diff --git a/packages/google-cloud-automl/.gitignore b/packages/google-cloud-automl/.gitignore index e79b5cf8830..5d32b23782f 100644 --- a/packages/google-cloud-automl/.gitignore +++ b/packages/google-cloud-automl/.gitignore @@ -1,9 +1,13 @@ **/*.log **/node_modules .coverage +coverage .nyc_output docs/ +out/ build/ +system-test/secrets.js +system-test/*key.json *.lock .DS_Store package-lock.json diff --git a/packages/google-cloud-automl/.jsdoc.js b/packages/google-cloud-automl/.jsdoc.js index e319b260669..aa9982847ae 100644 --- a/packages/google-cloud-automl/.jsdoc.js +++ b/packages/google-cloud-automl/.jsdoc.js @@ -12,6 +12,9 @@ // 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'; @@ -31,7 +34,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -42,7 +46,7 @@ module.exports = { systemName: '@google-cloud/automl', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: { diff --git a/packages/google-cloud-automl/linkinator.config.json b/packages/google-cloud-automl/linkinator.config.json index 4498bb29f0c..af4fa72352d 100644 --- a/packages/google-cloud-automl/linkinator.config.json +++ b/packages/google-cloud-automl/linkinator.config.json @@ -1,10 +1,9 @@ { "recurse": true, + "concurrency": 10, "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "setEndpoint.js", - "https://www.tensorflow.org/js", "img.shields.io" ] } diff --git a/packages/google-cloud-automl/package.json b/packages/google-cloud-automl/package.json index ac701e0f2a2..5738cdfb7b2 100644 --- a/packages/google-cloud-automl/package.json +++ b/packages/google-cloud-automl/package.json @@ -8,10 +8,10 @@ "node": ">=8.10.0" }, "repository": "googleapis/nodejs-automl", - "main": "src/index.js", + "main": "build/src/index.js", "files": [ - "protos", - "src" + "build/protos", + "build/src" ], "keywords": [ "google apis client", @@ -27,32 +27,45 @@ "Cloud AutoML API" ], "scripts": { - "test": "c8 mocha", - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", - "lint": "eslint '**/*.js'", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", + "lint": "gts fix && eslint samples/*.js", + "fix": "gts fix && eslint --fix samples/*.js", + "prelint": "cd samples; npm link ../; npm i", + "system-test": "mocha build/system-test", "docs": "jsdoc -c .jsdoc.js", - "system-test": "mocha system-test/*.js --timeout 600000", - "fix": "eslint '**/*.js' --fix", "docs-test": "linkinator docs", "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm i" + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "prepare": "npm run compile" }, "dependencies": { - "google-gax": "^1.7.5", - "protobufjs": "^6.8.0" + "google-gax": "^1.14.2" }, "devDependencies": { - "c8": "^7.0.0", - "codecov": "^3.0.2", - "eslint": "^6.0.0", - "eslint-config-prettier": "^6.0.0", + "@types/mocha": "^7.0.2", + "@types/node": "^13.7.7", + "gts": "^1.1.2", + "null-loader": "^3.0.0", + "pack-n-play": "^1.0.0-2", + "power-assert": "^1.6.1", + "ts-loader": "^6.2.1", + "typescript": "^3.7.0", + "webpack": "^4.42.0", + "webpack-cli": "^3.3.11", + "c8": "^7.1.0", + "codecov": "^3.6.5", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.10.0", "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^2.0.0", - "mocha": "^7.0.0", - "prettier": "^1.13.5" + "eslint-plugin-prettier": "^3.1.2", + "jsdoc": "^3.6.3", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.4", + "linkinator": "^2.0.3", + "mocha": "^7.1.0", + "prettier": "^1.19.1" } } diff --git a/packages/google-cloud-automl/protos/google/cloud/common_resources.proto b/packages/google-cloud-automl/protos/google/cloud/common_resources.proto new file mode 100644 index 00000000000..56c9f800d5e --- /dev/null +++ b/packages/google-cloud-automl/protos/google/cloud/common_resources.proto @@ -0,0 +1,52 @@ +// 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. + +// This file contains stub messages for common resources in GCP. +// It is not intended to be directly generated, and is instead used by +// other tooling to be able to match common resource patterns. +syntax = "proto3"; + +package google.cloud; + +import "google/api/resource.proto"; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Project" + pattern: "projects/{project}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Organization" + pattern: "organizations/{organization}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Folder" + pattern: "folders/{folder}" +}; + + +option (google.api.resource_definition) = { + type: "cloudbilling.googleapis.com/BillingAccount" + pattern: "billingAccounts/{billing_account}" +}; + +option (google.api.resource_definition) = { + type: "locations.googleapis.com/Location" + pattern: "projects/{project}/locations/{location}" +}; + diff --git a/packages/google-cloud-automl/protos/protos.d.ts b/packages/google-cloud-automl/protos/protos.d.ts index d6d5a77bb0c..9e429427179 100644 --- a/packages/google-cloud-automl/protos/protos.d.ts +++ b/packages/google-cloud-automl/protos/protos.d.ts @@ -26,5516 +26,5313 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata deleteDetails */ - deleteDetails?: (google.cloud.automl.v1.IDeleteOperationMetadata|null); - - /** OperationMetadata deployModelDetails */ - deployModelDetails?: (google.cloud.automl.v1.IDeployModelOperationMetadata|null); - - /** OperationMetadata undeployModelDetails */ - undeployModelDetails?: (google.cloud.automl.v1.IUndeployModelOperationMetadata|null); - - /** OperationMetadata createModelDetails */ - createModelDetails?: (google.cloud.automl.v1.ICreateModelOperationMetadata|null); - - /** OperationMetadata createDatasetDetails */ - createDatasetDetails?: (google.cloud.automl.v1.ICreateDatasetOperationMetadata|null); - - /** OperationMetadata importDataDetails */ - importDataDetails?: (google.cloud.automl.v1.IImportDataOperationMetadata|null); + /** Properties of an AnnotationPayload. */ + interface IAnnotationPayload { - /** OperationMetadata batchPredictDetails */ - batchPredictDetails?: (google.cloud.automl.v1.IBatchPredictOperationMetadata|null); + /** AnnotationPayload translation */ + translation?: (google.cloud.automl.v1.ITranslationAnnotation|null); - /** OperationMetadata exportDataDetails */ - exportDataDetails?: (google.cloud.automl.v1.IExportDataOperationMetadata|null); + /** AnnotationPayload classification */ + classification?: (google.cloud.automl.v1.IClassificationAnnotation|null); - /** OperationMetadata exportModelDetails */ - exportModelDetails?: (google.cloud.automl.v1.IExportModelOperationMetadata|null); + /** AnnotationPayload imageObjectDetection */ + imageObjectDetection?: (google.cloud.automl.v1.IImageObjectDetectionAnnotation|null); - /** OperationMetadata progressPercent */ - progressPercent?: (number|null); + /** AnnotationPayload textExtraction */ + textExtraction?: (google.cloud.automl.v1.ITextExtractionAnnotation|null); - /** OperationMetadata partialFailures */ - partialFailures?: (google.rpc.IStatus[]|null); + /** AnnotationPayload textSentiment */ + textSentiment?: (google.cloud.automl.v1.ITextSentimentAnnotation|null); - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** AnnotationPayload annotationSpecId */ + annotationSpecId?: (string|null); - /** OperationMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** AnnotationPayload displayName */ + displayName?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents an AnnotationPayload. */ + class AnnotationPayload implements IAnnotationPayload { /** - * Constructs a new OperationMetadata. + * Constructs a new AnnotationPayload. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IOperationMetadata); - - /** OperationMetadata deleteDetails. */ - public deleteDetails?: (google.cloud.automl.v1.IDeleteOperationMetadata|null); - - /** OperationMetadata deployModelDetails. */ - public deployModelDetails?: (google.cloud.automl.v1.IDeployModelOperationMetadata|null); - - /** OperationMetadata undeployModelDetails. */ - public undeployModelDetails?: (google.cloud.automl.v1.IUndeployModelOperationMetadata|null); - - /** OperationMetadata createModelDetails. */ - public createModelDetails?: (google.cloud.automl.v1.ICreateModelOperationMetadata|null); - - /** OperationMetadata createDatasetDetails. */ - public createDatasetDetails?: (google.cloud.automl.v1.ICreateDatasetOperationMetadata|null); - - /** OperationMetadata importDataDetails. */ - public importDataDetails?: (google.cloud.automl.v1.IImportDataOperationMetadata|null); + constructor(properties?: google.cloud.automl.v1.IAnnotationPayload); - /** OperationMetadata batchPredictDetails. */ - public batchPredictDetails?: (google.cloud.automl.v1.IBatchPredictOperationMetadata|null); + /** AnnotationPayload translation. */ + public translation?: (google.cloud.automl.v1.ITranslationAnnotation|null); - /** OperationMetadata exportDataDetails. */ - public exportDataDetails?: (google.cloud.automl.v1.IExportDataOperationMetadata|null); + /** AnnotationPayload classification. */ + public classification?: (google.cloud.automl.v1.IClassificationAnnotation|null); - /** OperationMetadata exportModelDetails. */ - public exportModelDetails?: (google.cloud.automl.v1.IExportModelOperationMetadata|null); + /** AnnotationPayload imageObjectDetection. */ + public imageObjectDetection?: (google.cloud.automl.v1.IImageObjectDetectionAnnotation|null); - /** OperationMetadata progressPercent. */ - public progressPercent: number; + /** AnnotationPayload textExtraction. */ + public textExtraction?: (google.cloud.automl.v1.ITextExtractionAnnotation|null); - /** OperationMetadata partialFailures. */ - public partialFailures: google.rpc.IStatus[]; + /** AnnotationPayload textSentiment. */ + public textSentiment?: (google.cloud.automl.v1.ITextSentimentAnnotation|null); - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** AnnotationPayload annotationSpecId. */ + public annotationSpecId: string; - /** OperationMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** AnnotationPayload displayName. */ + public displayName: string; - /** OperationMetadata details. */ - public details?: ("deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"createDatasetDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"); + /** AnnotationPayload detail. */ + public detail?: ("translation"|"classification"|"imageObjectDetection"|"textExtraction"|"textSentiment"); /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new AnnotationPayload instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns AnnotationPayload instance */ - public static create(properties?: google.cloud.automl.v1.IOperationMetadata): google.cloud.automl.v1.OperationMetadata; + public static create(properties?: google.cloud.automl.v1.IAnnotationPayload): google.cloud.automl.v1.AnnotationPayload; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. + * @param message AnnotationPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. + * @param message AnnotationPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes an AnnotationPayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns AnnotationPayload * @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.automl.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.AnnotationPayload; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns AnnotationPayload * @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.automl.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.AnnotationPayload; /** - * Verifies an OperationMetadata message. + * Verifies an AnnotationPayload 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationPayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns AnnotationPayload */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.AnnotationPayload; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. + * @param message AnnotationPayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.AnnotationPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this AnnotationPayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteOperationMetadata. */ - interface IDeleteOperationMetadata { + /** ClassificationType enum. */ + enum ClassificationType { + CLASSIFICATION_TYPE_UNSPECIFIED = 0, + MULTICLASS = 1, + MULTILABEL = 2 } - /** Represents a DeleteOperationMetadata. */ - class DeleteOperationMetadata implements IDeleteOperationMetadata { + /** Properties of a ClassificationAnnotation. */ + interface IClassificationAnnotation { + + /** ClassificationAnnotation score */ + score?: (number|null); + } + + /** Represents a ClassificationAnnotation. */ + class ClassificationAnnotation implements IClassificationAnnotation { /** - * Constructs a new DeleteOperationMetadata. + * Constructs a new ClassificationAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDeleteOperationMetadata); + constructor(properties?: google.cloud.automl.v1.IClassificationAnnotation); + + /** ClassificationAnnotation score. */ + public score: number; /** - * Creates a new DeleteOperationMetadata instance using the specified properties. + * Creates a new ClassificationAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteOperationMetadata instance + * @returns ClassificationAnnotation instance */ - public static create(properties?: google.cloud.automl.v1.IDeleteOperationMetadata): google.cloud.automl.v1.DeleteOperationMetadata; + public static create(properties?: google.cloud.automl.v1.IClassificationAnnotation): google.cloud.automl.v1.ClassificationAnnotation; /** - * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. - * @param message DeleteOperationMetadata message or plain object to encode + * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. + * @param message ClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. - * @param message DeleteOperationMetadata message or plain object to encode + * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. + * @param message ClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer. + * Decodes a ClassificationAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteOperationMetadata + * @returns ClassificationAnnotation * @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.automl.v1.DeleteOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ClassificationAnnotation; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteOperationMetadata + * @returns ClassificationAnnotation * @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.automl.v1.DeleteOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ClassificationAnnotation; /** - * Verifies a DeleteOperationMetadata message. + * Verifies a ClassificationAnnotation 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 DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteOperationMetadata + * @returns ClassificationAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeleteOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationAnnotation; /** - * Creates a plain object from a DeleteOperationMetadata message. Also converts values to other types if specified. - * @param message DeleteOperationMetadata + * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. + * @param message ClassificationAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.DeleteOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteOperationMetadata to JSON. + * Converts this ClassificationAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeployModelOperationMetadata. */ - interface IDeployModelOperationMetadata { + /** Properties of a ClassificationEvaluationMetrics. */ + interface IClassificationEvaluationMetrics { + + /** ClassificationEvaluationMetrics auPrc */ + auPrc?: (number|null); + + /** ClassificationEvaluationMetrics auRoc */ + auRoc?: (number|null); + + /** ClassificationEvaluationMetrics logLoss */ + logLoss?: (number|null); + + /** ClassificationEvaluationMetrics confidenceMetricsEntry */ + confidenceMetricsEntry?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]|null); + + /** ClassificationEvaluationMetrics confusionMatrix */ + confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + + /** ClassificationEvaluationMetrics annotationSpecId */ + annotationSpecId?: (string[]|null); } - /** Represents a DeployModelOperationMetadata. */ - class DeployModelOperationMetadata implements IDeployModelOperationMetadata { + /** Represents a ClassificationEvaluationMetrics. */ + class ClassificationEvaluationMetrics implements IClassificationEvaluationMetrics { /** - * Constructs a new DeployModelOperationMetadata. + * Constructs a new ClassificationEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDeployModelOperationMetadata); + constructor(properties?: google.cloud.automl.v1.IClassificationEvaluationMetrics); - /** - * Creates a new DeployModelOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns DeployModelOperationMetadata instance - */ - public static create(properties?: google.cloud.automl.v1.IDeployModelOperationMetadata): google.cloud.automl.v1.DeployModelOperationMetadata; - - /** - * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. - * @param message DeployModelOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. - * @param message DeployModelOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeployModelOperationMetadata - * @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.automl.v1.DeployModelOperationMetadata; - - /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeployModelOperationMetadata - * @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.automl.v1.DeployModelOperationMetadata; - - /** - * Verifies a DeployModelOperationMetadata 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 DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeployModelOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeployModelOperationMetadata; + /** ClassificationEvaluationMetrics auPrc. */ + public auPrc: number; - /** - * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. - * @param message DeployModelOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.DeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ClassificationEvaluationMetrics auRoc. */ + public auRoc: number; - /** - * Converts this DeployModelOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ClassificationEvaluationMetrics logLoss. */ + public logLoss: number; - /** Properties of an UndeployModelOperationMetadata. */ - interface IUndeployModelOperationMetadata { - } + /** ClassificationEvaluationMetrics confidenceMetricsEntry. */ + public confidenceMetricsEntry: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]; - /** Represents an UndeployModelOperationMetadata. */ - class UndeployModelOperationMetadata implements IUndeployModelOperationMetadata { + /** ClassificationEvaluationMetrics confusionMatrix. */ + public confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); - /** - * Constructs a new UndeployModelOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.IUndeployModelOperationMetadata); + /** ClassificationEvaluationMetrics annotationSpecId. */ + public annotationSpecId: string[]; /** - * Creates a new UndeployModelOperationMetadata instance using the specified properties. + * Creates a new ClassificationEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns UndeployModelOperationMetadata instance + * @returns ClassificationEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1.IUndeployModelOperationMetadata): google.cloud.automl.v1.UndeployModelOperationMetadata; + public static create(properties?: google.cloud.automl.v1.IClassificationEvaluationMetrics): google.cloud.automl.v1.ClassificationEvaluationMetrics; /** - * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. - * @param message UndeployModelOperationMetadata message or plain object to encode + * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. + * @param message ClassificationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. - * @param message UndeployModelOperationMetadata message or plain object to encode + * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. + * @param message ClassificationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UndeployModelOperationMetadata + * @returns ClassificationEvaluationMetrics * @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.automl.v1.UndeployModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ClassificationEvaluationMetrics; /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UndeployModelOperationMetadata + * @returns ClassificationEvaluationMetrics * @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.automl.v1.UndeployModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ClassificationEvaluationMetrics; /** - * Verifies an UndeployModelOperationMetadata message. + * Verifies a ClassificationEvaluationMetrics 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 UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UndeployModelOperationMetadata + * @returns ClassificationEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UndeployModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics; /** - * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. - * @param message UndeployModelOperationMetadata + * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. + * @param message ClassificationEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.UndeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UndeployModelOperationMetadata to JSON. + * Converts this ClassificationEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateDatasetOperationMetadata. */ - interface ICreateDatasetOperationMetadata { - } + namespace ClassificationEvaluationMetrics { - /** Represents a CreateDatasetOperationMetadata. */ - class CreateDatasetOperationMetadata implements ICreateDatasetOperationMetadata { + /** Properties of a ConfidenceMetricsEntry. */ + interface IConfidenceMetricsEntry { - /** - * Constructs a new CreateDatasetOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.ICreateDatasetOperationMetadata); + /** ConfidenceMetricsEntry confidenceThreshold */ + confidenceThreshold?: (number|null); - /** - * Creates a new CreateDatasetOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDatasetOperationMetadata instance - */ - public static create(properties?: google.cloud.automl.v1.ICreateDatasetOperationMetadata): google.cloud.automl.v1.CreateDatasetOperationMetadata; + /** ConfidenceMetricsEntry positionThreshold */ + positionThreshold?: (number|null); - /** - * Encodes the specified CreateDatasetOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. - * @param message CreateDatasetOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.ICreateDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceMetricsEntry recall */ + recall?: (number|null); - /** - * Encodes the specified CreateDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. - * @param message CreateDatasetOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.ICreateDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceMetricsEntry precision */ + precision?: (number|null); - /** - * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDatasetOperationMetadata - * @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.automl.v1.CreateDatasetOperationMetadata; + /** ConfidenceMetricsEntry falsePositiveRate */ + falsePositiveRate?: (number|null); - /** - * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDatasetOperationMetadata - * @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.automl.v1.CreateDatasetOperationMetadata; + /** ConfidenceMetricsEntry f1Score */ + f1Score?: (number|null); - /** - * Verifies a CreateDatasetOperationMetadata 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); + /** ConfidenceMetricsEntry recallAt1 */ + recallAt1?: (number|null); - /** - * Creates a CreateDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDatasetOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateDatasetOperationMetadata; + /** ConfidenceMetricsEntry precisionAt1 */ + precisionAt1?: (number|null); - /** - * Creates a plain object from a CreateDatasetOperationMetadata message. Also converts values to other types if specified. - * @param message CreateDatasetOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.CreateDatasetOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ConfidenceMetricsEntry falsePositiveRateAt1 */ + falsePositiveRateAt1?: (number|null); - /** - * Converts this CreateDatasetOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ConfidenceMetricsEntry f1ScoreAt1 */ + f1ScoreAt1?: (number|null); - /** Properties of a CreateModelOperationMetadata. */ - interface ICreateModelOperationMetadata { - } + /** ConfidenceMetricsEntry truePositiveCount */ + truePositiveCount?: (number|Long|string|null); - /** Represents a CreateModelOperationMetadata. */ - class CreateModelOperationMetadata implements ICreateModelOperationMetadata { + /** ConfidenceMetricsEntry falsePositiveCount */ + falsePositiveCount?: (number|Long|string|null); - /** - * Constructs a new CreateModelOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.ICreateModelOperationMetadata); + /** ConfidenceMetricsEntry falseNegativeCount */ + falseNegativeCount?: (number|Long|string|null); - /** - * Creates a new CreateModelOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateModelOperationMetadata instance - */ - public static create(properties?: google.cloud.automl.v1.ICreateModelOperationMetadata): google.cloud.automl.v1.CreateModelOperationMetadata; + /** ConfidenceMetricsEntry trueNegativeCount */ + trueNegativeCount?: (number|Long|string|null); + } - /** - * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. - * @param message CreateModelOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. - * @param message CreateModelOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateModelOperationMetadata - * @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.automl.v1.CreateModelOperationMetadata; - - /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateModelOperationMetadata - * @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.automl.v1.CreateModelOperationMetadata; - - /** - * Verifies a CreateModelOperationMetadata 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 CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateModelOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateModelOperationMetadata; - - /** - * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. - * @param message CreateModelOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.CreateModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateModelOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ImportDataOperationMetadata. */ - interface IImportDataOperationMetadata { - } + /** Represents a ConfidenceMetricsEntry. */ + class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { - /** Represents an ImportDataOperationMetadata. */ - class ImportDataOperationMetadata implements IImportDataOperationMetadata { + /** + * Constructs a new ConfidenceMetricsEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry); - /** - * Constructs a new ImportDataOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.IImportDataOperationMetadata); + /** ConfidenceMetricsEntry confidenceThreshold. */ + public confidenceThreshold: number; - /** - * Creates a new ImportDataOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportDataOperationMetadata instance - */ - public static create(properties?: google.cloud.automl.v1.IImportDataOperationMetadata): google.cloud.automl.v1.ImportDataOperationMetadata; + /** ConfidenceMetricsEntry positionThreshold. */ + public positionThreshold: number; - /** - * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. - * @param message ImportDataOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceMetricsEntry recall. */ + public recall: number; - /** - * Encodes the specified ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. - * @param message ImportDataOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceMetricsEntry precision. */ + public precision: number; - /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportDataOperationMetadata - * @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.automl.v1.ImportDataOperationMetadata; + /** ConfidenceMetricsEntry falsePositiveRate. */ + public falsePositiveRate: number; - /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportDataOperationMetadata - * @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.automl.v1.ImportDataOperationMetadata; + /** ConfidenceMetricsEntry f1Score. */ + public f1Score: number; - /** - * Verifies an ImportDataOperationMetadata 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); + /** ConfidenceMetricsEntry recallAt1. */ + public recallAt1: number; - /** - * Creates an ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportDataOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImportDataOperationMetadata; + /** ConfidenceMetricsEntry precisionAt1. */ + public precisionAt1: number; - /** - * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. - * @param message ImportDataOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.ImportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ConfidenceMetricsEntry falsePositiveRateAt1. */ + public falsePositiveRateAt1: number; - /** - * Converts this ImportDataOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ConfidenceMetricsEntry f1ScoreAt1. */ + public f1ScoreAt1: number; - /** Properties of an ExportDataOperationMetadata. */ - interface IExportDataOperationMetadata { + /** ConfidenceMetricsEntry truePositiveCount. */ + public truePositiveCount: (number|Long|string); - /** ExportDataOperationMetadata outputInfo */ - outputInfo?: (google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null); - } + /** ConfidenceMetricsEntry falsePositiveCount. */ + public falsePositiveCount: (number|Long|string); - /** Represents an ExportDataOperationMetadata. */ - class ExportDataOperationMetadata implements IExportDataOperationMetadata { + /** ConfidenceMetricsEntry falseNegativeCount. */ + public falseNegativeCount: (number|Long|string); - /** - * Constructs a new ExportDataOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.IExportDataOperationMetadata); + /** ConfidenceMetricsEntry trueNegativeCount. */ + public trueNegativeCount: (number|Long|string); - /** ExportDataOperationMetadata outputInfo. */ - public outputInfo?: (google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null); + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidenceMetricsEntry instance + */ + public static create(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - /** - * Creates a new ExportDataOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportDataOperationMetadata instance - */ - public static create(properties?: google.cloud.automl.v1.IExportDataOperationMetadata): google.cloud.automl.v1.ExportDataOperationMetadata; + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. - * @param message ExportDataOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. - * @param message ExportDataOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidenceMetricsEntry + * @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.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportDataOperationMetadata - * @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.automl.v1.ExportDataOperationMetadata; + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidenceMetricsEntry + * @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.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportDataOperationMetadata - * @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.automl.v1.ExportDataOperationMetadata; + /** + * Verifies a ConfidenceMetricsEntry 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); - /** - * Verifies an ExportDataOperationMetadata 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidenceMetricsEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - /** - * Creates an ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportDataOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportDataOperationMetadata; + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @param message ConfidenceMetricsEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an ExportDataOperationMetadata message. Also converts values to other types if specified. - * @param message ExportDataOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.ExportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this ExportDataOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a ConfusionMatrix. */ + interface IConfusionMatrix { - namespace ExportDataOperationMetadata { + /** ConfusionMatrix annotationSpecId */ + annotationSpecId?: (string[]|null); - /** Properties of an ExportDataOutputInfo. */ - interface IExportDataOutputInfo { + /** ConfusionMatrix displayName */ + displayName?: (string[]|null); - /** ExportDataOutputInfo gcsOutputDirectory */ - gcsOutputDirectory?: (string|null); + /** ConfusionMatrix row */ + row?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]|null); } - /** Represents an ExportDataOutputInfo. */ - class ExportDataOutputInfo implements IExportDataOutputInfo { + /** Represents a ConfusionMatrix. */ + class ConfusionMatrix implements IConfusionMatrix { /** - * Constructs a new ExportDataOutputInfo. + * Constructs a new ConfusionMatrix. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo); + constructor(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix); - /** ExportDataOutputInfo gcsOutputDirectory. */ - public gcsOutputDirectory: string; + /** ConfusionMatrix annotationSpecId. */ + public annotationSpecId: string[]; - /** ExportDataOutputInfo outputLocation. */ - public outputLocation?: "gcsOutputDirectory"; + /** ConfusionMatrix displayName. */ + public displayName: string[]; + + /** ConfusionMatrix row. */ + public row: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]; /** - * Creates a new ExportDataOutputInfo instance using the specified properties. + * Creates a new ConfusionMatrix instance using the specified properties. * @param [properties] Properties to set - * @returns ExportDataOutputInfo instance + * @returns ConfusionMatrix instance */ - public static create(properties?: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo): google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + public static create(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; /** - * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. - * @param message ExportDataOutputInfo message or plain object to encode + * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. + * @param message ConfusionMatrix message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. - * @param message ExportDataOutputInfo message or plain object to encode + * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. + * @param message ConfusionMatrix message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer. + * Decodes a ConfusionMatrix message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportDataOutputInfo + * @returns ConfusionMatrix * @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.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. + * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportDataOutputInfo + * @returns ConfusionMatrix * @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.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; /** - * Verifies an ExportDataOutputInfo message. + * Verifies a ConfusionMatrix 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 ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ConfusionMatrix message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportDataOutputInfo + * @returns ConfusionMatrix */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; /** - * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. - * @param message ExportDataOutputInfo + * Creates a plain object from a ConfusionMatrix message. Also converts values to other types if specified. + * @param message ConfusionMatrix * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportDataOutputInfo to JSON. + * Converts this ConfusionMatrix to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + namespace ConfusionMatrix { + + /** Properties of a Row. */ + interface IRow { + + /** Row exampleCount */ + exampleCount?: (number[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow); + + /** Row exampleCount. */ + public exampleCount: number[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + + /** + * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } - /** Properties of a BatchPredictOperationMetadata. */ - interface IBatchPredictOperationMetadata { + /** Properties of an ImageObjectDetectionAnnotation. */ + interface IImageObjectDetectionAnnotation { - /** BatchPredictOperationMetadata inputConfig */ - inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); + /** ImageObjectDetectionAnnotation boundingBox */ + boundingBox?: (google.cloud.automl.v1.IBoundingPoly|null); - /** BatchPredictOperationMetadata outputInfo */ - outputInfo?: (google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); + /** ImageObjectDetectionAnnotation score */ + score?: (number|null); } - /** Represents a BatchPredictOperationMetadata. */ - class BatchPredictOperationMetadata implements IBatchPredictOperationMetadata { + /** Represents an ImageObjectDetectionAnnotation. */ + class ImageObjectDetectionAnnotation implements IImageObjectDetectionAnnotation { /** - * Constructs a new BatchPredictOperationMetadata. + * Constructs a new ImageObjectDetectionAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IBatchPredictOperationMetadata); + constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionAnnotation); - /** BatchPredictOperationMetadata inputConfig. */ - public inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); + /** ImageObjectDetectionAnnotation boundingBox. */ + public boundingBox?: (google.cloud.automl.v1.IBoundingPoly|null); - /** BatchPredictOperationMetadata outputInfo. */ - public outputInfo?: (google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); + /** ImageObjectDetectionAnnotation score. */ + public score: number; /** - * Creates a new BatchPredictOperationMetadata instance using the specified properties. + * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictOperationMetadata instance + * @returns ImageObjectDetectionAnnotation instance */ - public static create(properties?: google.cloud.automl.v1.IBatchPredictOperationMetadata): google.cloud.automl.v1.BatchPredictOperationMetadata; + public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionAnnotation): google.cloud.automl.v1.ImageObjectDetectionAnnotation; /** - * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. - * @param message BatchPredictOperationMetadata message or plain object to encode + * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. + * @param message ImageObjectDetectionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. - * @param message BatchPredictOperationMetadata message or plain object to encode + * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. + * @param message ImageObjectDetectionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictOperationMetadata + * @returns ImageObjectDetectionAnnotation * @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.automl.v1.BatchPredictOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageObjectDetectionAnnotation; /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictOperationMetadata + * @returns ImageObjectDetectionAnnotation * @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.automl.v1.BatchPredictOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageObjectDetectionAnnotation; /** - * Verifies a BatchPredictOperationMetadata message. + * Verifies an ImageObjectDetectionAnnotation 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 BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictOperationMetadata + * @returns ImageObjectDetectionAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionAnnotation; /** - * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. - * @param message BatchPredictOperationMetadata + * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. + * @param message ImageObjectDetectionAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.BatchPredictOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictOperationMetadata to JSON. + * Converts this ImageObjectDetectionAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BatchPredictOperationMetadata { - - /** Properties of a BatchPredictOutputInfo. */ - interface IBatchPredictOutputInfo { - - /** BatchPredictOutputInfo gcsOutputDirectory */ - gcsOutputDirectory?: (string|null); - } - - /** Represents a BatchPredictOutputInfo. */ - class BatchPredictOutputInfo implements IBatchPredictOutputInfo { - - /** - * Constructs a new BatchPredictOutputInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo); - - /** BatchPredictOutputInfo gcsOutputDirectory. */ - public gcsOutputDirectory: string; - - /** BatchPredictOutputInfo outputLocation. */ - public outputLocation?: "gcsOutputDirectory"; - - /** - * Creates a new BatchPredictOutputInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchPredictOutputInfo instance - */ - public static create(properties?: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo): google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - - /** - * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @param message BatchPredictOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @param message BatchPredictOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchPredictOutputInfo - * @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.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - - /** - * Decodes a BatchPredictOutputInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchPredictOutputInfo - * @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.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - - /** - * Verifies a BatchPredictOutputInfo 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 BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchPredictOutputInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - - /** - * Creates a plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. - * @param message BatchPredictOutputInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a BoundingBoxMetricsEntry. */ + interface IBoundingBoxMetricsEntry { - /** - * Converts this BatchPredictOutputInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** BoundingBoxMetricsEntry iouThreshold */ + iouThreshold?: (number|null); - /** Properties of an ExportModelOperationMetadata. */ - interface IExportModelOperationMetadata { + /** BoundingBoxMetricsEntry meanAveragePrecision */ + meanAveragePrecision?: (number|null); - /** ExportModelOperationMetadata outputInfo */ - outputInfo?: (google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null); + /** BoundingBoxMetricsEntry confidenceMetricsEntries */ + confidenceMetricsEntries?: (google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]|null); } - /** Represents an ExportModelOperationMetadata. */ - class ExportModelOperationMetadata implements IExportModelOperationMetadata { + /** Represents a BoundingBoxMetricsEntry. */ + class BoundingBoxMetricsEntry implements IBoundingBoxMetricsEntry { /** - * Constructs a new ExportModelOperationMetadata. + * Constructs a new BoundingBoxMetricsEntry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IExportModelOperationMetadata); + constructor(properties?: google.cloud.automl.v1.IBoundingBoxMetricsEntry); - /** ExportModelOperationMetadata outputInfo. */ - public outputInfo?: (google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null); + /** BoundingBoxMetricsEntry iouThreshold. */ + public iouThreshold: number; + + /** BoundingBoxMetricsEntry meanAveragePrecision. */ + public meanAveragePrecision: number; + + /** BoundingBoxMetricsEntry confidenceMetricsEntries. */ + public confidenceMetricsEntries: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]; /** - * Creates a new ExportModelOperationMetadata instance using the specified properties. + * Creates a new BoundingBoxMetricsEntry instance using the specified properties. * @param [properties] Properties to set - * @returns ExportModelOperationMetadata instance + * @returns BoundingBoxMetricsEntry instance */ - public static create(properties?: google.cloud.automl.v1.IExportModelOperationMetadata): google.cloud.automl.v1.ExportModelOperationMetadata; + public static create(properties?: google.cloud.automl.v1.IBoundingBoxMetricsEntry): google.cloud.automl.v1.BoundingBoxMetricsEntry; /** - * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. - * @param message ExportModelOperationMetadata message or plain object to encode + * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. + * @param message BoundingBoxMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. - * @param message ExportModelOperationMetadata message or plain object to encode + * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. + * @param message BoundingBoxMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportModelOperationMetadata + * @returns BoundingBoxMetricsEntry * @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.automl.v1.ExportModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BoundingBoxMetricsEntry; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportModelOperationMetadata + * @returns BoundingBoxMetricsEntry * @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.automl.v1.ExportModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BoundingBoxMetricsEntry; /** - * Verifies an ExportModelOperationMetadata message. + * Verifies a BoundingBoxMetricsEntry 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 ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportModelOperationMetadata + * @returns BoundingBoxMetricsEntry */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BoundingBoxMetricsEntry; /** - * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. - * @param message ExportModelOperationMetadata + * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. + * @param message BoundingBoxMetricsEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ExportModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.BoundingBoxMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportModelOperationMetadata to JSON. + * Converts this BoundingBoxMetricsEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ExportModelOperationMetadata { + namespace BoundingBoxMetricsEntry { + + /** Properties of a ConfidenceMetricsEntry. */ + interface IConfidenceMetricsEntry { + + /** ConfidenceMetricsEntry confidenceThreshold */ + confidenceThreshold?: (number|null); + + /** ConfidenceMetricsEntry recall */ + recall?: (number|null); - /** Properties of an ExportModelOutputInfo. */ - interface IExportModelOutputInfo { + /** ConfidenceMetricsEntry precision */ + precision?: (number|null); - /** ExportModelOutputInfo gcsOutputDirectory */ - gcsOutputDirectory?: (string|null); + /** ConfidenceMetricsEntry f1Score */ + f1Score?: (number|null); } - /** Represents an ExportModelOutputInfo. */ - class ExportModelOutputInfo implements IExportModelOutputInfo { + /** Represents a ConfidenceMetricsEntry. */ + class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { /** - * Constructs a new ExportModelOutputInfo. + * Constructs a new ConfidenceMetricsEntry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo); + constructor(properties?: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry); - /** ExportModelOutputInfo gcsOutputDirectory. */ - public gcsOutputDirectory: string; + /** ConfidenceMetricsEntry confidenceThreshold. */ + public confidenceThreshold: number; + + /** ConfidenceMetricsEntry recall. */ + public recall: number; + + /** ConfidenceMetricsEntry precision. */ + public precision: number; + + /** ConfidenceMetricsEntry f1Score. */ + public f1Score: number; /** - * Creates a new ExportModelOutputInfo instance using the specified properties. + * Creates a new ConfidenceMetricsEntry instance using the specified properties. * @param [properties] Properties to set - * @returns ExportModelOutputInfo instance + * @returns ConfidenceMetricsEntry instance */ - public static create(properties?: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo): google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; + public static create(properties?: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry): google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; /** - * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. - * @param message ExportModelOutputInfo message or plain object to encode + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. - * @param message ExportModelOutputInfo message or plain object to encode + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportModelOutputInfo + * @returns ConfidenceMetricsEntry * @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.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportModelOutputInfo + * @returns ConfidenceMetricsEntry * @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.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; /** - * Verifies an ExportModelOutputInfo message. + * Verifies a ConfidenceMetricsEntry 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 ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportModelOutputInfo + * @returns ConfidenceMetricsEntry */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; /** - * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. - * @param message ExportModelOutputInfo + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @param message ConfidenceMetricsEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportModelOutputInfo to JSON. + * Converts this ConfidenceMetricsEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** Properties of a Dataset. */ - interface IDataset { - - /** Dataset translationDatasetMetadata */ - translationDatasetMetadata?: (google.cloud.automl.v1.ITranslationDatasetMetadata|null); - - /** Dataset imageClassificationDatasetMetadata */ - imageClassificationDatasetMetadata?: (google.cloud.automl.v1.IImageClassificationDatasetMetadata|null); - - /** Dataset textClassificationDatasetMetadata */ - textClassificationDatasetMetadata?: (google.cloud.automl.v1.ITextClassificationDatasetMetadata|null); - - /** Dataset imageObjectDetectionDatasetMetadata */ - imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null); - - /** Dataset textExtractionDatasetMetadata */ - textExtractionDatasetMetadata?: (google.cloud.automl.v1.ITextExtractionDatasetMetadata|null); - - /** Dataset textSentimentDatasetMetadata */ - textSentimentDatasetMetadata?: (google.cloud.automl.v1.ITextSentimentDatasetMetadata|null); - - /** Dataset name */ - name?: (string|null); - - /** Dataset displayName */ - displayName?: (string|null); - - /** Dataset description */ - description?: (string|null); - - /** Dataset exampleCount */ - exampleCount?: (number|null); + /** Properties of an ImageObjectDetectionEvaluationMetrics. */ + interface IImageObjectDetectionEvaluationMetrics { - /** Dataset createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount */ + evaluatedBoundingBoxCount?: (number|null); - /** Dataset etag */ - etag?: (string|null); + /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries */ + boundingBoxMetricsEntries?: (google.cloud.automl.v1.IBoundingBoxMetricsEntry[]|null); - /** Dataset labels */ - labels?: ({ [k: string]: string }|null); + /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision */ + boundingBoxMeanAveragePrecision?: (number|null); } - /** Represents a Dataset. */ - class Dataset implements IDataset { + /** Represents an ImageObjectDetectionEvaluationMetrics. */ + class ImageObjectDetectionEvaluationMetrics implements IImageObjectDetectionEvaluationMetrics { /** - * Constructs a new Dataset. + * Constructs a new ImageObjectDetectionEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDataset); - - /** Dataset translationDatasetMetadata. */ - public translationDatasetMetadata?: (google.cloud.automl.v1.ITranslationDatasetMetadata|null); - - /** Dataset imageClassificationDatasetMetadata. */ - public imageClassificationDatasetMetadata?: (google.cloud.automl.v1.IImageClassificationDatasetMetadata|null); - - /** Dataset textClassificationDatasetMetadata. */ - public textClassificationDatasetMetadata?: (google.cloud.automl.v1.ITextClassificationDatasetMetadata|null); - - /** Dataset imageObjectDetectionDatasetMetadata. */ - public imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null); - - /** Dataset textExtractionDatasetMetadata. */ - public textExtractionDatasetMetadata?: (google.cloud.automl.v1.ITextExtractionDatasetMetadata|null); - - /** Dataset textSentimentDatasetMetadata. */ - public textSentimentDatasetMetadata?: (google.cloud.automl.v1.ITextSentimentDatasetMetadata|null); - - /** Dataset name. */ - public name: string; - - /** Dataset displayName. */ - public displayName: string; - - /** Dataset description. */ - public description: string; - - /** Dataset exampleCount. */ - public exampleCount: number; - - /** Dataset createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics); - /** Dataset etag. */ - public etag: string; + /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. */ + public evaluatedBoundingBoxCount: number; - /** Dataset labels. */ - public labels: { [k: string]: string }; + /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. */ + public boundingBoxMetricsEntries: google.cloud.automl.v1.IBoundingBoxMetricsEntry[]; - /** Dataset datasetMetadata. */ - public datasetMetadata?: ("translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"); + /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. */ + public boundingBoxMeanAveragePrecision: number; /** - * Creates a new Dataset instance using the specified properties. + * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns Dataset instance + * @returns ImageObjectDetectionEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1.IDataset): google.cloud.automl.v1.Dataset; + public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics): google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics; /** - * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. - * @param message Dataset message or plain object to encode + * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. - * @param message Dataset message or plain object to encode + * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Dataset message from the specified reader or buffer. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Dataset + * @returns ImageObjectDetectionEvaluationMetrics * @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.automl.v1.Dataset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics; /** - * Decodes a Dataset message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Dataset + * @returns ImageObjectDetectionEvaluationMetrics * @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.automl.v1.Dataset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics; /** - * Verifies a Dataset message. + * Verifies an ImageObjectDetectionEvaluationMetrics 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 Dataset message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Dataset + * @returns ImageObjectDetectionEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Dataset; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics; /** - * Creates a plain object from a Dataset message. Also converts values to other types if specified. - * @param message Dataset + * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. + * @param message ImageObjectDetectionEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.Dataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Dataset to JSON. + * Converts this ImageObjectDetectionEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageClassificationDatasetMetadata. */ - interface IImageClassificationDatasetMetadata { + /** Properties of a NormalizedVertex. */ + interface INormalizedVertex { - /** ImageClassificationDatasetMetadata classificationType */ - classificationType?: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType|null); + /** NormalizedVertex x */ + x?: (number|null); + + /** NormalizedVertex y */ + y?: (number|null); } - /** Represents an ImageClassificationDatasetMetadata. */ - class ImageClassificationDatasetMetadata implements IImageClassificationDatasetMetadata { + /** Represents a NormalizedVertex. */ + class NormalizedVertex implements INormalizedVertex { /** - * Constructs a new ImageClassificationDatasetMetadata. + * Constructs a new NormalizedVertex. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImageClassificationDatasetMetadata); + constructor(properties?: google.cloud.automl.v1.INormalizedVertex); - /** ImageClassificationDatasetMetadata classificationType. */ - public classificationType: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType); + /** NormalizedVertex x. */ + public x: number; + + /** NormalizedVertex y. */ + public y: number; /** - * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. + * Creates a new NormalizedVertex instance using the specified properties. * @param [properties] Properties to set - * @returns ImageClassificationDatasetMetadata instance + * @returns NormalizedVertex instance */ - public static create(properties?: google.cloud.automl.v1.IImageClassificationDatasetMetadata): google.cloud.automl.v1.ImageClassificationDatasetMetadata; + public static create(properties?: google.cloud.automl.v1.INormalizedVertex): google.cloud.automl.v1.NormalizedVertex; /** - * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. - * @param message ImageClassificationDatasetMetadata message or plain object to encode + * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. + * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. - * @param message ImageClassificationDatasetMetadata message or plain object to encode + * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. + * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes a NormalizedVertex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageClassificationDatasetMetadata + * @returns NormalizedVertex * @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.automl.v1.ImageClassificationDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.NormalizedVertex; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageClassificationDatasetMetadata + * @returns NormalizedVertex * @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.automl.v1.ImageClassificationDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.NormalizedVertex; /** - * Verifies an ImageClassificationDatasetMetadata message. + * Verifies a NormalizedVertex 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 ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageClassificationDatasetMetadata + * @returns NormalizedVertex */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageClassificationDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.NormalizedVertex; /** - * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. - * @param message ImageClassificationDatasetMetadata + * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. + * @param message NormalizedVertex * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImageClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageClassificationDatasetMetadata to JSON. + * Converts this NormalizedVertex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionDatasetMetadata. */ - interface IImageObjectDetectionDatasetMetadata { + /** Properties of a BoundingPoly. */ + interface IBoundingPoly { + + /** BoundingPoly normalizedVertices */ + normalizedVertices?: (google.cloud.automl.v1.INormalizedVertex[]|null); } - /** Represents an ImageObjectDetectionDatasetMetadata. */ - class ImageObjectDetectionDatasetMetadata implements IImageObjectDetectionDatasetMetadata { + /** Represents a BoundingPoly. */ + class BoundingPoly implements IBoundingPoly { /** - * Constructs a new ImageObjectDetectionDatasetMetadata. + * Constructs a new BoundingPoly. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata); + constructor(properties?: google.cloud.automl.v1.IBoundingPoly); + + /** BoundingPoly normalizedVertices. */ + public normalizedVertices: google.cloud.automl.v1.INormalizedVertex[]; /** - * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. + * Creates a new BoundingPoly instance using the specified properties. * @param [properties] Properties to set - * @returns ImageObjectDetectionDatasetMetadata instance + * @returns BoundingPoly instance */ - public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata): google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata; + public static create(properties?: google.cloud.automl.v1.IBoundingPoly): google.cloud.automl.v1.BoundingPoly; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. - * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode + * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. + * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. - * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode + * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. + * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. + * Decodes a BoundingPoly message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionDatasetMetadata + * @returns BoundingPoly * @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.automl.v1.ImageObjectDetectionDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BoundingPoly; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionDatasetMetadata + * @returns BoundingPoly * @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.automl.v1.ImageObjectDetectionDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BoundingPoly; /** - * Verifies an ImageObjectDetectionDatasetMetadata message. + * Verifies a BoundingPoly 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 ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageObjectDetectionDatasetMetadata + * @returns BoundingPoly */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BoundingPoly; /** - * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. - * @param message ImageObjectDetectionDatasetMetadata + * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. + * @param message BoundingPoly * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageObjectDetectionDatasetMetadata to JSON. + * Converts this BoundingPoly to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageClassificationModelMetadata. */ - interface IImageClassificationModelMetadata { - - /** ImageClassificationModelMetadata baseModelId */ - baseModelId?: (string|null); - - /** ImageClassificationModelMetadata trainBudgetMilliNodeHours */ - trainBudgetMilliNodeHours?: (number|Long|string|null); - - /** ImageClassificationModelMetadata trainCostMilliNodeHours */ - trainCostMilliNodeHours?: (number|Long|string|null); - - /** ImageClassificationModelMetadata stopReason */ - stopReason?: (string|null); - - /** ImageClassificationModelMetadata modelType */ - modelType?: (string|null); + /** Properties of a TextExtractionAnnotation. */ + interface ITextExtractionAnnotation { - /** ImageClassificationModelMetadata nodeQps */ - nodeQps?: (number|null); + /** TextExtractionAnnotation textSegment */ + textSegment?: (google.cloud.automl.v1.ITextSegment|null); - /** ImageClassificationModelMetadata nodeCount */ - nodeCount?: (number|Long|string|null); + /** TextExtractionAnnotation score */ + score?: (number|null); } - /** Represents an ImageClassificationModelMetadata. */ - class ImageClassificationModelMetadata implements IImageClassificationModelMetadata { + /** Represents a TextExtractionAnnotation. */ + class TextExtractionAnnotation implements ITextExtractionAnnotation { /** - * Constructs a new ImageClassificationModelMetadata. + * Constructs a new TextExtractionAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImageClassificationModelMetadata); - - /** ImageClassificationModelMetadata baseModelId. */ - public baseModelId: string; - - /** ImageClassificationModelMetadata trainBudgetMilliNodeHours. */ - public trainBudgetMilliNodeHours: (number|Long|string); - - /** ImageClassificationModelMetadata trainCostMilliNodeHours. */ - public trainCostMilliNodeHours: (number|Long|string); - - /** ImageClassificationModelMetadata stopReason. */ - public stopReason: string; + constructor(properties?: google.cloud.automl.v1.ITextExtractionAnnotation); - /** ImageClassificationModelMetadata modelType. */ - public modelType: string; + /** TextExtractionAnnotation textSegment. */ + public textSegment?: (google.cloud.automl.v1.ITextSegment|null); - /** ImageClassificationModelMetadata nodeQps. */ - public nodeQps: number; + /** TextExtractionAnnotation score. */ + public score: number; - /** ImageClassificationModelMetadata nodeCount. */ - public nodeCount: (number|Long|string); + /** TextExtractionAnnotation annotation. */ + public annotation?: "textSegment"; /** - * Creates a new ImageClassificationModelMetadata instance using the specified properties. + * Creates a new TextExtractionAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ImageClassificationModelMetadata instance + * @returns TextExtractionAnnotation instance */ - public static create(properties?: google.cloud.automl.v1.IImageClassificationModelMetadata): google.cloud.automl.v1.ImageClassificationModelMetadata; + public static create(properties?: google.cloud.automl.v1.ITextExtractionAnnotation): google.cloud.automl.v1.TextExtractionAnnotation; /** - * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. - * @param message ImageClassificationModelMetadata message or plain object to encode + * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. + * @param message TextExtractionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. - * @param message ImageClassificationModelMetadata message or plain object to encode + * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. + * @param message TextExtractionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageClassificationModelMetadata + * @returns TextExtractionAnnotation * @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.automl.v1.ImageClassificationModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextExtractionAnnotation; /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageClassificationModelMetadata + * @returns TextExtractionAnnotation * @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.automl.v1.ImageClassificationModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextExtractionAnnotation; /** - * Verifies an ImageClassificationModelMetadata message. + * Verifies a TextExtractionAnnotation 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 ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageClassificationModelMetadata + * @returns TextExtractionAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageClassificationModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionAnnotation; /** - * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. - * @param message ImageClassificationModelMetadata + * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. + * @param message TextExtractionAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImageClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextExtractionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageClassificationModelMetadata to JSON. + * Converts this TextExtractionAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionModelMetadata. */ - interface IImageObjectDetectionModelMetadata { - - /** ImageObjectDetectionModelMetadata modelType */ - modelType?: (string|null); - - /** ImageObjectDetectionModelMetadata nodeCount */ - nodeCount?: (number|Long|string|null); - - /** ImageObjectDetectionModelMetadata nodeQps */ - nodeQps?: (number|null); - - /** ImageObjectDetectionModelMetadata stopReason */ - stopReason?: (string|null); + /** Properties of a TextExtractionEvaluationMetrics. */ + interface ITextExtractionEvaluationMetrics { - /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours */ - trainBudgetMilliNodeHours?: (number|Long|string|null); + /** TextExtractionEvaluationMetrics auPrc */ + auPrc?: (number|null); - /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours */ - trainCostMilliNodeHours?: (number|Long|string|null); + /** TextExtractionEvaluationMetrics confidenceMetricsEntries */ + confidenceMetricsEntries?: (google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]|null); } - /** Represents an ImageObjectDetectionModelMetadata. */ - class ImageObjectDetectionModelMetadata implements IImageObjectDetectionModelMetadata { + /** Represents a TextExtractionEvaluationMetrics. */ + class TextExtractionEvaluationMetrics implements ITextExtractionEvaluationMetrics { /** - * Constructs a new ImageObjectDetectionModelMetadata. + * Constructs a new TextExtractionEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionModelMetadata); - - /** ImageObjectDetectionModelMetadata modelType. */ - public modelType: string; - - /** ImageObjectDetectionModelMetadata nodeCount. */ - public nodeCount: (number|Long|string); - - /** ImageObjectDetectionModelMetadata nodeQps. */ - public nodeQps: number; - - /** ImageObjectDetectionModelMetadata stopReason. */ - public stopReason: string; - - /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. */ - public trainBudgetMilliNodeHours: (number|Long|string); + constructor(properties?: google.cloud.automl.v1.ITextExtractionEvaluationMetrics); - /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours. */ - public trainCostMilliNodeHours: (number|Long|string); + /** TextExtractionEvaluationMetrics auPrc. */ + public auPrc: number; + + /** TextExtractionEvaluationMetrics confidenceMetricsEntries. */ + public confidenceMetricsEntries: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]; /** - * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. + * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns ImageObjectDetectionModelMetadata instance + * @returns TextExtractionEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionModelMetadata): google.cloud.automl.v1.ImageObjectDetectionModelMetadata; + public static create(properties?: google.cloud.automl.v1.ITextExtractionEvaluationMetrics): google.cloud.automl.v1.TextExtractionEvaluationMetrics; /** - * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelMetadata message or plain object to encode + * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. + * @param message TextExtractionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelMetadata message or plain object to encode + * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. + * @param message TextExtractionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionModelMetadata + * @returns TextExtractionEvaluationMetrics * @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.automl.v1.ImageObjectDetectionModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextExtractionEvaluationMetrics; /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionModelMetadata + * @returns TextExtractionEvaluationMetrics * @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.automl.v1.ImageObjectDetectionModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextExtractionEvaluationMetrics; /** - * Verifies an ImageObjectDetectionModelMetadata message. + * Verifies a TextExtractionEvaluationMetrics 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 ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageObjectDetectionModelMetadata + * @returns TextExtractionEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionEvaluationMetrics; /** - * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. - * @param message ImageObjectDetectionModelMetadata + * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. + * @param message TextExtractionEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageObjectDetectionModelMetadata to JSON. + * Converts this TextExtractionEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageClassificationModelDeploymentMetadata. */ - interface IImageClassificationModelDeploymentMetadata { + namespace TextExtractionEvaluationMetrics { - /** ImageClassificationModelDeploymentMetadata nodeCount */ - nodeCount?: (number|Long|string|null); + /** Properties of a ConfidenceMetricsEntry. */ + interface IConfidenceMetricsEntry { + + /** ConfidenceMetricsEntry confidenceThreshold */ + confidenceThreshold?: (number|null); + + /** ConfidenceMetricsEntry recall */ + recall?: (number|null); + + /** ConfidenceMetricsEntry precision */ + precision?: (number|null); + + /** ConfidenceMetricsEntry f1Score */ + f1Score?: (number|null); + } + + /** Represents a ConfidenceMetricsEntry. */ + class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { + + /** + * Constructs a new ConfidenceMetricsEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry); + + /** ConfidenceMetricsEntry confidenceThreshold. */ + public confidenceThreshold: number; + + /** ConfidenceMetricsEntry recall. */ + public recall: number; + + /** ConfidenceMetricsEntry precision. */ + public precision: number; + + /** ConfidenceMetricsEntry f1Score. */ + public f1Score: number; + + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidenceMetricsEntry instance + */ + public static create(properties?: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidenceMetricsEntry + * @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.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidenceMetricsEntry + * @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.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidenceMetricsEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @param message ConfidenceMetricsEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents an ImageClassificationModelDeploymentMetadata. */ - class ImageClassificationModelDeploymentMetadata implements IImageClassificationModelDeploymentMetadata { + /** Properties of a TextSegment. */ + interface ITextSegment { + + /** TextSegment content */ + content?: (string|null); + + /** TextSegment startOffset */ + startOffset?: (number|Long|string|null); + + /** TextSegment endOffset */ + endOffset?: (number|Long|string|null); + } + + /** Represents a TextSegment. */ + class TextSegment implements ITextSegment { /** - * Constructs a new ImageClassificationModelDeploymentMetadata. + * Constructs a new TextSegment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata); + constructor(properties?: google.cloud.automl.v1.ITextSegment); - /** ImageClassificationModelDeploymentMetadata nodeCount. */ - public nodeCount: (number|Long|string); + /** TextSegment content. */ + public content: string; + + /** TextSegment startOffset. */ + public startOffset: (number|Long|string); + + /** TextSegment endOffset. */ + public endOffset: (number|Long|string); /** - * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. + * Creates a new TextSegment instance using the specified properties. * @param [properties] Properties to set - * @returns ImageClassificationModelDeploymentMetadata instance + * @returns TextSegment instance */ - public static create(properties?: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata): google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata; + public static create(properties?: google.cloud.automl.v1.ITextSegment): google.cloud.automl.v1.TextSegment; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. - * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode + * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. + * @param message TextSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. - * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode + * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. + * @param message TextSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. + * Decodes a TextSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageClassificationModelDeploymentMetadata + * @returns TextSegment * @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.automl.v1.ImageClassificationModelDeploymentMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextSegment; /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageClassificationModelDeploymentMetadata + * @returns TextSegment * @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.automl.v1.ImageClassificationModelDeploymentMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextSegment; /** - * Verifies an ImageClassificationModelDeploymentMetadata message. + * Verifies a TextSegment 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 ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageClassificationModelDeploymentMetadata + * @returns TextSegment */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSegment; /** - * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. - * @param message ImageClassificationModelDeploymentMetadata + * Creates a plain object from a TextSegment message. Also converts values to other types if specified. + * @param message TextSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageClassificationModelDeploymentMetadata to JSON. + * Converts this TextSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionModelDeploymentMetadata. */ - interface IImageObjectDetectionModelDeploymentMetadata { + /** Properties of a TextSentimentAnnotation. */ + interface ITextSentimentAnnotation { - /** ImageObjectDetectionModelDeploymentMetadata nodeCount */ - nodeCount?: (number|Long|string|null); + /** TextSentimentAnnotation sentiment */ + sentiment?: (number|null); } - /** Represents an ImageObjectDetectionModelDeploymentMetadata. */ - class ImageObjectDetectionModelDeploymentMetadata implements IImageObjectDetectionModelDeploymentMetadata { + /** Represents a TextSentimentAnnotation. */ + class TextSentimentAnnotation implements ITextSentimentAnnotation { /** - * Constructs a new ImageObjectDetectionModelDeploymentMetadata. + * Constructs a new TextSentimentAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata); + constructor(properties?: google.cloud.automl.v1.ITextSentimentAnnotation); - /** ImageObjectDetectionModelDeploymentMetadata nodeCount. */ - public nodeCount: (number|Long|string); + /** TextSentimentAnnotation sentiment. */ + public sentiment: number; /** - * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. + * Creates a new TextSentimentAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ImageObjectDetectionModelDeploymentMetadata instance + * @returns TextSentimentAnnotation instance */ - public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata): google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata; + public static create(properties?: google.cloud.automl.v1.ITextSentimentAnnotation): google.cloud.automl.v1.TextSentimentAnnotation; /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode + * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. + * @param message TextSentimentAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode + * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. + * @param message TextSentimentAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. + * Decodes a TextSentimentAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionModelDeploymentMetadata + * @returns TextSentimentAnnotation * @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.automl.v1.ImageObjectDetectionModelDeploymentMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextSentimentAnnotation; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionModelDeploymentMetadata + * @returns TextSentimentAnnotation * @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.automl.v1.ImageObjectDetectionModelDeploymentMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextSentimentAnnotation; /** - * Verifies an ImageObjectDetectionModelDeploymentMetadata message. + * Verifies a TextSentimentAnnotation 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 ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageObjectDetectionModelDeploymentMetadata + * @returns TextSentimentAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentAnnotation; /** - * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. - * @param message ImageObjectDetectionModelDeploymentMetadata + * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. + * @param message TextSentimentAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextSentimentAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. + * Converts this TextSentimentAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnnotationSpec. */ - interface IAnnotationSpec { + /** Properties of a TextSentimentEvaluationMetrics. */ + interface ITextSentimentEvaluationMetrics { - /** AnnotationSpec name */ - name?: (string|null); + /** TextSentimentEvaluationMetrics precision */ + precision?: (number|null); - /** AnnotationSpec displayName */ - displayName?: (string|null); + /** TextSentimentEvaluationMetrics recall */ + recall?: (number|null); - /** AnnotationSpec exampleCount */ - exampleCount?: (number|null); + /** TextSentimentEvaluationMetrics f1Score */ + f1Score?: (number|null); + + /** TextSentimentEvaluationMetrics meanAbsoluteError */ + meanAbsoluteError?: (number|null); + + /** TextSentimentEvaluationMetrics meanSquaredError */ + meanSquaredError?: (number|null); + + /** TextSentimentEvaluationMetrics linearKappa */ + linearKappa?: (number|null); + + /** TextSentimentEvaluationMetrics quadraticKappa */ + quadraticKappa?: (number|null); + + /** TextSentimentEvaluationMetrics confusionMatrix */ + confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); } - /** Represents an AnnotationSpec. */ - class AnnotationSpec implements IAnnotationSpec { + /** Represents a TextSentimentEvaluationMetrics. */ + class TextSentimentEvaluationMetrics implements ITextSentimentEvaluationMetrics { /** - * Constructs a new AnnotationSpec. + * Constructs a new TextSentimentEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IAnnotationSpec); + constructor(properties?: google.cloud.automl.v1.ITextSentimentEvaluationMetrics); - /** AnnotationSpec name. */ - public name: string; + /** TextSentimentEvaluationMetrics precision. */ + public precision: number; - /** AnnotationSpec displayName. */ - public displayName: string; + /** TextSentimentEvaluationMetrics recall. */ + public recall: number; - /** AnnotationSpec exampleCount. */ - public exampleCount: number; + /** TextSentimentEvaluationMetrics f1Score. */ + public f1Score: number; + + /** TextSentimentEvaluationMetrics meanAbsoluteError. */ + public meanAbsoluteError: number; + + /** TextSentimentEvaluationMetrics meanSquaredError. */ + public meanSquaredError: number; + + /** TextSentimentEvaluationMetrics linearKappa. */ + public linearKappa: number; + + /** TextSentimentEvaluationMetrics quadraticKappa. */ + public quadraticKappa: number; + + /** TextSentimentEvaluationMetrics confusionMatrix. */ + public confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); /** - * Creates a new AnnotationSpec instance using the specified properties. + * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationSpec instance + * @returns TextSentimentEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1.IAnnotationSpec): google.cloud.automl.v1.AnnotationSpec; + public static create(properties?: google.cloud.automl.v1.ITextSentimentEvaluationMetrics): google.cloud.automl.v1.TextSentimentEvaluationMetrics; /** - * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. - * @param message AnnotationSpec message or plain object to encode + * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. + * @param message TextSentimentEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. - * @param message AnnotationSpec message or plain object to encode + * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. + * @param message TextSentimentEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationSpec message from the specified reader or buffer. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationSpec + * @returns TextSentimentEvaluationMetrics * @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.automl.v1.AnnotationSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextSentimentEvaluationMetrics; /** - * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationSpec + * @returns TextSentimentEvaluationMetrics * @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.automl.v1.AnnotationSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextSentimentEvaluationMetrics; /** - * Verifies an AnnotationSpec message. + * Verifies a TextSentimentEvaluationMetrics 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 AnnotationSpec message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationSpec + * @returns TextSentimentEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.AnnotationSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentEvaluationMetrics; /** - * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. - * @param message AnnotationSpec + * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. + * @param message TextSentimentEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.AnnotationSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextSentimentEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationSpec to JSON. + * Converts this TextSentimentEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** ClassificationType enum. */ - enum ClassificationType { - CLASSIFICATION_TYPE_UNSPECIFIED = 0, - MULTICLASS = 1, - MULTILABEL = 2 - } + /** Properties of a TranslationDatasetMetadata. */ + interface ITranslationDatasetMetadata { - /** Properties of a ClassificationAnnotation. */ - interface IClassificationAnnotation { + /** TranslationDatasetMetadata sourceLanguageCode */ + sourceLanguageCode?: (string|null); - /** ClassificationAnnotation score */ - score?: (number|null); + /** TranslationDatasetMetadata targetLanguageCode */ + targetLanguageCode?: (string|null); } - /** Represents a ClassificationAnnotation. */ - class ClassificationAnnotation implements IClassificationAnnotation { + /** Represents a TranslationDatasetMetadata. */ + class TranslationDatasetMetadata implements ITranslationDatasetMetadata { /** - * Constructs a new ClassificationAnnotation. + * Constructs a new TranslationDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IClassificationAnnotation); + constructor(properties?: google.cloud.automl.v1.ITranslationDatasetMetadata); - /** ClassificationAnnotation score. */ - public score: number; + /** TranslationDatasetMetadata sourceLanguageCode. */ + public sourceLanguageCode: string; + + /** TranslationDatasetMetadata targetLanguageCode. */ + public targetLanguageCode: string; /** - * Creates a new ClassificationAnnotation instance using the specified properties. + * Creates a new TranslationDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ClassificationAnnotation instance + * @returns TranslationDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IClassificationAnnotation): google.cloud.automl.v1.ClassificationAnnotation; + public static create(properties?: google.cloud.automl.v1.ITranslationDatasetMetadata): google.cloud.automl.v1.TranslationDatasetMetadata; /** - * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. - * @param message ClassificationAnnotation message or plain object to encode + * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. + * @param message TranslationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. - * @param message ClassificationAnnotation message or plain object to encode + * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. + * @param message TranslationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClassificationAnnotation + * @returns TranslationDatasetMetadata * @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.automl.v1.ClassificationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TranslationDatasetMetadata; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClassificationAnnotation + * @returns TranslationDatasetMetadata * @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.automl.v1.ClassificationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TranslationDatasetMetadata; /** - * Verifies a ClassificationAnnotation message. + * Verifies a TranslationDatasetMetadata 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 ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClassificationAnnotation + * @returns TranslationDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationDatasetMetadata; /** - * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. - * @param message ClassificationAnnotation + * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. + * @param message TranslationDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TranslationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClassificationAnnotation to JSON. + * Converts this TranslationDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ClassificationEvaluationMetrics. */ - interface IClassificationEvaluationMetrics { - - /** ClassificationEvaluationMetrics auPrc */ - auPrc?: (number|null); - - /** ClassificationEvaluationMetrics auRoc */ - auRoc?: (number|null); - - /** ClassificationEvaluationMetrics logLoss */ - logLoss?: (number|null); - - /** ClassificationEvaluationMetrics confidenceMetricsEntry */ - confidenceMetricsEntry?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]|null); + /** Properties of a TranslationEvaluationMetrics. */ + interface ITranslationEvaluationMetrics { - /** ClassificationEvaluationMetrics confusionMatrix */ - confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + /** TranslationEvaluationMetrics bleuScore */ + bleuScore?: (number|null); - /** ClassificationEvaluationMetrics annotationSpecId */ - annotationSpecId?: (string[]|null); + /** TranslationEvaluationMetrics baseBleuScore */ + baseBleuScore?: (number|null); } - /** Represents a ClassificationEvaluationMetrics. */ - class ClassificationEvaluationMetrics implements IClassificationEvaluationMetrics { + /** Represents a TranslationEvaluationMetrics. */ + class TranslationEvaluationMetrics implements ITranslationEvaluationMetrics { /** - * Constructs a new ClassificationEvaluationMetrics. + * Constructs a new TranslationEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IClassificationEvaluationMetrics); - - /** ClassificationEvaluationMetrics auPrc. */ - public auPrc: number; - - /** ClassificationEvaluationMetrics auRoc. */ - public auRoc: number; - - /** ClassificationEvaluationMetrics logLoss. */ - public logLoss: number; - - /** ClassificationEvaluationMetrics confidenceMetricsEntry. */ - public confidenceMetricsEntry: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]; + constructor(properties?: google.cloud.automl.v1.ITranslationEvaluationMetrics); - /** ClassificationEvaluationMetrics confusionMatrix. */ - public confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + /** TranslationEvaluationMetrics bleuScore. */ + public bleuScore: number; - /** ClassificationEvaluationMetrics annotationSpecId. */ - public annotationSpecId: string[]; + /** TranslationEvaluationMetrics baseBleuScore. */ + public baseBleuScore: number; /** - * Creates a new ClassificationEvaluationMetrics instance using the specified properties. + * Creates a new TranslationEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns ClassificationEvaluationMetrics instance + * @returns TranslationEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1.IClassificationEvaluationMetrics): google.cloud.automl.v1.ClassificationEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1.ITranslationEvaluationMetrics): google.cloud.automl.v1.TranslationEvaluationMetrics; /** - * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. - * @param message ClassificationEvaluationMetrics message or plain object to encode + * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. + * @param message TranslationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. - * @param message ClassificationEvaluationMetrics message or plain object to encode + * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. + * @param message TranslationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClassificationEvaluationMetrics + * @returns TranslationEvaluationMetrics * @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.automl.v1.ClassificationEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TranslationEvaluationMetrics; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClassificationEvaluationMetrics + * @returns TranslationEvaluationMetrics * @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.automl.v1.ClassificationEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TranslationEvaluationMetrics; /** - * Verifies a ClassificationEvaluationMetrics message. + * Verifies a TranslationEvaluationMetrics 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 ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClassificationEvaluationMetrics + * @returns TranslationEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationEvaluationMetrics; /** - * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. - * @param message ClassificationEvaluationMetrics + * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. + * @param message TranslationEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TranslationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClassificationEvaluationMetrics to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ClassificationEvaluationMetrics { - - /** Properties of a ConfidenceMetricsEntry. */ - interface IConfidenceMetricsEntry { - - /** ConfidenceMetricsEntry confidenceThreshold */ - confidenceThreshold?: (number|null); - - /** ConfidenceMetricsEntry positionThreshold */ - positionThreshold?: (number|null); - - /** ConfidenceMetricsEntry recall */ - recall?: (number|null); - - /** ConfidenceMetricsEntry precision */ - precision?: (number|null); - - /** ConfidenceMetricsEntry falsePositiveRate */ - falsePositiveRate?: (number|null); - - /** ConfidenceMetricsEntry f1Score */ - f1Score?: (number|null); - - /** ConfidenceMetricsEntry recallAt1 */ - recallAt1?: (number|null); - - /** ConfidenceMetricsEntry precisionAt1 */ - precisionAt1?: (number|null); - - /** ConfidenceMetricsEntry falsePositiveRateAt1 */ - falsePositiveRateAt1?: (number|null); - - /** ConfidenceMetricsEntry f1ScoreAt1 */ - f1ScoreAt1?: (number|null); - - /** ConfidenceMetricsEntry truePositiveCount */ - truePositiveCount?: (number|Long|string|null); - - /** ConfidenceMetricsEntry falsePositiveCount */ - falsePositiveCount?: (number|Long|string|null); - - /** ConfidenceMetricsEntry falseNegativeCount */ - falseNegativeCount?: (number|Long|string|null); - - /** ConfidenceMetricsEntry trueNegativeCount */ - trueNegativeCount?: (number|Long|string|null); - } - - /** Represents a ConfidenceMetricsEntry. */ - class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { - - /** - * Constructs a new ConfidenceMetricsEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry); - - /** ConfidenceMetricsEntry confidenceThreshold. */ - public confidenceThreshold: number; - - /** ConfidenceMetricsEntry positionThreshold. */ - public positionThreshold: number; - - /** ConfidenceMetricsEntry recall. */ - public recall: number; - - /** ConfidenceMetricsEntry precision. */ - public precision: number; - - /** ConfidenceMetricsEntry falsePositiveRate. */ - public falsePositiveRate: number; - - /** ConfidenceMetricsEntry f1Score. */ - public f1Score: number; - - /** ConfidenceMetricsEntry recallAt1. */ - public recallAt1: number; - - /** ConfidenceMetricsEntry precisionAt1. */ - public precisionAt1: number; - - /** ConfidenceMetricsEntry falsePositiveRateAt1. */ - public falsePositiveRateAt1: number; - - /** ConfidenceMetricsEntry f1ScoreAt1. */ - public f1ScoreAt1: number; - - /** ConfidenceMetricsEntry truePositiveCount. */ - public truePositiveCount: (number|Long|string); - - /** ConfidenceMetricsEntry falsePositiveCount. */ - public falsePositiveCount: (number|Long|string); - - /** ConfidenceMetricsEntry falseNegativeCount. */ - public falseNegativeCount: (number|Long|string); - - /** ConfidenceMetricsEntry trueNegativeCount. */ - public trueNegativeCount: (number|Long|string); - - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidenceMetricsEntry instance - */ - public static create(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidenceMetricsEntry - * @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.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidenceMetricsEntry - * @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.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidenceMetricsEntry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @param message ConfidenceMetricsEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConfusionMatrix. */ - interface IConfusionMatrix { + * Converts this TranslationEvaluationMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ConfusionMatrix annotationSpecId */ - annotationSpecId?: (string[]|null); + /** Properties of a TranslationModelMetadata. */ + interface ITranslationModelMetadata { - /** ConfusionMatrix displayName */ - displayName?: (string[]|null); + /** TranslationModelMetadata baseModel */ + baseModel?: (string|null); - /** ConfusionMatrix row */ - row?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]|null); - } + /** TranslationModelMetadata sourceLanguageCode */ + sourceLanguageCode?: (string|null); - /** Represents a ConfusionMatrix. */ - class ConfusionMatrix implements IConfusionMatrix { + /** TranslationModelMetadata targetLanguageCode */ + targetLanguageCode?: (string|null); + } - /** - * Constructs a new ConfusionMatrix. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix); + /** Represents a TranslationModelMetadata. */ + class TranslationModelMetadata implements ITranslationModelMetadata { - /** ConfusionMatrix annotationSpecId. */ - public annotationSpecId: string[]; + /** + * Constructs a new TranslationModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.ITranslationModelMetadata); - /** ConfusionMatrix displayName. */ - public displayName: string[]; + /** TranslationModelMetadata baseModel. */ + public baseModel: string; - /** ConfusionMatrix row. */ - public row: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]; + /** TranslationModelMetadata sourceLanguageCode. */ + public sourceLanguageCode: string; - /** - * Creates a new ConfusionMatrix instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfusionMatrix instance - */ - public static create(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; + /** TranslationModelMetadata targetLanguageCode. */ + public targetLanguageCode: string; - /** - * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @param message ConfusionMatrix message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new TranslationModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationModelMetadata instance + */ + public static create(properties?: google.cloud.automl.v1.ITranslationModelMetadata): google.cloud.automl.v1.TranslationModelMetadata; - /** - * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @param message ConfusionMatrix message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. + * @param message TranslationModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ConfusionMatrix message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfusionMatrix - * @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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; + /** + * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. + * @param message TranslationModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfusionMatrix - * @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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; + /** + * Decodes a TranslationModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationModelMetadata + * @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.automl.v1.TranslationModelMetadata; - /** - * Verifies a ConfusionMatrix 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); + /** + * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationModelMetadata + * @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.automl.v1.TranslationModelMetadata; - /** - * Creates a ConfusionMatrix message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfusionMatrix - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix; + /** + * Verifies a TranslationModelMetadata 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 plain object from a ConfusionMatrix message. Also converts values to other types if specified. - * @param message ConfusionMatrix - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationModelMetadata; - /** - * Converts this ConfusionMatrix to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. + * @param message TranslationModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.TranslationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace ConfusionMatrix { + /** + * Converts this TranslationModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a Row. */ - interface IRow { + /** Properties of a TranslationAnnotation. */ + interface ITranslationAnnotation { - /** Row exampleCount */ - exampleCount?: (number[]|null); - } + /** TranslationAnnotation translatedContent */ + translatedContent?: (google.cloud.automl.v1.ITextSnippet|null); + } - /** Represents a Row. */ - class Row implements IRow { + /** Represents a TranslationAnnotation. */ + class TranslationAnnotation implements ITranslationAnnotation { - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow); + /** + * Constructs a new TranslationAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.ITranslationAnnotation); - /** Row exampleCount. */ - public exampleCount: number[]; + /** TranslationAnnotation translatedContent. */ + public translatedContent?: (google.cloud.automl.v1.ITextSnippet|null); - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** + * Creates a new TranslationAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationAnnotation instance + */ + public static create(properties?: google.cloud.automl.v1.ITranslationAnnotation): google.cloud.automl.v1.TranslationAnnotation; - /** - * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. + * @param message TranslationAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. + * @param message TranslationAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** + * Decodes a TranslationAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationAnnotation + * @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.automl.v1.TranslationAnnotation; - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** + * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationAnnotation + * @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.automl.v1.TranslationAnnotation; - /** - * Verifies a Row 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); + /** + * Verifies a TranslationAnnotation 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 Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** + * Creates a TranslationAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationAnnotation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationAnnotation; - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. + * @param message TranslationAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.TranslationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Converts this TranslationAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a TextClassificationDatasetMetadata. */ - interface ITextClassificationDatasetMetadata { + /** Properties of an Image. */ + interface IImage { - /** TextClassificationDatasetMetadata classificationType */ - classificationType?: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType|null); + /** Image imageBytes */ + imageBytes?: (Uint8Array|string|null); + + /** Image thumbnailUri */ + thumbnailUri?: (string|null); } - /** Represents a TextClassificationDatasetMetadata. */ - class TextClassificationDatasetMetadata implements ITextClassificationDatasetMetadata { + /** Represents an Image. */ + class Image implements IImage { /** - * Constructs a new TextClassificationDatasetMetadata. + * Constructs a new Image. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextClassificationDatasetMetadata); + constructor(properties?: google.cloud.automl.v1.IImage); - /** TextClassificationDatasetMetadata classificationType. */ - public classificationType: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType); + /** Image imageBytes. */ + public imageBytes: (Uint8Array|string); + + /** Image thumbnailUri. */ + public thumbnailUri: string; + + /** Image data. */ + public data?: "imageBytes"; /** - * Creates a new TextClassificationDatasetMetadata instance using the specified properties. + * Creates a new Image instance using the specified properties. * @param [properties] Properties to set - * @returns TextClassificationDatasetMetadata instance + * @returns Image instance */ - public static create(properties?: google.cloud.automl.v1.ITextClassificationDatasetMetadata): google.cloud.automl.v1.TextClassificationDatasetMetadata; + public static create(properties?: google.cloud.automl.v1.IImage): google.cloud.automl.v1.Image; /** - * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. - * @param message TextClassificationDatasetMetadata message or plain object to encode + * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. + * @param message Image message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. - * @param message TextClassificationDatasetMetadata message or plain object to encode + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. + * @param message Image message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes an Image message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextClassificationDatasetMetadata + * @returns Image * @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.automl.v1.TextClassificationDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.Image; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an Image message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextClassificationDatasetMetadata + * @returns Image * @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.automl.v1.TextClassificationDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.Image; /** - * Verifies a TextClassificationDatasetMetadata message. + * Verifies an Image 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 TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an Image message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextClassificationDatasetMetadata + * @returns Image */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextClassificationDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Image; /** - * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. - * @param message TextClassificationDatasetMetadata + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @param message Image * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextClassificationDatasetMetadata to JSON. + * Converts this Image to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextClassificationModelMetadata. */ - interface ITextClassificationModelMetadata { + /** Properties of a TextSnippet. */ + interface ITextSnippet { - /** TextClassificationModelMetadata classificationType */ - classificationType?: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType|null); + /** TextSnippet content */ + content?: (string|null); + + /** TextSnippet mimeType */ + mimeType?: (string|null); + + /** TextSnippet contentUri */ + contentUri?: (string|null); } - /** Represents a TextClassificationModelMetadata. */ - class TextClassificationModelMetadata implements ITextClassificationModelMetadata { + /** Represents a TextSnippet. */ + class TextSnippet implements ITextSnippet { /** - * Constructs a new TextClassificationModelMetadata. + * Constructs a new TextSnippet. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextClassificationModelMetadata); + constructor(properties?: google.cloud.automl.v1.ITextSnippet); - /** TextClassificationModelMetadata classificationType. */ - public classificationType: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType); + /** TextSnippet content. */ + public content: string; + + /** TextSnippet mimeType. */ + public mimeType: string; + + /** TextSnippet contentUri. */ + public contentUri: string; /** - * Creates a new TextClassificationModelMetadata instance using the specified properties. + * Creates a new TextSnippet instance using the specified properties. * @param [properties] Properties to set - * @returns TextClassificationModelMetadata instance + * @returns TextSnippet instance */ - public static create(properties?: google.cloud.automl.v1.ITextClassificationModelMetadata): google.cloud.automl.v1.TextClassificationModelMetadata; + public static create(properties?: google.cloud.automl.v1.ITextSnippet): google.cloud.automl.v1.TextSnippet; /** - * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. - * @param message TextClassificationModelMetadata message or plain object to encode + * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. + * @param message TextSnippet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. - * @param message TextClassificationModelMetadata message or plain object to encode + * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. + * @param message TextSnippet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. + * Decodes a TextSnippet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextClassificationModelMetadata + * @returns TextSnippet * @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.automl.v1.TextClassificationModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextSnippet; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextSnippet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextClassificationModelMetadata + * @returns TextSnippet * @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.automl.v1.TextClassificationModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextSnippet; /** - * Verifies a TextClassificationModelMetadata message. + * Verifies a TextSnippet 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 TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextSnippet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextClassificationModelMetadata + * @returns TextSnippet */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextClassificationModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSnippet; /** - * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. - * @param message TextClassificationModelMetadata + * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. + * @param message TextSnippet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextSnippet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextClassificationModelMetadata to JSON. + * Converts this TextSnippet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextExtractionDatasetMetadata. */ - interface ITextExtractionDatasetMetadata { + /** Properties of a DocumentDimensions. */ + interface IDocumentDimensions { + + /** DocumentDimensions unit */ + unit?: (google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|null); + + /** DocumentDimensions width */ + width?: (number|null); + + /** DocumentDimensions height */ + height?: (number|null); } - /** Represents a TextExtractionDatasetMetadata. */ - class TextExtractionDatasetMetadata implements ITextExtractionDatasetMetadata { + /** Represents a DocumentDimensions. */ + class DocumentDimensions implements IDocumentDimensions { /** - * Constructs a new TextExtractionDatasetMetadata. + * Constructs a new DocumentDimensions. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextExtractionDatasetMetadata); + constructor(properties?: google.cloud.automl.v1.IDocumentDimensions); + + /** DocumentDimensions unit. */ + public unit: (google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit); + + /** DocumentDimensions width. */ + public width: number; + + /** DocumentDimensions height. */ + public height: number; /** - * Creates a new TextExtractionDatasetMetadata instance using the specified properties. + * Creates a new DocumentDimensions instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionDatasetMetadata instance + * @returns DocumentDimensions instance */ - public static create(properties?: google.cloud.automl.v1.ITextExtractionDatasetMetadata): google.cloud.automl.v1.TextExtractionDatasetMetadata; + public static create(properties?: google.cloud.automl.v1.IDocumentDimensions): google.cloud.automl.v1.DocumentDimensions; /** - * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. - * @param message TextExtractionDatasetMetadata message or plain object to encode + * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. + * @param message DocumentDimensions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. - * @param message TextExtractionDatasetMetadata message or plain object to encode + * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. + * @param message DocumentDimensions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. + * Decodes a DocumentDimensions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionDatasetMetadata + * @returns DocumentDimensions * @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.automl.v1.TextExtractionDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.DocumentDimensions; /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionDatasetMetadata + * @returns DocumentDimensions * @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.automl.v1.TextExtractionDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.DocumentDimensions; /** - * Verifies a TextExtractionDatasetMetadata message. + * Verifies a DocumentDimensions 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 TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentDimensions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionDatasetMetadata + * @returns DocumentDimensions */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DocumentDimensions; /** - * Creates a plain object from a TextExtractionDatasetMetadata message. Also converts values to other types if specified. - * @param message TextExtractionDatasetMetadata + * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. + * @param message DocumentDimensions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextExtractionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.DocumentDimensions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextExtractionDatasetMetadata to JSON. + * Converts this DocumentDimensions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextExtractionModelMetadata. */ - interface ITextExtractionModelMetadata { + namespace DocumentDimensions { + + /** DocumentDimensionUnit enum. */ + enum DocumentDimensionUnit { + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0, + INCH = 1, + CENTIMETER = 2, + POINT = 3 + } } - /** Represents a TextExtractionModelMetadata. */ - class TextExtractionModelMetadata implements ITextExtractionModelMetadata { + /** Properties of a Document. */ + interface IDocument { + + /** Document inputConfig */ + inputConfig?: (google.cloud.automl.v1.IDocumentInputConfig|null); + + /** Document documentText */ + documentText?: (google.cloud.automl.v1.ITextSnippet|null); + + /** Document layout */ + layout?: (google.cloud.automl.v1.Document.ILayout[]|null); + + /** Document documentDimensions */ + documentDimensions?: (google.cloud.automl.v1.IDocumentDimensions|null); + + /** Document pageCount */ + pageCount?: (number|null); + } + + /** Represents a Document. */ + class Document implements IDocument { /** - * Constructs a new TextExtractionModelMetadata. + * Constructs a new Document. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextExtractionModelMetadata); + constructor(properties?: google.cloud.automl.v1.IDocument); + + /** Document inputConfig. */ + public inputConfig?: (google.cloud.automl.v1.IDocumentInputConfig|null); + + /** Document documentText. */ + public documentText?: (google.cloud.automl.v1.ITextSnippet|null); + + /** Document layout. */ + public layout: google.cloud.automl.v1.Document.ILayout[]; + + /** Document documentDimensions. */ + public documentDimensions?: (google.cloud.automl.v1.IDocumentDimensions|null); + + /** Document pageCount. */ + public pageCount: number; /** - * Creates a new TextExtractionModelMetadata instance using the specified properties. + * Creates a new Document instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionModelMetadata instance + * @returns Document instance */ - public static create(properties?: google.cloud.automl.v1.ITextExtractionModelMetadata): google.cloud.automl.v1.TextExtractionModelMetadata; + public static create(properties?: google.cloud.automl.v1.IDocument): google.cloud.automl.v1.Document; /** - * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. - * @param message TextExtractionModelMetadata message or plain object to encode + * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. + * @param message Document message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. - * @param message TextExtractionModelMetadata message or plain object to encode + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. + * @param message Document message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionModelMetadata + * @returns Document * @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.automl.v1.TextExtractionModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.Document; /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionModelMetadata + * @returns Document * @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.automl.v1.TextExtractionModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.Document; /** - * Verifies a TextExtractionModelMetadata message. + * Verifies a Document 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 TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionModelMetadata + * @returns Document */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Document; /** - * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. - * @param message TextExtractionModelMetadata + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @param message Document * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextExtractionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Document to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Document { + + /** Properties of a Layout. */ + interface ILayout { + + /** Layout textSegment */ + textSegment?: (google.cloud.automl.v1.ITextSegment|null); + + /** Layout pageNumber */ + pageNumber?: (number|null); + + /** Layout boundingPoly */ + boundingPoly?: (google.cloud.automl.v1.IBoundingPoly|null); + + /** Layout textSegmentType */ + textSegmentType?: (google.cloud.automl.v1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1.Document.Layout.TextSegmentType|null); + } + + /** Represents a Layout. */ + class Layout implements ILayout { + + /** + * Constructs a new Layout. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.Document.ILayout); + + /** Layout textSegment. */ + public textSegment?: (google.cloud.automl.v1.ITextSegment|null); + + /** Layout pageNumber. */ + public pageNumber: number; + + /** Layout boundingPoly. */ + public boundingPoly?: (google.cloud.automl.v1.IBoundingPoly|null); + + /** Layout textSegmentType. */ + public textSegmentType: (google.cloud.automl.v1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1.Document.Layout.TextSegmentType); + + /** + * Creates a new Layout instance using the specified properties. + * @param [properties] Properties to set + * @returns Layout instance + */ + public static create(properties?: google.cloud.automl.v1.Document.ILayout): google.cloud.automl.v1.Document.Layout; + + /** + * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. + * @param message Layout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. + * @param message Layout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Layout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Layout + * @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.automl.v1.Document.Layout; + + /** + * Decodes a Layout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Layout + * @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.automl.v1.Document.Layout; + + /** + * Verifies a Layout 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 Layout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Layout + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Document.Layout; + + /** + * Creates a plain object from a Layout message. Also converts values to other types if specified. + * @param message Layout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.Document.Layout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Layout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Layout { - /** - * Converts this TextExtractionModelMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** TextSegmentType enum. */ + enum TextSegmentType { + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0, + TOKEN = 1, + PARAGRAPH = 2, + FORM_FIELD = 3, + FORM_FIELD_NAME = 4, + FORM_FIELD_CONTENTS = 5, + TABLE = 6, + TABLE_HEADER = 7, + TABLE_ROW = 8, + TABLE_CELL = 9 + } + } } - /** Properties of a TextSentimentDatasetMetadata. */ - interface ITextSentimentDatasetMetadata { + /** Properties of an ExamplePayload. */ + interface IExamplePayload { - /** TextSentimentDatasetMetadata sentimentMax */ - sentimentMax?: (number|null); + /** ExamplePayload image */ + image?: (google.cloud.automl.v1.IImage|null); + + /** ExamplePayload textSnippet */ + textSnippet?: (google.cloud.automl.v1.ITextSnippet|null); + + /** ExamplePayload document */ + document?: (google.cloud.automl.v1.IDocument|null); } - /** Represents a TextSentimentDatasetMetadata. */ - class TextSentimentDatasetMetadata implements ITextSentimentDatasetMetadata { + /** Represents an ExamplePayload. */ + class ExamplePayload implements IExamplePayload { /** - * Constructs a new TextSentimentDatasetMetadata. + * Constructs a new ExamplePayload. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextSentimentDatasetMetadata); + constructor(properties?: google.cloud.automl.v1.IExamplePayload); - /** TextSentimentDatasetMetadata sentimentMax. */ - public sentimentMax: number; + /** ExamplePayload image. */ + public image?: (google.cloud.automl.v1.IImage|null); + + /** ExamplePayload textSnippet. */ + public textSnippet?: (google.cloud.automl.v1.ITextSnippet|null); + + /** ExamplePayload document. */ + public document?: (google.cloud.automl.v1.IDocument|null); + + /** ExamplePayload payload. */ + public payload?: ("image"|"textSnippet"|"document"); /** - * Creates a new TextSentimentDatasetMetadata instance using the specified properties. + * Creates a new ExamplePayload instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentDatasetMetadata instance + * @returns ExamplePayload instance */ - public static create(properties?: google.cloud.automl.v1.ITextSentimentDatasetMetadata): google.cloud.automl.v1.TextSentimentDatasetMetadata; + public static create(properties?: google.cloud.automl.v1.IExamplePayload): google.cloud.automl.v1.ExamplePayload; /** - * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. - * @param message TextSentimentDatasetMetadata message or plain object to encode + * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. + * @param message ExamplePayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. - * @param message TextSentimentDatasetMetadata message or plain object to encode + * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. + * @param message ExamplePayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. + * Decodes an ExamplePayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentDatasetMetadata + * @returns ExamplePayload * @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.automl.v1.TextSentimentDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ExamplePayload; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentDatasetMetadata + * @returns ExamplePayload * @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.automl.v1.TextSentimentDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ExamplePayload; /** - * Verifies a TextSentimentDatasetMetadata message. + * Verifies an ExamplePayload 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 TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExamplePayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentDatasetMetadata + * @returns ExamplePayload */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExamplePayload; /** - * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. - * @param message TextSentimentDatasetMetadata + * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. + * @param message ExamplePayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextSentimentDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ExamplePayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentDatasetMetadata to JSON. + * Converts this ExamplePayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSentimentModelMetadata. */ - interface ITextSentimentModelMetadata { + /** Properties of an InputConfig. */ + interface IInputConfig { + + /** InputConfig gcsSource */ + gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + + /** InputConfig params */ + params?: ({ [k: string]: string }|null); } - /** Represents a TextSentimentModelMetadata. */ - class TextSentimentModelMetadata implements ITextSentimentModelMetadata { + /** Represents an InputConfig. */ + class InputConfig implements IInputConfig { /** - * Constructs a new TextSentimentModelMetadata. + * Constructs a new InputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextSentimentModelMetadata); + constructor(properties?: google.cloud.automl.v1.IInputConfig); + + /** InputConfig gcsSource. */ + public gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + + /** InputConfig params. */ + public params: { [k: string]: string }; + + /** InputConfig source. */ + public source?: "gcsSource"; /** - * Creates a new TextSentimentModelMetadata instance using the specified properties. + * Creates a new InputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentModelMetadata instance + * @returns InputConfig instance */ - public static create(properties?: google.cloud.automl.v1.ITextSentimentModelMetadata): google.cloud.automl.v1.TextSentimentModelMetadata; + public static create(properties?: google.cloud.automl.v1.IInputConfig): google.cloud.automl.v1.InputConfig; /** - * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. - * @param message TextSentimentModelMetadata message or plain object to encode + * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. + * @param message InputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. - * @param message TextSentimentModelMetadata message or plain object to encode + * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. + * @param message InputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. + * Decodes an InputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentModelMetadata + * @returns InputConfig * @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.automl.v1.TextSentimentModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.InputConfig; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an InputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentModelMetadata + * @returns InputConfig * @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.automl.v1.TextSentimentModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.InputConfig; /** - * Verifies a TextSentimentModelMetadata message. + * Verifies an InputConfig 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 TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentModelMetadata + * @returns InputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.InputConfig; /** - * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. - * @param message TextSentimentModelMetadata + * Creates a plain object from an InputConfig message. Also converts values to other types if specified. + * @param message InputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextSentimentModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.InputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentModelMetadata to JSON. + * Converts this InputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TranslationDatasetMetadata. */ - interface ITranslationDatasetMetadata { - - /** TranslationDatasetMetadata sourceLanguageCode */ - sourceLanguageCode?: (string|null); + /** Properties of a BatchPredictInputConfig. */ + interface IBatchPredictInputConfig { - /** TranslationDatasetMetadata targetLanguageCode */ - targetLanguageCode?: (string|null); + /** BatchPredictInputConfig gcsSource */ + gcsSource?: (google.cloud.automl.v1.IGcsSource|null); } - /** Represents a TranslationDatasetMetadata. */ - class TranslationDatasetMetadata implements ITranslationDatasetMetadata { + /** Represents a BatchPredictInputConfig. */ + class BatchPredictInputConfig implements IBatchPredictInputConfig { /** - * Constructs a new TranslationDatasetMetadata. + * Constructs a new BatchPredictInputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITranslationDatasetMetadata); + constructor(properties?: google.cloud.automl.v1.IBatchPredictInputConfig); - /** TranslationDatasetMetadata sourceLanguageCode. */ - public sourceLanguageCode: string; + /** BatchPredictInputConfig gcsSource. */ + public gcsSource?: (google.cloud.automl.v1.IGcsSource|null); - /** TranslationDatasetMetadata targetLanguageCode. */ - public targetLanguageCode: string; + /** BatchPredictInputConfig source. */ + public source?: "gcsSource"; /** - * Creates a new TranslationDatasetMetadata instance using the specified properties. + * Creates a new BatchPredictInputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns TranslationDatasetMetadata instance + * @returns BatchPredictInputConfig instance */ - public static create(properties?: google.cloud.automl.v1.ITranslationDatasetMetadata): google.cloud.automl.v1.TranslationDatasetMetadata; + public static create(properties?: google.cloud.automl.v1.IBatchPredictInputConfig): google.cloud.automl.v1.BatchPredictInputConfig; /** - * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. - * @param message TranslationDatasetMetadata message or plain object to encode + * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. + * @param message BatchPredictInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. - * @param message TranslationDatasetMetadata message or plain object to encode + * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. + * @param message BatchPredictInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. + * Decodes a BatchPredictInputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TranslationDatasetMetadata + * @returns BatchPredictInputConfig * @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.automl.v1.TranslationDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BatchPredictInputConfig; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TranslationDatasetMetadata + * @returns BatchPredictInputConfig * @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.automl.v1.TranslationDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BatchPredictInputConfig; /** - * Verifies a TranslationDatasetMetadata message. + * Verifies a BatchPredictInputConfig 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 TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TranslationDatasetMetadata + * @returns BatchPredictInputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictInputConfig; /** - * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. - * @param message TranslationDatasetMetadata + * Creates a plain object from a BatchPredictInputConfig message. Also converts values to other types if specified. + * @param message BatchPredictInputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TranslationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.BatchPredictInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TranslationDatasetMetadata to JSON. + * Converts this BatchPredictInputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TranslationEvaluationMetrics. */ - interface ITranslationEvaluationMetrics { - - /** TranslationEvaluationMetrics bleuScore */ - bleuScore?: (number|null); - - /** TranslationEvaluationMetrics baseBleuScore */ - baseBleuScore?: (number|null); + /** Properties of a DocumentInputConfig. */ + interface IDocumentInputConfig { + + /** DocumentInputConfig gcsSource */ + gcsSource?: (google.cloud.automl.v1.IGcsSource|null); } - /** Represents a TranslationEvaluationMetrics. */ - class TranslationEvaluationMetrics implements ITranslationEvaluationMetrics { + /** Represents a DocumentInputConfig. */ + class DocumentInputConfig implements IDocumentInputConfig { /** - * Constructs a new TranslationEvaluationMetrics. + * Constructs a new DocumentInputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITranslationEvaluationMetrics); - - /** TranslationEvaluationMetrics bleuScore. */ - public bleuScore: number; + constructor(properties?: google.cloud.automl.v1.IDocumentInputConfig); - /** TranslationEvaluationMetrics baseBleuScore. */ - public baseBleuScore: number; + /** DocumentInputConfig gcsSource. */ + public gcsSource?: (google.cloud.automl.v1.IGcsSource|null); /** - * Creates a new TranslationEvaluationMetrics instance using the specified properties. + * Creates a new DocumentInputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns TranslationEvaluationMetrics instance + * @returns DocumentInputConfig instance */ - public static create(properties?: google.cloud.automl.v1.ITranslationEvaluationMetrics): google.cloud.automl.v1.TranslationEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1.IDocumentInputConfig): google.cloud.automl.v1.DocumentInputConfig; /** - * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. - * @param message TranslationEvaluationMetrics message or plain object to encode + * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. + * @param message DocumentInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. - * @param message TranslationEvaluationMetrics message or plain object to encode + * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. + * @param message DocumentInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. + * Decodes a DocumentInputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TranslationEvaluationMetrics + * @returns DocumentInputConfig * @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.automl.v1.TranslationEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.DocumentInputConfig; /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TranslationEvaluationMetrics + * @returns DocumentInputConfig * @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.automl.v1.TranslationEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.DocumentInputConfig; /** - * Verifies a TranslationEvaluationMetrics message. + * Verifies a DocumentInputConfig 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 TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TranslationEvaluationMetrics + * @returns DocumentInputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DocumentInputConfig; /** - * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. - * @param message TranslationEvaluationMetrics + * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. + * @param message DocumentInputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TranslationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.DocumentInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TranslationEvaluationMetrics to JSON. + * Converts this DocumentInputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TranslationModelMetadata. */ - interface ITranslationModelMetadata { - - /** TranslationModelMetadata baseModel */ - baseModel?: (string|null); - - /** TranslationModelMetadata sourceLanguageCode */ - sourceLanguageCode?: (string|null); + /** Properties of an OutputConfig. */ + interface IOutputConfig { - /** TranslationModelMetadata targetLanguageCode */ - targetLanguageCode?: (string|null); + /** OutputConfig gcsDestination */ + gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); } - /** Represents a TranslationModelMetadata. */ - class TranslationModelMetadata implements ITranslationModelMetadata { + /** Represents an OutputConfig. */ + class OutputConfig implements IOutputConfig { /** - * Constructs a new TranslationModelMetadata. + * Constructs a new OutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITranslationModelMetadata); - - /** TranslationModelMetadata baseModel. */ - public baseModel: string; + constructor(properties?: google.cloud.automl.v1.IOutputConfig); - /** TranslationModelMetadata sourceLanguageCode. */ - public sourceLanguageCode: string; + /** OutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); - /** TranslationModelMetadata targetLanguageCode. */ - public targetLanguageCode: string; + /** OutputConfig destination. */ + public destination?: "gcsDestination"; /** - * Creates a new TranslationModelMetadata instance using the specified properties. + * Creates a new OutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns TranslationModelMetadata instance + * @returns OutputConfig instance */ - public static create(properties?: google.cloud.automl.v1.ITranslationModelMetadata): google.cloud.automl.v1.TranslationModelMetadata; + public static create(properties?: google.cloud.automl.v1.IOutputConfig): google.cloud.automl.v1.OutputConfig; /** - * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. - * @param message TranslationModelMetadata message or plain object to encode + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. - * @param message TranslationModelMetadata message or plain object to encode + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TranslationModelMetadata + * @returns OutputConfig * @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.automl.v1.TranslationModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.OutputConfig; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TranslationModelMetadata + * @returns OutputConfig * @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.automl.v1.TranslationModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.OutputConfig; /** - * Verifies a TranslationModelMetadata message. + * Verifies an OutputConfig 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 TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TranslationModelMetadata + * @returns OutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.OutputConfig; /** - * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. - * @param message TranslationModelMetadata + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * @param message OutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TranslationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TranslationModelMetadata to JSON. + * Converts this OutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TranslationAnnotation. */ - interface ITranslationAnnotation { + /** Properties of a BatchPredictOutputConfig. */ + interface IBatchPredictOutputConfig { - /** TranslationAnnotation translatedContent */ - translatedContent?: (google.cloud.automl.v1.ITextSnippet|null); + /** BatchPredictOutputConfig gcsDestination */ + gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); } - /** Represents a TranslationAnnotation. */ - class TranslationAnnotation implements ITranslationAnnotation { + /** Represents a BatchPredictOutputConfig. */ + class BatchPredictOutputConfig implements IBatchPredictOutputConfig { /** - * Constructs a new TranslationAnnotation. + * Constructs a new BatchPredictOutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITranslationAnnotation); + constructor(properties?: google.cloud.automl.v1.IBatchPredictOutputConfig); - /** TranslationAnnotation translatedContent. */ - public translatedContent?: (google.cloud.automl.v1.ITextSnippet|null); + /** BatchPredictOutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); + + /** BatchPredictOutputConfig destination. */ + public destination?: "gcsDestination"; /** - * Creates a new TranslationAnnotation instance using the specified properties. + * Creates a new BatchPredictOutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns TranslationAnnotation instance + * @returns BatchPredictOutputConfig instance */ - public static create(properties?: google.cloud.automl.v1.ITranslationAnnotation): google.cloud.automl.v1.TranslationAnnotation; + public static create(properties?: google.cloud.automl.v1.IBatchPredictOutputConfig): google.cloud.automl.v1.BatchPredictOutputConfig; /** - * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. - * @param message TranslationAnnotation message or plain object to encode + * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. + * @param message BatchPredictOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. - * @param message TranslationAnnotation message or plain object to encode + * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. + * @param message BatchPredictOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TranslationAnnotation message from the specified reader or buffer. + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TranslationAnnotation + * @returns BatchPredictOutputConfig * @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.automl.v1.TranslationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BatchPredictOutputConfig; /** - * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TranslationAnnotation + * @returns BatchPredictOutputConfig * @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.automl.v1.TranslationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BatchPredictOutputConfig; /** - * Verifies a TranslationAnnotation message. + * Verifies a BatchPredictOutputConfig 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 TranslationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TranslationAnnotation + * @returns BatchPredictOutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TranslationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictOutputConfig; /** - * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. - * @param message TranslationAnnotation + * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. + * @param message BatchPredictOutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TranslationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.BatchPredictOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TranslationAnnotation to JSON. + * Converts this BatchPredictOutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Image. */ - interface IImage { + /** Properties of a ModelExportOutputConfig. */ + interface IModelExportOutputConfig { - /** Image imageBytes */ - imageBytes?: (Uint8Array|string|null); + /** ModelExportOutputConfig gcsDestination */ + gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); - /** Image thumbnailUri */ - thumbnailUri?: (string|null); + /** ModelExportOutputConfig modelFormat */ + modelFormat?: (string|null); + + /** ModelExportOutputConfig params */ + params?: ({ [k: string]: string }|null); } - /** Represents an Image. */ - class Image implements IImage { + /** Represents a ModelExportOutputConfig. */ + class ModelExportOutputConfig implements IModelExportOutputConfig { /** - * Constructs a new Image. + * Constructs a new ModelExportOutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImage); + constructor(properties?: google.cloud.automl.v1.IModelExportOutputConfig); - /** Image imageBytes. */ - public imageBytes: (Uint8Array|string); + /** ModelExportOutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); - /** Image thumbnailUri. */ - public thumbnailUri: string; + /** ModelExportOutputConfig modelFormat. */ + public modelFormat: string; - /** Image data. */ - public data?: "imageBytes"; + /** ModelExportOutputConfig params. */ + public params: { [k: string]: string }; + + /** ModelExportOutputConfig destination. */ + public destination?: "gcsDestination"; /** - * Creates a new Image instance using the specified properties. + * Creates a new ModelExportOutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Image instance + * @returns ModelExportOutputConfig instance */ - public static create(properties?: google.cloud.automl.v1.IImage): google.cloud.automl.v1.Image; + public static create(properties?: google.cloud.automl.v1.IModelExportOutputConfig): google.cloud.automl.v1.ModelExportOutputConfig; /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. - * @param message Image message or plain object to encode + * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. + * @param message ModelExportOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. - * @param message Image message or plain object to encode + * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. + * @param message ModelExportOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Image message from the specified reader or buffer. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Image + * @returns ModelExportOutputConfig * @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.automl.v1.Image; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ModelExportOutputConfig; /** - * Decodes an Image message from the specified reader or buffer, length delimited. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Image + * @returns ModelExportOutputConfig * @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.automl.v1.Image; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ModelExportOutputConfig; /** - * Verifies an Image message. + * Verifies a ModelExportOutputConfig 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 Image message from a plain object. Also converts values to their respective internal types. + * Creates a ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Image + * @returns ModelExportOutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Image; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ModelExportOutputConfig; /** - * Creates a plain object from an Image message. Also converts values to other types if specified. - * @param message Image + * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. + * @param message ModelExportOutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ModelExportOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Image to JSON. + * Converts this ModelExportOutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSnippet. */ - interface ITextSnippet { - - /** TextSnippet content */ - content?: (string|null); - - /** TextSnippet mimeType */ - mimeType?: (string|null); + /** Properties of a GcsSource. */ + interface IGcsSource { - /** TextSnippet contentUri */ - contentUri?: (string|null); + /** GcsSource inputUris */ + inputUris?: (string[]|null); } - /** Represents a TextSnippet. */ - class TextSnippet implements ITextSnippet { + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { /** - * Constructs a new TextSnippet. + * Constructs a new GcsSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextSnippet); - - /** TextSnippet content. */ - public content: string; - - /** TextSnippet mimeType. */ - public mimeType: string; + constructor(properties?: google.cloud.automl.v1.IGcsSource); - /** TextSnippet contentUri. */ - public contentUri: string; + /** GcsSource inputUris. */ + public inputUris: string[]; /** - * Creates a new TextSnippet instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @param [properties] Properties to set - * @returns TextSnippet instance + * @returns GcsSource instance */ - public static create(properties?: google.cloud.automl.v1.ITextSnippet): google.cloud.automl.v1.TextSnippet; + public static create(properties?: google.cloud.automl.v1.IGcsSource): google.cloud.automl.v1.GcsSource; /** - * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. - * @param message TextSnippet message or plain object to encode + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. - * @param message TextSnippet message or plain object to encode + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSnippet message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSnippet + * @returns GcsSource * @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.automl.v1.TextSnippet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.GcsSource; /** - * Decodes a TextSnippet message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSnippet + * @returns GcsSource * @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.automl.v1.TextSnippet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.GcsSource; /** - * Verifies a TextSnippet message. + * Verifies a GcsSource 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 TextSnippet message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSnippet + * @returns GcsSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSnippet; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GcsSource; /** - * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. - * @param message TextSnippet + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextSnippet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSnippet to JSON. + * Converts this GcsSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DocumentDimensions. */ - interface IDocumentDimensions { - - /** DocumentDimensions unit */ - unit?: (google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|null); - - /** DocumentDimensions width */ - width?: (number|null); + /** Properties of a GcsDestination. */ + interface IGcsDestination { - /** DocumentDimensions height */ - height?: (number|null); + /** GcsDestination outputUriPrefix */ + outputUriPrefix?: (string|null); } - /** Represents a DocumentDimensions. */ - class DocumentDimensions implements IDocumentDimensions { + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { /** - * Constructs a new DocumentDimensions. + * Constructs a new GcsDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDocumentDimensions); - - /** DocumentDimensions unit. */ - public unit: (google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit); - - /** DocumentDimensions width. */ - public width: number; + constructor(properties?: google.cloud.automl.v1.IGcsDestination); - /** DocumentDimensions height. */ - public height: number; + /** GcsDestination outputUriPrefix. */ + public outputUriPrefix: string; /** - * Creates a new DocumentDimensions instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentDimensions instance + * @returns GcsDestination instance */ - public static create(properties?: google.cloud.automl.v1.IDocumentDimensions): google.cloud.automl.v1.DocumentDimensions; + public static create(properties?: google.cloud.automl.v1.IGcsDestination): google.cloud.automl.v1.GcsDestination; /** - * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. - * @param message DocumentDimensions message or plain object to encode + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. - * @param message DocumentDimensions message or plain object to encode + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentDimensions message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentDimensions + * @returns GcsDestination * @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.automl.v1.DocumentDimensions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.GcsDestination; /** - * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentDimensions + * @returns GcsDestination * @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.automl.v1.DocumentDimensions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.GcsDestination; /** - * Verifies a DocumentDimensions message. + * Verifies a GcsDestination 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 DocumentDimensions message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentDimensions + * @returns GcsDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DocumentDimensions; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GcsDestination; /** - * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. - * @param message DocumentDimensions + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.DocumentDimensions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentDimensions to JSON. + * Converts this GcsDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DocumentDimensions { - - /** DocumentDimensionUnit enum. */ - enum DocumentDimensionUnit { - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0, - INCH = 1, - CENTIMETER = 2, - POINT = 3 - } - } - - /** Properties of a Document. */ - interface IDocument { - - /** Document inputConfig */ - inputConfig?: (google.cloud.automl.v1.IDocumentInputConfig|null); - - /** Document documentText */ - documentText?: (google.cloud.automl.v1.ITextSnippet|null); + /** Properties of an AnnotationSpec. */ + interface IAnnotationSpec { - /** Document layout */ - layout?: (google.cloud.automl.v1.Document.ILayout[]|null); + /** AnnotationSpec name */ + name?: (string|null); - /** Document documentDimensions */ - documentDimensions?: (google.cloud.automl.v1.IDocumentDimensions|null); + /** AnnotationSpec displayName */ + displayName?: (string|null); - /** Document pageCount */ - pageCount?: (number|null); + /** AnnotationSpec exampleCount */ + exampleCount?: (number|null); } - /** Represents a Document. */ - class Document implements IDocument { + /** Represents an AnnotationSpec. */ + class AnnotationSpec implements IAnnotationSpec { /** - * Constructs a new Document. + * Constructs a new AnnotationSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDocument); - - /** Document inputConfig. */ - public inputConfig?: (google.cloud.automl.v1.IDocumentInputConfig|null); - - /** Document documentText. */ - public documentText?: (google.cloud.automl.v1.ITextSnippet|null); + constructor(properties?: google.cloud.automl.v1.IAnnotationSpec); - /** Document layout. */ - public layout: google.cloud.automl.v1.Document.ILayout[]; + /** AnnotationSpec name. */ + public name: string; - /** Document documentDimensions. */ - public documentDimensions?: (google.cloud.automl.v1.IDocumentDimensions|null); + /** AnnotationSpec displayName. */ + public displayName: string; - /** Document pageCount. */ - public pageCount: number; + /** AnnotationSpec exampleCount. */ + public exampleCount: number; /** - * Creates a new Document instance using the specified properties. + * Creates a new AnnotationSpec instance using the specified properties. * @param [properties] Properties to set - * @returns Document instance + * @returns AnnotationSpec instance */ - public static create(properties?: google.cloud.automl.v1.IDocument): google.cloud.automl.v1.Document; + public static create(properties?: google.cloud.automl.v1.IAnnotationSpec): google.cloud.automl.v1.AnnotationSpec; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. + * @param message AnnotationSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. + * @param message AnnotationSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes an AnnotationSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Document + * @returns AnnotationSpec * @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.automl.v1.Document; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.AnnotationSpec; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Document + * @returns AnnotationSpec * @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.automl.v1.Document; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.AnnotationSpec; /** - * Verifies a Document message. + * Verifies an AnnotationSpec 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 Document message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Document + * @returns AnnotationSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Document; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.AnnotationSpec; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. - * @param message Document + * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. + * @param message AnnotationSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.AnnotationSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Document to JSON. + * Converts this AnnotationSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Document { - - /** Properties of a Layout. */ - interface ILayout { - - /** Layout textSegment */ - textSegment?: (google.cloud.automl.v1.ITextSegment|null); - - /** Layout pageNumber */ - pageNumber?: (number|null); + /** Properties of a Dataset. */ + interface IDataset { - /** Layout boundingPoly */ - boundingPoly?: (google.cloud.automl.v1.IBoundingPoly|null); + /** Dataset translationDatasetMetadata */ + translationDatasetMetadata?: (google.cloud.automl.v1.ITranslationDatasetMetadata|null); - /** Layout textSegmentType */ - textSegmentType?: (google.cloud.automl.v1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1.Document.Layout.TextSegmentType|null); - } + /** Dataset imageClassificationDatasetMetadata */ + imageClassificationDatasetMetadata?: (google.cloud.automl.v1.IImageClassificationDatasetMetadata|null); - /** Represents a Layout. */ - class Layout implements ILayout { + /** Dataset textClassificationDatasetMetadata */ + textClassificationDatasetMetadata?: (google.cloud.automl.v1.ITextClassificationDatasetMetadata|null); - /** - * Constructs a new Layout. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.Document.ILayout); + /** Dataset imageObjectDetectionDatasetMetadata */ + imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null); - /** Layout textSegment. */ - public textSegment?: (google.cloud.automl.v1.ITextSegment|null); + /** Dataset textExtractionDatasetMetadata */ + textExtractionDatasetMetadata?: (google.cloud.automl.v1.ITextExtractionDatasetMetadata|null); - /** Layout pageNumber. */ - public pageNumber: number; + /** Dataset textSentimentDatasetMetadata */ + textSentimentDatasetMetadata?: (google.cloud.automl.v1.ITextSentimentDatasetMetadata|null); - /** Layout boundingPoly. */ - public boundingPoly?: (google.cloud.automl.v1.IBoundingPoly|null); + /** Dataset name */ + name?: (string|null); - /** Layout textSegmentType. */ - public textSegmentType: (google.cloud.automl.v1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1.Document.Layout.TextSegmentType); + /** Dataset displayName */ + displayName?: (string|null); - /** - * Creates a new Layout instance using the specified properties. - * @param [properties] Properties to set - * @returns Layout instance - */ - public static create(properties?: google.cloud.automl.v1.Document.ILayout): google.cloud.automl.v1.Document.Layout; + /** Dataset description */ + description?: (string|null); - /** - * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. - * @param message Layout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** Dataset exampleCount */ + exampleCount?: (number|null); - /** - * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. - * @param message Layout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** Dataset createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a Layout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Layout - * @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.automl.v1.Document.Layout; + /** Dataset etag */ + etag?: (string|null); - /** - * Decodes a Layout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Layout - * @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.automl.v1.Document.Layout; + /** Dataset labels */ + labels?: ({ [k: string]: string }|null); + } - /** - * Verifies a Layout 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); + /** Represents a Dataset. */ + class Dataset implements IDataset { - /** - * Creates a Layout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Layout - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Document.Layout; + /** + * Constructs a new Dataset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.IDataset); - /** - * Creates a plain object from a Layout message. Also converts values to other types if specified. - * @param message Layout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.Document.Layout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Dataset translationDatasetMetadata. */ + public translationDatasetMetadata?: (google.cloud.automl.v1.ITranslationDatasetMetadata|null); - /** - * Converts this Layout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Dataset imageClassificationDatasetMetadata. */ + public imageClassificationDatasetMetadata?: (google.cloud.automl.v1.IImageClassificationDatasetMetadata|null); - namespace Layout { + /** Dataset textClassificationDatasetMetadata. */ + public textClassificationDatasetMetadata?: (google.cloud.automl.v1.ITextClassificationDatasetMetadata|null); - /** TextSegmentType enum. */ - enum TextSegmentType { - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0, - TOKEN = 1, - PARAGRAPH = 2, - FORM_FIELD = 3, - FORM_FIELD_NAME = 4, - FORM_FIELD_CONTENTS = 5, - TABLE = 6, - TABLE_HEADER = 7, - TABLE_ROW = 8, - TABLE_CELL = 9 - } - } - } + /** Dataset imageObjectDetectionDatasetMetadata. */ + public imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null); - /** Properties of an ExamplePayload. */ - interface IExamplePayload { + /** Dataset textExtractionDatasetMetadata. */ + public textExtractionDatasetMetadata?: (google.cloud.automl.v1.ITextExtractionDatasetMetadata|null); - /** ExamplePayload image */ - image?: (google.cloud.automl.v1.IImage|null); + /** Dataset textSentimentDatasetMetadata. */ + public textSentimentDatasetMetadata?: (google.cloud.automl.v1.ITextSentimentDatasetMetadata|null); - /** ExamplePayload textSnippet */ - textSnippet?: (google.cloud.automl.v1.ITextSnippet|null); + /** Dataset name. */ + public name: string; - /** ExamplePayload document */ - document?: (google.cloud.automl.v1.IDocument|null); - } + /** Dataset displayName. */ + public displayName: string; - /** Represents an ExamplePayload. */ - class ExamplePayload implements IExamplePayload { + /** Dataset description. */ + public description: string; - /** - * Constructs a new ExamplePayload. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.IExamplePayload); + /** Dataset exampleCount. */ + public exampleCount: number; - /** ExamplePayload image. */ - public image?: (google.cloud.automl.v1.IImage|null); + /** Dataset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ExamplePayload textSnippet. */ - public textSnippet?: (google.cloud.automl.v1.ITextSnippet|null); + /** Dataset etag. */ + public etag: string; - /** ExamplePayload document. */ - public document?: (google.cloud.automl.v1.IDocument|null); + /** Dataset labels. */ + public labels: { [k: string]: string }; - /** ExamplePayload payload. */ - public payload?: ("image"|"textSnippet"|"document"); + /** Dataset datasetMetadata. */ + public datasetMetadata?: ("translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"); /** - * Creates a new ExamplePayload instance using the specified properties. + * Creates a new Dataset instance using the specified properties. * @param [properties] Properties to set - * @returns ExamplePayload instance + * @returns Dataset instance */ - public static create(properties?: google.cloud.automl.v1.IExamplePayload): google.cloud.automl.v1.ExamplePayload; + public static create(properties?: google.cloud.automl.v1.IDataset): google.cloud.automl.v1.Dataset; /** - * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. - * @param message ExamplePayload message or plain object to encode + * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. + * @param message Dataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. - * @param message ExamplePayload message or plain object to encode + /** + * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. + * @param message Dataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExamplePayload message from the specified reader or buffer. + * Decodes a Dataset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExamplePayload + * @returns Dataset * @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.automl.v1.ExamplePayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.Dataset; /** - * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. + * Decodes a Dataset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExamplePayload + * @returns Dataset * @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.automl.v1.ExamplePayload; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.Dataset; /** - * Verifies an ExamplePayload message. + * Verifies a Dataset 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 ExamplePayload message from a plain object. Also converts values to their respective internal types. + * Creates a Dataset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExamplePayload + * @returns Dataset */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExamplePayload; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Dataset; /** - * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. - * @param message ExamplePayload + * Creates a plain object from a Dataset message. Also converts values to other types if specified. + * @param message Dataset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ExamplePayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.Dataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExamplePayload to JSON. + * Converts this Dataset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a NormalizedVertex. */ - interface INormalizedVertex { - - /** NormalizedVertex x */ - x?: (number|null); + /** Properties of an ImageClassificationDatasetMetadata. */ + interface IImageClassificationDatasetMetadata { - /** NormalizedVertex y */ - y?: (number|null); + /** ImageClassificationDatasetMetadata classificationType */ + classificationType?: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType|null); } - /** Represents a NormalizedVertex. */ - class NormalizedVertex implements INormalizedVertex { + /** Represents an ImageClassificationDatasetMetadata. */ + class ImageClassificationDatasetMetadata implements IImageClassificationDatasetMetadata { /** - * Constructs a new NormalizedVertex. + * Constructs a new ImageClassificationDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.INormalizedVertex); - - /** NormalizedVertex x. */ - public x: number; + constructor(properties?: google.cloud.automl.v1.IImageClassificationDatasetMetadata); - /** NormalizedVertex y. */ - public y: number; + /** ImageClassificationDatasetMetadata classificationType. */ + public classificationType: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType); /** - * Creates a new NormalizedVertex instance using the specified properties. + * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns NormalizedVertex instance + * @returns ImageClassificationDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1.INormalizedVertex): google.cloud.automl.v1.NormalizedVertex; + public static create(properties?: google.cloud.automl.v1.IImageClassificationDatasetMetadata): google.cloud.automl.v1.ImageClassificationDatasetMetadata; /** - * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. - * @param message NormalizedVertex message or plain object to encode + * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. + * @param message ImageClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. - * @param message NormalizedVertex message or plain object to encode + * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. + * @param message ImageClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NormalizedVertex message from the specified reader or buffer. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NormalizedVertex + * @returns ImageClassificationDatasetMetadata * @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.automl.v1.NormalizedVertex; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageClassificationDatasetMetadata; /** - * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NormalizedVertex + * @returns ImageClassificationDatasetMetadata * @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.automl.v1.NormalizedVertex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageClassificationDatasetMetadata; /** - * Verifies a NormalizedVertex message. + * Verifies an ImageClassificationDatasetMetadata 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 NormalizedVertex message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NormalizedVertex + * @returns ImageClassificationDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.NormalizedVertex; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageClassificationDatasetMetadata; /** - * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. - * @param message NormalizedVertex + * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. + * @param message ImageClassificationDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NormalizedVertex to JSON. + * Converts this ImageClassificationDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BoundingPoly. */ - interface IBoundingPoly { - - /** BoundingPoly normalizedVertices */ - normalizedVertices?: (google.cloud.automl.v1.INormalizedVertex[]|null); + /** Properties of an ImageObjectDetectionDatasetMetadata. */ + interface IImageObjectDetectionDatasetMetadata { } - /** Represents a BoundingPoly. */ - class BoundingPoly implements IBoundingPoly { + /** Represents an ImageObjectDetectionDatasetMetadata. */ + class ImageObjectDetectionDatasetMetadata implements IImageObjectDetectionDatasetMetadata { /** - * Constructs a new BoundingPoly. + * Constructs a new ImageObjectDetectionDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IBoundingPoly); - - /** BoundingPoly normalizedVertices. */ - public normalizedVertices: google.cloud.automl.v1.INormalizedVertex[]; + constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata); /** - * Creates a new BoundingPoly instance using the specified properties. + * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BoundingPoly instance + * @returns ImageObjectDetectionDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IBoundingPoly): google.cloud.automl.v1.BoundingPoly; + public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata): google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata; /** - * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. - * @param message BoundingPoly message or plain object to encode + * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. - * @param message BoundingPoly message or plain object to encode + * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BoundingPoly message from the specified reader or buffer. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BoundingPoly + * @returns ImageObjectDetectionDatasetMetadata * @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.automl.v1.BoundingPoly; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata; /** - * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BoundingPoly + * @returns ImageObjectDetectionDatasetMetadata * @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.automl.v1.BoundingPoly; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata; /** - * Verifies a BoundingPoly message. + * Verifies an ImageObjectDetectionDatasetMetadata 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 BoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BoundingPoly + * @returns ImageObjectDetectionDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BoundingPoly; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata; /** - * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. - * @param message BoundingPoly + * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. + * @param message ImageObjectDetectionDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BoundingPoly to JSON. + * Converts this ImageObjectDetectionDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an InputConfig. */ - interface IInputConfig { + /** Properties of an ImageClassificationModelMetadata. */ + interface IImageClassificationModelMetadata { - /** InputConfig gcsSource */ - gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + /** ImageClassificationModelMetadata baseModelId */ + baseModelId?: (string|null); - /** InputConfig params */ - params?: ({ [k: string]: string }|null); + /** ImageClassificationModelMetadata trainBudgetMilliNodeHours */ + trainBudgetMilliNodeHours?: (number|Long|string|null); + + /** ImageClassificationModelMetadata trainCostMilliNodeHours */ + trainCostMilliNodeHours?: (number|Long|string|null); + + /** ImageClassificationModelMetadata stopReason */ + stopReason?: (string|null); + + /** ImageClassificationModelMetadata modelType */ + modelType?: (string|null); + + /** ImageClassificationModelMetadata nodeQps */ + nodeQps?: (number|null); + + /** ImageClassificationModelMetadata nodeCount */ + nodeCount?: (number|Long|string|null); } - /** Represents an InputConfig. */ - class InputConfig implements IInputConfig { + /** Represents an ImageClassificationModelMetadata. */ + class ImageClassificationModelMetadata implements IImageClassificationModelMetadata { /** - * Constructs a new InputConfig. + * Constructs a new ImageClassificationModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IInputConfig); + constructor(properties?: google.cloud.automl.v1.IImageClassificationModelMetadata); - /** InputConfig gcsSource. */ - public gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + /** ImageClassificationModelMetadata baseModelId. */ + public baseModelId: string; - /** InputConfig params. */ - public params: { [k: string]: string }; + /** ImageClassificationModelMetadata trainBudgetMilliNodeHours. */ + public trainBudgetMilliNodeHours: (number|Long|string); - /** InputConfig source. */ - public source?: "gcsSource"; + /** ImageClassificationModelMetadata trainCostMilliNodeHours. */ + public trainCostMilliNodeHours: (number|Long|string); + + /** ImageClassificationModelMetadata stopReason. */ + public stopReason: string; + + /** ImageClassificationModelMetadata modelType. */ + public modelType: string; + + /** ImageClassificationModelMetadata nodeQps. */ + public nodeQps: number; + + /** ImageClassificationModelMetadata nodeCount. */ + public nodeCount: (number|Long|string); /** - * Creates a new InputConfig instance using the specified properties. + * Creates a new ImageClassificationModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns InputConfig instance + * @returns ImageClassificationModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IInputConfig): google.cloud.automl.v1.InputConfig; + public static create(properties?: google.cloud.automl.v1.IImageClassificationModelMetadata): google.cloud.automl.v1.ImageClassificationModelMetadata; /** - * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. - * @param message InputConfig message or plain object to encode + * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. + * @param message ImageClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. - * @param message InputConfig message or plain object to encode + * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. + * @param message ImageClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InputConfig message from the specified reader or buffer. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InputConfig + * @returns ImageClassificationModelMetadata * @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.automl.v1.InputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageClassificationModelMetadata; /** - * Decodes an InputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InputConfig + * @returns ImageClassificationModelMetadata * @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.automl.v1.InputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageClassificationModelMetadata; /** - * Verifies an InputConfig message. + * Verifies an ImageClassificationModelMetadata 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 InputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InputConfig + * @returns ImageClassificationModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.InputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageClassificationModelMetadata; /** - * Creates a plain object from an InputConfig message. Also converts values to other types if specified. - * @param message InputConfig + * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. + * @param message ImageClassificationModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.InputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InputConfig to JSON. + * Converts this ImageClassificationModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictInputConfig. */ - interface IBatchPredictInputConfig { + /** Properties of an ImageObjectDetectionModelMetadata. */ + interface IImageObjectDetectionModelMetadata { - /** BatchPredictInputConfig gcsSource */ - gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + /** ImageObjectDetectionModelMetadata modelType */ + modelType?: (string|null); + + /** ImageObjectDetectionModelMetadata nodeCount */ + nodeCount?: (number|Long|string|null); + + /** ImageObjectDetectionModelMetadata nodeQps */ + nodeQps?: (number|null); + + /** ImageObjectDetectionModelMetadata stopReason */ + stopReason?: (string|null); + + /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours */ + trainBudgetMilliNodeHours?: (number|Long|string|null); + + /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours */ + trainCostMilliNodeHours?: (number|Long|string|null); } - /** Represents a BatchPredictInputConfig. */ - class BatchPredictInputConfig implements IBatchPredictInputConfig { + /** Represents an ImageObjectDetectionModelMetadata. */ + class ImageObjectDetectionModelMetadata implements IImageObjectDetectionModelMetadata { /** - * Constructs a new BatchPredictInputConfig. + * Constructs a new ImageObjectDetectionModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IBatchPredictInputConfig); + constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionModelMetadata); - /** BatchPredictInputConfig gcsSource. */ - public gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + /** ImageObjectDetectionModelMetadata modelType. */ + public modelType: string; - /** BatchPredictInputConfig source. */ - public source?: "gcsSource"; + /** ImageObjectDetectionModelMetadata nodeCount. */ + public nodeCount: (number|Long|string); + + /** ImageObjectDetectionModelMetadata nodeQps. */ + public nodeQps: number; + + /** ImageObjectDetectionModelMetadata stopReason. */ + public stopReason: string; + + /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. */ + public trainBudgetMilliNodeHours: (number|Long|string); + + /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours. */ + public trainCostMilliNodeHours: (number|Long|string); /** - * Creates a new BatchPredictInputConfig instance using the specified properties. + * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictInputConfig instance + * @returns ImageObjectDetectionModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IBatchPredictInputConfig): google.cloud.automl.v1.BatchPredictInputConfig; + public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionModelMetadata): google.cloud.automl.v1.ImageObjectDetectionModelMetadata; /** - * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. - * @param message BatchPredictInputConfig message or plain object to encode + * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. - * @param message BatchPredictInputConfig message or plain object to encode + * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictInputConfig + * @returns ImageObjectDetectionModelMetadata * @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.automl.v1.BatchPredictInputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageObjectDetectionModelMetadata; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictInputConfig + * @returns ImageObjectDetectionModelMetadata * @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.automl.v1.BatchPredictInputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageObjectDetectionModelMetadata; /** - * Verifies a BatchPredictInputConfig message. + * Verifies an ImageObjectDetectionModelMetadata 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 BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictInputConfig + * @returns ImageObjectDetectionModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictInputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionModelMetadata; /** - * Creates a plain object from a BatchPredictInputConfig message. Also converts values to other types if specified. - * @param message BatchPredictInputConfig + * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. + * @param message ImageObjectDetectionModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.BatchPredictInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictInputConfig to JSON. + * Converts this ImageObjectDetectionModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DocumentInputConfig. */ - interface IDocumentInputConfig { + /** Properties of an ImageClassificationModelDeploymentMetadata. */ + interface IImageClassificationModelDeploymentMetadata { - /** DocumentInputConfig gcsSource */ - gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + /** ImageClassificationModelDeploymentMetadata nodeCount */ + nodeCount?: (number|Long|string|null); } - /** Represents a DocumentInputConfig. */ - class DocumentInputConfig implements IDocumentInputConfig { + /** Represents an ImageClassificationModelDeploymentMetadata. */ + class ImageClassificationModelDeploymentMetadata implements IImageClassificationModelDeploymentMetadata { /** - * Constructs a new DocumentInputConfig. + * Constructs a new ImageClassificationModelDeploymentMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDocumentInputConfig); + constructor(properties?: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata); - /** DocumentInputConfig gcsSource. */ - public gcsSource?: (google.cloud.automl.v1.IGcsSource|null); + /** ImageClassificationModelDeploymentMetadata nodeCount. */ + public nodeCount: (number|Long|string); /** - * Creates a new DocumentInputConfig instance using the specified properties. + * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentInputConfig instance + * @returns ImageClassificationModelDeploymentMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IDocumentInputConfig): google.cloud.automl.v1.DocumentInputConfig; + public static create(properties?: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata): google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata; /** - * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. - * @param message DocumentInputConfig message or plain object to encode + * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. + * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. - * @param message DocumentInputConfig message or plain object to encode + * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. + * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentInputConfig + * @returns ImageClassificationModelDeploymentMetadata * @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.automl.v1.DocumentInputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentInputConfig + * @returns ImageClassificationModelDeploymentMetadata * @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.automl.v1.DocumentInputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata; /** - * Verifies a DocumentInputConfig message. + * Verifies an ImageClassificationModelDeploymentMetadata 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 DocumentInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentInputConfig + * @returns ImageClassificationModelDeploymentMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DocumentInputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata; /** - * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. - * @param message DocumentInputConfig + * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. + * @param message ImageClassificationModelDeploymentMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.DocumentInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentInputConfig to JSON. + * Converts this ImageClassificationModelDeploymentMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OutputConfig. */ - interface IOutputConfig { + /** Properties of an ImageObjectDetectionModelDeploymentMetadata. */ + interface IImageObjectDetectionModelDeploymentMetadata { - /** OutputConfig gcsDestination */ - gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); + /** ImageObjectDetectionModelDeploymentMetadata nodeCount */ + nodeCount?: (number|Long|string|null); } - /** Represents an OutputConfig. */ - class OutputConfig implements IOutputConfig { + /** Represents an ImageObjectDetectionModelDeploymentMetadata. */ + class ImageObjectDetectionModelDeploymentMetadata implements IImageObjectDetectionModelDeploymentMetadata { /** - * Constructs a new OutputConfig. + * Constructs a new ImageObjectDetectionModelDeploymentMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IOutputConfig); - - /** OutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); + constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata); - /** OutputConfig destination. */ - public destination?: "gcsDestination"; + /** ImageObjectDetectionModelDeploymentMetadata nodeCount. */ + public nodeCount: (number|Long|string); /** - * Creates a new OutputConfig instance using the specified properties. + * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns OutputConfig instance + * @returns ImageObjectDetectionModelDeploymentMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IOutputConfig): google.cloud.automl.v1.OutputConfig; + public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata): google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputConfig + * @returns ImageObjectDetectionModelDeploymentMetadata * @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.automl.v1.OutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputConfig + * @returns ImageObjectDetectionModelDeploymentMetadata * @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.automl.v1.OutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata; /** - * Verifies an OutputConfig message. + * Verifies an ImageObjectDetectionModelDeploymentMetadata 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 OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputConfig + * @returns ImageObjectDetectionModelDeploymentMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.OutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. - * @param message OutputConfig + * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. + * @param message ImageObjectDetectionModelDeploymentMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputConfig to JSON. + * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictOutputConfig. */ - interface IBatchPredictOutputConfig { + /** Properties of a TextClassificationDatasetMetadata. */ + interface ITextClassificationDatasetMetadata { - /** BatchPredictOutputConfig gcsDestination */ - gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); + /** TextClassificationDatasetMetadata classificationType */ + classificationType?: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType|null); } - /** Represents a BatchPredictOutputConfig. */ - class BatchPredictOutputConfig implements IBatchPredictOutputConfig { + /** Represents a TextClassificationDatasetMetadata. */ + class TextClassificationDatasetMetadata implements ITextClassificationDatasetMetadata { /** - * Constructs a new BatchPredictOutputConfig. + * Constructs a new TextClassificationDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IBatchPredictOutputConfig); - - /** BatchPredictOutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); + constructor(properties?: google.cloud.automl.v1.ITextClassificationDatasetMetadata); - /** BatchPredictOutputConfig destination. */ - public destination?: "gcsDestination"; + /** TextClassificationDatasetMetadata classificationType. */ + public classificationType: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType); /** - * Creates a new BatchPredictOutputConfig instance using the specified properties. + * Creates a new TextClassificationDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictOutputConfig instance + * @returns TextClassificationDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IBatchPredictOutputConfig): google.cloud.automl.v1.BatchPredictOutputConfig; + public static create(properties?: google.cloud.automl.v1.ITextClassificationDatasetMetadata): google.cloud.automl.v1.TextClassificationDatasetMetadata; /** - * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. - * @param message BatchPredictOutputConfig message or plain object to encode + * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. + * @param message TextClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. - * @param message BatchPredictOutputConfig message or plain object to encode + * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. + * @param message TextClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictOutputConfig + * @returns TextClassificationDatasetMetadata * @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.automl.v1.BatchPredictOutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextClassificationDatasetMetadata; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictOutputConfig + * @returns TextClassificationDatasetMetadata * @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.automl.v1.BatchPredictOutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextClassificationDatasetMetadata; /** - * Verifies a BatchPredictOutputConfig message. + * Verifies a TextClassificationDatasetMetadata 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 BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictOutputConfig + * @returns TextClassificationDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictOutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextClassificationDatasetMetadata; /** - * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. - * @param message BatchPredictOutputConfig + * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. + * @param message TextClassificationDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.BatchPredictOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictOutputConfig to JSON. + * Converts this TextClassificationDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ModelExportOutputConfig. */ - interface IModelExportOutputConfig { - - /** ModelExportOutputConfig gcsDestination */ - gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); - - /** ModelExportOutputConfig modelFormat */ - modelFormat?: (string|null); + /** Properties of a TextClassificationModelMetadata. */ + interface ITextClassificationModelMetadata { - /** ModelExportOutputConfig params */ - params?: ({ [k: string]: string }|null); + /** TextClassificationModelMetadata classificationType */ + classificationType?: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType|null); } - /** Represents a ModelExportOutputConfig. */ - class ModelExportOutputConfig implements IModelExportOutputConfig { + /** Represents a TextClassificationModelMetadata. */ + class TextClassificationModelMetadata implements ITextClassificationModelMetadata { /** - * Constructs a new ModelExportOutputConfig. + * Constructs a new TextClassificationModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IModelExportOutputConfig); - - /** ModelExportOutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.automl.v1.IGcsDestination|null); - - /** ModelExportOutputConfig modelFormat. */ - public modelFormat: string; - - /** ModelExportOutputConfig params. */ - public params: { [k: string]: string }; + constructor(properties?: google.cloud.automl.v1.ITextClassificationModelMetadata); - /** ModelExportOutputConfig destination. */ - public destination?: "gcsDestination"; + /** TextClassificationModelMetadata classificationType. */ + public classificationType: (google.cloud.automl.v1.ClassificationType|keyof typeof google.cloud.automl.v1.ClassificationType); /** - * Creates a new ModelExportOutputConfig instance using the specified properties. + * Creates a new TextClassificationModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ModelExportOutputConfig instance + * @returns TextClassificationModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IModelExportOutputConfig): google.cloud.automl.v1.ModelExportOutputConfig; + public static create(properties?: google.cloud.automl.v1.ITextClassificationModelMetadata): google.cloud.automl.v1.TextClassificationModelMetadata; /** - * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. - * @param message ModelExportOutputConfig message or plain object to encode + * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. + * @param message TextClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. - * @param message ModelExportOutputConfig message or plain object to encode + * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. + * @param message TextClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ModelExportOutputConfig + * @returns TextClassificationModelMetadata * @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.automl.v1.ModelExportOutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextClassificationModelMetadata; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ModelExportOutputConfig + * @returns TextClassificationModelMetadata * @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.automl.v1.ModelExportOutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextClassificationModelMetadata; /** - * Verifies a ModelExportOutputConfig message. + * Verifies a TextClassificationModelMetadata 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 ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ModelExportOutputConfig + * @returns TextClassificationModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ModelExportOutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextClassificationModelMetadata; /** - * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. - * @param message ModelExportOutputConfig + * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. + * @param message TextClassificationModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ModelExportOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ModelExportOutputConfig to JSON. + * Converts this TextClassificationModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsSource. */ - interface IGcsSource { - - /** GcsSource inputUris */ - inputUris?: (string[]|null); + /** Properties of a TextExtractionDatasetMetadata. */ + interface ITextExtractionDatasetMetadata { } - /** Represents a GcsSource. */ - class GcsSource implements IGcsSource { + /** Represents a TextExtractionDatasetMetadata. */ + class TextExtractionDatasetMetadata implements ITextExtractionDatasetMetadata { /** - * Constructs a new GcsSource. + * Constructs a new TextExtractionDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IGcsSource); - - /** GcsSource inputUris. */ - public inputUris: string[]; + constructor(properties?: google.cloud.automl.v1.ITextExtractionDatasetMetadata); /** - * Creates a new GcsSource instance using the specified properties. + * Creates a new TextExtractionDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns GcsSource instance + * @returns TextExtractionDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IGcsSource): google.cloud.automl.v1.GcsSource; + public static create(properties?: google.cloud.automl.v1.ITextExtractionDatasetMetadata): google.cloud.automl.v1.TextExtractionDatasetMetadata; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. + * @param message TextExtractionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. + * @param message TextExtractionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsSource + * @returns TextExtractionDatasetMetadata * @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.automl.v1.GcsSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextExtractionDatasetMetadata; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsSource + * @returns TextExtractionDatasetMetadata * @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.automl.v1.GcsSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextExtractionDatasetMetadata; /** - * Verifies a GcsSource message. + * Verifies a TextExtractionDatasetMetadata 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 GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsSource + * @returns TextExtractionDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GcsSource; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionDatasetMetadata; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @param message GcsSource + * Creates a plain object from a TextExtractionDatasetMetadata message. Also converts values to other types if specified. + * @param message TextExtractionDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextExtractionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsSource to JSON. + * Converts this TextExtractionDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsDestination. */ - interface IGcsDestination { - - /** GcsDestination outputUriPrefix */ - outputUriPrefix?: (string|null); + /** Properties of a TextExtractionModelMetadata. */ + interface ITextExtractionModelMetadata { } - /** Represents a GcsDestination. */ - class GcsDestination implements IGcsDestination { + /** Represents a TextExtractionModelMetadata. */ + class TextExtractionModelMetadata implements ITextExtractionModelMetadata { /** - * Constructs a new GcsDestination. + * Constructs a new TextExtractionModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IGcsDestination); - - /** GcsDestination outputUriPrefix. */ - public outputUriPrefix: string; + constructor(properties?: google.cloud.automl.v1.ITextExtractionModelMetadata); /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new TextExtractionModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns GcsDestination instance + * @returns TextExtractionModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IGcsDestination): google.cloud.automl.v1.GcsDestination; + public static create(properties?: google.cloud.automl.v1.ITextExtractionModelMetadata): google.cloud.automl.v1.TextExtractionModelMetadata; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. + * @param message TextExtractionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. + * @param message TextExtractionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsDestination + * @returns TextExtractionModelMetadata * @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.automl.v1.GcsDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextExtractionModelMetadata; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsDestination + * @returns TextExtractionModelMetadata * @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.automl.v1.GcsDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextExtractionModelMetadata; /** - * Verifies a GcsDestination message. + * Verifies a TextExtractionModelMetadata 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 GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsDestination + * @returns TextExtractionModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GcsDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionModelMetadata; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @param message GcsDestination + * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. + * @param message TextExtractionModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextExtractionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsDestination to JSON. + * Converts this TextExtractionModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSegment. */ - interface ITextSegment { - - /** TextSegment content */ - content?: (string|null); - - /** TextSegment startOffset */ - startOffset?: (number|Long|string|null); + /** Properties of a TextSentimentDatasetMetadata. */ + interface ITextSentimentDatasetMetadata { - /** TextSegment endOffset */ - endOffset?: (number|Long|string|null); + /** TextSentimentDatasetMetadata sentimentMax */ + sentimentMax?: (number|null); } - /** Represents a TextSegment. */ - class TextSegment implements ITextSegment { + /** Represents a TextSentimentDatasetMetadata. */ + class TextSentimentDatasetMetadata implements ITextSentimentDatasetMetadata { /** - * Constructs a new TextSegment. + * Constructs a new TextSentimentDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextSegment); - - /** TextSegment content. */ - public content: string; - - /** TextSegment startOffset. */ - public startOffset: (number|Long|string); + constructor(properties?: google.cloud.automl.v1.ITextSentimentDatasetMetadata); - /** TextSegment endOffset. */ - public endOffset: (number|Long|string); + /** TextSentimentDatasetMetadata sentimentMax. */ + public sentimentMax: number; /** - * Creates a new TextSegment instance using the specified properties. + * Creates a new TextSentimentDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextSegment instance + * @returns TextSentimentDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1.ITextSegment): google.cloud.automl.v1.TextSegment; + public static create(properties?: google.cloud.automl.v1.ITextSentimentDatasetMetadata): google.cloud.automl.v1.TextSentimentDatasetMetadata; /** - * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. - * @param message TextSegment message or plain object to encode + * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. + * @param message TextSentimentDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. - * @param message TextSegment message or plain object to encode + * Encodes the specified TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. + * @param message TextSentimentDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSegment message from the specified reader or buffer. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSegment + * @returns TextSentimentDatasetMetadata * @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.automl.v1.TextSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextSentimentDatasetMetadata; /** - * Decodes a TextSegment message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSegment + * @returns TextSentimentDatasetMetadata * @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.automl.v1.TextSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextSentimentDatasetMetadata; /** - * Verifies a TextSegment message. + * Verifies a TextSentimentDatasetMetadata 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 TextSegment message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSegment + * @returns TextSentimentDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSegment; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentDatasetMetadata; /** - * Creates a plain object from a TextSegment message. Also converts values to other types if specified. - * @param message TextSegment + * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. + * @param message TextSentimentDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextSentimentDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSegment to JSON. + * Converts this TextSentimentDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSentimentAnnotation. */ - interface ITextSentimentAnnotation { - - /** TextSentimentAnnotation sentiment */ - sentiment?: (number|null); + /** Properties of a TextSentimentModelMetadata. */ + interface ITextSentimentModelMetadata { } - /** Represents a TextSentimentAnnotation. */ - class TextSentimentAnnotation implements ITextSentimentAnnotation { + /** Represents a TextSentimentModelMetadata. */ + class TextSentimentModelMetadata implements ITextSentimentModelMetadata { /** - * Constructs a new TextSentimentAnnotation. + * Constructs a new TextSentimentModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextSentimentAnnotation); - - /** TextSentimentAnnotation sentiment. */ - public sentiment: number; + constructor(properties?: google.cloud.automl.v1.ITextSentimentModelMetadata); /** - * Creates a new TextSentimentAnnotation instance using the specified properties. + * Creates a new TextSentimentModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentAnnotation instance + * @returns TextSentimentModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1.ITextSentimentAnnotation): google.cloud.automl.v1.TextSentimentAnnotation; + public static create(properties?: google.cloud.automl.v1.ITextSentimentModelMetadata): google.cloud.automl.v1.TextSentimentModelMetadata; /** - * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. - * @param message TextSentimentAnnotation message or plain object to encode + * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. + * @param message TextSentimentModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. - * @param message TextSentimentAnnotation message or plain object to encode + * Encodes the specified TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. + * @param message TextSentimentModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentAnnotation + * @returns TextSentimentModelMetadata * @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.automl.v1.TextSentimentAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.TextSentimentModelMetadata; /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentAnnotation + * @returns TextSentimentModelMetadata * @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.automl.v1.TextSentimentAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.TextSentimentModelMetadata; /** - * Verifies a TextSentimentAnnotation message. + * Verifies a TextSentimentModelMetadata 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 TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentAnnotation + * @returns TextSentimentModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentModelMetadata; /** - * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. - * @param message TextSentimentAnnotation + * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. + * @param message TextSentimentModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextSentimentAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.TextSentimentModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentAnnotation to JSON. + * Converts this TextSentimentModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSentimentEvaluationMetrics. */ - interface ITextSentimentEvaluationMetrics { + /** Properties of a Model. */ + interface IModel { - /** TextSentimentEvaluationMetrics precision */ - precision?: (number|null); + /** Model translationModelMetadata */ + translationModelMetadata?: (google.cloud.automl.v1.ITranslationModelMetadata|null); - /** TextSentimentEvaluationMetrics recall */ - recall?: (number|null); + /** Model imageClassificationModelMetadata */ + imageClassificationModelMetadata?: (google.cloud.automl.v1.IImageClassificationModelMetadata|null); - /** TextSentimentEvaluationMetrics f1Score */ - f1Score?: (number|null); + /** Model textClassificationModelMetadata */ + textClassificationModelMetadata?: (google.cloud.automl.v1.ITextClassificationModelMetadata|null); - /** TextSentimentEvaluationMetrics meanAbsoluteError */ - meanAbsoluteError?: (number|null); + /** Model imageObjectDetectionModelMetadata */ + imageObjectDetectionModelMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null); - /** TextSentimentEvaluationMetrics meanSquaredError */ - meanSquaredError?: (number|null); + /** Model textExtractionModelMetadata */ + textExtractionModelMetadata?: (google.cloud.automl.v1.ITextExtractionModelMetadata|null); - /** TextSentimentEvaluationMetrics linearKappa */ - linearKappa?: (number|null); + /** Model textSentimentModelMetadata */ + textSentimentModelMetadata?: (google.cloud.automl.v1.ITextSentimentModelMetadata|null); - /** TextSentimentEvaluationMetrics quadraticKappa */ - quadraticKappa?: (number|null); + /** Model name */ + name?: (string|null); - /** TextSentimentEvaluationMetrics confusionMatrix */ - confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + /** Model displayName */ + displayName?: (string|null); + + /** Model datasetId */ + datasetId?: (string|null); + + /** Model createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Model updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Model deploymentState */ + deploymentState?: (google.cloud.automl.v1.Model.DeploymentState|keyof typeof google.cloud.automl.v1.Model.DeploymentState|null); + + /** Model etag */ + etag?: (string|null); + + /** Model labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a TextSentimentEvaluationMetrics. */ - class TextSentimentEvaluationMetrics implements ITextSentimentEvaluationMetrics { + /** Represents a Model. */ + class Model implements IModel { /** - * Constructs a new TextSentimentEvaluationMetrics. + * Constructs a new Model. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextSentimentEvaluationMetrics); + constructor(properties?: google.cloud.automl.v1.IModel); - /** TextSentimentEvaluationMetrics precision. */ - public precision: number; + /** Model translationModelMetadata. */ + public translationModelMetadata?: (google.cloud.automl.v1.ITranslationModelMetadata|null); - /** TextSentimentEvaluationMetrics recall. */ - public recall: number; + /** Model imageClassificationModelMetadata. */ + public imageClassificationModelMetadata?: (google.cloud.automl.v1.IImageClassificationModelMetadata|null); - /** TextSentimentEvaluationMetrics f1Score. */ - public f1Score: number; + /** Model textClassificationModelMetadata. */ + public textClassificationModelMetadata?: (google.cloud.automl.v1.ITextClassificationModelMetadata|null); - /** TextSentimentEvaluationMetrics meanAbsoluteError. */ - public meanAbsoluteError: number; + /** Model imageObjectDetectionModelMetadata. */ + public imageObjectDetectionModelMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null); + + /** Model textExtractionModelMetadata. */ + public textExtractionModelMetadata?: (google.cloud.automl.v1.ITextExtractionModelMetadata|null); + + /** Model textSentimentModelMetadata. */ + public textSentimentModelMetadata?: (google.cloud.automl.v1.ITextSentimentModelMetadata|null); + + /** Model name. */ + public name: string; + + /** Model displayName. */ + public displayName: string; + + /** Model datasetId. */ + public datasetId: string; + + /** Model createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Model updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** TextSentimentEvaluationMetrics meanSquaredError. */ - public meanSquaredError: number; + /** Model deploymentState. */ + public deploymentState: (google.cloud.automl.v1.Model.DeploymentState|keyof typeof google.cloud.automl.v1.Model.DeploymentState); - /** TextSentimentEvaluationMetrics linearKappa. */ - public linearKappa: number; + /** Model etag. */ + public etag: string; - /** TextSentimentEvaluationMetrics quadraticKappa. */ - public quadraticKappa: number; + /** Model labels. */ + public labels: { [k: string]: string }; - /** TextSentimentEvaluationMetrics confusionMatrix. */ - public confusionMatrix?: (google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + /** Model modelMetadata. */ + public modelMetadata?: ("translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"textExtractionModelMetadata"|"textSentimentModelMetadata"); /** - * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. + * Creates a new Model instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentEvaluationMetrics instance + * @returns Model instance */ - public static create(properties?: google.cloud.automl.v1.ITextSentimentEvaluationMetrics): google.cloud.automl.v1.TextSentimentEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1.IModel): google.cloud.automl.v1.Model; /** - * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. - * @param message TextSentimentEvaluationMetrics message or plain object to encode + * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. + * @param message Model message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. - * @param message TextSentimentEvaluationMetrics message or plain object to encode + * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. + * @param message Model message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. + * Decodes a Model message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentEvaluationMetrics + * @returns Model * @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.automl.v1.TextSentimentEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.Model; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a Model message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentEvaluationMetrics + * @returns Model * @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.automl.v1.TextSentimentEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.Model; /** - * Verifies a TextSentimentEvaluationMetrics message. + * Verifies a Model 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 TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a Model message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentEvaluationMetrics + * @returns Model */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextSentimentEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Model; /** - * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. - * @param message TextSentimentEvaluationMetrics + * Creates a plain object from a Model message. Also converts values to other types if specified. + * @param message Model * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextSentimentEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentEvaluationMetrics to JSON. + * Converts this Model to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + namespace Model { + + /** DeploymentState enum. */ + enum DeploymentState { + DEPLOYMENT_STATE_UNSPECIFIED = 0, + DEPLOYED = 1, + UNDEPLOYED = 2 + } + } + /** Properties of a ModelEvaluation. */ interface IModelEvaluation { @@ -5683,18517 +5480,18494 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionAnnotation. */ - interface IImageObjectDetectionAnnotation { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** ImageObjectDetectionAnnotation boundingBox */ - boundingBox?: (google.cloud.automl.v1.IBoundingPoly|null); + /** OperationMetadata deleteDetails */ + deleteDetails?: (google.cloud.automl.v1.IDeleteOperationMetadata|null); - /** ImageObjectDetectionAnnotation score */ - score?: (number|null); - } + /** OperationMetadata deployModelDetails */ + deployModelDetails?: (google.cloud.automl.v1.IDeployModelOperationMetadata|null); - /** Represents an ImageObjectDetectionAnnotation. */ - class ImageObjectDetectionAnnotation implements IImageObjectDetectionAnnotation { + /** OperationMetadata undeployModelDetails */ + undeployModelDetails?: (google.cloud.automl.v1.IUndeployModelOperationMetadata|null); - /** - * Constructs a new ImageObjectDetectionAnnotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionAnnotation); + /** OperationMetadata createModelDetails */ + createModelDetails?: (google.cloud.automl.v1.ICreateModelOperationMetadata|null); - /** ImageObjectDetectionAnnotation boundingBox. */ - public boundingBox?: (google.cloud.automl.v1.IBoundingPoly|null); + /** OperationMetadata createDatasetDetails */ + createDatasetDetails?: (google.cloud.automl.v1.ICreateDatasetOperationMetadata|null); - /** ImageObjectDetectionAnnotation score. */ - public score: number; + /** OperationMetadata importDataDetails */ + importDataDetails?: (google.cloud.automl.v1.IImportDataOperationMetadata|null); - /** - * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageObjectDetectionAnnotation instance - */ - public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionAnnotation): google.cloud.automl.v1.ImageObjectDetectionAnnotation; + /** OperationMetadata batchPredictDetails */ + batchPredictDetails?: (google.cloud.automl.v1.IBatchPredictOperationMetadata|null); - /** - * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. - * @param message ImageObjectDetectionAnnotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** OperationMetadata exportDataDetails */ + exportDataDetails?: (google.cloud.automl.v1.IExportDataOperationMetadata|null); - /** - * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. - * @param message ImageObjectDetectionAnnotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** OperationMetadata exportModelDetails */ + exportModelDetails?: (google.cloud.automl.v1.IExportModelOperationMetadata|null); - /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionAnnotation - * @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.automl.v1.ImageObjectDetectionAnnotation; + /** OperationMetadata progressPercent */ + progressPercent?: (number|null); - /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionAnnotation - * @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.automl.v1.ImageObjectDetectionAnnotation; + /** OperationMetadata partialFailures */ + partialFailures?: (google.rpc.IStatus[]|null); - /** - * Verifies an ImageObjectDetectionAnnotation 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); + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Creates an ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageObjectDetectionAnnotation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionAnnotation; + /** OperationMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** - * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. - * @param message ImageObjectDetectionAnnotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Converts this ImageObjectDetectionAnnotation to JSON. - * @returns JSON object + * Constructs a new OperationMetadata. + * @param [properties] Properties to set */ - public toJSON(): { [k: string]: any }; - } + constructor(properties?: google.cloud.automl.v1.IOperationMetadata); - /** Properties of a BoundingBoxMetricsEntry. */ - interface IBoundingBoxMetricsEntry { + /** OperationMetadata deleteDetails. */ + public deleteDetails?: (google.cloud.automl.v1.IDeleteOperationMetadata|null); - /** BoundingBoxMetricsEntry iouThreshold */ - iouThreshold?: (number|null); + /** OperationMetadata deployModelDetails. */ + public deployModelDetails?: (google.cloud.automl.v1.IDeployModelOperationMetadata|null); - /** BoundingBoxMetricsEntry meanAveragePrecision */ - meanAveragePrecision?: (number|null); + /** OperationMetadata undeployModelDetails. */ + public undeployModelDetails?: (google.cloud.automl.v1.IUndeployModelOperationMetadata|null); - /** BoundingBoxMetricsEntry confidenceMetricsEntries */ - confidenceMetricsEntries?: (google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]|null); - } + /** OperationMetadata createModelDetails. */ + public createModelDetails?: (google.cloud.automl.v1.ICreateModelOperationMetadata|null); - /** Represents a BoundingBoxMetricsEntry. */ - class BoundingBoxMetricsEntry implements IBoundingBoxMetricsEntry { + /** OperationMetadata createDatasetDetails. */ + public createDatasetDetails?: (google.cloud.automl.v1.ICreateDatasetOperationMetadata|null); - /** - * Constructs a new BoundingBoxMetricsEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.IBoundingBoxMetricsEntry); + /** OperationMetadata importDataDetails. */ + public importDataDetails?: (google.cloud.automl.v1.IImportDataOperationMetadata|null); - /** BoundingBoxMetricsEntry iouThreshold. */ - public iouThreshold: number; + /** OperationMetadata batchPredictDetails. */ + public batchPredictDetails?: (google.cloud.automl.v1.IBatchPredictOperationMetadata|null); - /** BoundingBoxMetricsEntry meanAveragePrecision. */ - public meanAveragePrecision: number; + /** OperationMetadata exportDataDetails. */ + public exportDataDetails?: (google.cloud.automl.v1.IExportDataOperationMetadata|null); - /** BoundingBoxMetricsEntry confidenceMetricsEntries. */ - public confidenceMetricsEntries: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]; + /** OperationMetadata exportModelDetails. */ + public exportModelDetails?: (google.cloud.automl.v1.IExportModelOperationMetadata|null); + + /** OperationMetadata progressPercent. */ + public progressPercent: number; + + /** OperationMetadata partialFailures. */ + public partialFailures: google.rpc.IStatus[]; + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata details. */ + public details?: ("deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"createDatasetDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"); /** - * Creates a new BoundingBoxMetricsEntry instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BoundingBoxMetricsEntry instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IBoundingBoxMetricsEntry): google.cloud.automl.v1.BoundingBoxMetricsEntry; + public static create(properties?: google.cloud.automl.v1.IOperationMetadata): google.cloud.automl.v1.OperationMetadata; /** - * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. - * @param message BoundingBoxMetricsEntry message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. - * @param message BoundingBoxMetricsEntry message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BoundingBoxMetricsEntry + * @returns OperationMetadata * @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.automl.v1.BoundingBoxMetricsEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.OperationMetadata; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BoundingBoxMetricsEntry + * @returns OperationMetadata * @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.automl.v1.BoundingBoxMetricsEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.OperationMetadata; /** - * Verifies a BoundingBoxMetricsEntry message. + * Verifies an OperationMetadata 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 BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BoundingBoxMetricsEntry + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BoundingBoxMetricsEntry; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.OperationMetadata; /** - * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. - * @param message BoundingBoxMetricsEntry + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.BoundingBoxMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BoundingBoxMetricsEntry to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BoundingBoxMetricsEntry { - - /** Properties of a ConfidenceMetricsEntry. */ - interface IConfidenceMetricsEntry { - - /** ConfidenceMetricsEntry confidenceThreshold */ - confidenceThreshold?: (number|null); - - /** ConfidenceMetricsEntry recall */ - recall?: (number|null); - - /** ConfidenceMetricsEntry precision */ - precision?: (number|null); - - /** ConfidenceMetricsEntry f1Score */ - f1Score?: (number|null); - } - - /** Represents a ConfidenceMetricsEntry. */ - class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { - - /** - * Constructs a new ConfidenceMetricsEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry); - - /** ConfidenceMetricsEntry confidenceThreshold. */ - public confidenceThreshold: number; - - /** ConfidenceMetricsEntry recall. */ - public recall: number; - - /** ConfidenceMetricsEntry precision. */ - public precision: number; - - /** ConfidenceMetricsEntry f1Score. */ - public f1Score: number; - - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidenceMetricsEntry instance - */ - public static create(properties?: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry): google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; - - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidenceMetricsEntry - * @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.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidenceMetricsEntry - * @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.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; - - /** - * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidenceMetricsEntry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; - - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @param message ConfidenceMetricsEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of an ImageObjectDetectionEvaluationMetrics. */ - interface IImageObjectDetectionEvaluationMetrics { - - /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount */ - evaluatedBoundingBoxCount?: (number|null); - - /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries */ - boundingBoxMetricsEntries?: (google.cloud.automl.v1.IBoundingBoxMetricsEntry[]|null); - - /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision */ - boundingBoxMeanAveragePrecision?: (number|null); + /** Properties of a DeleteOperationMetadata. */ + interface IDeleteOperationMetadata { } - /** Represents an ImageObjectDetectionEvaluationMetrics. */ - class ImageObjectDetectionEvaluationMetrics implements IImageObjectDetectionEvaluationMetrics { + /** Represents a DeleteOperationMetadata. */ + class DeleteOperationMetadata implements IDeleteOperationMetadata { /** - * Constructs a new ImageObjectDetectionEvaluationMetrics. + * Constructs a new DeleteOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics); - - /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. */ - public evaluatedBoundingBoxCount: number; - - /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. */ - public boundingBoxMetricsEntries: google.cloud.automl.v1.IBoundingBoxMetricsEntry[]; - - /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. */ - public boundingBoxMeanAveragePrecision: number; + constructor(properties?: google.cloud.automl.v1.IDeleteOperationMetadata); /** - * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. + * Creates a new DeleteOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ImageObjectDetectionEvaluationMetrics instance + * @returns DeleteOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics): google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1.IDeleteOperationMetadata): google.cloud.automl.v1.DeleteOperationMetadata; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. - * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. + * @param message DeleteOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. - * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. + * @param message DeleteOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionEvaluationMetrics + * @returns DeleteOperationMetadata * @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.automl.v1.ImageObjectDetectionEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.DeleteOperationMetadata; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionEvaluationMetrics + * @returns DeleteOperationMetadata * @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.automl.v1.ImageObjectDetectionEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.DeleteOperationMetadata; /** - * Verifies an ImageObjectDetectionEvaluationMetrics message. + * Verifies a DeleteOperationMetadata 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 ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageObjectDetectionEvaluationMetrics + * @returns DeleteOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeleteOperationMetadata; /** - * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. - * @param message ImageObjectDetectionEvaluationMetrics + * Creates a plain object from a DeleteOperationMetadata message. Also converts values to other types if specified. + * @param message DeleteOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.DeleteOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageObjectDetectionEvaluationMetrics to JSON. + * Converts this DeleteOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextExtractionAnnotation. */ - interface ITextExtractionAnnotation { - - /** TextExtractionAnnotation textSegment */ - textSegment?: (google.cloud.automl.v1.ITextSegment|null); - - /** TextExtractionAnnotation score */ - score?: (number|null); + /** Properties of a DeployModelOperationMetadata. */ + interface IDeployModelOperationMetadata { } - /** Represents a TextExtractionAnnotation. */ - class TextExtractionAnnotation implements ITextExtractionAnnotation { + /** Represents a DeployModelOperationMetadata. */ + class DeployModelOperationMetadata implements IDeployModelOperationMetadata { /** - * Constructs a new TextExtractionAnnotation. + * Constructs a new DeployModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextExtractionAnnotation); - - /** TextExtractionAnnotation textSegment. */ - public textSegment?: (google.cloud.automl.v1.ITextSegment|null); - - /** TextExtractionAnnotation score. */ - public score: number; - - /** TextExtractionAnnotation annotation. */ - public annotation?: "textSegment"; + constructor(properties?: google.cloud.automl.v1.IDeployModelOperationMetadata); /** - * Creates a new TextExtractionAnnotation instance using the specified properties. + * Creates a new DeployModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionAnnotation instance + * @returns DeployModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.ITextExtractionAnnotation): google.cloud.automl.v1.TextExtractionAnnotation; + public static create(properties?: google.cloud.automl.v1.IDeployModelOperationMetadata): google.cloud.automl.v1.DeployModelOperationMetadata; /** - * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. - * @param message TextExtractionAnnotation message or plain object to encode + * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. + * @param message DeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. - * @param message TextExtractionAnnotation message or plain object to encode + * Encodes the specified DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. + * @param message DeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionAnnotation + * @returns DeployModelOperationMetadata * @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.automl.v1.TextExtractionAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.DeployModelOperationMetadata; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionAnnotation + * @returns DeployModelOperationMetadata * @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.automl.v1.TextExtractionAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.DeployModelOperationMetadata; /** - * Verifies a TextExtractionAnnotation message. + * Verifies a DeployModelOperationMetadata 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 TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionAnnotation + * @returns DeployModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeployModelOperationMetadata; /** - * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. - * @param message TextExtractionAnnotation + * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. + * @param message DeployModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextExtractionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.DeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextExtractionAnnotation to JSON. + * Converts this DeployModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextExtractionEvaluationMetrics. */ - interface ITextExtractionEvaluationMetrics { - - /** TextExtractionEvaluationMetrics auPrc */ - auPrc?: (number|null); - - /** TextExtractionEvaluationMetrics confidenceMetricsEntries */ - confidenceMetricsEntries?: (google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]|null); + /** Properties of an UndeployModelOperationMetadata. */ + interface IUndeployModelOperationMetadata { } - /** Represents a TextExtractionEvaluationMetrics. */ - class TextExtractionEvaluationMetrics implements ITextExtractionEvaluationMetrics { + /** Represents an UndeployModelOperationMetadata. */ + class UndeployModelOperationMetadata implements IUndeployModelOperationMetadata { /** - * Constructs a new TextExtractionEvaluationMetrics. + * Constructs a new UndeployModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ITextExtractionEvaluationMetrics); - - /** TextExtractionEvaluationMetrics auPrc. */ - public auPrc: number; - - /** TextExtractionEvaluationMetrics confidenceMetricsEntries. */ - public confidenceMetricsEntries: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]; + constructor(properties?: google.cloud.automl.v1.IUndeployModelOperationMetadata); /** - * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. + * Creates a new UndeployModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionEvaluationMetrics instance + * @returns UndeployModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.ITextExtractionEvaluationMetrics): google.cloud.automl.v1.TextExtractionEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1.IUndeployModelOperationMetadata): google.cloud.automl.v1.UndeployModelOperationMetadata; /** - * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. - * @param message TextExtractionEvaluationMetrics message or plain object to encode + * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. + * @param message UndeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. - * @param message TextExtractionEvaluationMetrics message or plain object to encode + * Encodes the specified UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. + * @param message UndeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionEvaluationMetrics + * @returns UndeployModelOperationMetadata * @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.automl.v1.TextExtractionEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.UndeployModelOperationMetadata; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionEvaluationMetrics + * @returns UndeployModelOperationMetadata * @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.automl.v1.TextExtractionEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.UndeployModelOperationMetadata; /** - * Verifies a TextExtractionEvaluationMetrics message. + * Verifies an UndeployModelOperationMetadata 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 TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionEvaluationMetrics + * @returns UndeployModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UndeployModelOperationMetadata; /** - * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. - * @param message TextExtractionEvaluationMetrics + * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. + * @param message UndeployModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.UndeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextExtractionEvaluationMetrics to JSON. + * Converts this UndeployModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace TextExtractionEvaluationMetrics { - - /** Properties of a ConfidenceMetricsEntry. */ - interface IConfidenceMetricsEntry { - - /** ConfidenceMetricsEntry confidenceThreshold */ - confidenceThreshold?: (number|null); - - /** ConfidenceMetricsEntry recall */ - recall?: (number|null); - - /** ConfidenceMetricsEntry precision */ - precision?: (number|null); - - /** ConfidenceMetricsEntry f1Score */ - f1Score?: (number|null); - } - - /** Represents a ConfidenceMetricsEntry. */ - class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { - - /** - * Constructs a new ConfidenceMetricsEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry); - - /** ConfidenceMetricsEntry confidenceThreshold. */ - public confidenceThreshold: number; - - /** ConfidenceMetricsEntry recall. */ - public recall: number; - - /** ConfidenceMetricsEntry precision. */ - public precision: number; - - /** ConfidenceMetricsEntry f1Score. */ - public f1Score: number; - - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidenceMetricsEntry instance - */ - public static create(properties?: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidenceMetricsEntry - * @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.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidenceMetricsEntry - * @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.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidenceMetricsEntry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; + /** Properties of a CreateDatasetOperationMetadata. */ + interface ICreateDatasetOperationMetadata { + } - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @param message ConfidenceMetricsEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a CreateDatasetOperationMetadata. */ + class CreateDatasetOperationMetadata implements ICreateDatasetOperationMetadata { - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Constructs a new CreateDatasetOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.ICreateDatasetOperationMetadata); - /** Represents a PredictionService */ - class PredictionService extends $protobuf.rpc.Service { + /** + * Creates a new CreateDatasetOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDatasetOperationMetadata instance + */ + public static create(properties?: google.cloud.automl.v1.ICreateDatasetOperationMetadata): google.cloud.automl.v1.CreateDatasetOperationMetadata; /** - * Constructs a new PredictionService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Encodes the specified CreateDatasetOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. + * @param message CreateDatasetOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static encode(message: google.cloud.automl.v1.ICreateDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Creates new PredictionService 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. + * Encodes the specified CreateDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. + * @param message CreateDatasetOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PredictionService; + public static encodeDelimited(message: google.cloud.automl.v1.ICreateDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls Predict. - * @param request PredictRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PredictResponse + * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDatasetOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public predict(request: google.cloud.automl.v1.IPredictRequest, callback: google.cloud.automl.v1.PredictionService.PredictCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.CreateDatasetOperationMetadata; /** - * Calls Predict. - * @param request PredictRequest message or plain object - * @returns Promise + * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDatasetOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public predict(request: google.cloud.automl.v1.IPredictRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.CreateDatasetOperationMetadata; /** - * Calls BatchPredict. - * @param request BatchPredictRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a CreateDatasetOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public batchPredict(request: google.cloud.automl.v1.IBatchPredictRequest, callback: google.cloud.automl.v1.PredictionService.BatchPredictCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls BatchPredict. - * @param request BatchPredictRequest message or plain object - * @returns Promise + * Creates a CreateDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDatasetOperationMetadata */ - public batchPredict(request: google.cloud.automl.v1.IBatchPredictRequest): Promise; - } - - namespace PredictionService { + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateDatasetOperationMetadata; /** - * Callback as used by {@link google.cloud.automl.v1.PredictionService#predict}. - * @param error Error, if any - * @param [response] PredictResponse + * Creates a plain object from a CreateDatasetOperationMetadata message. Also converts values to other types if specified. + * @param message CreateDatasetOperationMetadata + * @param [options] Conversion options + * @returns Plain object */ - type PredictCallback = (error: (Error|null), response?: google.cloud.automl.v1.PredictResponse) => void; + public static toObject(message: google.cloud.automl.v1.CreateDatasetOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.automl.v1.PredictionService#batchPredict}. - * @param error Error, if any - * @param [response] Operation + * Converts this CreateDatasetOperationMetadata to JSON. + * @returns JSON object */ - type BatchPredictCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a PredictRequest. */ - interface IPredictRequest { - - /** PredictRequest name */ - name?: (string|null); - - /** PredictRequest payload */ - payload?: (google.cloud.automl.v1.IExamplePayload|null); - - /** PredictRequest params */ - params?: ({ [k: string]: string }|null); + /** Properties of a CreateModelOperationMetadata. */ + interface ICreateModelOperationMetadata { } - /** Represents a PredictRequest. */ - class PredictRequest implements IPredictRequest { + /** Represents a CreateModelOperationMetadata. */ + class CreateModelOperationMetadata implements ICreateModelOperationMetadata { /** - * Constructs a new PredictRequest. + * Constructs a new CreateModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IPredictRequest); - - /** PredictRequest name. */ - public name: string; - - /** PredictRequest payload. */ - public payload?: (google.cloud.automl.v1.IExamplePayload|null); - - /** PredictRequest params. */ - public params: { [k: string]: string }; + constructor(properties?: google.cloud.automl.v1.ICreateModelOperationMetadata); /** - * Creates a new PredictRequest instance using the specified properties. + * Creates a new CreateModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns PredictRequest instance + * @returns CreateModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IPredictRequest): google.cloud.automl.v1.PredictRequest; + public static create(properties?: google.cloud.automl.v1.ICreateModelOperationMetadata): google.cloud.automl.v1.CreateModelOperationMetadata; /** - * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. - * @param message PredictRequest message or plain object to encode + * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. + * @param message CreateModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. - * @param message PredictRequest message or plain object to encode + * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. + * @param message CreateModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PredictRequest message from the specified reader or buffer. + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PredictRequest + * @returns CreateModelOperationMetadata * @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.automl.v1.PredictRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.CreateModelOperationMetadata; /** - * Decodes a PredictRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PredictRequest + * @returns CreateModelOperationMetadata * @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.automl.v1.PredictRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.CreateModelOperationMetadata; /** - * Verifies a PredictRequest message. + * Verifies a CreateModelOperationMetadata 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 PredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PredictRequest + * @returns CreateModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.PredictRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateModelOperationMetadata; /** - * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. - * @param message PredictRequest + * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. + * @param message CreateModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.PredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.CreateModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PredictRequest to JSON. + * Converts this CreateModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PredictResponse. */ - interface IPredictResponse { - - /** PredictResponse payload */ - payload?: (google.cloud.automl.v1.IAnnotationPayload[]|null); - - /** PredictResponse preprocessedInput */ - preprocessedInput?: (google.cloud.automl.v1.IExamplePayload|null); - - /** PredictResponse metadata */ - metadata?: ({ [k: string]: string }|null); + /** Properties of an ImportDataOperationMetadata. */ + interface IImportDataOperationMetadata { } - /** Represents a PredictResponse. */ - class PredictResponse implements IPredictResponse { + /** Represents an ImportDataOperationMetadata. */ + class ImportDataOperationMetadata implements IImportDataOperationMetadata { /** - * Constructs a new PredictResponse. + * Constructs a new ImportDataOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IPredictResponse); - - /** PredictResponse payload. */ - public payload: google.cloud.automl.v1.IAnnotationPayload[]; - - /** PredictResponse preprocessedInput. */ - public preprocessedInput?: (google.cloud.automl.v1.IExamplePayload|null); - - /** PredictResponse metadata. */ - public metadata: { [k: string]: string }; + constructor(properties?: google.cloud.automl.v1.IImportDataOperationMetadata); /** - * Creates a new PredictResponse instance using the specified properties. + * Creates a new ImportDataOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns PredictResponse instance + * @returns ImportDataOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IPredictResponse): google.cloud.automl.v1.PredictResponse; + public static create(properties?: google.cloud.automl.v1.IImportDataOperationMetadata): google.cloud.automl.v1.ImportDataOperationMetadata; /** - * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. - * @param message PredictResponse message or plain object to encode + * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. + * @param message ImportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. - * @param message PredictResponse message or plain object to encode + * Encodes the specified ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. + * @param message ImportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PredictResponse message from the specified reader or buffer. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PredictResponse + * @returns ImportDataOperationMetadata * @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.automl.v1.PredictResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImportDataOperationMetadata; /** - * Decodes a PredictResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PredictResponse + * @returns ImportDataOperationMetadata * @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.automl.v1.PredictResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImportDataOperationMetadata; /** - * Verifies a PredictResponse message. + * Verifies an ImportDataOperationMetadata 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 PredictResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PredictResponse + * @returns ImportDataOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.PredictResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImportDataOperationMetadata; /** - * Creates a plain object from a PredictResponse message. Also converts values to other types if specified. - * @param message PredictResponse + * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. + * @param message ImportDataOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.PredictResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PredictResponse to JSON. + * Converts this ImportDataOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictRequest. */ - interface IBatchPredictRequest { - - /** BatchPredictRequest name */ - name?: (string|null); - - /** BatchPredictRequest inputConfig */ - inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); - - /** BatchPredictRequest outputConfig */ - outputConfig?: (google.cloud.automl.v1.IBatchPredictOutputConfig|null); + /** Properties of an ExportDataOperationMetadata. */ + interface IExportDataOperationMetadata { - /** BatchPredictRequest params */ - params?: ({ [k: string]: string }|null); + /** ExportDataOperationMetadata outputInfo */ + outputInfo?: (google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null); } - /** Represents a BatchPredictRequest. */ - class BatchPredictRequest implements IBatchPredictRequest { + /** Represents an ExportDataOperationMetadata. */ + class ExportDataOperationMetadata implements IExportDataOperationMetadata { /** - * Constructs a new BatchPredictRequest. + * Constructs a new ExportDataOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IBatchPredictRequest); - - /** BatchPredictRequest name. */ - public name: string; - - /** BatchPredictRequest inputConfig. */ - public inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); - - /** BatchPredictRequest outputConfig. */ - public outputConfig?: (google.cloud.automl.v1.IBatchPredictOutputConfig|null); + constructor(properties?: google.cloud.automl.v1.IExportDataOperationMetadata); - /** BatchPredictRequest params. */ - public params: { [k: string]: string }; + /** ExportDataOperationMetadata outputInfo. */ + public outputInfo?: (google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null); /** - * Creates a new BatchPredictRequest instance using the specified properties. + * Creates a new ExportDataOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictRequest instance + * @returns ExportDataOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IBatchPredictRequest): google.cloud.automl.v1.BatchPredictRequest; + public static create(properties?: google.cloud.automl.v1.IExportDataOperationMetadata): google.cloud.automl.v1.ExportDataOperationMetadata; /** - * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. - * @param message BatchPredictRequest message or plain object to encode + * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. + * @param message ExportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. - * @param message BatchPredictRequest message or plain object to encode + * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. + * @param message ExportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictRequest + * @returns ExportDataOperationMetadata * @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.automl.v1.BatchPredictRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ExportDataOperationMetadata; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictRequest + * @returns ExportDataOperationMetadata * @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.automl.v1.BatchPredictRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ExportDataOperationMetadata; /** - * Verifies a BatchPredictRequest message. + * Verifies an ExportDataOperationMetadata 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 BatchPredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictRequest + * @returns ExportDataOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportDataOperationMetadata; /** - * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. - * @param message BatchPredictRequest + * Creates a plain object from an ExportDataOperationMetadata message. Also converts values to other types if specified. + * @param message ExportDataOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.BatchPredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ExportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictRequest to JSON. + * Converts this ExportDataOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictResult. */ - interface IBatchPredictResult { + namespace ExportDataOperationMetadata { - /** BatchPredictResult metadata */ - metadata?: ({ [k: string]: string }|null); + /** Properties of an ExportDataOutputInfo. */ + interface IExportDataOutputInfo { + + /** ExportDataOutputInfo gcsOutputDirectory */ + gcsOutputDirectory?: (string|null); + } + + /** Represents an ExportDataOutputInfo. */ + class ExportDataOutputInfo implements IExportDataOutputInfo { + + /** + * Constructs a new ExportDataOutputInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo); + + /** ExportDataOutputInfo gcsOutputDirectory. */ + public gcsOutputDirectory: string; + + /** ExportDataOutputInfo outputLocation. */ + public outputLocation?: "gcsOutputDirectory"; + + /** + * Creates a new ExportDataOutputInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportDataOutputInfo instance + */ + public static create(properties?: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo): google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. + * @param message ExportDataOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. + * @param message ExportDataOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportDataOutputInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportDataOutputInfo + * @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.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportDataOutputInfo + * @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.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Verifies an ExportDataOutputInfo 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 ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportDataOutputInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. + * @param message ExportDataOutputInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportDataOutputInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a BatchPredictResult. */ - class BatchPredictResult implements IBatchPredictResult { + /** Properties of a BatchPredictOperationMetadata. */ + interface IBatchPredictOperationMetadata { + + /** BatchPredictOperationMetadata inputConfig */ + inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); + + /** BatchPredictOperationMetadata outputInfo */ + outputInfo?: (google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); + } + + /** Represents a BatchPredictOperationMetadata. */ + class BatchPredictOperationMetadata implements IBatchPredictOperationMetadata { /** - * Constructs a new BatchPredictResult. + * Constructs a new BatchPredictOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IBatchPredictResult); + constructor(properties?: google.cloud.automl.v1.IBatchPredictOperationMetadata); - /** BatchPredictResult metadata. */ - public metadata: { [k: string]: string }; + /** BatchPredictOperationMetadata inputConfig. */ + public inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); + + /** BatchPredictOperationMetadata outputInfo. */ + public outputInfo?: (google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); /** - * Creates a new BatchPredictResult instance using the specified properties. + * Creates a new BatchPredictOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictResult instance + * @returns BatchPredictOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IBatchPredictResult): google.cloud.automl.v1.BatchPredictResult; + public static create(properties?: google.cloud.automl.v1.IBatchPredictOperationMetadata): google.cloud.automl.v1.BatchPredictOperationMetadata; /** - * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. - * @param message BatchPredictResult message or plain object to encode + * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. + * @param message BatchPredictOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. - * @param message BatchPredictResult message or plain object to encode + * Encodes the specified BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. + * @param message BatchPredictOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictResult message from the specified reader or buffer. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictResult + * @returns BatchPredictOperationMetadata * @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.automl.v1.BatchPredictResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BatchPredictOperationMetadata; /** - * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictResult + * @returns BatchPredictOperationMetadata * @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.automl.v1.BatchPredictResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BatchPredictOperationMetadata; /** - * Verifies a BatchPredictResult message. + * Verifies a BatchPredictOperationMetadata 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 BatchPredictResult message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictResult + * @returns BatchPredictOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictResult; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictOperationMetadata; /** - * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. - * @param message BatchPredictResult + * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. + * @param message BatchPredictOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.BatchPredictResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.BatchPredictOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictResult to JSON. + * Converts this BatchPredictOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnnotationPayload. */ - interface IAnnotationPayload { + namespace BatchPredictOperationMetadata { + + /** Properties of a BatchPredictOutputInfo. */ + interface IBatchPredictOutputInfo { + + /** BatchPredictOutputInfo gcsOutputDirectory */ + gcsOutputDirectory?: (string|null); + } + + /** Represents a BatchPredictOutputInfo. */ + class BatchPredictOutputInfo implements IBatchPredictOutputInfo { + + /** + * Constructs a new BatchPredictOutputInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo); + + /** BatchPredictOutputInfo gcsOutputDirectory. */ + public gcsOutputDirectory: string; + + /** BatchPredictOutputInfo outputLocation. */ + public outputLocation?: "gcsOutputDirectory"; + + /** + * Creates a new BatchPredictOutputInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchPredictOutputInfo instance + */ + public static create(properties?: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo): google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; + + /** + * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @param message BatchPredictOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @param message BatchPredictOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchPredictOutputInfo + * @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.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - /** AnnotationPayload translation */ - translation?: (google.cloud.automl.v1.ITranslationAnnotation|null); + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchPredictOutputInfo + * @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.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - /** AnnotationPayload classification */ - classification?: (google.cloud.automl.v1.IClassificationAnnotation|null); + /** + * Verifies a BatchPredictOutputInfo 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); - /** AnnotationPayload imageObjectDetection */ - imageObjectDetection?: (google.cloud.automl.v1.IImageObjectDetectionAnnotation|null); + /** + * Creates a BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchPredictOutputInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - /** AnnotationPayload textExtraction */ - textExtraction?: (google.cloud.automl.v1.ITextExtractionAnnotation|null); + /** + * Creates a plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. + * @param message BatchPredictOutputInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AnnotationPayload textSentiment */ - textSentiment?: (google.cloud.automl.v1.ITextSentimentAnnotation|null); + /** + * Converts this BatchPredictOutputInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** AnnotationPayload annotationSpecId */ - annotationSpecId?: (string|null); + /** Properties of an ExportModelOperationMetadata. */ + interface IExportModelOperationMetadata { - /** AnnotationPayload displayName */ - displayName?: (string|null); + /** ExportModelOperationMetadata outputInfo */ + outputInfo?: (google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null); } - /** Represents an AnnotationPayload. */ - class AnnotationPayload implements IAnnotationPayload { + /** Represents an ExportModelOperationMetadata. */ + class ExportModelOperationMetadata implements IExportModelOperationMetadata { /** - * Constructs a new AnnotationPayload. + * Constructs a new ExportModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IAnnotationPayload); - - /** AnnotationPayload translation. */ - public translation?: (google.cloud.automl.v1.ITranslationAnnotation|null); - - /** AnnotationPayload classification. */ - public classification?: (google.cloud.automl.v1.IClassificationAnnotation|null); - - /** AnnotationPayload imageObjectDetection. */ - public imageObjectDetection?: (google.cloud.automl.v1.IImageObjectDetectionAnnotation|null); - - /** AnnotationPayload textExtraction. */ - public textExtraction?: (google.cloud.automl.v1.ITextExtractionAnnotation|null); - - /** AnnotationPayload textSentiment. */ - public textSentiment?: (google.cloud.automl.v1.ITextSentimentAnnotation|null); - - /** AnnotationPayload annotationSpecId. */ - public annotationSpecId: string; - - /** AnnotationPayload displayName. */ - public displayName: string; + constructor(properties?: google.cloud.automl.v1.IExportModelOperationMetadata); - /** AnnotationPayload detail. */ - public detail?: ("translation"|"classification"|"imageObjectDetection"|"textExtraction"|"textSentiment"); + /** ExportModelOperationMetadata outputInfo. */ + public outputInfo?: (google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null); /** - * Creates a new AnnotationPayload instance using the specified properties. + * Creates a new ExportModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationPayload instance + * @returns ExportModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1.IAnnotationPayload): google.cloud.automl.v1.AnnotationPayload; + public static create(properties?: google.cloud.automl.v1.IExportModelOperationMetadata): google.cloud.automl.v1.ExportModelOperationMetadata; /** - * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. - * @param message AnnotationPayload message or plain object to encode + * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. + * @param message ExportModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. - * @param message AnnotationPayload message or plain object to encode + * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. + * @param message ExportModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationPayload message from the specified reader or buffer. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationPayload + * @returns ExportModelOperationMetadata * @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.automl.v1.AnnotationPayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ExportModelOperationMetadata; /** - * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationPayload + * @returns ExportModelOperationMetadata * @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.automl.v1.AnnotationPayload; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ExportModelOperationMetadata; /** - * Verifies an AnnotationPayload message. + * Verifies an ExportModelOperationMetadata 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 AnnotationPayload message from a plain object. Also converts values to their respective internal types. + * Creates an ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationPayload + * @returns ExportModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.AnnotationPayload; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportModelOperationMetadata; /** - * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. - * @param message AnnotationPayload + * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. + * @param message ExportModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.AnnotationPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ExportModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationPayload to JSON. + * Converts this ExportModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Model. */ - interface IModel { + namespace ExportModelOperationMetadata { - /** Model translationModelMetadata */ - translationModelMetadata?: (google.cloud.automl.v1.ITranslationModelMetadata|null); + /** Properties of an ExportModelOutputInfo. */ + interface IExportModelOutputInfo { - /** Model imageClassificationModelMetadata */ - imageClassificationModelMetadata?: (google.cloud.automl.v1.IImageClassificationModelMetadata|null); + /** ExportModelOutputInfo gcsOutputDirectory */ + gcsOutputDirectory?: (string|null); + } - /** Model textClassificationModelMetadata */ - textClassificationModelMetadata?: (google.cloud.automl.v1.ITextClassificationModelMetadata|null); + /** Represents an ExportModelOutputInfo. */ + class ExportModelOutputInfo implements IExportModelOutputInfo { - /** Model imageObjectDetectionModelMetadata */ - imageObjectDetectionModelMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null); + /** + * Constructs a new ExportModelOutputInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo); - /** Model textExtractionModelMetadata */ - textExtractionModelMetadata?: (google.cloud.automl.v1.ITextExtractionModelMetadata|null); + /** ExportModelOutputInfo gcsOutputDirectory. */ + public gcsOutputDirectory: string; - /** Model textSentimentModelMetadata */ - textSentimentModelMetadata?: (google.cloud.automl.v1.ITextSentimentModelMetadata|null); + /** + * Creates a new ExportModelOutputInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportModelOutputInfo instance + */ + public static create(properties?: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo): google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** Model name */ - name?: (string|null); + /** + * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @param message ExportModelOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Model displayName */ - displayName?: (string|null); + /** + * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @param message ExportModelOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Model datasetId */ - datasetId?: (string|null); + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportModelOutputInfo + * @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.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** Model createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportModelOutputInfo + * @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.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** Model updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Verifies an ExportModelOutputInfo 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); - /** Model deploymentState */ - deploymentState?: (google.cloud.automl.v1.Model.DeploymentState|keyof typeof google.cloud.automl.v1.Model.DeploymentState|null); + /** + * Creates an ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportModelOutputInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** Model etag */ - etag?: (string|null); + /** + * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. + * @param message ExportModelOutputInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Model labels */ - labels?: ({ [k: string]: string }|null); + /** + * Converts this ExportModelOutputInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a Model. */ - class Model implements IModel { + /** Represents a PredictionService */ + class PredictionService extends $protobuf.rpc.Service { + + /** + * Constructs a new PredictionService 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 PredictionService 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): PredictionService; /** - * Constructs a new Model. - * @param [properties] Properties to set + * Calls Predict. + * @param request PredictRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PredictResponse */ - constructor(properties?: google.cloud.automl.v1.IModel); + public predict(request: google.cloud.automl.v1.IPredictRequest, callback: google.cloud.automl.v1.PredictionService.PredictCallback): void; - /** Model translationModelMetadata. */ - public translationModelMetadata?: (google.cloud.automl.v1.ITranslationModelMetadata|null); + /** + * Calls Predict. + * @param request PredictRequest message or plain object + * @returns Promise + */ + public predict(request: google.cloud.automl.v1.IPredictRequest): Promise; - /** Model imageClassificationModelMetadata. */ - public imageClassificationModelMetadata?: (google.cloud.automl.v1.IImageClassificationModelMetadata|null); + /** + * Calls BatchPredict. + * @param request BatchPredictRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchPredict(request: google.cloud.automl.v1.IBatchPredictRequest, callback: google.cloud.automl.v1.PredictionService.BatchPredictCallback): void; - /** Model textClassificationModelMetadata. */ - public textClassificationModelMetadata?: (google.cloud.automl.v1.ITextClassificationModelMetadata|null); + /** + * Calls BatchPredict. + * @param request BatchPredictRequest message or plain object + * @returns Promise + */ + public batchPredict(request: google.cloud.automl.v1.IBatchPredictRequest): Promise; + } - /** Model imageObjectDetectionModelMetadata. */ - public imageObjectDetectionModelMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null); + namespace PredictionService { - /** Model textExtractionModelMetadata. */ - public textExtractionModelMetadata?: (google.cloud.automl.v1.ITextExtractionModelMetadata|null); + /** + * Callback as used by {@link google.cloud.automl.v1.PredictionService#predict}. + * @param error Error, if any + * @param [response] PredictResponse + */ + type PredictCallback = (error: (Error|null), response?: google.cloud.automl.v1.PredictResponse) => void; - /** Model textSentimentModelMetadata. */ - public textSentimentModelMetadata?: (google.cloud.automl.v1.ITextSentimentModelMetadata|null); + /** + * Callback as used by {@link google.cloud.automl.v1.PredictionService#batchPredict}. + * @param error Error, if any + * @param [response] Operation + */ + type BatchPredictCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** Model name. */ - public name: string; + /** Properties of a PredictRequest. */ + interface IPredictRequest { - /** Model displayName. */ - public displayName: string; + /** PredictRequest name */ + name?: (string|null); - /** Model datasetId. */ - public datasetId: string; + /** PredictRequest payload */ + payload?: (google.cloud.automl.v1.IExamplePayload|null); - /** Model createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** PredictRequest params */ + params?: ({ [k: string]: string }|null); + } - /** Model updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a PredictRequest. */ + class PredictRequest implements IPredictRequest { - /** Model deploymentState. */ - public deploymentState: (google.cloud.automl.v1.Model.DeploymentState|keyof typeof google.cloud.automl.v1.Model.DeploymentState); + /** + * Constructs a new PredictRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1.IPredictRequest); - /** Model etag. */ - public etag: string; + /** PredictRequest name. */ + public name: string; - /** Model labels. */ - public labels: { [k: string]: string }; + /** PredictRequest payload. */ + public payload?: (google.cloud.automl.v1.IExamplePayload|null); - /** Model modelMetadata. */ - public modelMetadata?: ("translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"textExtractionModelMetadata"|"textSentimentModelMetadata"); + /** PredictRequest params. */ + public params: { [k: string]: string }; /** - * Creates a new Model instance using the specified properties. + * Creates a new PredictRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Model instance + * @returns PredictRequest instance */ - public static create(properties?: google.cloud.automl.v1.IModel): google.cloud.automl.v1.Model; + public static create(properties?: google.cloud.automl.v1.IPredictRequest): google.cloud.automl.v1.PredictRequest; /** - * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. - * @param message Model message or plain object to encode + * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. + * @param message PredictRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. - * @param message Model message or plain object to encode + * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. + * @param message PredictRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Model message from the specified reader or buffer. + * Decodes a PredictRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Model + * @returns PredictRequest * @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.automl.v1.Model; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.PredictRequest; /** - * Decodes a Model message from the specified reader or buffer, length delimited. + * Decodes a PredictRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Model + * @returns PredictRequest * @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.automl.v1.Model; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.PredictRequest; /** - * Verifies a Model message. + * Verifies a PredictRequest 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 Model message from a plain object. Also converts values to their respective internal types. + * Creates a PredictRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Model + * @returns PredictRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.Model; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.PredictRequest; /** - * Creates a plain object from a Model message. Also converts values to other types if specified. - * @param message Model + * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. + * @param message PredictRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.PredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Model to JSON. + * Converts this PredictRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Model { - - /** DeploymentState enum. */ - enum DeploymentState { - DEPLOYMENT_STATE_UNSPECIFIED = 0, - DEPLOYED = 1, - UNDEPLOYED = 2 - } - } - - /** Represents an AutoMl */ - class AutoMl extends $protobuf.rpc.Service { - - /** - * Constructs a new AutoMl 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 AutoMl 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): AutoMl; - - /** - * Calls CreateDataset. - * @param request CreateDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createDataset(request: google.cloud.automl.v1.ICreateDatasetRequest, callback: google.cloud.automl.v1.AutoMl.CreateDatasetCallback): void; - - /** - * Calls CreateDataset. - * @param request CreateDatasetRequest message or plain object - * @returns Promise - */ - public createDataset(request: google.cloud.automl.v1.ICreateDatasetRequest): Promise; - - /** - * Calls GetDataset. - * @param request GetDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dataset - */ - public getDataset(request: google.cloud.automl.v1.IGetDatasetRequest, callback: google.cloud.automl.v1.AutoMl.GetDatasetCallback): void; - - /** - * Calls GetDataset. - * @param request GetDatasetRequest message or plain object - * @returns Promise - */ - public getDataset(request: google.cloud.automl.v1.IGetDatasetRequest): Promise; + /** Properties of a PredictResponse. */ + interface IPredictResponse { - /** - * Calls ListDatasets. - * @param request ListDatasetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDatasetsResponse - */ - public listDatasets(request: google.cloud.automl.v1.IListDatasetsRequest, callback: google.cloud.automl.v1.AutoMl.ListDatasetsCallback): void; + /** PredictResponse payload */ + payload?: (google.cloud.automl.v1.IAnnotationPayload[]|null); - /** - * Calls ListDatasets. - * @param request ListDatasetsRequest message or plain object - * @returns Promise - */ - public listDatasets(request: google.cloud.automl.v1.IListDatasetsRequest): Promise; + /** PredictResponse preprocessedInput */ + preprocessedInput?: (google.cloud.automl.v1.IExamplePayload|null); - /** - * Calls UpdateDataset. - * @param request UpdateDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dataset - */ - public updateDataset(request: google.cloud.automl.v1.IUpdateDatasetRequest, callback: google.cloud.automl.v1.AutoMl.UpdateDatasetCallback): void; + /** PredictResponse metadata */ + metadata?: ({ [k: string]: string }|null); + } - /** - * Calls UpdateDataset. - * @param request UpdateDatasetRequest message or plain object - * @returns Promise - */ - public updateDataset(request: google.cloud.automl.v1.IUpdateDatasetRequest): Promise; + /** Represents a PredictResponse. */ + class PredictResponse implements IPredictResponse { /** - * Calls DeleteDataset. - * @param request DeleteDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Constructs a new PredictResponse. + * @param [properties] Properties to set */ - public deleteDataset(request: google.cloud.automl.v1.IDeleteDatasetRequest, callback: google.cloud.automl.v1.AutoMl.DeleteDatasetCallback): void; + constructor(properties?: google.cloud.automl.v1.IPredictResponse); - /** - * Calls DeleteDataset. - * @param request DeleteDatasetRequest message or plain object - * @returns Promise - */ - public deleteDataset(request: google.cloud.automl.v1.IDeleteDatasetRequest): Promise; + /** PredictResponse payload. */ + public payload: google.cloud.automl.v1.IAnnotationPayload[]; - /** - * Calls ImportData. - * @param request ImportDataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public importData(request: google.cloud.automl.v1.IImportDataRequest, callback: google.cloud.automl.v1.AutoMl.ImportDataCallback): void; + /** PredictResponse preprocessedInput. */ + public preprocessedInput?: (google.cloud.automl.v1.IExamplePayload|null); - /** - * Calls ImportData. - * @param request ImportDataRequest message or plain object - * @returns Promise - */ - public importData(request: google.cloud.automl.v1.IImportDataRequest): Promise; + /** PredictResponse metadata. */ + public metadata: { [k: string]: string }; /** - * Calls ExportData. - * @param request ExportDataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new PredictResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PredictResponse instance */ - public exportData(request: google.cloud.automl.v1.IExportDataRequest, callback: google.cloud.automl.v1.AutoMl.ExportDataCallback): void; + public static create(properties?: google.cloud.automl.v1.IPredictResponse): google.cloud.automl.v1.PredictResponse; /** - * Calls ExportData. - * @param request ExportDataRequest message or plain object - * @returns Promise + * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. + * @param message PredictResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public exportData(request: google.cloud.automl.v1.IExportDataRequest): Promise; + public static encode(message: google.cloud.automl.v1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetAnnotationSpec. - * @param request GetAnnotationSpecRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AnnotationSpec + * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. + * @param message PredictResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAnnotationSpec(request: google.cloud.automl.v1.IGetAnnotationSpecRequest, callback: google.cloud.automl.v1.AutoMl.GetAnnotationSpecCallback): void; + public static encodeDelimited(message: google.cloud.automl.v1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetAnnotationSpec. - * @param request GetAnnotationSpecRequest message or plain object - * @returns Promise + * Decodes a PredictResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PredictResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getAnnotationSpec(request: google.cloud.automl.v1.IGetAnnotationSpecRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.PredictResponse; /** - * Calls CreateModel. - * @param request CreateModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a PredictResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PredictResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createModel(request: google.cloud.automl.v1.ICreateModelRequest, callback: google.cloud.automl.v1.AutoMl.CreateModelCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.PredictResponse; /** - * Calls CreateModel. - * @param request CreateModelRequest message or plain object - * @returns Promise + * Verifies a PredictResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createModel(request: google.cloud.automl.v1.ICreateModelRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetModel. - * @param request GetModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Model + * Creates a PredictResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PredictResponse */ - public getModel(request: google.cloud.automl.v1.IGetModelRequest, callback: google.cloud.automl.v1.AutoMl.GetModelCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.PredictResponse; /** - * Calls GetModel. - * @param request GetModelRequest message or plain object - * @returns Promise + * Creates a plain object from a PredictResponse message. Also converts values to other types if specified. + * @param message PredictResponse + * @param [options] Conversion options + * @returns Plain object */ - public getModel(request: google.cloud.automl.v1.IGetModelRequest): Promise; + public static toObject(message: google.cloud.automl.v1.PredictResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListModels. - * @param request ListModelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListModelsResponse + * Converts this PredictResponse to JSON. + * @returns JSON object */ - public listModels(request: google.cloud.automl.v1.IListModelsRequest, callback: google.cloud.automl.v1.AutoMl.ListModelsCallback): void; + public toJSON(): { [k: string]: any }; + } - /** - * Calls ListModels. - * @param request ListModelsRequest message or plain object - * @returns Promise - */ - public listModels(request: google.cloud.automl.v1.IListModelsRequest): Promise; + /** Properties of a BatchPredictRequest. */ + interface IBatchPredictRequest { + + /** BatchPredictRequest name */ + name?: (string|null); + + /** BatchPredictRequest inputConfig */ + inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); + + /** BatchPredictRequest outputConfig */ + outputConfig?: (google.cloud.automl.v1.IBatchPredictOutputConfig|null); + + /** BatchPredictRequest params */ + params?: ({ [k: string]: string }|null); + } + + /** Represents a BatchPredictRequest. */ + class BatchPredictRequest implements IBatchPredictRequest { /** - * Calls DeleteModel. - * @param request DeleteModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Constructs a new BatchPredictRequest. + * @param [properties] Properties to set */ - public deleteModel(request: google.cloud.automl.v1.IDeleteModelRequest, callback: google.cloud.automl.v1.AutoMl.DeleteModelCallback): void; + constructor(properties?: google.cloud.automl.v1.IBatchPredictRequest); + + /** BatchPredictRequest name. */ + public name: string; + + /** BatchPredictRequest inputConfig. */ + public inputConfig?: (google.cloud.automl.v1.IBatchPredictInputConfig|null); + + /** BatchPredictRequest outputConfig. */ + public outputConfig?: (google.cloud.automl.v1.IBatchPredictOutputConfig|null); + + /** BatchPredictRequest params. */ + public params: { [k: string]: string }; /** - * Calls DeleteModel. - * @param request DeleteModelRequest message or plain object - * @returns Promise + * Creates a new BatchPredictRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchPredictRequest instance */ - public deleteModel(request: google.cloud.automl.v1.IDeleteModelRequest): Promise; + public static create(properties?: google.cloud.automl.v1.IBatchPredictRequest): google.cloud.automl.v1.BatchPredictRequest; /** - * Calls UpdateModel. - * @param request UpdateModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Model + * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. + * @param message BatchPredictRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateModel(request: google.cloud.automl.v1.IUpdateModelRequest, callback: google.cloud.automl.v1.AutoMl.UpdateModelCallback): void; + public static encode(message: google.cloud.automl.v1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateModel. - * @param request UpdateModelRequest message or plain object - * @returns Promise + * Encodes the specified BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. + * @param message BatchPredictRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateModel(request: google.cloud.automl.v1.IUpdateModelRequest): Promise; + public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeployModel. - * @param request DeployModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a BatchPredictRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchPredictRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deployModel(request: google.cloud.automl.v1.IDeployModelRequest, callback: google.cloud.automl.v1.AutoMl.DeployModelCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BatchPredictRequest; /** - * Calls DeployModel. - * @param request DeployModelRequest message or plain object - * @returns Promise + * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchPredictRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deployModel(request: google.cloud.automl.v1.IDeployModelRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BatchPredictRequest; /** - * Calls UndeployModel. - * @param request UndeployModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a BatchPredictRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public undeployModel(request: google.cloud.automl.v1.IUndeployModelRequest, callback: google.cloud.automl.v1.AutoMl.UndeployModelCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UndeployModel. - * @param request UndeployModelRequest message or plain object - * @returns Promise + * Creates a BatchPredictRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchPredictRequest */ - public undeployModel(request: google.cloud.automl.v1.IUndeployModelRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictRequest; /** - * Calls ExportModel. - * @param request ExportModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. + * @param message BatchPredictRequest + * @param [options] Conversion options + * @returns Plain object */ - public exportModel(request: google.cloud.automl.v1.IExportModelRequest, callback: google.cloud.automl.v1.AutoMl.ExportModelCallback): void; + public static toObject(message: google.cloud.automl.v1.BatchPredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ExportModel. - * @param request ExportModelRequest message or plain object - * @returns Promise + * Converts this BatchPredictRequest to JSON. + * @returns JSON object */ - public exportModel(request: google.cloud.automl.v1.IExportModelRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BatchPredictResult. */ + interface IBatchPredictResult { + + /** BatchPredictResult metadata */ + metadata?: ({ [k: string]: string }|null); + } + + /** Represents a BatchPredictResult. */ + class BatchPredictResult implements IBatchPredictResult { /** - * Calls GetModelEvaluation. - * @param request GetModelEvaluationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ModelEvaluation + * Constructs a new BatchPredictResult. + * @param [properties] Properties to set */ - public getModelEvaluation(request: google.cloud.automl.v1.IGetModelEvaluationRequest, callback: google.cloud.automl.v1.AutoMl.GetModelEvaluationCallback): void; + constructor(properties?: google.cloud.automl.v1.IBatchPredictResult); + + /** BatchPredictResult metadata. */ + public metadata: { [k: string]: string }; /** - * Calls GetModelEvaluation. - * @param request GetModelEvaluationRequest message or plain object - * @returns Promise + * Creates a new BatchPredictResult instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchPredictResult instance */ - public getModelEvaluation(request: google.cloud.automl.v1.IGetModelEvaluationRequest): Promise; + public static create(properties?: google.cloud.automl.v1.IBatchPredictResult): google.cloud.automl.v1.BatchPredictResult; /** - * Calls ListModelEvaluations. - * @param request ListModelEvaluationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListModelEvaluationsResponse + * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. + * @param message BatchPredictResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listModelEvaluations(request: google.cloud.automl.v1.IListModelEvaluationsRequest, callback: google.cloud.automl.v1.AutoMl.ListModelEvaluationsCallback): void; + public static encode(message: google.cloud.automl.v1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListModelEvaluations. - * @param request ListModelEvaluationsRequest message or plain object - * @returns Promise + * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. + * @param message BatchPredictResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listModelEvaluations(request: google.cloud.automl.v1.IListModelEvaluationsRequest): Promise; - } - - namespace AutoMl { + public static encodeDelimited(message: google.cloud.automl.v1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#createDataset}. - * @param error Error, if any - * @param [response] Operation + * Decodes a BatchPredictResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchPredictResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.BatchPredictResult; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#getDataset}. - * @param error Error, if any - * @param [response] Dataset + * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchPredictResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1.Dataset) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.BatchPredictResult; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#listDatasets}. - * @param error Error, if any - * @param [response] ListDatasetsResponse + * Verifies a BatchPredictResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ListDatasetsCallback = (error: (Error|null), response?: google.cloud.automl.v1.ListDatasetsResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#updateDataset}. - * @param error Error, if any - * @param [response] Dataset + * Creates a BatchPredictResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchPredictResult */ - type UpdateDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1.Dataset) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.BatchPredictResult; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#deleteDataset}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. + * @param message BatchPredictResult + * @param [options] Conversion options + * @returns Plain object */ - type DeleteDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.automl.v1.BatchPredictResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#importData}. - * @param error Error, if any - * @param [response] Operation + * Converts this BatchPredictResult to JSON. + * @returns JSON object */ - type ImportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; + } + + /** Represents an AutoMl */ + class AutoMl extends $protobuf.rpc.Service { /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#exportData}. - * @param error Error, if any - * @param [response] Operation + * Constructs a new AutoMl service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - type ExportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#getAnnotationSpec}. - * @param error Error, if any - * @param [response] AnnotationSpec + * Creates new AutoMl 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. */ - type GetAnnotationSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1.AnnotationSpec) => void; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AutoMl; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#createModel}. - * @param error Error, if any - * @param [response] Operation + * Calls CreateDataset. + * @param request CreateDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type CreateModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public createDataset(request: google.cloud.automl.v1.ICreateDatasetRequest, callback: google.cloud.automl.v1.AutoMl.CreateDatasetCallback): void; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#getModel}. - * @param error Error, if any - * @param [response] Model + * Calls CreateDataset. + * @param request CreateDatasetRequest message or plain object + * @returns Promise */ - type GetModelCallback = (error: (Error|null), response?: google.cloud.automl.v1.Model) => void; + public createDataset(request: google.cloud.automl.v1.ICreateDatasetRequest): Promise; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#listModels}. - * @param error Error, if any - * @param [response] ListModelsResponse + * Calls GetDataset. + * @param request GetDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dataset */ - type ListModelsCallback = (error: (Error|null), response?: google.cloud.automl.v1.ListModelsResponse) => void; + public getDataset(request: google.cloud.automl.v1.IGetDatasetRequest, callback: google.cloud.automl.v1.AutoMl.GetDatasetCallback): void; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#deleteModel}. - * @param error Error, if any - * @param [response] Operation + * Calls GetDataset. + * @param request GetDatasetRequest message or plain object + * @returns Promise */ - type DeleteModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public getDataset(request: google.cloud.automl.v1.IGetDatasetRequest): Promise; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#updateModel}. - * @param error Error, if any - * @param [response] Model + * Calls ListDatasets. + * @param request ListDatasetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDatasetsResponse */ - type UpdateModelCallback = (error: (Error|null), response?: google.cloud.automl.v1.Model) => void; + public listDatasets(request: google.cloud.automl.v1.IListDatasetsRequest, callback: google.cloud.automl.v1.AutoMl.ListDatasetsCallback): void; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#deployModel}. - * @param error Error, if any - * @param [response] Operation + * Calls ListDatasets. + * @param request ListDatasetsRequest message or plain object + * @returns Promise */ - type DeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listDatasets(request: google.cloud.automl.v1.IListDatasetsRequest): Promise; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#undeployModel}. - * @param error Error, if any - * @param [response] Operation + * Calls UpdateDataset. + * @param request UpdateDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dataset */ - type UndeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public updateDataset(request: google.cloud.automl.v1.IUpdateDatasetRequest, callback: google.cloud.automl.v1.AutoMl.UpdateDatasetCallback): void; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#exportModel}. - * @param error Error, if any - * @param [response] Operation + * Calls UpdateDataset. + * @param request UpdateDatasetRequest message or plain object + * @returns Promise */ - type ExportModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public updateDataset(request: google.cloud.automl.v1.IUpdateDatasetRequest): Promise; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#getModelEvaluation}. - * @param error Error, if any - * @param [response] ModelEvaluation + * Calls DeleteDataset. + * @param request DeleteDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type GetModelEvaluationCallback = (error: (Error|null), response?: google.cloud.automl.v1.ModelEvaluation) => void; + public deleteDataset(request: google.cloud.automl.v1.IDeleteDatasetRequest, callback: google.cloud.automl.v1.AutoMl.DeleteDatasetCallback): void; /** - * Callback as used by {@link google.cloud.automl.v1.AutoMl#listModelEvaluations}. - * @param error Error, if any - * @param [response] ListModelEvaluationsResponse + * Calls DeleteDataset. + * @param request DeleteDatasetRequest message or plain object + * @returns Promise */ - type ListModelEvaluationsCallback = (error: (Error|null), response?: google.cloud.automl.v1.ListModelEvaluationsResponse) => void; - } - - /** Properties of a CreateDatasetRequest. */ - interface ICreateDatasetRequest { - - /** CreateDatasetRequest parent */ - parent?: (string|null); - - /** CreateDatasetRequest dataset */ - dataset?: (google.cloud.automl.v1.IDataset|null); - } - - /** Represents a CreateDatasetRequest. */ - class CreateDatasetRequest implements ICreateDatasetRequest { + public deleteDataset(request: google.cloud.automl.v1.IDeleteDatasetRequest): Promise; /** - * Constructs a new CreateDatasetRequest. - * @param [properties] Properties to set + * Calls ImportData. + * @param request ImportDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.automl.v1.ICreateDatasetRequest); - - /** CreateDatasetRequest parent. */ - public parent: string; + public importData(request: google.cloud.automl.v1.IImportDataRequest, callback: google.cloud.automl.v1.AutoMl.ImportDataCallback): void; - /** CreateDatasetRequest dataset. */ - public dataset?: (google.cloud.automl.v1.IDataset|null); + /** + * Calls ImportData. + * @param request ImportDataRequest message or plain object + * @returns Promise + */ + public importData(request: google.cloud.automl.v1.IImportDataRequest): Promise; /** - * Creates a new CreateDatasetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDatasetRequest instance + * Calls ExportData. + * @param request ExportDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.automl.v1.ICreateDatasetRequest): google.cloud.automl.v1.CreateDatasetRequest; + public exportData(request: google.cloud.automl.v1.IExportDataRequest, callback: google.cloud.automl.v1.AutoMl.ExportDataCallback): void; /** - * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetRequest.verify|verify} messages. - * @param message CreateDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportData. + * @param request ExportDataRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.automl.v1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public exportData(request: google.cloud.automl.v1.IExportDataRequest): Promise; /** - * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetRequest.verify|verify} messages. - * @param message CreateDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetAnnotationSpec. + * @param request GetAnnotationSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnnotationSpec */ - public static encodeDelimited(message: google.cloud.automl.v1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getAnnotationSpec(request: google.cloud.automl.v1.IGetAnnotationSpecRequest, callback: google.cloud.automl.v1.AutoMl.GetAnnotationSpecCallback): void; /** - * Decodes a CreateDatasetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetAnnotationSpec. + * @param request GetAnnotationSpecRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.CreateDatasetRequest; + public getAnnotationSpec(request: google.cloud.automl.v1.IGetAnnotationSpecRequest): Promise; /** - * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateModel. + * @param request CreateModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.CreateDatasetRequest; + public createModel(request: google.cloud.automl.v1.ICreateModelRequest, callback: google.cloud.automl.v1.AutoMl.CreateModelCallback): void; /** - * Verifies a CreateDatasetRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateModel. + * @param request CreateModelRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public createModel(request: google.cloud.automl.v1.ICreateModelRequest): Promise; /** - * Creates a CreateDatasetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDatasetRequest + * Calls GetModel. + * @param request GetModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Model */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateDatasetRequest; + public getModel(request: google.cloud.automl.v1.IGetModelRequest, callback: google.cloud.automl.v1.AutoMl.GetModelCallback): void; /** - * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified. - * @param message CreateDatasetRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetModel. + * @param request GetModelRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.automl.v1.CreateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getModel(request: google.cloud.automl.v1.IGetModelRequest): Promise; /** - * Converts this CreateDatasetRequest to JSON. - * @returns JSON object + * Calls ListModels. + * @param request ListModelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListModelsResponse */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetDatasetRequest. */ - interface IGetDatasetRequest { - - /** GetDatasetRequest name */ - name?: (string|null); - } - - /** Represents a GetDatasetRequest. */ - class GetDatasetRequest implements IGetDatasetRequest { + public listModels(request: google.cloud.automl.v1.IListModelsRequest, callback: google.cloud.automl.v1.AutoMl.ListModelsCallback): void; /** - * Constructs a new GetDatasetRequest. - * @param [properties] Properties to set + * Calls ListModels. + * @param request ListModelsRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.automl.v1.IGetDatasetRequest); - - /** GetDatasetRequest name. */ - public name: string; + public listModels(request: google.cloud.automl.v1.IListModelsRequest): Promise; /** - * Creates a new GetDatasetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDatasetRequest instance + * Calls DeleteModel. + * @param request DeleteModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.automl.v1.IGetDatasetRequest): google.cloud.automl.v1.GetDatasetRequest; + public deleteModel(request: google.cloud.automl.v1.IDeleteModelRequest, callback: google.cloud.automl.v1.AutoMl.DeleteModelCallback): void; /** - * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.GetDatasetRequest.verify|verify} messages. - * @param message GetDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteModel. + * @param request DeleteModelRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.automl.v1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteModel(request: google.cloud.automl.v1.IDeleteModelRequest): Promise; /** - * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetDatasetRequest.verify|verify} messages. - * @param message GetDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateModel. + * @param request UpdateModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Model */ - public static encodeDelimited(message: google.cloud.automl.v1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateModel(request: google.cloud.automl.v1.IUpdateModelRequest, callback: google.cloud.automl.v1.AutoMl.UpdateModelCallback): void; /** - * Decodes a GetDatasetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateModel. + * @param request UpdateModelRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.GetDatasetRequest; + public updateModel(request: google.cloud.automl.v1.IUpdateModelRequest): Promise; /** - * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeployModel. + * @param request DeployModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.GetDatasetRequest; + public deployModel(request: google.cloud.automl.v1.IDeployModelRequest, callback: google.cloud.automl.v1.AutoMl.DeployModelCallback): void; /** - * Verifies a GetDatasetRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeployModel. + * @param request DeployModelRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public deployModel(request: google.cloud.automl.v1.IDeployModelRequest): Promise; /** - * Creates a GetDatasetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDatasetRequest + * Calls UndeployModel. + * @param request UndeployModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetDatasetRequest; + public undeployModel(request: google.cloud.automl.v1.IUndeployModelRequest, callback: google.cloud.automl.v1.AutoMl.UndeployModelCallback): void; /** - * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified. - * @param message GetDatasetRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UndeployModel. + * @param request UndeployModelRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.automl.v1.GetDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public undeployModel(request: google.cloud.automl.v1.IUndeployModelRequest): Promise; /** - * Converts this GetDatasetRequest to JSON. - * @returns JSON object + * Calls ExportModel. + * @param request ExportModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListDatasetsRequest. */ - interface IListDatasetsRequest { - - /** ListDatasetsRequest parent */ - parent?: (string|null); - - /** ListDatasetsRequest filter */ - filter?: (string|null); - - /** ListDatasetsRequest pageSize */ - pageSize?: (number|null); - - /** ListDatasetsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListDatasetsRequest. */ - class ListDatasetsRequest implements IListDatasetsRequest { + public exportModel(request: google.cloud.automl.v1.IExportModelRequest, callback: google.cloud.automl.v1.AutoMl.ExportModelCallback): void; /** - * Constructs a new ListDatasetsRequest. - * @param [properties] Properties to set + * Calls ExportModel. + * @param request ExportModelRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.automl.v1.IListDatasetsRequest); - - /** ListDatasetsRequest parent. */ - public parent: string; - - /** ListDatasetsRequest filter. */ - public filter: string; - - /** ListDatasetsRequest pageSize. */ - public pageSize: number; - - /** ListDatasetsRequest pageToken. */ - public pageToken: string; + public exportModel(request: google.cloud.automl.v1.IExportModelRequest): Promise; /** - * Creates a new ListDatasetsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDatasetsRequest instance + * Calls GetModelEvaluation. + * @param request GetModelEvaluationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ModelEvaluation */ - public static create(properties?: google.cloud.automl.v1.IListDatasetsRequest): google.cloud.automl.v1.ListDatasetsRequest; + public getModelEvaluation(request: google.cloud.automl.v1.IGetModelEvaluationRequest, callback: google.cloud.automl.v1.AutoMl.GetModelEvaluationCallback): void; /** - * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsRequest.verify|verify} messages. - * @param message ListDatasetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetModelEvaluation. + * @param request GetModelEvaluationRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.automl.v1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getModelEvaluation(request: google.cloud.automl.v1.IGetModelEvaluationRequest): Promise; /** - * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsRequest.verify|verify} messages. - * @param message ListDatasetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListModelEvaluations. + * @param request ListModelEvaluationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListModelEvaluationsResponse */ - public static encodeDelimited(message: google.cloud.automl.v1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listModelEvaluations(request: google.cloud.automl.v1.IListModelEvaluationsRequest, callback: google.cloud.automl.v1.AutoMl.ListModelEvaluationsCallback): void; /** - * Decodes a ListDatasetsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDatasetsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListModelEvaluations. + * @param request ListModelEvaluationsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListDatasetsRequest; + public listModelEvaluations(request: google.cloud.automl.v1.IListModelEvaluationsRequest): Promise; + } + + namespace AutoMl { /** - * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDatasetsRequest - * @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.automl.v1.AutoMl#createDataset}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListDatasetsRequest; + type CreateDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a ListDatasetsRequest 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.automl.v1.AutoMl#getDataset}. + * @param error Error, if any + * @param [response] Dataset */ - public static verify(message: { [k: string]: any }): (string|null); + type GetDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1.Dataset) => void; /** - * Creates a ListDatasetsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDatasetsRequest + * Callback as used by {@link google.cloud.automl.v1.AutoMl#listDatasets}. + * @param error Error, if any + * @param [response] ListDatasetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListDatasetsRequest; + type ListDatasetsCallback = (error: (Error|null), response?: google.cloud.automl.v1.ListDatasetsResponse) => void; /** - * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified. - * @param message ListDatasetsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.automl.v1.AutoMl#updateDataset}. + * @param error Error, if any + * @param [response] Dataset */ - public static toObject(message: google.cloud.automl.v1.ListDatasetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type UpdateDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1.Dataset) => void; /** - * Converts this ListDatasetsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.automl.v1.AutoMl#deleteDataset}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListDatasetsResponse. */ - interface IListDatasetsResponse { - - /** ListDatasetsResponse datasets */ - datasets?: (google.cloud.automl.v1.IDataset[]|null); - - /** ListDatasetsResponse nextPageToken */ - nextPageToken?: (string|null); - } + type DeleteDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** Represents a ListDatasetsResponse. */ - class ListDatasetsResponse implements IListDatasetsResponse { + /** + * Callback as used by {@link google.cloud.automl.v1.AutoMl#importData}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Constructs a new ListDatasetsResponse. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.automl.v1.AutoMl#exportData}. + * @param error Error, if any + * @param [response] Operation */ - constructor(properties?: google.cloud.automl.v1.IListDatasetsResponse); + type ExportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ListDatasetsResponse datasets. */ - public datasets: google.cloud.automl.v1.IDataset[]; + /** + * Callback as used by {@link google.cloud.automl.v1.AutoMl#getAnnotationSpec}. + * @param error Error, if any + * @param [response] AnnotationSpec + */ + type GetAnnotationSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1.AnnotationSpec) => void; - /** ListDatasetsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Callback as used by {@link google.cloud.automl.v1.AutoMl#createModel}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a new ListDatasetsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDatasetsResponse instance + * Callback as used by {@link google.cloud.automl.v1.AutoMl#getModel}. + * @param error Error, if any + * @param [response] Model */ - public static create(properties?: google.cloud.automl.v1.IListDatasetsResponse): google.cloud.automl.v1.ListDatasetsResponse; + type GetModelCallback = (error: (Error|null), response?: google.cloud.automl.v1.Model) => void; /** - * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsResponse.verify|verify} messages. - * @param message ListDatasetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.automl.v1.AutoMl#listModels}. + * @param error Error, if any + * @param [response] ListModelsResponse */ - public static encode(message: google.cloud.automl.v1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type ListModelsCallback = (error: (Error|null), response?: google.cloud.automl.v1.ListModelsResponse) => void; /** - * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsResponse.verify|verify} messages. - * @param message ListDatasetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.automl.v1.AutoMl#deleteModel}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.automl.v1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a ListDatasetsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDatasetsResponse - * @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.automl.v1.AutoMl#updateModel}. + * @param error Error, if any + * @param [response] Model */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListDatasetsResponse; + type UpdateModelCallback = (error: (Error|null), response?: google.cloud.automl.v1.Model) => void; /** - * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDatasetsResponse - * @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.automl.v1.AutoMl#deployModel}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListDatasetsResponse; + type DeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a ListDatasetsResponse 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.automl.v1.AutoMl#undeployModel}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type UndeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a ListDatasetsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDatasetsResponse + * Callback as used by {@link google.cloud.automl.v1.AutoMl#exportModel}. + * @param error Error, if any + * @param [response] Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListDatasetsResponse; + type ExportModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a plain object from a ListDatasetsResponse message. Also converts values to other types if specified. - * @param message ListDatasetsResponse - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.automl.v1.AutoMl#getModelEvaluation}. + * @param error Error, if any + * @param [response] ModelEvaluation */ - public static toObject(message: google.cloud.automl.v1.ListDatasetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetModelEvaluationCallback = (error: (Error|null), response?: google.cloud.automl.v1.ModelEvaluation) => void; /** - * Converts this ListDatasetsResponse to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.automl.v1.AutoMl#listModelEvaluations}. + * @param error Error, if any + * @param [response] ListModelEvaluationsResponse */ - public toJSON(): { [k: string]: any }; + type ListModelEvaluationsCallback = (error: (Error|null), response?: google.cloud.automl.v1.ListModelEvaluationsResponse) => void; } - /** Properties of an UpdateDatasetRequest. */ - interface IUpdateDatasetRequest { + /** Properties of a CreateDatasetRequest. */ + interface ICreateDatasetRequest { - /** UpdateDatasetRequest dataset */ - dataset?: (google.cloud.automl.v1.IDataset|null); + /** CreateDatasetRequest parent */ + parent?: (string|null); - /** UpdateDatasetRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** CreateDatasetRequest dataset */ + dataset?: (google.cloud.automl.v1.IDataset|null); } - /** Represents an UpdateDatasetRequest. */ - class UpdateDatasetRequest implements IUpdateDatasetRequest { + /** Represents a CreateDatasetRequest. */ + class CreateDatasetRequest implements ICreateDatasetRequest { /** - * Constructs a new UpdateDatasetRequest. + * Constructs a new CreateDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IUpdateDatasetRequest); + constructor(properties?: google.cloud.automl.v1.ICreateDatasetRequest); - /** UpdateDatasetRequest dataset. */ - public dataset?: (google.cloud.automl.v1.IDataset|null); + /** CreateDatasetRequest parent. */ + public parent: string; - /** UpdateDatasetRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** CreateDatasetRequest dataset. */ + public dataset?: (google.cloud.automl.v1.IDataset|null); /** - * Creates a new UpdateDatasetRequest instance using the specified properties. + * Creates a new CreateDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateDatasetRequest instance + * @returns CreateDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1.IUpdateDatasetRequest): google.cloud.automl.v1.UpdateDatasetRequest; + public static create(properties?: google.cloud.automl.v1.ICreateDatasetRequest): google.cloud.automl.v1.CreateDatasetRequest; /** - * Encodes the specified UpdateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.UpdateDatasetRequest.verify|verify} messages. - * @param message UpdateDatasetRequest message or plain object to encode + * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetRequest.verify|verify} messages. + * @param message CreateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UpdateDatasetRequest.verify|verify} messages. - * @param message UpdateDatasetRequest message or plain object to encode + * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetRequest.verify|verify} messages. + * @param message CreateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateDatasetRequest message from the specified reader or buffer. + * Decodes a CreateDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateDatasetRequest + * @returns CreateDatasetRequest * @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.automl.v1.UpdateDatasetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.CreateDatasetRequest; /** - * Decodes an UpdateDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateDatasetRequest + * @returns CreateDatasetRequest * @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.automl.v1.UpdateDatasetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.CreateDatasetRequest; /** - * Verifies an UpdateDatasetRequest message. + * Verifies a CreateDatasetRequest 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 UpdateDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateDatasetRequest + * @returns CreateDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UpdateDatasetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateDatasetRequest; /** - * Creates a plain object from an UpdateDatasetRequest message. Also converts values to other types if specified. - * @param message UpdateDatasetRequest + * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified. + * @param message CreateDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.UpdateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.CreateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateDatasetRequest to JSON. + * Converts this CreateDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteDatasetRequest. */ - interface IDeleteDatasetRequest { + /** Properties of a GetDatasetRequest. */ + interface IGetDatasetRequest { - /** DeleteDatasetRequest name */ + /** GetDatasetRequest name */ name?: (string|null); } - /** Represents a DeleteDatasetRequest. */ - class DeleteDatasetRequest implements IDeleteDatasetRequest { + /** Represents a GetDatasetRequest. */ + class GetDatasetRequest implements IGetDatasetRequest { /** - * Constructs a new DeleteDatasetRequest. + * Constructs a new GetDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDeleteDatasetRequest); + constructor(properties?: google.cloud.automl.v1.IGetDatasetRequest); - /** DeleteDatasetRequest name. */ + /** GetDatasetRequest name. */ public name: string; /** - * Creates a new DeleteDatasetRequest instance using the specified properties. + * Creates a new GetDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDatasetRequest instance + * @returns GetDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1.IDeleteDatasetRequest): google.cloud.automl.v1.DeleteDatasetRequest; + public static create(properties?: google.cloud.automl.v1.IGetDatasetRequest): google.cloud.automl.v1.GetDatasetRequest; /** - * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.DeleteDatasetRequest.verify|verify} messages. - * @param message DeleteDatasetRequest message or plain object to encode + * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.GetDatasetRequest.verify|verify} messages. + * @param message GetDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteDatasetRequest.verify|verify} messages. - * @param message DeleteDatasetRequest message or plain object to encode + * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetDatasetRequest.verify|verify} messages. + * @param message GetDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDatasetRequest message from the specified reader or buffer. + * Decodes a GetDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDatasetRequest + * @returns GetDatasetRequest * @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.automl.v1.DeleteDatasetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.GetDatasetRequest; /** - * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDatasetRequest + * @returns GetDatasetRequest * @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.automl.v1.DeleteDatasetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.GetDatasetRequest; /** - * Verifies a DeleteDatasetRequest message. + * Verifies a GetDatasetRequest 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 DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDatasetRequest + * @returns GetDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeleteDatasetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetDatasetRequest; /** - * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified. - * @param message DeleteDatasetRequest + * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified. + * @param message GetDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.DeleteDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.GetDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDatasetRequest to JSON. + * Converts this GetDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImportDataRequest. */ - interface IImportDataRequest { + /** Properties of a ListDatasetsRequest. */ + interface IListDatasetsRequest { - /** ImportDataRequest name */ - name?: (string|null); + /** ListDatasetsRequest parent */ + parent?: (string|null); - /** ImportDataRequest inputConfig */ - inputConfig?: (google.cloud.automl.v1.IInputConfig|null); + /** ListDatasetsRequest filter */ + filter?: (string|null); + + /** ListDatasetsRequest pageSize */ + pageSize?: (number|null); + + /** ListDatasetsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an ImportDataRequest. */ - class ImportDataRequest implements IImportDataRequest { + /** Represents a ListDatasetsRequest. */ + class ListDatasetsRequest implements IListDatasetsRequest { /** - * Constructs a new ImportDataRequest. + * Constructs a new ListDatasetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IImportDataRequest); + constructor(properties?: google.cloud.automl.v1.IListDatasetsRequest); - /** ImportDataRequest name. */ - public name: string; + /** ListDatasetsRequest parent. */ + public parent: string; - /** ImportDataRequest inputConfig. */ - public inputConfig?: (google.cloud.automl.v1.IInputConfig|null); + /** ListDatasetsRequest filter. */ + public filter: string; + + /** ListDatasetsRequest pageSize. */ + public pageSize: number; + + /** ListDatasetsRequest pageToken. */ + public pageToken: string; /** - * Creates a new ImportDataRequest instance using the specified properties. + * Creates a new ListDatasetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDataRequest instance + * @returns ListDatasetsRequest instance */ - public static create(properties?: google.cloud.automl.v1.IImportDataRequest): google.cloud.automl.v1.ImportDataRequest; + public static create(properties?: google.cloud.automl.v1.IListDatasetsRequest): google.cloud.automl.v1.ListDatasetsRequest; /** - * Encodes the specified ImportDataRequest message. Does not implicitly {@link google.cloud.automl.v1.ImportDataRequest.verify|verify} messages. - * @param message ImportDataRequest message or plain object to encode + * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsRequest.verify|verify} messages. + * @param message ListDatasetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImportDataRequest.verify|verify} messages. - * @param message ImportDataRequest message or plain object to encode + * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsRequest.verify|verify} messages. + * @param message ListDatasetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDataRequest message from the specified reader or buffer. + * Decodes a ListDatasetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDataRequest + * @returns ListDatasetsRequest * @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.automl.v1.ImportDataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListDatasetsRequest; /** - * Decodes an ImportDataRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDataRequest + * @returns ListDatasetsRequest * @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.automl.v1.ImportDataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListDatasetsRequest; /** - * Verifies an ImportDataRequest message. + * Verifies a ListDatasetsRequest 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 ImportDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDatasetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDataRequest + * @returns ListDatasetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImportDataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListDatasetsRequest; /** - * Creates a plain object from an ImportDataRequest message. Also converts values to other types if specified. - * @param message ImportDataRequest + * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified. + * @param message ListDatasetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ImportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ListDatasetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDataRequest to JSON. + * Converts this ListDatasetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportDataRequest. */ - interface IExportDataRequest { + /** Properties of a ListDatasetsResponse. */ + interface IListDatasetsResponse { - /** ExportDataRequest name */ - name?: (string|null); + /** ListDatasetsResponse datasets */ + datasets?: (google.cloud.automl.v1.IDataset[]|null); - /** ExportDataRequest outputConfig */ - outputConfig?: (google.cloud.automl.v1.IOutputConfig|null); + /** ListDatasetsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ExportDataRequest. */ - class ExportDataRequest implements IExportDataRequest { + /** Represents a ListDatasetsResponse. */ + class ListDatasetsResponse implements IListDatasetsResponse { /** - * Constructs a new ExportDataRequest. + * Constructs a new ListDatasetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IExportDataRequest); + constructor(properties?: google.cloud.automl.v1.IListDatasetsResponse); - /** ExportDataRequest name. */ - public name: string; + /** ListDatasetsResponse datasets. */ + public datasets: google.cloud.automl.v1.IDataset[]; - /** ExportDataRequest outputConfig. */ - public outputConfig?: (google.cloud.automl.v1.IOutputConfig|null); + /** ListDatasetsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ExportDataRequest instance using the specified properties. + * Creates a new ListDatasetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExportDataRequest instance + * @returns ListDatasetsResponse instance */ - public static create(properties?: google.cloud.automl.v1.IExportDataRequest): google.cloud.automl.v1.ExportDataRequest; + public static create(properties?: google.cloud.automl.v1.IListDatasetsResponse): google.cloud.automl.v1.ListDatasetsResponse; /** - * Encodes the specified ExportDataRequest message. Does not implicitly {@link google.cloud.automl.v1.ExportDataRequest.verify|verify} messages. - * @param message ExportDataRequest message or plain object to encode + * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsResponse.verify|verify} messages. + * @param message ListDatasetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataRequest.verify|verify} messages. - * @param message ExportDataRequest message or plain object to encode + * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListDatasetsResponse.verify|verify} messages. + * @param message ListDatasetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportDataRequest message from the specified reader or buffer. + * Decodes a ListDatasetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportDataRequest + * @returns ListDatasetsResponse * @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.automl.v1.ExportDataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListDatasetsResponse; /** - * Decodes an ExportDataRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportDataRequest + * @returns ListDatasetsResponse * @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.automl.v1.ExportDataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListDatasetsResponse; /** - * Verifies an ExportDataRequest message. + * Verifies a ListDatasetsResponse 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 ExportDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDatasetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportDataRequest + * @returns ListDatasetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportDataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListDatasetsResponse; /** - * Creates a plain object from an ExportDataRequest message. Also converts values to other types if specified. - * @param message ExportDataRequest + * Creates a plain object from a ListDatasetsResponse message. Also converts values to other types if specified. + * @param message ListDatasetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ExportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ListDatasetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportDataRequest to JSON. + * Converts this ListDatasetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetAnnotationSpecRequest. */ - interface IGetAnnotationSpecRequest { + /** Properties of an UpdateDatasetRequest. */ + interface IUpdateDatasetRequest { - /** GetAnnotationSpecRequest name */ - name?: (string|null); + /** UpdateDatasetRequest dataset */ + dataset?: (google.cloud.automl.v1.IDataset|null); + + /** UpdateDatasetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a GetAnnotationSpecRequest. */ - class GetAnnotationSpecRequest implements IGetAnnotationSpecRequest { + /** Represents an UpdateDatasetRequest. */ + class UpdateDatasetRequest implements IUpdateDatasetRequest { /** - * Constructs a new GetAnnotationSpecRequest. + * Constructs a new UpdateDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IGetAnnotationSpecRequest); + constructor(properties?: google.cloud.automl.v1.IUpdateDatasetRequest); - /** GetAnnotationSpecRequest name. */ - public name: string; + /** UpdateDatasetRequest dataset. */ + public dataset?: (google.cloud.automl.v1.IDataset|null); + + /** UpdateDatasetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new GetAnnotationSpecRequest instance using the specified properties. + * Creates a new UpdateDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetAnnotationSpecRequest instance + * @returns UpdateDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1.IGetAnnotationSpecRequest): google.cloud.automl.v1.GetAnnotationSpecRequest; + public static create(properties?: google.cloud.automl.v1.IUpdateDatasetRequest): google.cloud.automl.v1.UpdateDatasetRequest; /** - * Encodes the specified GetAnnotationSpecRequest message. Does not implicitly {@link google.cloud.automl.v1.GetAnnotationSpecRequest.verify|verify} messages. - * @param message GetAnnotationSpecRequest message or plain object to encode + * Encodes the specified UpdateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.UpdateDatasetRequest.verify|verify} messages. + * @param message UpdateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetAnnotationSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetAnnotationSpecRequest.verify|verify} messages. - * @param message GetAnnotationSpecRequest message or plain object to encode + * Encodes the specified UpdateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UpdateDatasetRequest.verify|verify} messages. + * @param message UpdateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer. + * Decodes an UpdateDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetAnnotationSpecRequest + * @returns UpdateDatasetRequest * @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.automl.v1.GetAnnotationSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.UpdateDatasetRequest; /** - * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetAnnotationSpecRequest + * @returns UpdateDatasetRequest * @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.automl.v1.GetAnnotationSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.UpdateDatasetRequest; /** - * Verifies a GetAnnotationSpecRequest message. + * Verifies an UpdateDatasetRequest 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 GetAnnotationSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetAnnotationSpecRequest + * @returns UpdateDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetAnnotationSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UpdateDatasetRequest; /** - * Creates a plain object from a GetAnnotationSpecRequest message. Also converts values to other types if specified. - * @param message GetAnnotationSpecRequest + * Creates a plain object from an UpdateDatasetRequest message. Also converts values to other types if specified. + * @param message UpdateDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.GetAnnotationSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.UpdateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetAnnotationSpecRequest to JSON. + * Converts this UpdateDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateModelRequest. */ - interface ICreateModelRequest { - - /** CreateModelRequest parent */ - parent?: (string|null); + /** Properties of a DeleteDatasetRequest. */ + interface IDeleteDatasetRequest { - /** CreateModelRequest model */ - model?: (google.cloud.automl.v1.IModel|null); + /** DeleteDatasetRequest name */ + name?: (string|null); } - /** Represents a CreateModelRequest. */ - class CreateModelRequest implements ICreateModelRequest { + /** Represents a DeleteDatasetRequest. */ + class DeleteDatasetRequest implements IDeleteDatasetRequest { /** - * Constructs a new CreateModelRequest. + * Constructs a new DeleteDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.ICreateModelRequest); - - /** CreateModelRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.automl.v1.IDeleteDatasetRequest); - /** CreateModelRequest model. */ - public model?: (google.cloud.automl.v1.IModel|null); + /** DeleteDatasetRequest name. */ + public name: string; /** - * Creates a new CreateModelRequest instance using the specified properties. + * Creates a new DeleteDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateModelRequest instance + * @returns DeleteDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1.ICreateModelRequest): google.cloud.automl.v1.CreateModelRequest; + public static create(properties?: google.cloud.automl.v1.IDeleteDatasetRequest): google.cloud.automl.v1.DeleteDatasetRequest; /** - * Encodes the specified CreateModelRequest message. Does not implicitly {@link google.cloud.automl.v1.CreateModelRequest.verify|verify} messages. - * @param message CreateModelRequest message or plain object to encode + * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1.DeleteDatasetRequest.verify|verify} messages. + * @param message DeleteDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateModelRequest.verify|verify} messages. - * @param message CreateModelRequest message or plain object to encode + * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteDatasetRequest.verify|verify} messages. + * @param message DeleteDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateModelRequest message from the specified reader or buffer. + * Decodes a DeleteDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateModelRequest + * @returns DeleteDatasetRequest * @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.automl.v1.CreateModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.DeleteDatasetRequest; /** - * Decodes a CreateModelRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateModelRequest + * @returns DeleteDatasetRequest * @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.automl.v1.CreateModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.DeleteDatasetRequest; /** - * Verifies a CreateModelRequest message. + * Verifies a DeleteDatasetRequest 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 CreateModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateModelRequest + * @returns DeleteDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeleteDatasetRequest; /** - * Creates a plain object from a CreateModelRequest message. Also converts values to other types if specified. - * @param message CreateModelRequest + * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified. + * @param message DeleteDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.CreateModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.DeleteDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateModelRequest to JSON. + * Converts this DeleteDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetModelRequest. */ - interface IGetModelRequest { + /** Properties of an ImportDataRequest. */ + interface IImportDataRequest { - /** GetModelRequest name */ + /** ImportDataRequest name */ name?: (string|null); + + /** ImportDataRequest inputConfig */ + inputConfig?: (google.cloud.automl.v1.IInputConfig|null); } - /** Represents a GetModelRequest. */ - class GetModelRequest implements IGetModelRequest { + /** Represents an ImportDataRequest. */ + class ImportDataRequest implements IImportDataRequest { /** - * Constructs a new GetModelRequest. + * Constructs a new ImportDataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IGetModelRequest); + constructor(properties?: google.cloud.automl.v1.IImportDataRequest); - /** GetModelRequest name. */ + /** ImportDataRequest name. */ public name: string; + /** ImportDataRequest inputConfig. */ + public inputConfig?: (google.cloud.automl.v1.IInputConfig|null); + /** - * Creates a new GetModelRequest instance using the specified properties. + * Creates a new ImportDataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetModelRequest instance + * @returns ImportDataRequest instance */ - public static create(properties?: google.cloud.automl.v1.IGetModelRequest): google.cloud.automl.v1.GetModelRequest; + public static create(properties?: google.cloud.automl.v1.IImportDataRequest): google.cloud.automl.v1.ImportDataRequest; /** - * Encodes the specified GetModelRequest message. Does not implicitly {@link google.cloud.automl.v1.GetModelRequest.verify|verify} messages. - * @param message GetModelRequest message or plain object to encode + * Encodes the specified ImportDataRequest message. Does not implicitly {@link google.cloud.automl.v1.ImportDataRequest.verify|verify} messages. + * @param message ImportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetModelRequest.verify|verify} messages. - * @param message GetModelRequest message or plain object to encode + * Encodes the specified ImportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImportDataRequest.verify|verify} messages. + * @param message ImportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetModelRequest message from the specified reader or buffer. + * Decodes an ImportDataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetModelRequest + * @returns ImportDataRequest * @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.automl.v1.GetModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ImportDataRequest; /** - * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportDataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetModelRequest + * @returns ImportDataRequest * @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.automl.v1.GetModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ImportDataRequest; /** - * Verifies a GetModelRequest message. + * Verifies an ImportDataRequest 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 GetModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetModelRequest + * @returns ImportDataRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ImportDataRequest; /** - * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. - * @param message GetModelRequest + * Creates a plain object from an ImportDataRequest message. Also converts values to other types if specified. + * @param message ImportDataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.GetModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ImportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetModelRequest to JSON. + * Converts this ImportDataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelsRequest. */ - interface IListModelsRequest { - - /** ListModelsRequest parent */ - parent?: (string|null); - - /** ListModelsRequest filter */ - filter?: (string|null); + /** Properties of an ExportDataRequest. */ + interface IExportDataRequest { - /** ListModelsRequest pageSize */ - pageSize?: (number|null); + /** ExportDataRequest name */ + name?: (string|null); - /** ListModelsRequest pageToken */ - pageToken?: (string|null); + /** ExportDataRequest outputConfig */ + outputConfig?: (google.cloud.automl.v1.IOutputConfig|null); } - /** Represents a ListModelsRequest. */ - class ListModelsRequest implements IListModelsRequest { + /** Represents an ExportDataRequest. */ + class ExportDataRequest implements IExportDataRequest { /** - * Constructs a new ListModelsRequest. + * Constructs a new ExportDataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IListModelsRequest); - - /** ListModelsRequest parent. */ - public parent: string; - - /** ListModelsRequest filter. */ - public filter: string; + constructor(properties?: google.cloud.automl.v1.IExportDataRequest); - /** ListModelsRequest pageSize. */ - public pageSize: number; + /** ExportDataRequest name. */ + public name: string; - /** ListModelsRequest pageToken. */ - public pageToken: string; + /** ExportDataRequest outputConfig. */ + public outputConfig?: (google.cloud.automl.v1.IOutputConfig|null); /** - * Creates a new ListModelsRequest instance using the specified properties. + * Creates a new ExportDataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelsRequest instance + * @returns ExportDataRequest instance */ - public static create(properties?: google.cloud.automl.v1.IListModelsRequest): google.cloud.automl.v1.ListModelsRequest; + public static create(properties?: google.cloud.automl.v1.IExportDataRequest): google.cloud.automl.v1.ExportDataRequest; /** - * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.cloud.automl.v1.ListModelsRequest.verify|verify} messages. - * @param message ListModelsRequest message or plain object to encode + * Encodes the specified ExportDataRequest message. Does not implicitly {@link google.cloud.automl.v1.ExportDataRequest.verify|verify} messages. + * @param message ExportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelsRequest.verify|verify} messages. - * @param message ListModelsRequest message or plain object to encode + * Encodes the specified ExportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataRequest.verify|verify} messages. + * @param message ExportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelsRequest message from the specified reader or buffer. + * Decodes an ExportDataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelsRequest + * @returns ExportDataRequest * @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.automl.v1.ListModelsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ExportDataRequest; /** - * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportDataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelsRequest + * @returns ExportDataRequest * @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.automl.v1.ListModelsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ExportDataRequest; /** - * Verifies a ListModelsRequest message. + * Verifies an ExportDataRequest 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 ListModelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelsRequest + * @returns ExportDataRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportDataRequest; /** - * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. - * @param message ListModelsRequest + * Creates a plain object from an ExportDataRequest message. Also converts values to other types if specified. + * @param message ExportDataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ListModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ExportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelsRequest to JSON. + * Converts this ExportDataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelsResponse. */ - interface IListModelsResponse { - - /** ListModelsResponse model */ - model?: (google.cloud.automl.v1.IModel[]|null); + /** Properties of a GetAnnotationSpecRequest. */ + interface IGetAnnotationSpecRequest { - /** ListModelsResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetAnnotationSpecRequest name */ + name?: (string|null); } - /** Represents a ListModelsResponse. */ - class ListModelsResponse implements IListModelsResponse { + /** Represents a GetAnnotationSpecRequest. */ + class GetAnnotationSpecRequest implements IGetAnnotationSpecRequest { /** - * Constructs a new ListModelsResponse. + * Constructs a new GetAnnotationSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IListModelsResponse); - - /** ListModelsResponse model. */ - public model: google.cloud.automl.v1.IModel[]; + constructor(properties?: google.cloud.automl.v1.IGetAnnotationSpecRequest); - /** ListModelsResponse nextPageToken. */ - public nextPageToken: string; + /** GetAnnotationSpecRequest name. */ + public name: string; /** - * Creates a new ListModelsResponse instance using the specified properties. + * Creates a new GetAnnotationSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelsResponse instance + * @returns GetAnnotationSpecRequest instance */ - public static create(properties?: google.cloud.automl.v1.IListModelsResponse): google.cloud.automl.v1.ListModelsResponse; + public static create(properties?: google.cloud.automl.v1.IGetAnnotationSpecRequest): google.cloud.automl.v1.GetAnnotationSpecRequest; /** - * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListModelsResponse.verify|verify} messages. - * @param message ListModelsResponse message or plain object to encode + * Encodes the specified GetAnnotationSpecRequest message. Does not implicitly {@link google.cloud.automl.v1.GetAnnotationSpecRequest.verify|verify} messages. + * @param message GetAnnotationSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelsResponse.verify|verify} messages. - * @param message ListModelsResponse message or plain object to encode + * Encodes the specified GetAnnotationSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetAnnotationSpecRequest.verify|verify} messages. + * @param message GetAnnotationSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelsResponse message from the specified reader or buffer. + * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelsResponse + * @returns GetAnnotationSpecRequest * @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.automl.v1.ListModelsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.GetAnnotationSpecRequest; /** - * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelsResponse + * @returns GetAnnotationSpecRequest * @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.automl.v1.ListModelsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.GetAnnotationSpecRequest; /** - * Verifies a ListModelsResponse message. + * Verifies a GetAnnotationSpecRequest 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 ListModelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetAnnotationSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelsResponse + * @returns GetAnnotationSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetAnnotationSpecRequest; /** - * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. - * @param message ListModelsResponse + * Creates a plain object from a GetAnnotationSpecRequest message. Also converts values to other types if specified. + * @param message GetAnnotationSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ListModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.GetAnnotationSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelsResponse to JSON. + * Converts this GetAnnotationSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteModelRequest. */ - interface IDeleteModelRequest { + /** Properties of a CreateModelRequest. */ + interface ICreateModelRequest { - /** DeleteModelRequest name */ - name?: (string|null); + /** CreateModelRequest parent */ + parent?: (string|null); + + /** CreateModelRequest model */ + model?: (google.cloud.automl.v1.IModel|null); } - /** Represents a DeleteModelRequest. */ - class DeleteModelRequest implements IDeleteModelRequest { + /** Represents a CreateModelRequest. */ + class CreateModelRequest implements ICreateModelRequest { /** - * Constructs a new DeleteModelRequest. + * Constructs a new CreateModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDeleteModelRequest); + constructor(properties?: google.cloud.automl.v1.ICreateModelRequest); - /** DeleteModelRequest name. */ - public name: string; + /** CreateModelRequest parent. */ + public parent: string; + + /** CreateModelRequest model. */ + public model?: (google.cloud.automl.v1.IModel|null); /** - * Creates a new DeleteModelRequest instance using the specified properties. + * Creates a new CreateModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteModelRequest instance + * @returns CreateModelRequest instance */ - public static create(properties?: google.cloud.automl.v1.IDeleteModelRequest): google.cloud.automl.v1.DeleteModelRequest; + public static create(properties?: google.cloud.automl.v1.ICreateModelRequest): google.cloud.automl.v1.CreateModelRequest; /** - * Encodes the specified DeleteModelRequest message. Does not implicitly {@link google.cloud.automl.v1.DeleteModelRequest.verify|verify} messages. - * @param message DeleteModelRequest message or plain object to encode + * Encodes the specified CreateModelRequest message. Does not implicitly {@link google.cloud.automl.v1.CreateModelRequest.verify|verify} messages. + * @param message CreateModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteModelRequest.verify|verify} messages. - * @param message DeleteModelRequest message or plain object to encode + * Encodes the specified CreateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateModelRequest.verify|verify} messages. + * @param message CreateModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteModelRequest message from the specified reader or buffer. + * Decodes a CreateModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteModelRequest + * @returns CreateModelRequest * @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.automl.v1.DeleteModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.CreateModelRequest; /** - * Decodes a DeleteModelRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteModelRequest + * @returns CreateModelRequest * @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.automl.v1.DeleteModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.CreateModelRequest; /** - * Verifies a DeleteModelRequest message. + * Verifies a CreateModelRequest 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 DeleteModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteModelRequest + * @returns CreateModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeleteModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.CreateModelRequest; /** - * Creates a plain object from a DeleteModelRequest message. Also converts values to other types if specified. - * @param message DeleteModelRequest + * Creates a plain object from a CreateModelRequest message. Also converts values to other types if specified. + * @param message CreateModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.DeleteModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.CreateModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteModelRequest to JSON. + * Converts this CreateModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateModelRequest. */ - interface IUpdateModelRequest { - - /** UpdateModelRequest model */ - model?: (google.cloud.automl.v1.IModel|null); + /** Properties of a GetModelRequest. */ + interface IGetModelRequest { - /** UpdateModelRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GetModelRequest name */ + name?: (string|null); } - /** Represents an UpdateModelRequest. */ - class UpdateModelRequest implements IUpdateModelRequest { + /** Represents a GetModelRequest. */ + class GetModelRequest implements IGetModelRequest { /** - * Constructs a new UpdateModelRequest. + * Constructs a new GetModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IUpdateModelRequest); - - /** UpdateModelRequest model. */ - public model?: (google.cloud.automl.v1.IModel|null); + constructor(properties?: google.cloud.automl.v1.IGetModelRequest); - /** UpdateModelRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GetModelRequest name. */ + public name: string; /** - * Creates a new UpdateModelRequest instance using the specified properties. + * Creates a new GetModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateModelRequest instance + * @returns GetModelRequest instance */ - public static create(properties?: google.cloud.automl.v1.IUpdateModelRequest): google.cloud.automl.v1.UpdateModelRequest; + public static create(properties?: google.cloud.automl.v1.IGetModelRequest): google.cloud.automl.v1.GetModelRequest; /** - * Encodes the specified UpdateModelRequest message. Does not implicitly {@link google.cloud.automl.v1.UpdateModelRequest.verify|verify} messages. - * @param message UpdateModelRequest message or plain object to encode + * Encodes the specified GetModelRequest message. Does not implicitly {@link google.cloud.automl.v1.GetModelRequest.verify|verify} messages. + * @param message GetModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IUpdateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UpdateModelRequest.verify|verify} messages. - * @param message UpdateModelRequest message or plain object to encode + * Encodes the specified GetModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetModelRequest.verify|verify} messages. + * @param message GetModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IUpdateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateModelRequest message from the specified reader or buffer. + * Decodes a GetModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateModelRequest + * @returns GetModelRequest * @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.automl.v1.UpdateModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.GetModelRequest; /** - * Decodes an UpdateModelRequest message from the specified reader or buffer, length delimited. + * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateModelRequest + * @returns GetModelRequest * @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.automl.v1.UpdateModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.GetModelRequest; /** - * Verifies an UpdateModelRequest message. + * Verifies a GetModelRequest 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 UpdateModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateModelRequest + * @returns GetModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UpdateModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetModelRequest; /** - * Creates a plain object from an UpdateModelRequest message. Also converts values to other types if specified. - * @param message UpdateModelRequest + * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. + * @param message GetModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.UpdateModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.GetModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateModelRequest to JSON. + * Converts this GetModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeployModelRequest. */ - interface IDeployModelRequest { + /** Properties of a ListModelsRequest. */ + interface IListModelsRequest { - /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata */ - imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata|null); + /** ListModelsRequest parent */ + parent?: (string|null); - /** DeployModelRequest imageClassificationModelDeploymentMetadata */ - imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata|null); + /** ListModelsRequest filter */ + filter?: (string|null); - /** DeployModelRequest name */ - name?: (string|null); + /** ListModelsRequest pageSize */ + pageSize?: (number|null); + + /** ListModelsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DeployModelRequest. */ - class DeployModelRequest implements IDeployModelRequest { + /** Represents a ListModelsRequest. */ + class ListModelsRequest implements IListModelsRequest { /** - * Constructs a new DeployModelRequest. + * Constructs a new ListModelsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IDeployModelRequest); + constructor(properties?: google.cloud.automl.v1.IListModelsRequest); - /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata. */ - public imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata|null); + /** ListModelsRequest parent. */ + public parent: string; - /** DeployModelRequest imageClassificationModelDeploymentMetadata. */ - public imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata|null); + /** ListModelsRequest filter. */ + public filter: string; - /** DeployModelRequest name. */ - public name: string; + /** ListModelsRequest pageSize. */ + public pageSize: number; - /** DeployModelRequest modelDeploymentMetadata. */ - public modelDeploymentMetadata?: ("imageObjectDetectionModelDeploymentMetadata"|"imageClassificationModelDeploymentMetadata"); + /** ListModelsRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeployModelRequest instance using the specified properties. + * Creates a new ListModelsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeployModelRequest instance + * @returns ListModelsRequest instance */ - public static create(properties?: google.cloud.automl.v1.IDeployModelRequest): google.cloud.automl.v1.DeployModelRequest; + public static create(properties?: google.cloud.automl.v1.IListModelsRequest): google.cloud.automl.v1.ListModelsRequest; /** - * Encodes the specified DeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1.DeployModelRequest.verify|verify} messages. - * @param message DeployModelRequest message or plain object to encode + * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.cloud.automl.v1.ListModelsRequest.verify|verify} messages. + * @param message ListModelsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeployModelRequest.verify|verify} messages. - * @param message DeployModelRequest message or plain object to encode + * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelsRequest.verify|verify} messages. + * @param message ListModelsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeployModelRequest message from the specified reader or buffer. + * Decodes a ListModelsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeployModelRequest + * @returns ListModelsRequest * @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.automl.v1.DeployModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListModelsRequest; /** - * Decodes a DeployModelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeployModelRequest + * @returns ListModelsRequest * @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.automl.v1.DeployModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListModelsRequest; /** - * Verifies a DeployModelRequest message. + * Verifies a ListModelsRequest 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 DeployModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeployModelRequest + * @returns ListModelsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeployModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelsRequest; /** - * Creates a plain object from a DeployModelRequest message. Also converts values to other types if specified. - * @param message DeployModelRequest + * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. + * @param message ListModelsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.DeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ListModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeployModelRequest to JSON. + * Converts this ListModelsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UndeployModelRequest. */ - interface IUndeployModelRequest { + /** Properties of a ListModelsResponse. */ + interface IListModelsResponse { - /** UndeployModelRequest name */ - name?: (string|null); + /** ListModelsResponse model */ + model?: (google.cloud.automl.v1.IModel[]|null); + + /** ListModelsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UndeployModelRequest. */ - class UndeployModelRequest implements IUndeployModelRequest { + /** Represents a ListModelsResponse. */ + class ListModelsResponse implements IListModelsResponse { /** - * Constructs a new UndeployModelRequest. + * Constructs a new ListModelsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IUndeployModelRequest); + constructor(properties?: google.cloud.automl.v1.IListModelsResponse); - /** UndeployModelRequest name. */ - public name: string; + /** ListModelsResponse model. */ + public model: google.cloud.automl.v1.IModel[]; + + /** ListModelsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UndeployModelRequest instance using the specified properties. + * Creates a new ListModelsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UndeployModelRequest instance + * @returns ListModelsResponse instance */ - public static create(properties?: google.cloud.automl.v1.IUndeployModelRequest): google.cloud.automl.v1.UndeployModelRequest; + public static create(properties?: google.cloud.automl.v1.IListModelsResponse): google.cloud.automl.v1.ListModelsResponse; /** - * Encodes the specified UndeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1.UndeployModelRequest.verify|verify} messages. - * @param message UndeployModelRequest message or plain object to encode + * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListModelsResponse.verify|verify} messages. + * @param message ListModelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UndeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UndeployModelRequest.verify|verify} messages. - * @param message UndeployModelRequest message or plain object to encode + * Encodes the specified ListModelsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelsResponse.verify|verify} messages. + * @param message ListModelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UndeployModelRequest message from the specified reader or buffer. + * Decodes a ListModelsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UndeployModelRequest + * @returns ListModelsResponse * @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.automl.v1.UndeployModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListModelsResponse; /** - * Decodes an UndeployModelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UndeployModelRequest + * @returns ListModelsResponse * @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.automl.v1.UndeployModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListModelsResponse; /** - * Verifies an UndeployModelRequest message. + * Verifies a ListModelsResponse 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 UndeployModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UndeployModelRequest + * @returns ListModelsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UndeployModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelsResponse; /** - * Creates a plain object from an UndeployModelRequest message. Also converts values to other types if specified. - * @param message UndeployModelRequest + * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. + * @param message ListModelsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.UndeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.ListModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UndeployModelRequest to JSON. + * Converts this ListModelsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportModelRequest. */ - interface IExportModelRequest { + /** Properties of a DeleteModelRequest. */ + interface IDeleteModelRequest { - /** ExportModelRequest name */ + /** DeleteModelRequest name */ name?: (string|null); - - /** ExportModelRequest outputConfig */ - outputConfig?: (google.cloud.automl.v1.IModelExportOutputConfig|null); } - /** Represents an ExportModelRequest. */ - class ExportModelRequest implements IExportModelRequest { + /** Represents a DeleteModelRequest. */ + class DeleteModelRequest implements IDeleteModelRequest { /** - * Constructs a new ExportModelRequest. + * Constructs a new DeleteModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IExportModelRequest); + constructor(properties?: google.cloud.automl.v1.IDeleteModelRequest); - /** ExportModelRequest name. */ + /** DeleteModelRequest name. */ public name: string; - /** ExportModelRequest outputConfig. */ - public outputConfig?: (google.cloud.automl.v1.IModelExportOutputConfig|null); - /** - * Creates a new ExportModelRequest instance using the specified properties. + * Creates a new DeleteModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportModelRequest instance + * @returns DeleteModelRequest instance */ - public static create(properties?: google.cloud.automl.v1.IExportModelRequest): google.cloud.automl.v1.ExportModelRequest; + public static create(properties?: google.cloud.automl.v1.IDeleteModelRequest): google.cloud.automl.v1.DeleteModelRequest; /** - * Encodes the specified ExportModelRequest message. Does not implicitly {@link google.cloud.automl.v1.ExportModelRequest.verify|verify} messages. - * @param message ExportModelRequest message or plain object to encode + * Encodes the specified DeleteModelRequest message. Does not implicitly {@link google.cloud.automl.v1.DeleteModelRequest.verify|verify} messages. + * @param message DeleteModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelRequest.verify|verify} messages. - * @param message ExportModelRequest message or plain object to encode + * Encodes the specified DeleteModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteModelRequest.verify|verify} messages. + * @param message DeleteModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportModelRequest message from the specified reader or buffer. + * Decodes a DeleteModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportModelRequest + * @returns DeleteModelRequest * @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.automl.v1.ExportModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.DeleteModelRequest; /** - * Decodes an ExportModelRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportModelRequest + * @returns DeleteModelRequest * @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.automl.v1.ExportModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.DeleteModelRequest; /** - * Verifies an ExportModelRequest message. + * Verifies a DeleteModelRequest 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 ExportModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportModelRequest + * @returns DeleteModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeleteModelRequest; /** - * Creates a plain object from an ExportModelRequest message. Also converts values to other types if specified. - * @param message ExportModelRequest + * Creates a plain object from a DeleteModelRequest message. Also converts values to other types if specified. + * @param message DeleteModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ExportModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.DeleteModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportModelRequest to JSON. + * Converts this DeleteModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetModelEvaluationRequest. */ - interface IGetModelEvaluationRequest { + /** Properties of an UpdateModelRequest. */ + interface IUpdateModelRequest { - /** GetModelEvaluationRequest name */ - name?: (string|null); + /** UpdateModelRequest model */ + model?: (google.cloud.automl.v1.IModel|null); + + /** UpdateModelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a GetModelEvaluationRequest. */ - class GetModelEvaluationRequest implements IGetModelEvaluationRequest { + /** Represents an UpdateModelRequest. */ + class UpdateModelRequest implements IUpdateModelRequest { /** - * Constructs a new GetModelEvaluationRequest. + * Constructs a new UpdateModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IGetModelEvaluationRequest); + constructor(properties?: google.cloud.automl.v1.IUpdateModelRequest); - /** GetModelEvaluationRequest name. */ - public name: string; + /** UpdateModelRequest model. */ + public model?: (google.cloud.automl.v1.IModel|null); + + /** UpdateModelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new GetModelEvaluationRequest instance using the specified properties. + * Creates a new UpdateModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetModelEvaluationRequest instance + * @returns UpdateModelRequest instance */ - public static create(properties?: google.cloud.automl.v1.IGetModelEvaluationRequest): google.cloud.automl.v1.GetModelEvaluationRequest; + public static create(properties?: google.cloud.automl.v1.IUpdateModelRequest): google.cloud.automl.v1.UpdateModelRequest; /** - * Encodes the specified GetModelEvaluationRequest message. Does not implicitly {@link google.cloud.automl.v1.GetModelEvaluationRequest.verify|verify} messages. - * @param message GetModelEvaluationRequest message or plain object to encode + * Encodes the specified UpdateModelRequest message. Does not implicitly {@link google.cloud.automl.v1.UpdateModelRequest.verify|verify} messages. + * @param message UpdateModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IUpdateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetModelEvaluationRequest.verify|verify} messages. - * @param message GetModelEvaluationRequest message or plain object to encode + * Encodes the specified UpdateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UpdateModelRequest.verify|verify} messages. + * @param message UpdateModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IUpdateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetModelEvaluationRequest message from the specified reader or buffer. + * Decodes an UpdateModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetModelEvaluationRequest + * @returns UpdateModelRequest * @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.automl.v1.GetModelEvaluationRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.UpdateModelRequest; /** - * Decodes a GetModelEvaluationRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetModelEvaluationRequest + * @returns UpdateModelRequest * @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.automl.v1.GetModelEvaluationRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.UpdateModelRequest; /** - * Verifies a GetModelEvaluationRequest message. + * Verifies an UpdateModelRequest 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 GetModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetModelEvaluationRequest + * @returns UpdateModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetModelEvaluationRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UpdateModelRequest; /** - * Creates a plain object from a GetModelEvaluationRequest message. Also converts values to other types if specified. - * @param message GetModelEvaluationRequest + * Creates a plain object from an UpdateModelRequest message. Also converts values to other types if specified. + * @param message UpdateModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.GetModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.UpdateModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetModelEvaluationRequest to JSON. + * Converts this UpdateModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelEvaluationsRequest. */ - interface IListModelEvaluationsRequest { - - /** ListModelEvaluationsRequest parent */ - parent?: (string|null); + /** Properties of a DeployModelRequest. */ + interface IDeployModelRequest { - /** ListModelEvaluationsRequest filter */ - filter?: (string|null); + /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata */ + imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata|null); - /** ListModelEvaluationsRequest pageSize */ - pageSize?: (number|null); + /** DeployModelRequest imageClassificationModelDeploymentMetadata */ + imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata|null); - /** ListModelEvaluationsRequest pageToken */ - pageToken?: (string|null); + /** DeployModelRequest name */ + name?: (string|null); } - /** Represents a ListModelEvaluationsRequest. */ - class ListModelEvaluationsRequest implements IListModelEvaluationsRequest { + /** Represents a DeployModelRequest. */ + class DeployModelRequest implements IDeployModelRequest { /** - * Constructs a new ListModelEvaluationsRequest. + * Constructs a new DeployModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IListModelEvaluationsRequest); + constructor(properties?: google.cloud.automl.v1.IDeployModelRequest); - /** ListModelEvaluationsRequest parent. */ - public parent: string; + /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata. */ + public imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata|null); - /** ListModelEvaluationsRequest filter. */ - public filter: string; + /** DeployModelRequest imageClassificationModelDeploymentMetadata. */ + public imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata|null); - /** ListModelEvaluationsRequest pageSize. */ - public pageSize: number; + /** DeployModelRequest name. */ + public name: string; - /** ListModelEvaluationsRequest pageToken. */ - public pageToken: string; + /** DeployModelRequest modelDeploymentMetadata. */ + public modelDeploymentMetadata?: ("imageObjectDetectionModelDeploymentMetadata"|"imageClassificationModelDeploymentMetadata"); /** - * Creates a new ListModelEvaluationsRequest instance using the specified properties. + * Creates a new DeployModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelEvaluationsRequest instance + * @returns DeployModelRequest instance */ - public static create(properties?: google.cloud.automl.v1.IListModelEvaluationsRequest): google.cloud.automl.v1.ListModelEvaluationsRequest; + public static create(properties?: google.cloud.automl.v1.IDeployModelRequest): google.cloud.automl.v1.DeployModelRequest; /** - * Encodes the specified ListModelEvaluationsRequest message. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsRequest.verify|verify} messages. - * @param message ListModelEvaluationsRequest message or plain object to encode + * Encodes the specified DeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1.DeployModelRequest.verify|verify} messages. + * @param message DeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsRequest.verify|verify} messages. - * @param message ListModelEvaluationsRequest message or plain object to encode + * Encodes the specified DeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeployModelRequest.verify|verify} messages. + * @param message DeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer. + * Decodes a DeployModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelEvaluationsRequest + * @returns DeployModelRequest * @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.automl.v1.ListModelEvaluationsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.DeployModelRequest; /** - * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeployModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelEvaluationsRequest + * @returns DeployModelRequest * @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.automl.v1.ListModelEvaluationsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.DeployModelRequest; /** - * Verifies a ListModelEvaluationsRequest message. + * Verifies a DeployModelRequest 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 ListModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeployModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelEvaluationsRequest + * @returns DeployModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelEvaluationsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.DeployModelRequest; /** - * Creates a plain object from a ListModelEvaluationsRequest message. Also converts values to other types if specified. - * @param message ListModelEvaluationsRequest + * Creates a plain object from a DeployModelRequest message. Also converts values to other types if specified. + * @param message DeployModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ListModelEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.DeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelEvaluationsRequest to JSON. + * Converts this DeployModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelEvaluationsResponse. */ - interface IListModelEvaluationsResponse { - - /** ListModelEvaluationsResponse modelEvaluation */ - modelEvaluation?: (google.cloud.automl.v1.IModelEvaluation[]|null); + /** Properties of an UndeployModelRequest. */ + interface IUndeployModelRequest { - /** ListModelEvaluationsResponse nextPageToken */ - nextPageToken?: (string|null); + /** UndeployModelRequest name */ + name?: (string|null); } - /** Represents a ListModelEvaluationsResponse. */ - class ListModelEvaluationsResponse implements IListModelEvaluationsResponse { + /** Represents an UndeployModelRequest. */ + class UndeployModelRequest implements IUndeployModelRequest { /** - * Constructs a new ListModelEvaluationsResponse. + * Constructs a new UndeployModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1.IListModelEvaluationsResponse); - - /** ListModelEvaluationsResponse modelEvaluation. */ - public modelEvaluation: google.cloud.automl.v1.IModelEvaluation[]; + constructor(properties?: google.cloud.automl.v1.IUndeployModelRequest); - /** ListModelEvaluationsResponse nextPageToken. */ - public nextPageToken: string; + /** UndeployModelRequest name. */ + public name: string; /** - * Creates a new ListModelEvaluationsResponse instance using the specified properties. + * Creates a new UndeployModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelEvaluationsResponse instance + * @returns UndeployModelRequest instance */ - public static create(properties?: google.cloud.automl.v1.IListModelEvaluationsResponse): google.cloud.automl.v1.ListModelEvaluationsResponse; + public static create(properties?: google.cloud.automl.v1.IUndeployModelRequest): google.cloud.automl.v1.UndeployModelRequest; /** - * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. - * @param message ListModelEvaluationsResponse message or plain object to encode + * Encodes the specified UndeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1.UndeployModelRequest.verify|verify} messages. + * @param message UndeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. - * @param message ListModelEvaluationsResponse message or plain object to encode + * Encodes the specified UndeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UndeployModelRequest.verify|verify} messages. + * @param message UndeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. + * Decodes an UndeployModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelEvaluationsResponse + * @returns UndeployModelRequest * @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.automl.v1.ListModelEvaluationsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.UndeployModelRequest; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * Decodes an UndeployModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelEvaluationsResponse + * @returns UndeployModelRequest * @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.automl.v1.ListModelEvaluationsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.UndeployModelRequest; /** - * Verifies a ListModelEvaluationsResponse message. + * Verifies an UndeployModelRequest 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 ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelEvaluationsResponse + * @returns UndeployModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelEvaluationsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.UndeployModelRequest; /** - * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. - * @param message ListModelEvaluationsResponse + * Creates a plain object from an UndeployModelRequest message. Also converts values to other types if specified. + * @param message UndeployModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1.ListModelEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1.UndeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelEvaluationsResponse to JSON. + * Converts this UndeployModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Represents an AutoMl */ - class AutoMl extends $protobuf.rpc.Service { - - /** - * Constructs a new AutoMl 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 AutoMl 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): AutoMl; - - /** - * Calls CreateDataset. - * @param request CreateDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dataset - */ - public createDataset(request: google.cloud.automl.v1beta1.ICreateDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.CreateDatasetCallback): void; - - /** - * Calls CreateDataset. - * @param request CreateDatasetRequest message or plain object - * @returns Promise - */ - public createDataset(request: google.cloud.automl.v1beta1.ICreateDatasetRequest): Promise; - /** - * Calls GetDataset. - * @param request GetDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dataset - */ - public getDataset(request: google.cloud.automl.v1beta1.IGetDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetDatasetCallback): void; + /** Properties of an ExportModelRequest. */ + interface IExportModelRequest { - /** - * Calls GetDataset. - * @param request GetDatasetRequest message or plain object - * @returns Promise - */ - public getDataset(request: google.cloud.automl.v1beta1.IGetDatasetRequest): Promise; + /** ExportModelRequest name */ + name?: (string|null); - /** - * Calls ListDatasets. - * @param request ListDatasetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDatasetsResponse - */ - public listDatasets(request: google.cloud.automl.v1beta1.IListDatasetsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListDatasetsCallback): void; + /** ExportModelRequest outputConfig */ + outputConfig?: (google.cloud.automl.v1.IModelExportOutputConfig|null); + } - /** - * Calls ListDatasets. - * @param request ListDatasetsRequest message or plain object - * @returns Promise - */ - public listDatasets(request: google.cloud.automl.v1beta1.IListDatasetsRequest): Promise; + /** Represents an ExportModelRequest. */ + class ExportModelRequest implements IExportModelRequest { /** - * Calls UpdateDataset. - * @param request UpdateDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dataset + * Constructs a new ExportModelRequest. + * @param [properties] Properties to set */ - public updateDataset(request: google.cloud.automl.v1beta1.IUpdateDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.UpdateDatasetCallback): void; + constructor(properties?: google.cloud.automl.v1.IExportModelRequest); - /** - * Calls UpdateDataset. - * @param request UpdateDatasetRequest message or plain object - * @returns Promise - */ - public updateDataset(request: google.cloud.automl.v1beta1.IUpdateDatasetRequest): Promise; + /** ExportModelRequest name. */ + public name: string; - /** - * Calls DeleteDataset. - * @param request DeleteDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteDataset(request: google.cloud.automl.v1beta1.IDeleteDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.DeleteDatasetCallback): void; + /** ExportModelRequest outputConfig. */ + public outputConfig?: (google.cloud.automl.v1.IModelExportOutputConfig|null); /** - * Calls DeleteDataset. - * @param request DeleteDatasetRequest message or plain object - * @returns Promise + * Creates a new ExportModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportModelRequest instance */ - public deleteDataset(request: google.cloud.automl.v1beta1.IDeleteDatasetRequest): Promise; + public static create(properties?: google.cloud.automl.v1.IExportModelRequest): google.cloud.automl.v1.ExportModelRequest; /** - * Calls ImportData. - * @param request ImportDataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified ExportModelRequest message. Does not implicitly {@link google.cloud.automl.v1.ExportModelRequest.verify|verify} messages. + * @param message ExportModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public importData(request: google.cloud.automl.v1beta1.IImportDataRequest, callback: google.cloud.automl.v1beta1.AutoMl.ImportDataCallback): void; + public static encode(message: google.cloud.automl.v1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ImportData. - * @param request ImportDataRequest message or plain object - * @returns Promise + * Encodes the specified ExportModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelRequest.verify|verify} messages. + * @param message ExportModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public importData(request: google.cloud.automl.v1beta1.IImportDataRequest): Promise; + public static encodeDelimited(message: google.cloud.automl.v1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ExportData. - * @param request ExportDataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes an ExportModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public exportData(request: google.cloud.automl.v1beta1.IExportDataRequest, callback: google.cloud.automl.v1beta1.AutoMl.ExportDataCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ExportModelRequest; /** - * Calls ExportData. - * @param request ExportDataRequest message or plain object - * @returns Promise + * Decodes an ExportModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public exportData(request: google.cloud.automl.v1beta1.IExportDataRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ExportModelRequest; /** - * Calls GetAnnotationSpec. - * @param request GetAnnotationSpecRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AnnotationSpec + * Verifies an ExportModelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getAnnotationSpec(request: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpecCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetAnnotationSpec. - * @param request GetAnnotationSpecRequest message or plain object - * @returns Promise + * Creates an ExportModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportModelRequest */ - public getAnnotationSpec(request: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ExportModelRequest; /** - * Calls GetTableSpec. - * @param request GetTableSpecRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TableSpec + * Creates a plain object from an ExportModelRequest message. Also converts values to other types if specified. + * @param message ExportModelRequest + * @param [options] Conversion options + * @returns Plain object */ - public getTableSpec(request: google.cloud.automl.v1beta1.IGetTableSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetTableSpecCallback): void; + public static toObject(message: google.cloud.automl.v1.ExportModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetTableSpec. - * @param request GetTableSpecRequest message or plain object - * @returns Promise + * Converts this ExportModelRequest to JSON. + * @returns JSON object */ - public getTableSpec(request: google.cloud.automl.v1beta1.IGetTableSpecRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetModelEvaluationRequest. */ + interface IGetModelEvaluationRequest { + + /** GetModelEvaluationRequest name */ + name?: (string|null); + } + + /** Represents a GetModelEvaluationRequest. */ + class GetModelEvaluationRequest implements IGetModelEvaluationRequest { /** - * Calls ListTableSpecs. - * @param request ListTableSpecsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTableSpecsResponse + * Constructs a new GetModelEvaluationRequest. + * @param [properties] Properties to set */ - public listTableSpecs(request: google.cloud.automl.v1beta1.IListTableSpecsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListTableSpecsCallback): void; + constructor(properties?: google.cloud.automl.v1.IGetModelEvaluationRequest); + + /** GetModelEvaluationRequest name. */ + public name: string; /** - * Calls ListTableSpecs. - * @param request ListTableSpecsRequest message or plain object - * @returns Promise + * Creates a new GetModelEvaluationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetModelEvaluationRequest instance */ - public listTableSpecs(request: google.cloud.automl.v1beta1.IListTableSpecsRequest): Promise; + public static create(properties?: google.cloud.automl.v1.IGetModelEvaluationRequest): google.cloud.automl.v1.GetModelEvaluationRequest; /** - * Calls UpdateTableSpec. - * @param request UpdateTableSpecRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TableSpec + * Encodes the specified GetModelEvaluationRequest message. Does not implicitly {@link google.cloud.automl.v1.GetModelEvaluationRequest.verify|verify} messages. + * @param message GetModelEvaluationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateTableSpec(request: google.cloud.automl.v1beta1.IUpdateTableSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.UpdateTableSpecCallback): void; + public static encode(message: google.cloud.automl.v1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateTableSpec. - * @param request UpdateTableSpecRequest message or plain object - * @returns Promise + * Encodes the specified GetModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GetModelEvaluationRequest.verify|verify} messages. + * @param message GetModelEvaluationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateTableSpec(request: google.cloud.automl.v1beta1.IUpdateTableSpecRequest): Promise; + public static encodeDelimited(message: google.cloud.automl.v1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetColumnSpec. - * @param request GetColumnSpecRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ColumnSpec + * Decodes a GetModelEvaluationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetModelEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getColumnSpec(request: google.cloud.automl.v1beta1.IGetColumnSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetColumnSpecCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.GetModelEvaluationRequest; /** - * Calls GetColumnSpec. - * @param request GetColumnSpecRequest message or plain object - * @returns Promise + * Decodes a GetModelEvaluationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetModelEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getColumnSpec(request: google.cloud.automl.v1beta1.IGetColumnSpecRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.GetModelEvaluationRequest; /** - * Calls ListColumnSpecs. - * @param request ListColumnSpecsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListColumnSpecsResponse + * Verifies a GetModelEvaluationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listColumnSpecs(request: google.cloud.automl.v1beta1.IListColumnSpecsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListColumnSpecsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListColumnSpecs. - * @param request ListColumnSpecsRequest message or plain object - * @returns Promise + * Creates a GetModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetModelEvaluationRequest */ - public listColumnSpecs(request: google.cloud.automl.v1beta1.IListColumnSpecsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.GetModelEvaluationRequest; /** - * Calls UpdateColumnSpec. - * @param request UpdateColumnSpecRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ColumnSpec + * Creates a plain object from a GetModelEvaluationRequest message. Also converts values to other types if specified. + * @param message GetModelEvaluationRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateColumnSpec(request: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpecCallback): void; + public static toObject(message: google.cloud.automl.v1.GetModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateColumnSpec. - * @param request UpdateColumnSpecRequest message or plain object - * @returns Promise + * Converts this GetModelEvaluationRequest to JSON. + * @returns JSON object */ - public updateColumnSpec(request: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListModelEvaluationsRequest. */ + interface IListModelEvaluationsRequest { + + /** ListModelEvaluationsRequest parent */ + parent?: (string|null); + + /** ListModelEvaluationsRequest filter */ + filter?: (string|null); + + /** ListModelEvaluationsRequest pageSize */ + pageSize?: (number|null); + + /** ListModelEvaluationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListModelEvaluationsRequest. */ + class ListModelEvaluationsRequest implements IListModelEvaluationsRequest { /** - * Calls CreateModel. - * @param request CreateModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Constructs a new ListModelEvaluationsRequest. + * @param [properties] Properties to set */ - public createModel(request: google.cloud.automl.v1beta1.ICreateModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.CreateModelCallback): void; + constructor(properties?: google.cloud.automl.v1.IListModelEvaluationsRequest); + + /** ListModelEvaluationsRequest parent. */ + public parent: string; + + /** ListModelEvaluationsRequest filter. */ + public filter: string; + + /** ListModelEvaluationsRequest pageSize. */ + public pageSize: number; + + /** ListModelEvaluationsRequest pageToken. */ + public pageToken: string; /** - * Calls CreateModel. - * @param request CreateModelRequest message or plain object - * @returns Promise + * Creates a new ListModelEvaluationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListModelEvaluationsRequest instance */ - public createModel(request: google.cloud.automl.v1beta1.ICreateModelRequest): Promise; + public static create(properties?: google.cloud.automl.v1.IListModelEvaluationsRequest): google.cloud.automl.v1.ListModelEvaluationsRequest; /** - * Calls GetModel. - * @param request GetModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Model + * Encodes the specified ListModelEvaluationsRequest message. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsRequest.verify|verify} messages. + * @param message ListModelEvaluationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getModel(request: google.cloud.automl.v1beta1.IGetModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetModelCallback): void; + public static encode(message: google.cloud.automl.v1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetModel. - * @param request GetModelRequest message or plain object - * @returns Promise + * Encodes the specified ListModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsRequest.verify|verify} messages. + * @param message ListModelEvaluationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getModel(request: google.cloud.automl.v1beta1.IGetModelRequest): Promise; + public static encodeDelimited(message: google.cloud.automl.v1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListModels. - * @param request ListModelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListModelsResponse + * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListModelEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listModels(request: google.cloud.automl.v1beta1.IListModelsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListModelsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListModelEvaluationsRequest; /** - * Calls ListModels. - * @param request ListModelsRequest message or plain object - * @returns Promise + * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListModelEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listModels(request: google.cloud.automl.v1beta1.IListModelsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListModelEvaluationsRequest; /** - * Calls DeleteModel. - * @param request DeleteModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a ListModelEvaluationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteModel(request: google.cloud.automl.v1beta1.IDeleteModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.DeleteModelCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteModel. - * @param request DeleteModelRequest message or plain object - * @returns Promise + * Creates a ListModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListModelEvaluationsRequest */ - public deleteModel(request: google.cloud.automl.v1beta1.IDeleteModelRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelEvaluationsRequest; /** - * Calls DeployModel. - * @param request DeployModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a ListModelEvaluationsRequest message. Also converts values to other types if specified. + * @param message ListModelEvaluationsRequest + * @param [options] Conversion options + * @returns Plain object */ - public deployModel(request: google.cloud.automl.v1beta1.IDeployModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.DeployModelCallback): void; + public static toObject(message: google.cloud.automl.v1.ListModelEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeployModel. - * @param request DeployModelRequest message or plain object - * @returns Promise + * Converts this ListModelEvaluationsRequest to JSON. + * @returns JSON object */ - public deployModel(request: google.cloud.automl.v1beta1.IDeployModelRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListModelEvaluationsResponse. */ + interface IListModelEvaluationsResponse { + + /** ListModelEvaluationsResponse modelEvaluation */ + modelEvaluation?: (google.cloud.automl.v1.IModelEvaluation[]|null); + + /** ListModelEvaluationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListModelEvaluationsResponse. */ + class ListModelEvaluationsResponse implements IListModelEvaluationsResponse { /** - * Calls UndeployModel. - * @param request UndeployModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Constructs a new ListModelEvaluationsResponse. + * @param [properties] Properties to set */ - public undeployModel(request: google.cloud.automl.v1beta1.IUndeployModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.UndeployModelCallback): void; + constructor(properties?: google.cloud.automl.v1.IListModelEvaluationsResponse); + + /** ListModelEvaluationsResponse modelEvaluation. */ + public modelEvaluation: google.cloud.automl.v1.IModelEvaluation[]; + + /** ListModelEvaluationsResponse nextPageToken. */ + public nextPageToken: string; /** - * Calls UndeployModel. - * @param request UndeployModelRequest message or plain object - * @returns Promise + * Creates a new ListModelEvaluationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListModelEvaluationsResponse instance */ - public undeployModel(request: google.cloud.automl.v1beta1.IUndeployModelRequest): Promise; + public static create(properties?: google.cloud.automl.v1.IListModelEvaluationsResponse): google.cloud.automl.v1.ListModelEvaluationsResponse; /** - * Calls ExportModel. - * @param request ExportModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. + * @param message ListModelEvaluationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public exportModel(request: google.cloud.automl.v1beta1.IExportModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.ExportModelCallback): void; + public static encode(message: google.cloud.automl.v1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ExportModel. - * @param request ExportModelRequest message or plain object - * @returns Promise + * Encodes the specified ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. + * @param message ListModelEvaluationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public exportModel(request: google.cloud.automl.v1beta1.IExportModelRequest): Promise; + public static encodeDelimited(message: google.cloud.automl.v1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ExportEvaluatedExamples. - * @param request ExportEvaluatedExamplesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListModelEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public exportEvaluatedExamples(request: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, callback: google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamplesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1.ListModelEvaluationsResponse; /** - * Calls ExportEvaluatedExamples. - * @param request ExportEvaluatedExamplesRequest message or plain object - * @returns Promise + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListModelEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public exportEvaluatedExamples(request: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1.ListModelEvaluationsResponse; /** - * Calls GetModelEvaluation. - * @param request GetModelEvaluationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ModelEvaluation + * Verifies a ListModelEvaluationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getModelEvaluation(request: google.cloud.automl.v1beta1.IGetModelEvaluationRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetModelEvaluationCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetModelEvaluation. - * @param request GetModelEvaluationRequest message or plain object - * @returns Promise + * Creates a ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListModelEvaluationsResponse */ - public getModelEvaluation(request: google.cloud.automl.v1beta1.IGetModelEvaluationRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1.ListModelEvaluationsResponse; /** - * Calls ListModelEvaluations. - * @param request ListModelEvaluationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListModelEvaluationsResponse + * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. + * @param message ListModelEvaluationsResponse + * @param [options] Conversion options + * @returns Plain object */ - public listModelEvaluations(request: google.cloud.automl.v1beta1.IListModelEvaluationsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListModelEvaluationsCallback): void; + public static toObject(message: google.cloud.automl.v1.ListModelEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListModelEvaluations. - * @param request ListModelEvaluationsRequest message or plain object - * @returns Promise + * Converts this ListModelEvaluationsResponse to JSON. + * @returns JSON object */ - public listModelEvaluations(request: google.cloud.automl.v1beta1.IListModelEvaluationsRequest): Promise; + public toJSON(): { [k: string]: any }; } + } - namespace AutoMl { + /** Namespace v1beta1. */ + namespace v1beta1 { - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#createDataset}. - * @param error Error, if any - * @param [response] Dataset - */ - type CreateDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Dataset) => void; + /** Properties of an AnnotationPayload. */ + interface IAnnotationPayload { - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getDataset}. - * @param error Error, if any - * @param [response] Dataset - */ - type GetDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Dataset) => void; + /** AnnotationPayload translation */ + translation?: (google.cloud.automl.v1beta1.ITranslationAnnotation|null); + + /** AnnotationPayload classification */ + classification?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); + + /** AnnotationPayload imageObjectDetection */ + imageObjectDetection?: (google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null); + + /** AnnotationPayload videoClassification */ + videoClassification?: (google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null); + + /** AnnotationPayload videoObjectTracking */ + videoObjectTracking?: (google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null); + + /** AnnotationPayload textExtraction */ + textExtraction?: (google.cloud.automl.v1beta1.ITextExtractionAnnotation|null); + + /** AnnotationPayload textSentiment */ + textSentiment?: (google.cloud.automl.v1beta1.ITextSentimentAnnotation|null); + + /** AnnotationPayload tables */ + tables?: (google.cloud.automl.v1beta1.ITablesAnnotation|null); + + /** AnnotationPayload annotationSpecId */ + annotationSpecId?: (string|null); + + /** AnnotationPayload displayName */ + displayName?: (string|null); + } + + /** Represents an AnnotationPayload. */ + class AnnotationPayload implements IAnnotationPayload { /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listDatasets}. - * @param error Error, if any - * @param [response] ListDatasetsResponse + * Constructs a new AnnotationPayload. + * @param [properties] Properties to set */ - type ListDatasetsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListDatasetsResponse) => void; + constructor(properties?: google.cloud.automl.v1beta1.IAnnotationPayload); + + /** AnnotationPayload translation. */ + public translation?: (google.cloud.automl.v1beta1.ITranslationAnnotation|null); + + /** AnnotationPayload classification. */ + public classification?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); + + /** AnnotationPayload imageObjectDetection. */ + public imageObjectDetection?: (google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null); + + /** AnnotationPayload videoClassification. */ + public videoClassification?: (google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null); + + /** AnnotationPayload videoObjectTracking. */ + public videoObjectTracking?: (google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null); + + /** AnnotationPayload textExtraction. */ + public textExtraction?: (google.cloud.automl.v1beta1.ITextExtractionAnnotation|null); + + /** AnnotationPayload textSentiment. */ + public textSentiment?: (google.cloud.automl.v1beta1.ITextSentimentAnnotation|null); + + /** AnnotationPayload tables. */ + public tables?: (google.cloud.automl.v1beta1.ITablesAnnotation|null); + + /** AnnotationPayload annotationSpecId. */ + public annotationSpecId: string; + + /** AnnotationPayload displayName. */ + public displayName: string; + + /** AnnotationPayload detail. */ + public detail?: ("translation"|"classification"|"imageObjectDetection"|"videoClassification"|"videoObjectTracking"|"textExtraction"|"textSentiment"|"tables"); /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateDataset}. - * @param error Error, if any - * @param [response] Dataset + * Creates a new AnnotationPayload instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotationPayload instance */ - type UpdateDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Dataset) => void; + public static create(properties?: google.cloud.automl.v1beta1.IAnnotationPayload): google.cloud.automl.v1beta1.AnnotationPayload; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deleteDataset}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. + * @param message AnnotationPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encode(message: google.cloud.automl.v1beta1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#importData}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. + * @param message AnnotationPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ImportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportData}. - * @param error Error, if any - * @param [response] Operation + * Decodes an AnnotationPayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotationPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ExportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.AnnotationPayload; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getAnnotationSpec}. - * @param error Error, if any - * @param [response] AnnotationSpec + * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotationPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetAnnotationSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.AnnotationSpec) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.AnnotationPayload; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getTableSpec}. - * @param error Error, if any - * @param [response] TableSpec + * Verifies an AnnotationPayload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetTableSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.TableSpec) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listTableSpecs}. - * @param error Error, if any - * @param [response] ListTableSpecsResponse + * Creates an AnnotationPayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotationPayload */ - type ListTableSpecsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListTableSpecsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.AnnotationPayload; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateTableSpec}. - * @param error Error, if any - * @param [response] TableSpec + * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. + * @param message AnnotationPayload + * @param [options] Conversion options + * @returns Plain object */ - type UpdateTableSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.TableSpec) => void; + public static toObject(message: google.cloud.automl.v1beta1.AnnotationPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getColumnSpec}. - * @param error Error, if any - * @param [response] ColumnSpec + * Converts this AnnotationPayload to JSON. + * @returns JSON object */ - type GetColumnSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ColumnSpec) => void; + public toJSON(): { [k: string]: any }; + } + + /** ClassificationType enum. */ + enum ClassificationType { + CLASSIFICATION_TYPE_UNSPECIFIED = 0, + MULTICLASS = 1, + MULTILABEL = 2 + } - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listColumnSpecs}. - * @param error Error, if any - * @param [response] ListColumnSpecsResponse - */ - type ListColumnSpecsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListColumnSpecsResponse) => void; + /** Properties of a ClassificationAnnotation. */ + interface IClassificationAnnotation { - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateColumnSpec}. - * @param error Error, if any - * @param [response] ColumnSpec - */ - type UpdateColumnSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ColumnSpec) => void; + /** ClassificationAnnotation score */ + score?: (number|null); + } + + /** Represents a ClassificationAnnotation. */ + class ClassificationAnnotation implements IClassificationAnnotation { /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#createModel}. - * @param error Error, if any - * @param [response] Operation + * Constructs a new ClassificationAnnotation. + * @param [properties] Properties to set */ - type CreateModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + constructor(properties?: google.cloud.automl.v1beta1.IClassificationAnnotation); + + /** ClassificationAnnotation score. */ + public score: number; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getModel}. - * @param error Error, if any - * @param [response] Model + * Creates a new ClassificationAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassificationAnnotation instance */ - type GetModelCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Model) => void; + public static create(properties?: google.cloud.automl.v1beta1.IClassificationAnnotation): google.cloud.automl.v1beta1.ClassificationAnnotation; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModels}. - * @param error Error, if any - * @param [response] ListModelsResponse + * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. + * @param message ClassificationAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListModelsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListModelsResponse) => void; + public static encode(message: google.cloud.automl.v1beta1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deleteModel}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. + * @param message ClassificationAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deployModel}. - * @param error Error, if any - * @param [response] Operation + * Decodes a ClassificationAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassificationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ClassificationAnnotation; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#undeployModel}. - * @param error Error, if any - * @param [response] Operation + * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassificationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UndeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ClassificationAnnotation; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportModel}. - * @param error Error, if any - * @param [response] Operation + * Verifies a ClassificationAnnotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ExportModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportEvaluatedExamples}. - * @param error Error, if any - * @param [response] Operation + * Creates a ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassificationAnnotation */ - type ExportEvaluatedExamplesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationAnnotation; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getModelEvaluation}. - * @param error Error, if any - * @param [response] ModelEvaluation + * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. + * @param message ClassificationAnnotation + * @param [options] Conversion options + * @returns Plain object */ - type GetModelEvaluationCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ModelEvaluation) => void; + public static toObject(message: google.cloud.automl.v1beta1.ClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModelEvaluations}. - * @param error Error, if any - * @param [response] ListModelEvaluationsResponse + * Converts this ClassificationAnnotation to JSON. + * @returns JSON object */ - type ListModelEvaluationsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListModelEvaluationsResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a CreateDatasetRequest. */ - interface ICreateDatasetRequest { + /** Properties of a VideoClassificationAnnotation. */ + interface IVideoClassificationAnnotation { - /** CreateDatasetRequest parent */ - parent?: (string|null); + /** VideoClassificationAnnotation type */ + type?: (string|null); - /** CreateDatasetRequest dataset */ - dataset?: (google.cloud.automl.v1beta1.IDataset|null); + /** VideoClassificationAnnotation classificationAnnotation */ + classificationAnnotation?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); + + /** VideoClassificationAnnotation timeSegment */ + timeSegment?: (google.cloud.automl.v1beta1.ITimeSegment|null); } - /** Represents a CreateDatasetRequest. */ - class CreateDatasetRequest implements ICreateDatasetRequest { + /** Represents a VideoClassificationAnnotation. */ + class VideoClassificationAnnotation implements IVideoClassificationAnnotation { /** - * Constructs a new CreateDatasetRequest. + * Constructs a new VideoClassificationAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ICreateDatasetRequest); + constructor(properties?: google.cloud.automl.v1beta1.IVideoClassificationAnnotation); - /** CreateDatasetRequest parent. */ - public parent: string; + /** VideoClassificationAnnotation type. */ + public type: string; - /** CreateDatasetRequest dataset. */ - public dataset?: (google.cloud.automl.v1beta1.IDataset|null); + /** VideoClassificationAnnotation classificationAnnotation. */ + public classificationAnnotation?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); + + /** VideoClassificationAnnotation timeSegment. */ + public timeSegment?: (google.cloud.automl.v1beta1.ITimeSegment|null); /** - * Creates a new CreateDatasetRequest instance using the specified properties. + * Creates a new VideoClassificationAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns CreateDatasetRequest instance + * @returns VideoClassificationAnnotation instance */ - public static create(properties?: google.cloud.automl.v1beta1.ICreateDatasetRequest): google.cloud.automl.v1beta1.CreateDatasetRequest; + public static create(properties?: google.cloud.automl.v1beta1.IVideoClassificationAnnotation): google.cloud.automl.v1beta1.VideoClassificationAnnotation; /** - * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. - * @param message CreateDatasetRequest message or plain object to encode + * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * @param message VideoClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. - * @param message CreateDatasetRequest message or plain object to encode + * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * @param message VideoClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateDatasetRequest message from the specified reader or buffer. + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateDatasetRequest + * @returns VideoClassificationAnnotation * @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.automl.v1beta1.CreateDatasetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.VideoClassificationAnnotation; /** - * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateDatasetRequest + * @returns VideoClassificationAnnotation * @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.automl.v1beta1.CreateDatasetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.VideoClassificationAnnotation; /** - * Verifies a CreateDatasetRequest message. + * Verifies a VideoClassificationAnnotation 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 CreateDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateDatasetRequest + * @returns VideoClassificationAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CreateDatasetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoClassificationAnnotation; /** - * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified. - * @param message CreateDatasetRequest + * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. + * @param message VideoClassificationAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.CreateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.VideoClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateDatasetRequest to JSON. + * Converts this VideoClassificationAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetDatasetRequest. */ - interface IGetDatasetRequest { + /** Properties of a ClassificationEvaluationMetrics. */ + interface IClassificationEvaluationMetrics { - /** GetDatasetRequest name */ - name?: (string|null); + /** ClassificationEvaluationMetrics auPrc */ + auPrc?: (number|null); + + /** ClassificationEvaluationMetrics baseAuPrc */ + baseAuPrc?: (number|null); + + /** ClassificationEvaluationMetrics auRoc */ + auRoc?: (number|null); + + /** ClassificationEvaluationMetrics logLoss */ + logLoss?: (number|null); + + /** ClassificationEvaluationMetrics confidenceMetricsEntry */ + confidenceMetricsEntry?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]|null); + + /** ClassificationEvaluationMetrics confusionMatrix */ + confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + + /** ClassificationEvaluationMetrics annotationSpecId */ + annotationSpecId?: (string[]|null); } - /** Represents a GetDatasetRequest. */ - class GetDatasetRequest implements IGetDatasetRequest { + /** Represents a ClassificationEvaluationMetrics. */ + class ClassificationEvaluationMetrics implements IClassificationEvaluationMetrics { /** - * Constructs a new GetDatasetRequest. + * Constructs a new ClassificationEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGetDatasetRequest); + constructor(properties?: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics); - /** GetDatasetRequest name. */ - public name: string; + /** ClassificationEvaluationMetrics auPrc. */ + public auPrc: number; + + /** ClassificationEvaluationMetrics baseAuPrc. */ + public baseAuPrc: number; + + /** ClassificationEvaluationMetrics auRoc. */ + public auRoc: number; + + /** ClassificationEvaluationMetrics logLoss. */ + public logLoss: number; + + /** ClassificationEvaluationMetrics confidenceMetricsEntry. */ + public confidenceMetricsEntry: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]; + + /** ClassificationEvaluationMetrics confusionMatrix. */ + public confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + + /** ClassificationEvaluationMetrics annotationSpecId. */ + public annotationSpecId: string[]; /** - * Creates a new GetDatasetRequest instance using the specified properties. + * Creates a new ClassificationEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns GetDatasetRequest instance + * @returns ClassificationEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGetDatasetRequest): google.cloud.automl.v1beta1.GetDatasetRequest; + public static create(properties?: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics; /** - * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. - * @param message GetDatasetRequest message or plain object to encode + * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. + * @param message ClassificationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. - * @param message GetDatasetRequest message or plain object to encode + * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. + * @param message ClassificationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDatasetRequest message from the specified reader or buffer. + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDatasetRequest + * @returns ClassificationEvaluationMetrics * @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.automl.v1beta1.GetDatasetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics; /** - * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDatasetRequest + * @returns ClassificationEvaluationMetrics * @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.automl.v1beta1.GetDatasetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics; /** - * Verifies a GetDatasetRequest message. + * Verifies a ClassificationEvaluationMetrics 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 GetDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDatasetRequest + * @returns ClassificationEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetDatasetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics; /** - * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified. - * @param message GetDatasetRequest + * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. + * @param message ClassificationEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GetDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDatasetRequest to JSON. + * Converts this ClassificationEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDatasetsRequest. */ - interface IListDatasetsRequest { + namespace ClassificationEvaluationMetrics { - /** ListDatasetsRequest parent */ - parent?: (string|null); + /** Properties of a ConfidenceMetricsEntry. */ + interface IConfidenceMetricsEntry { - /** ListDatasetsRequest filter */ - filter?: (string|null); + /** ConfidenceMetricsEntry confidenceThreshold */ + confidenceThreshold?: (number|null); - /** ListDatasetsRequest pageSize */ - pageSize?: (number|null); + /** ConfidenceMetricsEntry positionThreshold */ + positionThreshold?: (number|null); - /** ListDatasetsRequest pageToken */ - pageToken?: (string|null); - } + /** ConfidenceMetricsEntry recall */ + recall?: (number|null); - /** Represents a ListDatasetsRequest. */ - class ListDatasetsRequest implements IListDatasetsRequest { + /** ConfidenceMetricsEntry precision */ + precision?: (number|null); - /** - * Constructs a new ListDatasetsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.IListDatasetsRequest); + /** ConfidenceMetricsEntry falsePositiveRate */ + falsePositiveRate?: (number|null); - /** ListDatasetsRequest parent. */ - public parent: string; + /** ConfidenceMetricsEntry f1Score */ + f1Score?: (number|null); - /** ListDatasetsRequest filter. */ - public filter: string; + /** ConfidenceMetricsEntry recallAt1 */ + recallAt1?: (number|null); - /** ListDatasetsRequest pageSize. */ - public pageSize: number; + /** ConfidenceMetricsEntry precisionAt1 */ + precisionAt1?: (number|null); - /** ListDatasetsRequest pageToken. */ - public pageToken: string; + /** ConfidenceMetricsEntry falsePositiveRateAt1 */ + falsePositiveRateAt1?: (number|null); - /** - * Creates a new ListDatasetsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDatasetsRequest instance - */ - public static create(properties?: google.cloud.automl.v1beta1.IListDatasetsRequest): google.cloud.automl.v1beta1.ListDatasetsRequest; + /** ConfidenceMetricsEntry f1ScoreAt1 */ + f1ScoreAt1?: (number|null); - /** - * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. - * @param message ListDatasetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceMetricsEntry truePositiveCount */ + truePositiveCount?: (number|Long|string|null); - /** - * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. - * @param message ListDatasetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceMetricsEntry falsePositiveCount */ + falsePositiveCount?: (number|Long|string|null); - /** - * Decodes a ListDatasetsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDatasetsRequest - * @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.automl.v1beta1.ListDatasetsRequest; + /** ConfidenceMetricsEntry falseNegativeCount */ + falseNegativeCount?: (number|Long|string|null); - /** - * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDatasetsRequest - * @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.automl.v1beta1.ListDatasetsRequest; + /** ConfidenceMetricsEntry trueNegativeCount */ + trueNegativeCount?: (number|Long|string|null); + } - /** - * Verifies a ListDatasetsRequest 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); + /** Represents a ConfidenceMetricsEntry. */ + class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { - /** - * Creates a ListDatasetsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDatasetsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListDatasetsRequest; + /** + * Constructs a new ConfidenceMetricsEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry); + + /** ConfidenceMetricsEntry confidenceThreshold. */ + public confidenceThreshold: number; + + /** ConfidenceMetricsEntry positionThreshold. */ + public positionThreshold: number; + + /** ConfidenceMetricsEntry recall. */ + public recall: number; + + /** ConfidenceMetricsEntry precision. */ + public precision: number; + + /** ConfidenceMetricsEntry falsePositiveRate. */ + public falsePositiveRate: number; + + /** ConfidenceMetricsEntry f1Score. */ + public f1Score: number; + + /** ConfidenceMetricsEntry recallAt1. */ + public recallAt1: number; + + /** ConfidenceMetricsEntry precisionAt1. */ + public precisionAt1: number; + + /** ConfidenceMetricsEntry falsePositiveRateAt1. */ + public falsePositiveRateAt1: number; + + /** ConfidenceMetricsEntry f1ScoreAt1. */ + public f1ScoreAt1: number; + + /** ConfidenceMetricsEntry truePositiveCount. */ + public truePositiveCount: (number|Long|string); + + /** ConfidenceMetricsEntry falsePositiveCount. */ + public falsePositiveCount: (number|Long|string); + + /** ConfidenceMetricsEntry falseNegativeCount. */ + public falseNegativeCount: (number|Long|string); + + /** ConfidenceMetricsEntry trueNegativeCount. */ + public trueNegativeCount: (number|Long|string); + + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidenceMetricsEntry instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidenceMetricsEntry + * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidenceMetricsEntry + * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidenceMetricsEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; + + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @param message ConfidenceMetricsEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified. - * @param message ListDatasetsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ListDatasetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this ListDatasetsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a ConfusionMatrix. */ + interface IConfusionMatrix { - /** Properties of a ListDatasetsResponse. */ - interface IListDatasetsResponse { + /** ConfusionMatrix annotationSpecId */ + annotationSpecId?: (string[]|null); - /** ListDatasetsResponse datasets */ - datasets?: (google.cloud.automl.v1beta1.IDataset[]|null); + /** ConfusionMatrix displayName */ + displayName?: (string[]|null); - /** ListDatasetsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** ConfusionMatrix row */ + row?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]|null); + } - /** Represents a ListDatasetsResponse. */ - class ListDatasetsResponse implements IListDatasetsResponse { + /** Represents a ConfusionMatrix. */ + class ConfusionMatrix implements IConfusionMatrix { - /** - * Constructs a new ListDatasetsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.IListDatasetsResponse); + /** + * Constructs a new ConfusionMatrix. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix); - /** ListDatasetsResponse datasets. */ - public datasets: google.cloud.automl.v1beta1.IDataset[]; + /** ConfusionMatrix annotationSpecId. */ + public annotationSpecId: string[]; - /** ListDatasetsResponse nextPageToken. */ - public nextPageToken: string; + /** ConfusionMatrix displayName. */ + public displayName: string[]; - /** - * Creates a new ListDatasetsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDatasetsResponse instance - */ - public static create(properties?: google.cloud.automl.v1beta1.IListDatasetsResponse): google.cloud.automl.v1beta1.ListDatasetsResponse; + /** ConfusionMatrix row. */ + public row: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]; - /** - * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. - * @param message ListDatasetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ConfusionMatrix instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfusionMatrix instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; - /** - * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. - * @param message ListDatasetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. + * @param message ConfusionMatrix message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListDatasetsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDatasetsResponse - * @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.automl.v1beta1.ListDatasetsResponse; + /** + * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. + * @param message ConfusionMatrix message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDatasetsResponse - * @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.automl.v1beta1.ListDatasetsResponse; + /** + * Decodes a ConfusionMatrix message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfusionMatrix + * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; - /** - * Verifies a ListDatasetsResponse 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); + /** + * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfusionMatrix + * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; - /** - * Creates a ListDatasetsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDatasetsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListDatasetsResponse; + /** + * Verifies a ConfusionMatrix 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 plain object from a ListDatasetsResponse message. Also converts values to other types if specified. - * @param message ListDatasetsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ListDatasetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a ConfusionMatrix message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfusionMatrix + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; - /** - * Converts this ListDatasetsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a ConfusionMatrix message. Also converts values to other types if specified. + * @param message ConfusionMatrix + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an UpdateDatasetRequest. */ - interface IUpdateDatasetRequest { + /** + * Converts this ConfusionMatrix to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** UpdateDatasetRequest dataset */ - dataset?: (google.cloud.automl.v1beta1.IDataset|null); + namespace ConfusionMatrix { - /** UpdateDatasetRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** Properties of a Row. */ + interface IRow { - /** Represents an UpdateDatasetRequest. */ - class UpdateDatasetRequest implements IUpdateDatasetRequest { + /** Row exampleCount */ + exampleCount?: (number[]|null); + } - /** - * Constructs a new UpdateDatasetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.IUpdateDatasetRequest); + /** Represents a Row. */ + class Row implements IRow { - /** UpdateDatasetRequest dataset. */ - public dataset?: (google.cloud.automl.v1beta1.IDataset|null); + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow); - /** UpdateDatasetRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Row exampleCount. */ + public exampleCount: number[]; - /** - * Creates a new UpdateDatasetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDatasetRequest instance - */ - public static create(properties?: google.cloud.automl.v1beta1.IUpdateDatasetRequest): google.cloud.automl.v1beta1.UpdateDatasetRequest; + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; - /** - * Encodes the specified UpdateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. - * @param message UpdateDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UpdateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. - * @param message UpdateDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an UpdateDatasetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDatasetRequest - * @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.automl.v1beta1.UpdateDatasetRequest; + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; - /** - * Decodes an UpdateDatasetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDatasetRequest - * @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.automl.v1beta1.UpdateDatasetRequest; + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; - /** - * Verifies an UpdateDatasetRequest 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); + /** + * Verifies a Row 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 UpdateDatasetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDatasetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UpdateDatasetRequest; + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; - /** - * Creates a plain object from an UpdateDatasetRequest message. Also converts values to other types if specified. - * @param message UpdateDatasetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.UpdateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this UpdateDatasetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } - /** Properties of a DeleteDatasetRequest. */ - interface IDeleteDatasetRequest { + /** Properties of a TimeSegment. */ + interface ITimeSegment { - /** DeleteDatasetRequest name */ - name?: (string|null); + /** TimeSegment startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + + /** TimeSegment endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); } - /** Represents a DeleteDatasetRequest. */ - class DeleteDatasetRequest implements IDeleteDatasetRequest { + /** Represents a TimeSegment. */ + class TimeSegment implements ITimeSegment { /** - * Constructs a new DeleteDatasetRequest. + * Constructs a new TimeSegment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDeleteDatasetRequest); + constructor(properties?: google.cloud.automl.v1beta1.ITimeSegment); - /** DeleteDatasetRequest name. */ - public name: string; + /** TimeSegment startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** TimeSegment endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); /** - * Creates a new DeleteDatasetRequest instance using the specified properties. + * Creates a new TimeSegment instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDatasetRequest instance + * @returns TimeSegment instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDeleteDatasetRequest): google.cloud.automl.v1beta1.DeleteDatasetRequest; + public static create(properties?: google.cloud.automl.v1beta1.ITimeSegment): google.cloud.automl.v1beta1.TimeSegment; /** - * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. - * @param message DeleteDatasetRequest message or plain object to encode + * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. + * @param message TimeSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. - * @param message DeleteDatasetRequest message or plain object to encode + * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. + * @param message TimeSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDatasetRequest message from the specified reader or buffer. + * Decodes a TimeSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDatasetRequest + * @returns TimeSegment * @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.automl.v1beta1.DeleteDatasetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TimeSegment; /** - * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDatasetRequest + * @returns TimeSegment * @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.automl.v1beta1.DeleteDatasetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TimeSegment; /** - * Verifies a DeleteDatasetRequest message. + * Verifies a TimeSegment 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 DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDatasetRequest + * @returns TimeSegment */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeleteDatasetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TimeSegment; /** - * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified. - * @param message DeleteDatasetRequest + * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. + * @param message TimeSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DeleteDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TimeSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDatasetRequest to JSON. + * Converts this TimeSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImportDataRequest. */ - interface IImportDataRequest { + /** Properties of an ImageObjectDetectionAnnotation. */ + interface IImageObjectDetectionAnnotation { - /** ImportDataRequest name */ - name?: (string|null); + /** ImageObjectDetectionAnnotation boundingBox */ + boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); - /** ImportDataRequest inputConfig */ - inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); + /** ImageObjectDetectionAnnotation score */ + score?: (number|null); } - /** Represents an ImportDataRequest. */ - class ImportDataRequest implements IImportDataRequest { + /** Represents an ImageObjectDetectionAnnotation. */ + class ImageObjectDetectionAnnotation implements IImageObjectDetectionAnnotation { /** - * Constructs a new ImportDataRequest. + * Constructs a new ImageObjectDetectionAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IImportDataRequest); + constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation); - /** ImportDataRequest name. */ - public name: string; + /** ImageObjectDetectionAnnotation boundingBox. */ + public boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); - /** ImportDataRequest inputConfig. */ - public inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); + /** ImageObjectDetectionAnnotation score. */ + public score: number; /** - * Creates a new ImportDataRequest instance using the specified properties. + * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDataRequest instance + * @returns ImageObjectDetectionAnnotation instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImportDataRequest): google.cloud.automl.v1beta1.ImportDataRequest; + public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation): google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation; /** - * Encodes the specified ImportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. - * @param message ImportDataRequest message or plain object to encode + * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. + * @param message ImageObjectDetectionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. - * @param message ImportDataRequest message or plain object to encode + * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. + * @param message ImageObjectDetectionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDataRequest message from the specified reader or buffer. + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDataRequest + * @returns ImageObjectDetectionAnnotation * @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.automl.v1beta1.ImportDataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation; /** - * Decodes an ImportDataRequest message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDataRequest + * @returns ImageObjectDetectionAnnotation * @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.automl.v1beta1.ImportDataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation; /** - * Verifies an ImportDataRequest message. + * Verifies an ImageObjectDetectionAnnotation 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 ImportDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDataRequest + * @returns ImageObjectDetectionAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImportDataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation; /** - * Creates a plain object from an ImportDataRequest message. Also converts values to other types if specified. - * @param message ImportDataRequest + * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. + * @param message ImageObjectDetectionAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ImportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDataRequest to JSON. + * Converts this ImageObjectDetectionAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportDataRequest. */ - interface IExportDataRequest { + /** Properties of a VideoObjectTrackingAnnotation. */ + interface IVideoObjectTrackingAnnotation { - /** ExportDataRequest name */ - name?: (string|null); + /** VideoObjectTrackingAnnotation instanceId */ + instanceId?: (string|null); - /** ExportDataRequest outputConfig */ - outputConfig?: (google.cloud.automl.v1beta1.IOutputConfig|null); + /** VideoObjectTrackingAnnotation timeOffset */ + timeOffset?: (google.protobuf.IDuration|null); + + /** VideoObjectTrackingAnnotation boundingBox */ + boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); + + /** VideoObjectTrackingAnnotation score */ + score?: (number|null); } - /** Represents an ExportDataRequest. */ - class ExportDataRequest implements IExportDataRequest { + /** Represents a VideoObjectTrackingAnnotation. */ + class VideoObjectTrackingAnnotation implements IVideoObjectTrackingAnnotation { /** - * Constructs a new ExportDataRequest. + * Constructs a new VideoObjectTrackingAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExportDataRequest); + constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation); - /** ExportDataRequest name. */ - public name: string; + /** VideoObjectTrackingAnnotation instanceId. */ + public instanceId: string; - /** ExportDataRequest outputConfig. */ - public outputConfig?: (google.cloud.automl.v1beta1.IOutputConfig|null); + /** VideoObjectTrackingAnnotation timeOffset. */ + public timeOffset?: (google.protobuf.IDuration|null); + + /** VideoObjectTrackingAnnotation boundingBox. */ + public boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); + + /** VideoObjectTrackingAnnotation score. */ + public score: number; /** - * Creates a new ExportDataRequest instance using the specified properties. + * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ExportDataRequest instance + * @returns VideoObjectTrackingAnnotation instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExportDataRequest): google.cloud.automl.v1beta1.ExportDataRequest; + public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation): google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation; /** - * Encodes the specified ExportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. - * @param message ExportDataRequest message or plain object to encode + * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * @param message VideoObjectTrackingAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. - * @param message ExportDataRequest message or plain object to encode + * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * @param message VideoObjectTrackingAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportDataRequest message from the specified reader or buffer. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportDataRequest + * @returns VideoObjectTrackingAnnotation * @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.automl.v1beta1.ExportDataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation; /** - * Decodes an ExportDataRequest message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportDataRequest + * @returns VideoObjectTrackingAnnotation * @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.automl.v1beta1.ExportDataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation; /** - * Verifies an ExportDataRequest message. + * Verifies a VideoObjectTrackingAnnotation 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 ExportDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportDataRequest + * @returns VideoObjectTrackingAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportDataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation; /** - * Creates a plain object from an ExportDataRequest message. Also converts values to other types if specified. - * @param message ExportDataRequest + * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. + * @param message VideoObjectTrackingAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportDataRequest to JSON. + * Converts this VideoObjectTrackingAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetAnnotationSpecRequest. */ - interface IGetAnnotationSpecRequest { + /** Properties of a BoundingBoxMetricsEntry. */ + interface IBoundingBoxMetricsEntry { - /** GetAnnotationSpecRequest name */ - name?: (string|null); + /** BoundingBoxMetricsEntry iouThreshold */ + iouThreshold?: (number|null); + + /** BoundingBoxMetricsEntry meanAveragePrecision */ + meanAveragePrecision?: (number|null); + + /** BoundingBoxMetricsEntry confidenceMetricsEntries */ + confidenceMetricsEntries?: (google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]|null); } - /** Represents a GetAnnotationSpecRequest. */ - class GetAnnotationSpecRequest implements IGetAnnotationSpecRequest { + /** Represents a BoundingBoxMetricsEntry. */ + class BoundingBoxMetricsEntry implements IBoundingBoxMetricsEntry { /** - * Constructs a new GetAnnotationSpecRequest. + * Constructs a new BoundingBoxMetricsEntry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest); + constructor(properties?: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry); - /** GetAnnotationSpecRequest name. */ - public name: string; + /** BoundingBoxMetricsEntry iouThreshold. */ + public iouThreshold: number; + + /** BoundingBoxMetricsEntry meanAveragePrecision. */ + public meanAveragePrecision: number; + + /** BoundingBoxMetricsEntry confidenceMetricsEntries. */ + public confidenceMetricsEntries: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]; /** - * Creates a new GetAnnotationSpecRequest instance using the specified properties. + * Creates a new BoundingBoxMetricsEntry instance using the specified properties. * @param [properties] Properties to set - * @returns GetAnnotationSpecRequest instance + * @returns BoundingBoxMetricsEntry instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest): google.cloud.automl.v1beta1.GetAnnotationSpecRequest; + public static create(properties?: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry; /** - * Encodes the specified GetAnnotationSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. - * @param message GetAnnotationSpecRequest message or plain object to encode + * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. + * @param message BoundingBoxMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetAnnotationSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. - * @param message GetAnnotationSpecRequest message or plain object to encode + * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. + * @param message BoundingBoxMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetAnnotationSpecRequest + * @returns BoundingBoxMetricsEntry * @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.automl.v1beta1.GetAnnotationSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry; /** - * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetAnnotationSpecRequest + * @returns BoundingBoxMetricsEntry * @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.automl.v1beta1.GetAnnotationSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry; /** - * Verifies a GetAnnotationSpecRequest message. + * Verifies a BoundingBoxMetricsEntry 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 GetAnnotationSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetAnnotationSpecRequest + * @returns BoundingBoxMetricsEntry */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetAnnotationSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry; /** - * Creates a plain object from a GetAnnotationSpecRequest message. Also converts values to other types if specified. - * @param message GetAnnotationSpecRequest + * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. + * @param message BoundingBoxMetricsEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GetAnnotationSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetAnnotationSpecRequest to JSON. + * Converts this BoundingBoxMetricsEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTableSpecRequest. */ - interface IGetTableSpecRequest { + namespace BoundingBoxMetricsEntry { + + /** Properties of a ConfidenceMetricsEntry. */ + interface IConfidenceMetricsEntry { + + /** ConfidenceMetricsEntry confidenceThreshold */ + confidenceThreshold?: (number|null); + + /** ConfidenceMetricsEntry recall */ + recall?: (number|null); + + /** ConfidenceMetricsEntry precision */ + precision?: (number|null); + + /** ConfidenceMetricsEntry f1Score */ + f1Score?: (number|null); + } + + /** Represents a ConfidenceMetricsEntry. */ + class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { + + /** + * Constructs a new ConfidenceMetricsEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry); + + /** ConfidenceMetricsEntry confidenceThreshold. */ + public confidenceThreshold: number; + + /** ConfidenceMetricsEntry recall. */ + public recall: number; + + /** ConfidenceMetricsEntry precision. */ + public precision: number; + + /** ConfidenceMetricsEntry f1Score. */ + public f1Score: number; + + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidenceMetricsEntry instance + */ + public static create(properties?: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidenceMetricsEntry + * @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.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidenceMetricsEntry + * @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.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + + /** + * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidenceMetricsEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @param message ConfidenceMetricsEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ImageObjectDetectionEvaluationMetrics. */ + interface IImageObjectDetectionEvaluationMetrics { + + /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount */ + evaluatedBoundingBoxCount?: (number|null); - /** GetTableSpecRequest name */ - name?: (string|null); + /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries */ + boundingBoxMetricsEntries?: (google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]|null); - /** GetTableSpecRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision */ + boundingBoxMeanAveragePrecision?: (number|null); } - /** Represents a GetTableSpecRequest. */ - class GetTableSpecRequest implements IGetTableSpecRequest { + /** Represents an ImageObjectDetectionEvaluationMetrics. */ + class ImageObjectDetectionEvaluationMetrics implements IImageObjectDetectionEvaluationMetrics { /** - * Constructs a new GetTableSpecRequest. + * Constructs a new ImageObjectDetectionEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGetTableSpecRequest); + constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics); - /** GetTableSpecRequest name. */ - public name: string; + /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. */ + public evaluatedBoundingBoxCount: number; - /** GetTableSpecRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. */ + public boundingBoxMetricsEntries: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]; + + /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. */ + public boundingBoxMeanAveragePrecision: number; /** - * Creates a new GetTableSpecRequest instance using the specified properties. + * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns GetTableSpecRequest instance + * @returns ImageObjectDetectionEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGetTableSpecRequest): google.cloud.automl.v1beta1.GetTableSpecRequest; + public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics): google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; /** - * Encodes the specified GetTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. - * @param message GetTableSpecRequest message or plain object to encode + * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGetTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. - * @param message GetTableSpecRequest message or plain object to encode + * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTableSpecRequest message from the specified reader or buffer. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTableSpecRequest + * @returns ImageObjectDetectionEvaluationMetrics * @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.automl.v1beta1.GetTableSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; /** - * Decodes a GetTableSpecRequest message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTableSpecRequest + * @returns ImageObjectDetectionEvaluationMetrics * @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.automl.v1beta1.GetTableSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; /** - * Verifies a GetTableSpecRequest message. + * Verifies an ImageObjectDetectionEvaluationMetrics 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 GetTableSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTableSpecRequest + * @returns ImageObjectDetectionEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetTableSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; /** - * Creates a plain object from a GetTableSpecRequest message. Also converts values to other types if specified. - * @param message GetTableSpecRequest + * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. + * @param message ImageObjectDetectionEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GetTableSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTableSpecRequest to JSON. + * Converts this ImageObjectDetectionEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTableSpecsRequest. */ - interface IListTableSpecsRequest { - - /** ListTableSpecsRequest parent */ - parent?: (string|null); + /** Properties of a VideoObjectTrackingEvaluationMetrics. */ + interface IVideoObjectTrackingEvaluationMetrics { - /** ListTableSpecsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** VideoObjectTrackingEvaluationMetrics evaluatedFrameCount */ + evaluatedFrameCount?: (number|null); - /** ListTableSpecsRequest filter */ - filter?: (string|null); + /** VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount */ + evaluatedBoundingBoxCount?: (number|null); - /** ListTableSpecsRequest pageSize */ - pageSize?: (number|null); + /** VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries */ + boundingBoxMetricsEntries?: (google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]|null); - /** ListTableSpecsRequest pageToken */ - pageToken?: (string|null); + /** VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision */ + boundingBoxMeanAveragePrecision?: (number|null); } - /** Represents a ListTableSpecsRequest. */ - class ListTableSpecsRequest implements IListTableSpecsRequest { + /** Represents a VideoObjectTrackingEvaluationMetrics. */ + class VideoObjectTrackingEvaluationMetrics implements IVideoObjectTrackingEvaluationMetrics { /** - * Constructs a new ListTableSpecsRequest. + * Constructs a new VideoObjectTrackingEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListTableSpecsRequest); - - /** ListTableSpecsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics); - /** ListTableSpecsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** VideoObjectTrackingEvaluationMetrics evaluatedFrameCount. */ + public evaluatedFrameCount: number; - /** ListTableSpecsRequest filter. */ - public filter: string; + /** VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount. */ + public evaluatedBoundingBoxCount: number; - /** ListTableSpecsRequest pageSize. */ - public pageSize: number; + /** VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries. */ + public boundingBoxMetricsEntries: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]; - /** ListTableSpecsRequest pageToken. */ - public pageToken: string; + /** VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision. */ + public boundingBoxMeanAveragePrecision: number; /** - * Creates a new ListTableSpecsRequest instance using the specified properties. + * Creates a new VideoObjectTrackingEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns ListTableSpecsRequest instance + * @returns VideoObjectTrackingEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListTableSpecsRequest): google.cloud.automl.v1beta1.ListTableSpecsRequest; + public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics): google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; /** - * Encodes the specified ListTableSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. - * @param message ListTableSpecsRequest message or plain object to encode + * Encodes the specified VideoObjectTrackingEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. + * @param message VideoObjectTrackingEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListTableSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTableSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. - * @param message ListTableSpecsRequest message or plain object to encode + * Encodes the specified VideoObjectTrackingEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. + * @param message VideoObjectTrackingEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListTableSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTableSpecsRequest message from the specified reader or buffer. + * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTableSpecsRequest + * @returns VideoObjectTrackingEvaluationMetrics * @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.automl.v1beta1.ListTableSpecsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; /** - * Decodes a ListTableSpecsRequest message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTableSpecsRequest + * @returns VideoObjectTrackingEvaluationMetrics * @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.automl.v1beta1.ListTableSpecsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; /** - * Verifies a ListTableSpecsRequest message. + * Verifies a VideoObjectTrackingEvaluationMetrics 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 ListTableSpecsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTableSpecsRequest + * @returns VideoObjectTrackingEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListTableSpecsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; /** - * Creates a plain object from a ListTableSpecsRequest message. Also converts values to other types if specified. - * @param message ListTableSpecsRequest + * Creates a plain object from a VideoObjectTrackingEvaluationMetrics message. Also converts values to other types if specified. + * @param message VideoObjectTrackingEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListTableSpecsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTableSpecsRequest to JSON. + * Converts this VideoObjectTrackingEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTableSpecsResponse. */ - interface IListTableSpecsResponse { + /** Properties of a NormalizedVertex. */ + interface INormalizedVertex { - /** ListTableSpecsResponse tableSpecs */ - tableSpecs?: (google.cloud.automl.v1beta1.ITableSpec[]|null); + /** NormalizedVertex x */ + x?: (number|null); - /** ListTableSpecsResponse nextPageToken */ - nextPageToken?: (string|null); + /** NormalizedVertex y */ + y?: (number|null); } - /** Represents a ListTableSpecsResponse. */ - class ListTableSpecsResponse implements IListTableSpecsResponse { + /** Represents a NormalizedVertex. */ + class NormalizedVertex implements INormalizedVertex { /** - * Constructs a new ListTableSpecsResponse. + * Constructs a new NormalizedVertex. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListTableSpecsResponse); + constructor(properties?: google.cloud.automl.v1beta1.INormalizedVertex); - /** ListTableSpecsResponse tableSpecs. */ - public tableSpecs: google.cloud.automl.v1beta1.ITableSpec[]; + /** NormalizedVertex x. */ + public x: number; - /** ListTableSpecsResponse nextPageToken. */ - public nextPageToken: string; + /** NormalizedVertex y. */ + public y: number; /** - * Creates a new ListTableSpecsResponse instance using the specified properties. + * Creates a new NormalizedVertex instance using the specified properties. * @param [properties] Properties to set - * @returns ListTableSpecsResponse instance + * @returns NormalizedVertex instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListTableSpecsResponse): google.cloud.automl.v1beta1.ListTableSpecsResponse; + public static create(properties?: google.cloud.automl.v1beta1.INormalizedVertex): google.cloud.automl.v1beta1.NormalizedVertex; /** - * Encodes the specified ListTableSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. - * @param message ListTableSpecsResponse message or plain object to encode + * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. + * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListTableSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTableSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. - * @param message ListTableSpecsResponse message or plain object to encode + * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. + * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListTableSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTableSpecsResponse message from the specified reader or buffer. + * Decodes a NormalizedVertex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTableSpecsResponse + * @returns NormalizedVertex * @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.automl.v1beta1.ListTableSpecsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.NormalizedVertex; /** - * Decodes a ListTableSpecsResponse message from the specified reader or buffer, length delimited. + * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTableSpecsResponse + * @returns NormalizedVertex * @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.automl.v1beta1.ListTableSpecsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.NormalizedVertex; /** - * Verifies a ListTableSpecsResponse message. + * Verifies a NormalizedVertex 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 ListTableSpecsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTableSpecsResponse + * @returns NormalizedVertex */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListTableSpecsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.NormalizedVertex; /** - * Creates a plain object from a ListTableSpecsResponse message. Also converts values to other types if specified. - * @param message ListTableSpecsResponse + * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. + * @param message NormalizedVertex * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListTableSpecsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTableSpecsResponse to JSON. + * Converts this NormalizedVertex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateTableSpecRequest. */ - interface IUpdateTableSpecRequest { - - /** UpdateTableSpecRequest tableSpec */ - tableSpec?: (google.cloud.automl.v1beta1.ITableSpec|null); + /** Properties of a BoundingPoly. */ + interface IBoundingPoly { - /** UpdateTableSpecRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** BoundingPoly normalizedVertices */ + normalizedVertices?: (google.cloud.automl.v1beta1.INormalizedVertex[]|null); } - /** Represents an UpdateTableSpecRequest. */ - class UpdateTableSpecRequest implements IUpdateTableSpecRequest { + /** Represents a BoundingPoly. */ + class BoundingPoly implements IBoundingPoly { /** - * Constructs a new UpdateTableSpecRequest. + * Constructs a new BoundingPoly. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IUpdateTableSpecRequest); - - /** UpdateTableSpecRequest tableSpec. */ - public tableSpec?: (google.cloud.automl.v1beta1.ITableSpec|null); + constructor(properties?: google.cloud.automl.v1beta1.IBoundingPoly); - /** UpdateTableSpecRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** BoundingPoly normalizedVertices. */ + public normalizedVertices: google.cloud.automl.v1beta1.INormalizedVertex[]; /** - * Creates a new UpdateTableSpecRequest instance using the specified properties. + * Creates a new BoundingPoly instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTableSpecRequest instance + * @returns BoundingPoly instance */ - public static create(properties?: google.cloud.automl.v1beta1.IUpdateTableSpecRequest): google.cloud.automl.v1beta1.UpdateTableSpecRequest; + public static create(properties?: google.cloud.automl.v1beta1.IBoundingPoly): google.cloud.automl.v1beta1.BoundingPoly; /** - * Encodes the specified UpdateTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. - * @param message UpdateTableSpecRequest message or plain object to encode + * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. + * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IUpdateTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. - * @param message UpdateTableSpecRequest message or plain object to encode + * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. + * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IUpdateTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTableSpecRequest message from the specified reader or buffer. + * Decodes a BoundingPoly message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateTableSpecRequest + * @returns BoundingPoly * @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.automl.v1beta1.UpdateTableSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BoundingPoly; /** - * Decodes an UpdateTableSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTableSpecRequest + * @returns BoundingPoly * @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.automl.v1beta1.UpdateTableSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BoundingPoly; /** - * Verifies an UpdateTableSpecRequest message. + * Verifies a BoundingPoly 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 UpdateTableSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTableSpecRequest + * @returns BoundingPoly */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UpdateTableSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BoundingPoly; /** - * Creates a plain object from an UpdateTableSpecRequest message. Also converts values to other types if specified. - * @param message UpdateTableSpecRequest + * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. + * @param message BoundingPoly * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.UpdateTableSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTableSpecRequest to JSON. + * Converts this BoundingPoly to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetColumnSpecRequest. */ - interface IGetColumnSpecRequest { + /** Properties of a TablesDatasetMetadata. */ + interface ITablesDatasetMetadata { - /** GetColumnSpecRequest name */ - name?: (string|null); + /** TablesDatasetMetadata primaryTableSpecId */ + primaryTableSpecId?: (string|null); - /** GetColumnSpecRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** TablesDatasetMetadata targetColumnSpecId */ + targetColumnSpecId?: (string|null); + + /** TablesDatasetMetadata weightColumnSpecId */ + weightColumnSpecId?: (string|null); + + /** TablesDatasetMetadata mlUseColumnSpecId */ + mlUseColumnSpecId?: (string|null); + + /** TablesDatasetMetadata targetColumnCorrelations */ + targetColumnCorrelations?: ({ [k: string]: google.cloud.automl.v1beta1.ICorrelationStats }|null); + + /** TablesDatasetMetadata statsUpdateTime */ + statsUpdateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a GetColumnSpecRequest. */ - class GetColumnSpecRequest implements IGetColumnSpecRequest { + /** Represents a TablesDatasetMetadata. */ + class TablesDatasetMetadata implements ITablesDatasetMetadata { /** - * Constructs a new GetColumnSpecRequest. + * Constructs a new TablesDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGetColumnSpecRequest); + constructor(properties?: google.cloud.automl.v1beta1.ITablesDatasetMetadata); - /** GetColumnSpecRequest name. */ - public name: string; + /** TablesDatasetMetadata primaryTableSpecId. */ + public primaryTableSpecId: string; - /** GetColumnSpecRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** TablesDatasetMetadata targetColumnSpecId. */ + public targetColumnSpecId: string; + + /** TablesDatasetMetadata weightColumnSpecId. */ + public weightColumnSpecId: string; + + /** TablesDatasetMetadata mlUseColumnSpecId. */ + public mlUseColumnSpecId: string; + + /** TablesDatasetMetadata targetColumnCorrelations. */ + public targetColumnCorrelations: { [k: string]: google.cloud.automl.v1beta1.ICorrelationStats }; + + /** TablesDatasetMetadata statsUpdateTime. */ + public statsUpdateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new GetColumnSpecRequest instance using the specified properties. + * Creates a new TablesDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns GetColumnSpecRequest instance + * @returns TablesDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGetColumnSpecRequest): google.cloud.automl.v1beta1.GetColumnSpecRequest; + public static create(properties?: google.cloud.automl.v1beta1.ITablesDatasetMetadata): google.cloud.automl.v1beta1.TablesDatasetMetadata; /** - * Encodes the specified GetColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. - * @param message GetColumnSpecRequest message or plain object to encode + * Encodes the specified TablesDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. + * @param message TablesDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGetColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITablesDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. - * @param message GetColumnSpecRequest message or plain object to encode + * Encodes the specified TablesDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. + * @param message TablesDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetColumnSpecRequest message from the specified reader or buffer. + * Decodes a TablesDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetColumnSpecRequest + * @returns TablesDatasetMetadata * @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.automl.v1beta1.GetColumnSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TablesDatasetMetadata; /** - * Decodes a GetColumnSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a TablesDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetColumnSpecRequest + * @returns TablesDatasetMetadata * @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.automl.v1beta1.GetColumnSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TablesDatasetMetadata; /** - * Verifies a GetColumnSpecRequest message. + * Verifies a TablesDatasetMetadata 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 GetColumnSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TablesDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetColumnSpecRequest + * @returns TablesDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetColumnSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesDatasetMetadata; /** - * Creates a plain object from a GetColumnSpecRequest message. Also converts values to other types if specified. - * @param message GetColumnSpecRequest + * Creates a plain object from a TablesDatasetMetadata message. Also converts values to other types if specified. + * @param message TablesDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GetColumnSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TablesDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetColumnSpecRequest to JSON. + * Converts this TablesDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListColumnSpecsRequest. */ - interface IListColumnSpecsRequest { + /** Properties of a TablesModelMetadata. */ + interface ITablesModelMetadata { - /** ListColumnSpecsRequest parent */ - parent?: (string|null); + /** TablesModelMetadata optimizationObjectiveRecallValue */ + optimizationObjectiveRecallValue?: (number|null); - /** ListColumnSpecsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** TablesModelMetadata optimizationObjectivePrecisionValue */ + optimizationObjectivePrecisionValue?: (number|null); - /** ListColumnSpecsRequest filter */ - filter?: (string|null); + /** TablesModelMetadata targetColumnSpec */ + targetColumnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); - /** ListColumnSpecsRequest pageSize */ - pageSize?: (number|null); + /** TablesModelMetadata inputFeatureColumnSpecs */ + inputFeatureColumnSpecs?: (google.cloud.automl.v1beta1.IColumnSpec[]|null); - /** ListColumnSpecsRequest pageToken */ - pageToken?: (string|null); + /** TablesModelMetadata optimizationObjective */ + optimizationObjective?: (string|null); + + /** TablesModelMetadata tablesModelColumnInfo */ + tablesModelColumnInfo?: (google.cloud.automl.v1beta1.ITablesModelColumnInfo[]|null); + + /** TablesModelMetadata trainBudgetMilliNodeHours */ + trainBudgetMilliNodeHours?: (number|Long|string|null); + + /** TablesModelMetadata trainCostMilliNodeHours */ + trainCostMilliNodeHours?: (number|Long|string|null); + + /** TablesModelMetadata disableEarlyStopping */ + disableEarlyStopping?: (boolean|null); } - /** Represents a ListColumnSpecsRequest. */ - class ListColumnSpecsRequest implements IListColumnSpecsRequest { + /** Represents a TablesModelMetadata. */ + class TablesModelMetadata implements ITablesModelMetadata { /** - * Constructs a new ListColumnSpecsRequest. + * Constructs a new TablesModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListColumnSpecsRequest); + constructor(properties?: google.cloud.automl.v1beta1.ITablesModelMetadata); - /** ListColumnSpecsRequest parent. */ - public parent: string; + /** TablesModelMetadata optimizationObjectiveRecallValue. */ + public optimizationObjectiveRecallValue: number; - /** ListColumnSpecsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** TablesModelMetadata optimizationObjectivePrecisionValue. */ + public optimizationObjectivePrecisionValue: number; - /** ListColumnSpecsRequest filter. */ - public filter: string; + /** TablesModelMetadata targetColumnSpec. */ + public targetColumnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); - /** ListColumnSpecsRequest pageSize. */ - public pageSize: number; + /** TablesModelMetadata inputFeatureColumnSpecs. */ + public inputFeatureColumnSpecs: google.cloud.automl.v1beta1.IColumnSpec[]; - /** ListColumnSpecsRequest pageToken. */ - public pageToken: string; + /** TablesModelMetadata optimizationObjective. */ + public optimizationObjective: string; + + /** TablesModelMetadata tablesModelColumnInfo. */ + public tablesModelColumnInfo: google.cloud.automl.v1beta1.ITablesModelColumnInfo[]; + + /** TablesModelMetadata trainBudgetMilliNodeHours. */ + public trainBudgetMilliNodeHours: (number|Long|string); + + /** TablesModelMetadata trainCostMilliNodeHours. */ + public trainCostMilliNodeHours: (number|Long|string); + + /** TablesModelMetadata disableEarlyStopping. */ + public disableEarlyStopping: boolean; + + /** TablesModelMetadata additionalOptimizationObjectiveConfig. */ + public additionalOptimizationObjectiveConfig?: ("optimizationObjectiveRecallValue"|"optimizationObjectivePrecisionValue"); /** - * Creates a new ListColumnSpecsRequest instance using the specified properties. + * Creates a new TablesModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListColumnSpecsRequest instance + * @returns TablesModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListColumnSpecsRequest): google.cloud.automl.v1beta1.ListColumnSpecsRequest; + public static create(properties?: google.cloud.automl.v1beta1.ITablesModelMetadata): google.cloud.automl.v1beta1.TablesModelMetadata; /** - * Encodes the specified ListColumnSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. - * @param message ListColumnSpecsRequest message or plain object to encode + * Encodes the specified TablesModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. + * @param message TablesModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListColumnSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITablesModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListColumnSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. - * @param message ListColumnSpecsRequest message or plain object to encode + * Encodes the specified TablesModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. + * @param message TablesModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListColumnSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListColumnSpecsRequest message from the specified reader or buffer. + * Decodes a TablesModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListColumnSpecsRequest + * @returns TablesModelMetadata * @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.automl.v1beta1.ListColumnSpecsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TablesModelMetadata; /** - * Decodes a ListColumnSpecsRequest message from the specified reader or buffer, length delimited. + * Decodes a TablesModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListColumnSpecsRequest + * @returns TablesModelMetadata * @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.automl.v1beta1.ListColumnSpecsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TablesModelMetadata; /** - * Verifies a ListColumnSpecsRequest message. + * Verifies a TablesModelMetadata 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 ListColumnSpecsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TablesModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListColumnSpecsRequest + * @returns TablesModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListColumnSpecsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesModelMetadata; /** - * Creates a plain object from a ListColumnSpecsRequest message. Also converts values to other types if specified. - * @param message ListColumnSpecsRequest + * Creates a plain object from a TablesModelMetadata message. Also converts values to other types if specified. + * @param message TablesModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListColumnSpecsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TablesModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListColumnSpecsRequest to JSON. + * Converts this TablesModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListColumnSpecsResponse. */ - interface IListColumnSpecsResponse { + /** Properties of a TablesAnnotation. */ + interface ITablesAnnotation { - /** ListColumnSpecsResponse columnSpecs */ - columnSpecs?: (google.cloud.automl.v1beta1.IColumnSpec[]|null); + /** TablesAnnotation score */ + score?: (number|null); - /** ListColumnSpecsResponse nextPageToken */ - nextPageToken?: (string|null); + /** TablesAnnotation predictionInterval */ + predictionInterval?: (google.cloud.automl.v1beta1.IDoubleRange|null); + + /** TablesAnnotation value */ + value?: (google.protobuf.IValue|null); + + /** TablesAnnotation tablesModelColumnInfo */ + tablesModelColumnInfo?: (google.cloud.automl.v1beta1.ITablesModelColumnInfo[]|null); + + /** TablesAnnotation baselineScore */ + baselineScore?: (number|null); } - /** Represents a ListColumnSpecsResponse. */ - class ListColumnSpecsResponse implements IListColumnSpecsResponse { + /** Represents a TablesAnnotation. */ + class TablesAnnotation implements ITablesAnnotation { /** - * Constructs a new ListColumnSpecsResponse. + * Constructs a new TablesAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListColumnSpecsResponse); + constructor(properties?: google.cloud.automl.v1beta1.ITablesAnnotation); - /** ListColumnSpecsResponse columnSpecs. */ - public columnSpecs: google.cloud.automl.v1beta1.IColumnSpec[]; + /** TablesAnnotation score. */ + public score: number; - /** ListColumnSpecsResponse nextPageToken. */ - public nextPageToken: string; + /** TablesAnnotation predictionInterval. */ + public predictionInterval?: (google.cloud.automl.v1beta1.IDoubleRange|null); + + /** TablesAnnotation value. */ + public value?: (google.protobuf.IValue|null); + + /** TablesAnnotation tablesModelColumnInfo. */ + public tablesModelColumnInfo: google.cloud.automl.v1beta1.ITablesModelColumnInfo[]; + + /** TablesAnnotation baselineScore. */ + public baselineScore: number; /** - * Creates a new ListColumnSpecsResponse instance using the specified properties. + * Creates a new TablesAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ListColumnSpecsResponse instance + * @returns TablesAnnotation instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListColumnSpecsResponse): google.cloud.automl.v1beta1.ListColumnSpecsResponse; + public static create(properties?: google.cloud.automl.v1beta1.ITablesAnnotation): google.cloud.automl.v1beta1.TablesAnnotation; /** - * Encodes the specified ListColumnSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. - * @param message ListColumnSpecsResponse message or plain object to encode + * Encodes the specified TablesAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. + * @param message TablesAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListColumnSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITablesAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListColumnSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. - * @param message ListColumnSpecsResponse message or plain object to encode + * Encodes the specified TablesAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. + * @param message TablesAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListColumnSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListColumnSpecsResponse message from the specified reader or buffer. + * Decodes a TablesAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListColumnSpecsResponse + * @returns TablesAnnotation * @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.automl.v1beta1.ListColumnSpecsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TablesAnnotation; /** - * Decodes a ListColumnSpecsResponse message from the specified reader or buffer, length delimited. + * Decodes a TablesAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListColumnSpecsResponse + * @returns TablesAnnotation * @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.automl.v1beta1.ListColumnSpecsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TablesAnnotation; /** - * Verifies a ListColumnSpecsResponse message. + * Verifies a TablesAnnotation 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 ListColumnSpecsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TablesAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListColumnSpecsResponse + * @returns TablesAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListColumnSpecsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesAnnotation; /** - * Creates a plain object from a ListColumnSpecsResponse message. Also converts values to other types if specified. - * @param message ListColumnSpecsResponse + * Creates a plain object from a TablesAnnotation message. Also converts values to other types if specified. + * @param message TablesAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListColumnSpecsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TablesAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListColumnSpecsResponse to JSON. + * Converts this TablesAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateColumnSpecRequest. */ - interface IUpdateColumnSpecRequest { + /** Properties of a TablesModelColumnInfo. */ + interface ITablesModelColumnInfo { - /** UpdateColumnSpecRequest columnSpec */ - columnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); + /** TablesModelColumnInfo columnSpecName */ + columnSpecName?: (string|null); - /** UpdateColumnSpecRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** TablesModelColumnInfo columnDisplayName */ + columnDisplayName?: (string|null); + + /** TablesModelColumnInfo featureImportance */ + featureImportance?: (number|null); } - /** Represents an UpdateColumnSpecRequest. */ - class UpdateColumnSpecRequest implements IUpdateColumnSpecRequest { + /** Represents a TablesModelColumnInfo. */ + class TablesModelColumnInfo implements ITablesModelColumnInfo { /** - * Constructs a new UpdateColumnSpecRequest. + * Constructs a new TablesModelColumnInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest); + constructor(properties?: google.cloud.automl.v1beta1.ITablesModelColumnInfo); - /** UpdateColumnSpecRequest columnSpec. */ - public columnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); + /** TablesModelColumnInfo columnSpecName. */ + public columnSpecName: string; - /** UpdateColumnSpecRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** TablesModelColumnInfo columnDisplayName. */ + public columnDisplayName: string; + + /** TablesModelColumnInfo featureImportance. */ + public featureImportance: number; /** - * Creates a new UpdateColumnSpecRequest instance using the specified properties. + * Creates a new TablesModelColumnInfo instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateColumnSpecRequest instance + * @returns TablesModelColumnInfo instance */ - public static create(properties?: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest): google.cloud.automl.v1beta1.UpdateColumnSpecRequest; + public static create(properties?: google.cloud.automl.v1beta1.ITablesModelColumnInfo): google.cloud.automl.v1beta1.TablesModelColumnInfo; /** - * Encodes the specified UpdateColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. - * @param message UpdateColumnSpecRequest message or plain object to encode + * Encodes the specified TablesModelColumnInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. + * @param message TablesModelColumnInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITablesModelColumnInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. - * @param message UpdateColumnSpecRequest message or plain object to encode + * Encodes the specified TablesModelColumnInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. + * @param message TablesModelColumnInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesModelColumnInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer. + * Decodes a TablesModelColumnInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateColumnSpecRequest + * @returns TablesModelColumnInfo * @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.automl.v1beta1.UpdateColumnSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TablesModelColumnInfo; /** - * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a TablesModelColumnInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateColumnSpecRequest + * @returns TablesModelColumnInfo * @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.automl.v1beta1.UpdateColumnSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TablesModelColumnInfo; /** - * Verifies an UpdateColumnSpecRequest message. + * Verifies a TablesModelColumnInfo 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 UpdateColumnSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TablesModelColumnInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateColumnSpecRequest + * @returns TablesModelColumnInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UpdateColumnSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesModelColumnInfo; /** - * Creates a plain object from an UpdateColumnSpecRequest message. Also converts values to other types if specified. - * @param message UpdateColumnSpecRequest + * Creates a plain object from a TablesModelColumnInfo message. Also converts values to other types if specified. + * @param message TablesModelColumnInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.UpdateColumnSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TablesModelColumnInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateColumnSpecRequest to JSON. + * Converts this TablesModelColumnInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateModelRequest. */ - interface ICreateModelRequest { + /** Properties of a ColumnSpec. */ + interface IColumnSpec { - /** CreateModelRequest parent */ - parent?: (string|null); + /** ColumnSpec name */ + name?: (string|null); - /** CreateModelRequest model */ - model?: (google.cloud.automl.v1beta1.IModel|null); + /** ColumnSpec dataType */ + dataType?: (google.cloud.automl.v1beta1.IDataType|null); + + /** ColumnSpec displayName */ + displayName?: (string|null); + + /** ColumnSpec dataStats */ + dataStats?: (google.cloud.automl.v1beta1.IDataStats|null); + + /** ColumnSpec topCorrelatedColumns */ + topCorrelatedColumns?: (google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn[]|null); + + /** ColumnSpec etag */ + etag?: (string|null); } - /** Represents a CreateModelRequest. */ - class CreateModelRequest implements ICreateModelRequest { + /** Represents a ColumnSpec. */ + class ColumnSpec implements IColumnSpec { /** - * Constructs a new CreateModelRequest. + * Constructs a new ColumnSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ICreateModelRequest); + constructor(properties?: google.cloud.automl.v1beta1.IColumnSpec); - /** CreateModelRequest parent. */ - public parent: string; + /** ColumnSpec name. */ + public name: string; - /** CreateModelRequest model. */ - public model?: (google.cloud.automl.v1beta1.IModel|null); + /** ColumnSpec dataType. */ + public dataType?: (google.cloud.automl.v1beta1.IDataType|null); + + /** ColumnSpec displayName. */ + public displayName: string; + + /** ColumnSpec dataStats. */ + public dataStats?: (google.cloud.automl.v1beta1.IDataStats|null); + + /** ColumnSpec topCorrelatedColumns. */ + public topCorrelatedColumns: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn[]; + + /** ColumnSpec etag. */ + public etag: string; /** - * Creates a new CreateModelRequest instance using the specified properties. + * Creates a new ColumnSpec instance using the specified properties. * @param [properties] Properties to set - * @returns CreateModelRequest instance + * @returns ColumnSpec instance */ - public static create(properties?: google.cloud.automl.v1beta1.ICreateModelRequest): google.cloud.automl.v1beta1.CreateModelRequest; + public static create(properties?: google.cloud.automl.v1beta1.IColumnSpec): google.cloud.automl.v1beta1.ColumnSpec; /** - * Encodes the specified CreateModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. - * @param message CreateModelRequest message or plain object to encode + * Encodes the specified ColumnSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. + * @param message ColumnSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. - * @param message CreateModelRequest message or plain object to encode + * Encodes the specified ColumnSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. + * @param message ColumnSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateModelRequest message from the specified reader or buffer. + * Decodes a ColumnSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateModelRequest + * @returns ColumnSpec * @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.automl.v1beta1.CreateModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ColumnSpec; /** - * Decodes a CreateModelRequest message from the specified reader or buffer, length delimited. + * Decodes a ColumnSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateModelRequest + * @returns ColumnSpec * @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.automl.v1beta1.CreateModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ColumnSpec; /** - * Verifies a CreateModelRequest message. + * Verifies a ColumnSpec 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 CreateModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateModelRequest + * @returns ColumnSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CreateModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ColumnSpec; /** - * Creates a plain object from a CreateModelRequest message. Also converts values to other types if specified. - * @param message CreateModelRequest + * Creates a plain object from a ColumnSpec message. Also converts values to other types if specified. + * @param message ColumnSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.CreateModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ColumnSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateModelRequest to JSON. + * Converts this ColumnSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetModelRequest. */ - interface IGetModelRequest { + namespace ColumnSpec { - /** GetModelRequest name */ - name?: (string|null); + /** Properties of a CorrelatedColumn. */ + interface ICorrelatedColumn { + + /** CorrelatedColumn columnSpecId */ + columnSpecId?: (string|null); + + /** CorrelatedColumn correlationStats */ + correlationStats?: (google.cloud.automl.v1beta1.ICorrelationStats|null); + } + + /** Represents a CorrelatedColumn. */ + class CorrelatedColumn implements ICorrelatedColumn { + + /** + * Constructs a new CorrelatedColumn. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn); + + /** CorrelatedColumn columnSpecId. */ + public columnSpecId: string; + + /** CorrelatedColumn correlationStats. */ + public correlationStats?: (google.cloud.automl.v1beta1.ICorrelationStats|null); + + /** + * Creates a new CorrelatedColumn instance using the specified properties. + * @param [properties] Properties to set + * @returns CorrelatedColumn instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn): google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn; + + /** + * Encodes the specified CorrelatedColumn message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. + * @param message CorrelatedColumn message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CorrelatedColumn message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. + * @param message CorrelatedColumn message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CorrelatedColumn message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CorrelatedColumn + * @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.automl.v1beta1.ColumnSpec.CorrelatedColumn; + + /** + * Decodes a CorrelatedColumn message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CorrelatedColumn + * @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.automl.v1beta1.ColumnSpec.CorrelatedColumn; + + /** + * Verifies a CorrelatedColumn 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 CorrelatedColumn message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CorrelatedColumn + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn; + + /** + * Creates a plain object from a CorrelatedColumn message. Also converts values to other types if specified. + * @param message CorrelatedColumn + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CorrelatedColumn to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a GetModelRequest. */ - class GetModelRequest implements IGetModelRequest { + /** Properties of a DataStats. */ + interface IDataStats { + + /** DataStats float64Stats */ + float64Stats?: (google.cloud.automl.v1beta1.IFloat64Stats|null); + + /** DataStats stringStats */ + stringStats?: (google.cloud.automl.v1beta1.IStringStats|null); + + /** DataStats timestampStats */ + timestampStats?: (google.cloud.automl.v1beta1.ITimestampStats|null); + + /** DataStats arrayStats */ + arrayStats?: (google.cloud.automl.v1beta1.IArrayStats|null); + + /** DataStats structStats */ + structStats?: (google.cloud.automl.v1beta1.IStructStats|null); + + /** DataStats categoryStats */ + categoryStats?: (google.cloud.automl.v1beta1.ICategoryStats|null); + + /** DataStats distinctValueCount */ + distinctValueCount?: (number|Long|string|null); + + /** DataStats nullValueCount */ + nullValueCount?: (number|Long|string|null); + + /** DataStats validValueCount */ + validValueCount?: (number|Long|string|null); + } + + /** Represents a DataStats. */ + class DataStats implements IDataStats { /** - * Constructs a new GetModelRequest. + * Constructs a new DataStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGetModelRequest); + constructor(properties?: google.cloud.automl.v1beta1.IDataStats); - /** GetModelRequest name. */ - public name: string; + /** DataStats float64Stats. */ + public float64Stats?: (google.cloud.automl.v1beta1.IFloat64Stats|null); + + /** DataStats stringStats. */ + public stringStats?: (google.cloud.automl.v1beta1.IStringStats|null); + + /** DataStats timestampStats. */ + public timestampStats?: (google.cloud.automl.v1beta1.ITimestampStats|null); + + /** DataStats arrayStats. */ + public arrayStats?: (google.cloud.automl.v1beta1.IArrayStats|null); + + /** DataStats structStats. */ + public structStats?: (google.cloud.automl.v1beta1.IStructStats|null); + + /** DataStats categoryStats. */ + public categoryStats?: (google.cloud.automl.v1beta1.ICategoryStats|null); + + /** DataStats distinctValueCount. */ + public distinctValueCount: (number|Long|string); + + /** DataStats nullValueCount. */ + public nullValueCount: (number|Long|string); + + /** DataStats validValueCount. */ + public validValueCount: (number|Long|string); + + /** DataStats stats. */ + public stats?: ("float64Stats"|"stringStats"|"timestampStats"|"arrayStats"|"structStats"|"categoryStats"); /** - * Creates a new GetModelRequest instance using the specified properties. + * Creates a new DataStats instance using the specified properties. * @param [properties] Properties to set - * @returns GetModelRequest instance + * @returns DataStats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGetModelRequest): google.cloud.automl.v1beta1.GetModelRequest; + public static create(properties?: google.cloud.automl.v1beta1.IDataStats): google.cloud.automl.v1beta1.DataStats; /** - * Encodes the specified GetModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. - * @param message GetModelRequest message or plain object to encode + * Encodes the specified DataStats message. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. + * @param message DataStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDataStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. - * @param message GetModelRequest message or plain object to encode + * Encodes the specified DataStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. + * @param message DataStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDataStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetModelRequest message from the specified reader or buffer. + * Decodes a DataStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetModelRequest + * @returns DataStats * @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.automl.v1beta1.GetModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DataStats; /** - * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. + * Decodes a DataStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetModelRequest + * @returns DataStats * @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.automl.v1beta1.GetModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DataStats; /** - * Verifies a GetModelRequest message. + * Verifies a DataStats 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 GetModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetModelRequest + * @returns DataStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DataStats; /** - * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. - * @param message GetModelRequest + * Creates a plain object from a DataStats message. Also converts values to other types if specified. + * @param message DataStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GetModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DataStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetModelRequest to JSON. + * Converts this DataStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelsRequest. */ - interface IListModelsRequest { + /** Properties of a Float64Stats. */ + interface IFloat64Stats { - /** ListModelsRequest parent */ - parent?: (string|null); + /** Float64Stats mean */ + mean?: (number|null); - /** ListModelsRequest filter */ - filter?: (string|null); + /** Float64Stats standardDeviation */ + standardDeviation?: (number|null); - /** ListModelsRequest pageSize */ - pageSize?: (number|null); + /** Float64Stats quantiles */ + quantiles?: (number[]|null); - /** ListModelsRequest pageToken */ - pageToken?: (string|null); + /** Float64Stats histogramBuckets */ + histogramBuckets?: (google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket[]|null); } - /** Represents a ListModelsRequest. */ - class ListModelsRequest implements IListModelsRequest { + /** Represents a Float64Stats. */ + class Float64Stats implements IFloat64Stats { /** - * Constructs a new ListModelsRequest. + * Constructs a new Float64Stats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListModelsRequest); + constructor(properties?: google.cloud.automl.v1beta1.IFloat64Stats); - /** ListModelsRequest parent. */ - public parent: string; + /** Float64Stats mean. */ + public mean: number; - /** ListModelsRequest filter. */ - public filter: string; + /** Float64Stats standardDeviation. */ + public standardDeviation: number; - /** ListModelsRequest pageSize. */ - public pageSize: number; + /** Float64Stats quantiles. */ + public quantiles: number[]; - /** ListModelsRequest pageToken. */ - public pageToken: string; + /** Float64Stats histogramBuckets. */ + public histogramBuckets: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket[]; /** - * Creates a new ListModelsRequest instance using the specified properties. + * Creates a new Float64Stats instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelsRequest instance + * @returns Float64Stats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListModelsRequest): google.cloud.automl.v1beta1.ListModelsRequest; + public static create(properties?: google.cloud.automl.v1beta1.IFloat64Stats): google.cloud.automl.v1beta1.Float64Stats; /** - * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. - * @param message ListModelsRequest message or plain object to encode + * Encodes the specified Float64Stats message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. + * @param message Float64Stats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IFloat64Stats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. - * @param message ListModelsRequest message or plain object to encode + * Encodes the specified Float64Stats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. + * @param message Float64Stats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IFloat64Stats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelsRequest message from the specified reader or buffer. + * Decodes a Float64Stats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelsRequest + * @returns Float64Stats * @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.automl.v1beta1.ListModelsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.Float64Stats; /** - * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. + * Decodes a Float64Stats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelsRequest + * @returns Float64Stats * @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.automl.v1beta1.ListModelsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.Float64Stats; /** - * Verifies a ListModelsRequest message. + * Verifies a Float64Stats 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 ListModelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Float64Stats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelsRequest + * @returns Float64Stats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Float64Stats; /** - * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. - * @param message ListModelsRequest + * Creates a plain object from a Float64Stats message. Also converts values to other types if specified. + * @param message Float64Stats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.Float64Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelsRequest to JSON. + * Converts this Float64Stats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelsResponse. */ - interface IListModelsResponse { + namespace Float64Stats { - /** ListModelsResponse model */ - model?: (google.cloud.automl.v1beta1.IModel[]|null); + /** Properties of a HistogramBucket. */ + interface IHistogramBucket { - /** ListModelsResponse nextPageToken */ - nextPageToken?: (string|null); + /** HistogramBucket min */ + min?: (number|null); + + /** HistogramBucket max */ + max?: (number|null); + + /** HistogramBucket count */ + count?: (number|Long|string|null); + } + + /** Represents a HistogramBucket. */ + class HistogramBucket implements IHistogramBucket { + + /** + * Constructs a new HistogramBucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket); + + /** HistogramBucket min. */ + public min: number; + + /** HistogramBucket max. */ + public max: number; + + /** HistogramBucket count. */ + public count: (number|Long|string); + + /** + * Creates a new HistogramBucket instance using the specified properties. + * @param [properties] Properties to set + * @returns HistogramBucket instance + */ + public static create(properties?: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket): google.cloud.automl.v1beta1.Float64Stats.HistogramBucket; + + /** + * Encodes the specified HistogramBucket message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. + * @param message HistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistogramBucket message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. + * @param message HistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HistogramBucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistogramBucket + * @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.automl.v1beta1.Float64Stats.HistogramBucket; + + /** + * Decodes a HistogramBucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistogramBucket + * @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.automl.v1beta1.Float64Stats.HistogramBucket; + + /** + * Verifies a HistogramBucket 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 HistogramBucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistogramBucket + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Float64Stats.HistogramBucket; + + /** + * Creates a plain object from a HistogramBucket message. Also converts values to other types if specified. + * @param message HistogramBucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.Float64Stats.HistogramBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistogramBucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a ListModelsResponse. */ - class ListModelsResponse implements IListModelsResponse { + /** Properties of a StringStats. */ + interface IStringStats { + + /** StringStats topUnigramStats */ + topUnigramStats?: (google.cloud.automl.v1beta1.StringStats.IUnigramStats[]|null); + } + + /** Represents a StringStats. */ + class StringStats implements IStringStats { /** - * Constructs a new ListModelsResponse. + * Constructs a new StringStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListModelsResponse); - - /** ListModelsResponse model. */ - public model: google.cloud.automl.v1beta1.IModel[]; + constructor(properties?: google.cloud.automl.v1beta1.IStringStats); - /** ListModelsResponse nextPageToken. */ - public nextPageToken: string; + /** StringStats topUnigramStats. */ + public topUnigramStats: google.cloud.automl.v1beta1.StringStats.IUnigramStats[]; /** - * Creates a new ListModelsResponse instance using the specified properties. + * Creates a new StringStats instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelsResponse instance + * @returns StringStats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListModelsResponse): google.cloud.automl.v1beta1.ListModelsResponse; + public static create(properties?: google.cloud.automl.v1beta1.IStringStats): google.cloud.automl.v1beta1.StringStats; /** - * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. - * @param message ListModelsResponse message or plain object to encode + * Encodes the specified StringStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. + * @param message StringStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IStringStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. - * @param message ListModelsResponse message or plain object to encode + * Encodes the specified StringStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. + * @param message StringStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IStringStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelsResponse message from the specified reader or buffer. + * Decodes a StringStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelsResponse + * @returns StringStats * @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.automl.v1beta1.ListModelsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.StringStats; /** - * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. + * Decodes a StringStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelsResponse + * @returns StringStats * @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.automl.v1beta1.ListModelsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.StringStats; /** - * Verifies a ListModelsResponse message. + * Verifies a StringStats 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 ListModelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StringStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelsResponse + * @returns StringStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StringStats; /** - * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. - * @param message ListModelsResponse + * Creates a plain object from a StringStats message. Also converts values to other types if specified. + * @param message StringStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.StringStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelsResponse to JSON. + * Converts this StringStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteModelRequest. */ - interface IDeleteModelRequest { + namespace StringStats { - /** DeleteModelRequest name */ - name?: (string|null); + /** Properties of an UnigramStats. */ + interface IUnigramStats { + + /** UnigramStats value */ + value?: (string|null); + + /** UnigramStats count */ + count?: (number|Long|string|null); + } + + /** Represents an UnigramStats. */ + class UnigramStats implements IUnigramStats { + + /** + * Constructs a new UnigramStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.StringStats.IUnigramStats); + + /** UnigramStats value. */ + public value: string; + + /** UnigramStats count. */ + public count: (number|Long|string); + + /** + * Creates a new UnigramStats instance using the specified properties. + * @param [properties] Properties to set + * @returns UnigramStats instance + */ + public static create(properties?: google.cloud.automl.v1beta1.StringStats.IUnigramStats): google.cloud.automl.v1beta1.StringStats.UnigramStats; + + /** + * Encodes the specified UnigramStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. + * @param message UnigramStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.StringStats.IUnigramStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnigramStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. + * @param message UnigramStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.StringStats.IUnigramStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnigramStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnigramStats + * @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.automl.v1beta1.StringStats.UnigramStats; + + /** + * Decodes an UnigramStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnigramStats + * @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.automl.v1beta1.StringStats.UnigramStats; + + /** + * Verifies an UnigramStats 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 UnigramStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnigramStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StringStats.UnigramStats; + + /** + * Creates a plain object from an UnigramStats message. Also converts values to other types if specified. + * @param message UnigramStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.StringStats.UnigramStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnigramStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a DeleteModelRequest. */ - class DeleteModelRequest implements IDeleteModelRequest { + /** Properties of a TimestampStats. */ + interface ITimestampStats { + + /** TimestampStats granularStats */ + granularStats?: ({ [k: string]: google.cloud.automl.v1beta1.TimestampStats.IGranularStats }|null); + } + + /** Represents a TimestampStats. */ + class TimestampStats implements ITimestampStats { /** - * Constructs a new DeleteModelRequest. + * Constructs a new TimestampStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDeleteModelRequest); + constructor(properties?: google.cloud.automl.v1beta1.ITimestampStats); - /** DeleteModelRequest name. */ - public name: string; + /** TimestampStats granularStats. */ + public granularStats: { [k: string]: google.cloud.automl.v1beta1.TimestampStats.IGranularStats }; /** - * Creates a new DeleteModelRequest instance using the specified properties. + * Creates a new TimestampStats instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteModelRequest instance + * @returns TimestampStats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDeleteModelRequest): google.cloud.automl.v1beta1.DeleteModelRequest; + public static create(properties?: google.cloud.automl.v1beta1.ITimestampStats): google.cloud.automl.v1beta1.TimestampStats; /** - * Encodes the specified DeleteModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. - * @param message DeleteModelRequest message or plain object to encode + * Encodes the specified TimestampStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. + * @param message TimestampStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITimestampStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. - * @param message DeleteModelRequest message or plain object to encode + * Encodes the specified TimestampStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. + * @param message TimestampStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITimestampStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteModelRequest message from the specified reader or buffer. + * Decodes a TimestampStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteModelRequest + * @returns TimestampStats * @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.automl.v1beta1.DeleteModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TimestampStats; /** - * Decodes a DeleteModelRequest message from the specified reader or buffer, length delimited. + * Decodes a TimestampStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteModelRequest + * @returns TimestampStats * @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.automl.v1beta1.DeleteModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TimestampStats; /** - * Verifies a DeleteModelRequest message. + * Verifies a TimestampStats 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 DeleteModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimestampStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteModelRequest + * @returns TimestampStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeleteModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TimestampStats; /** - * Creates a plain object from a DeleteModelRequest message. Also converts values to other types if specified. - * @param message DeleteModelRequest + * Creates a plain object from a TimestampStats message. Also converts values to other types if specified. + * @param message TimestampStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DeleteModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TimestampStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteModelRequest to JSON. + * Converts this TimestampStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeployModelRequest. */ - interface IDeployModelRequest { - - /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata */ - imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null); - - /** DeployModelRequest imageClassificationModelDeploymentMetadata */ - imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null); - - /** DeployModelRequest name */ - name?: (string|null); - } - - /** Represents a DeployModelRequest. */ - class DeployModelRequest implements IDeployModelRequest { + namespace TimestampStats { - /** - * Constructs a new DeployModelRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.IDeployModelRequest); + /** Properties of a GranularStats. */ + interface IGranularStats { - /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata. */ - public imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null); + /** GranularStats buckets */ + buckets?: ({ [k: string]: (number|Long|string) }|null); + } - /** DeployModelRequest imageClassificationModelDeploymentMetadata. */ - public imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null); + /** Represents a GranularStats. */ + class GranularStats implements IGranularStats { - /** DeployModelRequest name. */ - public name: string; + /** + * Constructs a new GranularStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.TimestampStats.IGranularStats); - /** DeployModelRequest modelDeploymentMetadata. */ - public modelDeploymentMetadata?: ("imageObjectDetectionModelDeploymentMetadata"|"imageClassificationModelDeploymentMetadata"); + /** GranularStats buckets. */ + public buckets: { [k: string]: (number|Long|string) }; - /** - * Creates a new DeployModelRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeployModelRequest instance - */ - public static create(properties?: google.cloud.automl.v1beta1.IDeployModelRequest): google.cloud.automl.v1beta1.DeployModelRequest; + /** + * Creates a new GranularStats instance using the specified properties. + * @param [properties] Properties to set + * @returns GranularStats instance + */ + public static create(properties?: google.cloud.automl.v1beta1.TimestampStats.IGranularStats): google.cloud.automl.v1beta1.TimestampStats.GranularStats; - /** - * Encodes the specified DeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. - * @param message DeployModelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GranularStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. + * @param message GranularStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.TimestampStats.IGranularStats, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. - * @param message DeployModelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GranularStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. + * @param message GranularStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.TimestampStats.IGranularStats, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DeployModelRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeployModelRequest - * @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.automl.v1beta1.DeployModelRequest; + /** + * Decodes a GranularStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GranularStats + * @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.automl.v1beta1.TimestampStats.GranularStats; - /** - * Decodes a DeployModelRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeployModelRequest - * @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.automl.v1beta1.DeployModelRequest; + /** + * Decodes a GranularStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GranularStats + * @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.automl.v1beta1.TimestampStats.GranularStats; - /** - * Verifies a DeployModelRequest 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); + /** + * Verifies a GranularStats 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 DeployModelRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeployModelRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeployModelRequest; + /** + * Creates a GranularStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GranularStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TimestampStats.GranularStats; - /** - * Creates a plain object from a DeployModelRequest message. Also converts values to other types if specified. - * @param message DeployModelRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.DeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a GranularStats message. Also converts values to other types if specified. + * @param message GranularStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.TimestampStats.GranularStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DeployModelRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this GranularStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of an UndeployModelRequest. */ - interface IUndeployModelRequest { + /** Properties of an ArrayStats. */ + interface IArrayStats { - /** UndeployModelRequest name */ - name?: (string|null); + /** ArrayStats memberStats */ + memberStats?: (google.cloud.automl.v1beta1.IDataStats|null); } - /** Represents an UndeployModelRequest. */ - class UndeployModelRequest implements IUndeployModelRequest { + /** Represents an ArrayStats. */ + class ArrayStats implements IArrayStats { /** - * Constructs a new UndeployModelRequest. + * Constructs a new ArrayStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IUndeployModelRequest); + constructor(properties?: google.cloud.automl.v1beta1.IArrayStats); - /** UndeployModelRequest name. */ - public name: string; + /** ArrayStats memberStats. */ + public memberStats?: (google.cloud.automl.v1beta1.IDataStats|null); /** - * Creates a new UndeployModelRequest instance using the specified properties. + * Creates a new ArrayStats instance using the specified properties. * @param [properties] Properties to set - * @returns UndeployModelRequest instance + * @returns ArrayStats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IUndeployModelRequest): google.cloud.automl.v1beta1.UndeployModelRequest; + public static create(properties?: google.cloud.automl.v1beta1.IArrayStats): google.cloud.automl.v1beta1.ArrayStats; /** - * Encodes the specified UndeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. - * @param message UndeployModelRequest message or plain object to encode + * Encodes the specified ArrayStats message. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. + * @param message ArrayStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IArrayStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UndeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. - * @param message UndeployModelRequest message or plain object to encode + * Encodes the specified ArrayStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. + * @param message ArrayStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IArrayStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UndeployModelRequest message from the specified reader or buffer. + * Decodes an ArrayStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UndeployModelRequest + * @returns ArrayStats * @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.automl.v1beta1.UndeployModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ArrayStats; /** - * Decodes an UndeployModelRequest message from the specified reader or buffer, length delimited. + * Decodes an ArrayStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UndeployModelRequest + * @returns ArrayStats * @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.automl.v1beta1.UndeployModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ArrayStats; /** - * Verifies an UndeployModelRequest message. + * Verifies an ArrayStats 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 UndeployModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ArrayStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UndeployModelRequest + * @returns ArrayStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UndeployModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ArrayStats; /** - * Creates a plain object from an UndeployModelRequest message. Also converts values to other types if specified. - * @param message UndeployModelRequest + * Creates a plain object from an ArrayStats message. Also converts values to other types if specified. + * @param message ArrayStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.UndeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ArrayStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UndeployModelRequest to JSON. + * Converts this ArrayStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportModelRequest. */ - interface IExportModelRequest { - - /** ExportModelRequest name */ - name?: (string|null); + /** Properties of a StructStats. */ + interface IStructStats { - /** ExportModelRequest outputConfig */ - outputConfig?: (google.cloud.automl.v1beta1.IModelExportOutputConfig|null); + /** StructStats fieldStats */ + fieldStats?: ({ [k: string]: google.cloud.automl.v1beta1.IDataStats }|null); } - /** Represents an ExportModelRequest. */ - class ExportModelRequest implements IExportModelRequest { + /** Represents a StructStats. */ + class StructStats implements IStructStats { /** - * Constructs a new ExportModelRequest. + * Constructs a new StructStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExportModelRequest); - - /** ExportModelRequest name. */ - public name: string; + constructor(properties?: google.cloud.automl.v1beta1.IStructStats); - /** ExportModelRequest outputConfig. */ - public outputConfig?: (google.cloud.automl.v1beta1.IModelExportOutputConfig|null); + /** StructStats fieldStats. */ + public fieldStats: { [k: string]: google.cloud.automl.v1beta1.IDataStats }; /** - * Creates a new ExportModelRequest instance using the specified properties. + * Creates a new StructStats instance using the specified properties. * @param [properties] Properties to set - * @returns ExportModelRequest instance + * @returns StructStats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExportModelRequest): google.cloud.automl.v1beta1.ExportModelRequest; + public static create(properties?: google.cloud.automl.v1beta1.IStructStats): google.cloud.automl.v1beta1.StructStats; /** - * Encodes the specified ExportModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. - * @param message ExportModelRequest message or plain object to encode + * Encodes the specified StructStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. + * @param message StructStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IStructStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. - * @param message ExportModelRequest message or plain object to encode + * Encodes the specified StructStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. + * @param message StructStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IStructStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportModelRequest message from the specified reader or buffer. + * Decodes a StructStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportModelRequest + * @returns StructStats * @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.automl.v1beta1.ExportModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.StructStats; /** - * Decodes an ExportModelRequest message from the specified reader or buffer, length delimited. + * Decodes a StructStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportModelRequest + * @returns StructStats * @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.automl.v1beta1.ExportModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.StructStats; /** - * Verifies an ExportModelRequest message. + * Verifies a StructStats 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 ExportModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StructStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportModelRequest + * @returns StructStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StructStats; /** - * Creates a plain object from an ExportModelRequest message. Also converts values to other types if specified. - * @param message ExportModelRequest + * Creates a plain object from a StructStats message. Also converts values to other types if specified. + * @param message StructStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExportModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.StructStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportModelRequest to JSON. + * Converts this StructStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportEvaluatedExamplesRequest. */ - interface IExportEvaluatedExamplesRequest { - - /** ExportEvaluatedExamplesRequest name */ - name?: (string|null); + /** Properties of a CategoryStats. */ + interface ICategoryStats { - /** ExportEvaluatedExamplesRequest outputConfig */ - outputConfig?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null); + /** CategoryStats topCategoryStats */ + topCategoryStats?: (google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats[]|null); } - /** Represents an ExportEvaluatedExamplesRequest. */ - class ExportEvaluatedExamplesRequest implements IExportEvaluatedExamplesRequest { + /** Represents a CategoryStats. */ + class CategoryStats implements ICategoryStats { /** - * Constructs a new ExportEvaluatedExamplesRequest. + * Constructs a new CategoryStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest); - - /** ExportEvaluatedExamplesRequest name. */ - public name: string; + constructor(properties?: google.cloud.automl.v1beta1.ICategoryStats); - /** ExportEvaluatedExamplesRequest outputConfig. */ - public outputConfig?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null); + /** CategoryStats topCategoryStats. */ + public topCategoryStats: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats[]; /** - * Creates a new ExportEvaluatedExamplesRequest instance using the specified properties. + * Creates a new CategoryStats instance using the specified properties. * @param [properties] Properties to set - * @returns ExportEvaluatedExamplesRequest instance + * @returns CategoryStats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest): google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; + public static create(properties?: google.cloud.automl.v1beta1.ICategoryStats): google.cloud.automl.v1beta1.CategoryStats; /** - * Encodes the specified ExportEvaluatedExamplesRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. - * @param message ExportEvaluatedExamplesRequest message or plain object to encode + * Encodes the specified CategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. + * @param message CategoryStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ICategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportEvaluatedExamplesRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. - * @param message ExportEvaluatedExamplesRequest message or plain object to encode + * Encodes the specified CategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. + * @param message CategoryStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ICategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer. + * Decodes a CategoryStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportEvaluatedExamplesRequest + * @returns CategoryStats * @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.automl.v1beta1.ExportEvaluatedExamplesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.CategoryStats; /** - * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer, length delimited. + * Decodes a CategoryStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportEvaluatedExamplesRequest + * @returns CategoryStats * @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.automl.v1beta1.ExportEvaluatedExamplesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.CategoryStats; /** - * Verifies an ExportEvaluatedExamplesRequest message. + * Verifies a CategoryStats 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 ExportEvaluatedExamplesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CategoryStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportEvaluatedExamplesRequest + * @returns CategoryStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CategoryStats; /** - * Creates a plain object from an ExportEvaluatedExamplesRequest message. Also converts values to other types if specified. - * @param message ExportEvaluatedExamplesRequest + * Creates a plain object from a CategoryStats message. Also converts values to other types if specified. + * @param message CategoryStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.CategoryStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportEvaluatedExamplesRequest to JSON. + * Converts this CategoryStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetModelEvaluationRequest. */ - interface IGetModelEvaluationRequest { + namespace CategoryStats { - /** GetModelEvaluationRequest name */ - name?: (string|null); + /** Properties of a SingleCategoryStats. */ + interface ISingleCategoryStats { + + /** SingleCategoryStats value */ + value?: (string|null); + + /** SingleCategoryStats count */ + count?: (number|Long|string|null); + } + + /** Represents a SingleCategoryStats. */ + class SingleCategoryStats implements ISingleCategoryStats { + + /** + * Constructs a new SingleCategoryStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats); + + /** SingleCategoryStats value. */ + public value: string; + + /** SingleCategoryStats count. */ + public count: (number|Long|string); + + /** + * Creates a new SingleCategoryStats instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleCategoryStats instance + */ + public static create(properties?: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats): google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats; + + /** + * Encodes the specified SingleCategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. + * @param message SingleCategoryStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleCategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. + * @param message SingleCategoryStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleCategoryStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleCategoryStats + * @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.automl.v1beta1.CategoryStats.SingleCategoryStats; + + /** + * Decodes a SingleCategoryStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleCategoryStats + * @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.automl.v1beta1.CategoryStats.SingleCategoryStats; + + /** + * Verifies a SingleCategoryStats 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 SingleCategoryStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleCategoryStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats; + + /** + * Creates a plain object from a SingleCategoryStats message. Also converts values to other types if specified. + * @param message SingleCategoryStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleCategoryStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a GetModelEvaluationRequest. */ - class GetModelEvaluationRequest implements IGetModelEvaluationRequest { + /** Properties of a CorrelationStats. */ + interface ICorrelationStats { + + /** CorrelationStats cramersV */ + cramersV?: (number|null); + } + + /** Represents a CorrelationStats. */ + class CorrelationStats implements ICorrelationStats { /** - * Constructs a new GetModelEvaluationRequest. + * Constructs a new CorrelationStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGetModelEvaluationRequest); + constructor(properties?: google.cloud.automl.v1beta1.ICorrelationStats); - /** GetModelEvaluationRequest name. */ - public name: string; + /** CorrelationStats cramersV. */ + public cramersV: number; /** - * Creates a new GetModelEvaluationRequest instance using the specified properties. + * Creates a new CorrelationStats instance using the specified properties. * @param [properties] Properties to set - * @returns GetModelEvaluationRequest instance + * @returns CorrelationStats instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGetModelEvaluationRequest): google.cloud.automl.v1beta1.GetModelEvaluationRequest; + public static create(properties?: google.cloud.automl.v1beta1.ICorrelationStats): google.cloud.automl.v1beta1.CorrelationStats; /** - * Encodes the specified GetModelEvaluationRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. - * @param message GetModelEvaluationRequest message or plain object to encode + * Encodes the specified CorrelationStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. + * @param message CorrelationStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ICorrelationStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. - * @param message GetModelEvaluationRequest message or plain object to encode + * Encodes the specified CorrelationStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. + * @param message CorrelationStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ICorrelationStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetModelEvaluationRequest message from the specified reader or buffer. + * Decodes a CorrelationStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetModelEvaluationRequest + * @returns CorrelationStats * @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.automl.v1beta1.GetModelEvaluationRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.CorrelationStats; /** - * Decodes a GetModelEvaluationRequest message from the specified reader or buffer, length delimited. + * Decodes a CorrelationStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetModelEvaluationRequest + * @returns CorrelationStats * @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.automl.v1beta1.GetModelEvaluationRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.CorrelationStats; /** - * Verifies a GetModelEvaluationRequest message. + * Verifies a CorrelationStats 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 GetModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CorrelationStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetModelEvaluationRequest + * @returns CorrelationStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetModelEvaluationRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CorrelationStats; /** - * Creates a plain object from a GetModelEvaluationRequest message. Also converts values to other types if specified. - * @param message GetModelEvaluationRequest + * Creates a plain object from a CorrelationStats message. Also converts values to other types if specified. + * @param message CorrelationStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GetModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.CorrelationStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetModelEvaluationRequest to JSON. + * Converts this CorrelationStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelEvaluationsRequest. */ - interface IListModelEvaluationsRequest { + /** TypeCode enum. */ + enum TypeCode { + TYPE_CODE_UNSPECIFIED = 0, + FLOAT64 = 3, + TIMESTAMP = 4, + STRING = 6, + ARRAY = 8, + STRUCT = 9, + CATEGORY = 10 + } - /** ListModelEvaluationsRequest parent */ - parent?: (string|null); + /** Properties of a DataType. */ + interface IDataType { - /** ListModelEvaluationsRequest filter */ - filter?: (string|null); + /** DataType listElementType */ + listElementType?: (google.cloud.automl.v1beta1.IDataType|null); - /** ListModelEvaluationsRequest pageSize */ - pageSize?: (number|null); + /** DataType structType */ + structType?: (google.cloud.automl.v1beta1.IStructType|null); - /** ListModelEvaluationsRequest pageToken */ - pageToken?: (string|null); + /** DataType timeFormat */ + timeFormat?: (string|null); + + /** DataType typeCode */ + typeCode?: (google.cloud.automl.v1beta1.TypeCode|keyof typeof google.cloud.automl.v1beta1.TypeCode|null); + + /** DataType nullable */ + nullable?: (boolean|null); } - /** Represents a ListModelEvaluationsRequest. */ - class ListModelEvaluationsRequest implements IListModelEvaluationsRequest { + /** Represents a DataType. */ + class DataType implements IDataType { /** - * Constructs a new ListModelEvaluationsRequest. + * Constructs a new DataType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsRequest); + constructor(properties?: google.cloud.automl.v1beta1.IDataType); - /** ListModelEvaluationsRequest parent. */ - public parent: string; + /** DataType listElementType. */ + public listElementType?: (google.cloud.automl.v1beta1.IDataType|null); - /** ListModelEvaluationsRequest filter. */ - public filter: string; + /** DataType structType. */ + public structType?: (google.cloud.automl.v1beta1.IStructType|null); + + /** DataType timeFormat. */ + public timeFormat: string; - /** ListModelEvaluationsRequest pageSize. */ - public pageSize: number; + /** DataType typeCode. */ + public typeCode: (google.cloud.automl.v1beta1.TypeCode|keyof typeof google.cloud.automl.v1beta1.TypeCode); - /** ListModelEvaluationsRequest pageToken. */ - public pageToken: string; + /** DataType nullable. */ + public nullable: boolean; + + /** DataType details. */ + public details?: ("listElementType"|"structType"|"timeFormat"); /** - * Creates a new ListModelEvaluationsRequest instance using the specified properties. + * Creates a new DataType instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelEvaluationsRequest instance + * @returns DataType instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsRequest): google.cloud.automl.v1beta1.ListModelEvaluationsRequest; + public static create(properties?: google.cloud.automl.v1beta1.IDataType): google.cloud.automl.v1beta1.DataType; /** - * Encodes the specified ListModelEvaluationsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. - * @param message ListModelEvaluationsRequest message or plain object to encode + * Encodes the specified DataType message. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. + * @param message DataType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDataType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. - * @param message ListModelEvaluationsRequest message or plain object to encode + * Encodes the specified DataType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. + * @param message DataType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDataType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer. + * Decodes a DataType message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelEvaluationsRequest + * @returns DataType * @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.automl.v1beta1.ListModelEvaluationsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DataType; /** - * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer, length delimited. + * Decodes a DataType message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelEvaluationsRequest + * @returns DataType * @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.automl.v1beta1.ListModelEvaluationsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DataType; /** - * Verifies a ListModelEvaluationsRequest message. + * Verifies a DataType 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 ListModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataType message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelEvaluationsRequest + * @returns DataType */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelEvaluationsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DataType; /** - * Creates a plain object from a ListModelEvaluationsRequest message. Also converts values to other types if specified. - * @param message ListModelEvaluationsRequest + * Creates a plain object from a DataType message. Also converts values to other types if specified. + * @param message DataType * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListModelEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DataType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelEvaluationsRequest to JSON. + * Converts this DataType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListModelEvaluationsResponse. */ - interface IListModelEvaluationsResponse { - - /** ListModelEvaluationsResponse modelEvaluation */ - modelEvaluation?: (google.cloud.automl.v1beta1.IModelEvaluation[]|null); + /** Properties of a StructType. */ + interface IStructType { - /** ListModelEvaluationsResponse nextPageToken */ - nextPageToken?: (string|null); + /** StructType fields */ + fields?: ({ [k: string]: google.cloud.automl.v1beta1.IDataType }|null); } - /** Represents a ListModelEvaluationsResponse. */ - class ListModelEvaluationsResponse implements IListModelEvaluationsResponse { + /** Represents a StructType. */ + class StructType implements IStructType { /** - * Constructs a new ListModelEvaluationsResponse. + * Constructs a new StructType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsResponse); - - /** ListModelEvaluationsResponse modelEvaluation. */ - public modelEvaluation: google.cloud.automl.v1beta1.IModelEvaluation[]; + constructor(properties?: google.cloud.automl.v1beta1.IStructType); - /** ListModelEvaluationsResponse nextPageToken. */ - public nextPageToken: string; + /** StructType fields. */ + public fields: { [k: string]: google.cloud.automl.v1beta1.IDataType }; /** - * Creates a new ListModelEvaluationsResponse instance using the specified properties. + * Creates a new StructType instance using the specified properties. * @param [properties] Properties to set - * @returns ListModelEvaluationsResponse instance + * @returns StructType instance */ - public static create(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsResponse): google.cloud.automl.v1beta1.ListModelEvaluationsResponse; + public static create(properties?: google.cloud.automl.v1beta1.IStructType): google.cloud.automl.v1beta1.StructType; /** - * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. - * @param message ListModelEvaluationsResponse message or plain object to encode + * Encodes the specified StructType message. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. + * @param message StructType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IStructType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. - * @param message ListModelEvaluationsResponse message or plain object to encode + * Encodes the specified StructType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. + * @param message StructType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IStructType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. + * Decodes a StructType message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListModelEvaluationsResponse + * @returns StructType * @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.automl.v1beta1.ListModelEvaluationsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.StructType; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * Decodes a StructType message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListModelEvaluationsResponse + * @returns StructType * @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.automl.v1beta1.ListModelEvaluationsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.StructType; /** - * Verifies a ListModelEvaluationsResponse message. + * Verifies a StructType 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 ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StructType message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListModelEvaluationsResponse + * @returns StructType */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelEvaluationsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StructType; /** - * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. - * @param message ListModelEvaluationsResponse + * Creates a plain object from a StructType message. Also converts values to other types if specified. + * @param message StructType * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ListModelEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.StructType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListModelEvaluationsResponse to JSON. + * Converts this StructType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnnotationPayload. */ - interface IAnnotationPayload { - - /** AnnotationPayload translation */ - translation?: (google.cloud.automl.v1beta1.ITranslationAnnotation|null); - - /** AnnotationPayload classification */ - classification?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); - - /** AnnotationPayload imageObjectDetection */ - imageObjectDetection?: (google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null); - - /** AnnotationPayload videoClassification */ - videoClassification?: (google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null); - - /** AnnotationPayload videoObjectTracking */ - videoObjectTracking?: (google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null); - - /** AnnotationPayload textExtraction */ - textExtraction?: (google.cloud.automl.v1beta1.ITextExtractionAnnotation|null); - - /** AnnotationPayload textSentiment */ - textSentiment?: (google.cloud.automl.v1beta1.ITextSentimentAnnotation|null); + /** Properties of an Image. */ + interface IImage { - /** AnnotationPayload tables */ - tables?: (google.cloud.automl.v1beta1.ITablesAnnotation|null); + /** Image imageBytes */ + imageBytes?: (Uint8Array|string|null); - /** AnnotationPayload annotationSpecId */ - annotationSpecId?: (string|null); + /** Image inputConfig */ + inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); - /** AnnotationPayload displayName */ - displayName?: (string|null); + /** Image thumbnailUri */ + thumbnailUri?: (string|null); } - /** Represents an AnnotationPayload. */ - class AnnotationPayload implements IAnnotationPayload { + /** Represents an Image. */ + class Image implements IImage { /** - * Constructs a new AnnotationPayload. + * Constructs a new Image. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IAnnotationPayload); - - /** AnnotationPayload translation. */ - public translation?: (google.cloud.automl.v1beta1.ITranslationAnnotation|null); - - /** AnnotationPayload classification. */ - public classification?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); - - /** AnnotationPayload imageObjectDetection. */ - public imageObjectDetection?: (google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null); - - /** AnnotationPayload videoClassification. */ - public videoClassification?: (google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null); - - /** AnnotationPayload videoObjectTracking. */ - public videoObjectTracking?: (google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null); - - /** AnnotationPayload textExtraction. */ - public textExtraction?: (google.cloud.automl.v1beta1.ITextExtractionAnnotation|null); - - /** AnnotationPayload textSentiment. */ - public textSentiment?: (google.cloud.automl.v1beta1.ITextSentimentAnnotation|null); + constructor(properties?: google.cloud.automl.v1beta1.IImage); - /** AnnotationPayload tables. */ - public tables?: (google.cloud.automl.v1beta1.ITablesAnnotation|null); + /** Image imageBytes. */ + public imageBytes: (Uint8Array|string); - /** AnnotationPayload annotationSpecId. */ - public annotationSpecId: string; + /** Image inputConfig. */ + public inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); - /** AnnotationPayload displayName. */ - public displayName: string; + /** Image thumbnailUri. */ + public thumbnailUri: string; - /** AnnotationPayload detail. */ - public detail?: ("translation"|"classification"|"imageObjectDetection"|"videoClassification"|"videoObjectTracking"|"textExtraction"|"textSentiment"|"tables"); + /** Image data. */ + public data?: ("imageBytes"|"inputConfig"); /** - * Creates a new AnnotationPayload instance using the specified properties. + * Creates a new Image instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationPayload instance + * @returns Image instance */ - public static create(properties?: google.cloud.automl.v1beta1.IAnnotationPayload): google.cloud.automl.v1beta1.AnnotationPayload; + public static create(properties?: google.cloud.automl.v1beta1.IImage): google.cloud.automl.v1beta1.Image; /** - * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. - * @param message AnnotationPayload message or plain object to encode + * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. + * @param message Image message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. - * @param message AnnotationPayload message or plain object to encode + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. + * @param message Image message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IAnnotationPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationPayload message from the specified reader or buffer. + * Decodes an Image message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationPayload + * @returns Image * @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.automl.v1beta1.AnnotationPayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.Image; /** - * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. + * Decodes an Image message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationPayload + * @returns Image * @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.automl.v1beta1.AnnotationPayload; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.Image; /** - * Verifies an AnnotationPayload message. + * Verifies an Image 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 AnnotationPayload message from a plain object. Also converts values to their respective internal types. + * Creates an Image message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationPayload + * @returns Image */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.AnnotationPayload; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Image; /** - * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. - * @param message AnnotationPayload + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @param message Image * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.AnnotationPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationPayload to JSON. + * Converts this Image to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** ClassificationType enum. */ - enum ClassificationType { - CLASSIFICATION_TYPE_UNSPECIFIED = 0, - MULTICLASS = 1, - MULTILABEL = 2 - } + /** Properties of a TextSnippet. */ + interface ITextSnippet { - /** Properties of a ClassificationAnnotation. */ - interface IClassificationAnnotation { + /** TextSnippet content */ + content?: (string|null); - /** ClassificationAnnotation score */ - score?: (number|null); + /** TextSnippet mimeType */ + mimeType?: (string|null); + + /** TextSnippet contentUri */ + contentUri?: (string|null); } - /** Represents a ClassificationAnnotation. */ - class ClassificationAnnotation implements IClassificationAnnotation { + /** Represents a TextSnippet. */ + class TextSnippet implements ITextSnippet { /** - * Constructs a new ClassificationAnnotation. + * Constructs a new TextSnippet. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IClassificationAnnotation); + constructor(properties?: google.cloud.automl.v1beta1.ITextSnippet); - /** ClassificationAnnotation score. */ - public score: number; + /** TextSnippet content. */ + public content: string; + + /** TextSnippet mimeType. */ + public mimeType: string; + + /** TextSnippet contentUri. */ + public contentUri: string; /** - * Creates a new ClassificationAnnotation instance using the specified properties. + * Creates a new TextSnippet instance using the specified properties. * @param [properties] Properties to set - * @returns ClassificationAnnotation instance + * @returns TextSnippet instance */ - public static create(properties?: google.cloud.automl.v1beta1.IClassificationAnnotation): google.cloud.automl.v1beta1.ClassificationAnnotation; + public static create(properties?: google.cloud.automl.v1beta1.ITextSnippet): google.cloud.automl.v1beta1.TextSnippet; /** - * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. - * @param message ClassificationAnnotation message or plain object to encode + * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. + * @param message TextSnippet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. - * @param message ClassificationAnnotation message or plain object to encode + * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. + * @param message TextSnippet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer. + * Decodes a TextSnippet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClassificationAnnotation + * @returns TextSnippet * @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.automl.v1beta1.ClassificationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextSnippet; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TextSnippet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClassificationAnnotation + * @returns TextSnippet * @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.automl.v1beta1.ClassificationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextSnippet; /** - * Verifies a ClassificationAnnotation message. + * Verifies a TextSnippet 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 ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TextSnippet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClassificationAnnotation + * @returns TextSnippet */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSnippet; /** - * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. - * @param message ClassificationAnnotation + * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. + * @param message TextSnippet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextSnippet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClassificationAnnotation to JSON. + * Converts this TextSnippet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoClassificationAnnotation. */ - interface IVideoClassificationAnnotation { + /** Properties of a DocumentDimensions. */ + interface IDocumentDimensions { - /** VideoClassificationAnnotation type */ - type?: (string|null); + /** DocumentDimensions unit */ + unit?: (google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|null); - /** VideoClassificationAnnotation classificationAnnotation */ - classificationAnnotation?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); + /** DocumentDimensions width */ + width?: (number|null); - /** VideoClassificationAnnotation timeSegment */ - timeSegment?: (google.cloud.automl.v1beta1.ITimeSegment|null); + /** DocumentDimensions height */ + height?: (number|null); } - /** Represents a VideoClassificationAnnotation. */ - class VideoClassificationAnnotation implements IVideoClassificationAnnotation { + /** Represents a DocumentDimensions. */ + class DocumentDimensions implements IDocumentDimensions { /** - * Constructs a new VideoClassificationAnnotation. + * Constructs a new DocumentDimensions. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IVideoClassificationAnnotation); + constructor(properties?: google.cloud.automl.v1beta1.IDocumentDimensions); - /** VideoClassificationAnnotation type. */ - public type: string; + /** DocumentDimensions unit. */ + public unit: (google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit); - /** VideoClassificationAnnotation classificationAnnotation. */ - public classificationAnnotation?: (google.cloud.automl.v1beta1.IClassificationAnnotation|null); + /** DocumentDimensions width. */ + public width: number; - /** VideoClassificationAnnotation timeSegment. */ - public timeSegment?: (google.cloud.automl.v1beta1.ITimeSegment|null); + /** DocumentDimensions height. */ + public height: number; /** - * Creates a new VideoClassificationAnnotation instance using the specified properties. + * Creates a new DocumentDimensions instance using the specified properties. * @param [properties] Properties to set - * @returns VideoClassificationAnnotation instance + * @returns DocumentDimensions instance */ - public static create(properties?: google.cloud.automl.v1beta1.IVideoClassificationAnnotation): google.cloud.automl.v1beta1.VideoClassificationAnnotation; + public static create(properties?: google.cloud.automl.v1beta1.IDocumentDimensions): google.cloud.automl.v1beta1.DocumentDimensions; /** - * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. - * @param message VideoClassificationAnnotation message or plain object to encode + * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. + * @param message DocumentDimensions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. - * @param message VideoClassificationAnnotation message or plain object to encode + * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. + * @param message DocumentDimensions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. + * Decodes a DocumentDimensions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoClassificationAnnotation + * @returns DocumentDimensions * @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.automl.v1beta1.VideoClassificationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DocumentDimensions; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoClassificationAnnotation + * @returns DocumentDimensions * @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.automl.v1beta1.VideoClassificationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DocumentDimensions; /** - * Verifies a VideoClassificationAnnotation message. + * Verifies a DocumentDimensions 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 VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentDimensions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoClassificationAnnotation + * @returns DocumentDimensions */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoClassificationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DocumentDimensions; /** - * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. - * @param message VideoClassificationAnnotation + * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. + * @param message DocumentDimensions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.VideoClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DocumentDimensions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoClassificationAnnotation to JSON. + * Converts this DocumentDimensions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ClassificationEvaluationMetrics. */ - interface IClassificationEvaluationMetrics { + namespace DocumentDimensions { - /** ClassificationEvaluationMetrics auPrc */ - auPrc?: (number|null); + /** DocumentDimensionUnit enum. */ + enum DocumentDimensionUnit { + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0, + INCH = 1, + CENTIMETER = 2, + POINT = 3 + } + } - /** ClassificationEvaluationMetrics baseAuPrc */ - baseAuPrc?: (number|null); + /** Properties of a Document. */ + interface IDocument { - /** ClassificationEvaluationMetrics auRoc */ - auRoc?: (number|null); + /** Document inputConfig */ + inputConfig?: (google.cloud.automl.v1beta1.IDocumentInputConfig|null); - /** ClassificationEvaluationMetrics logLoss */ - logLoss?: (number|null); + /** Document documentText */ + documentText?: (google.cloud.automl.v1beta1.ITextSnippet|null); - /** ClassificationEvaluationMetrics confidenceMetricsEntry */ - confidenceMetricsEntry?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]|null); + /** Document layout */ + layout?: (google.cloud.automl.v1beta1.Document.ILayout[]|null); - /** ClassificationEvaluationMetrics confusionMatrix */ - confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + /** Document documentDimensions */ + documentDimensions?: (google.cloud.automl.v1beta1.IDocumentDimensions|null); - /** ClassificationEvaluationMetrics annotationSpecId */ - annotationSpecId?: (string[]|null); + /** Document pageCount */ + pageCount?: (number|null); } - /** Represents a ClassificationEvaluationMetrics. */ - class ClassificationEvaluationMetrics implements IClassificationEvaluationMetrics { + /** Represents a Document. */ + class Document implements IDocument { /** - * Constructs a new ClassificationEvaluationMetrics. + * Constructs a new Document. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics); - - /** ClassificationEvaluationMetrics auPrc. */ - public auPrc: number; - - /** ClassificationEvaluationMetrics baseAuPrc. */ - public baseAuPrc: number; + constructor(properties?: google.cloud.automl.v1beta1.IDocument); - /** ClassificationEvaluationMetrics auRoc. */ - public auRoc: number; + /** Document inputConfig. */ + public inputConfig?: (google.cloud.automl.v1beta1.IDocumentInputConfig|null); - /** ClassificationEvaluationMetrics logLoss. */ - public logLoss: number; + /** Document documentText. */ + public documentText?: (google.cloud.automl.v1beta1.ITextSnippet|null); - /** ClassificationEvaluationMetrics confidenceMetricsEntry. */ - public confidenceMetricsEntry: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry[]; + /** Document layout. */ + public layout: google.cloud.automl.v1beta1.Document.ILayout[]; - /** ClassificationEvaluationMetrics confusionMatrix. */ - public confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + /** Document documentDimensions. */ + public documentDimensions?: (google.cloud.automl.v1beta1.IDocumentDimensions|null); - /** ClassificationEvaluationMetrics annotationSpecId. */ - public annotationSpecId: string[]; + /** Document pageCount. */ + public pageCount: number; /** - * Creates a new ClassificationEvaluationMetrics instance using the specified properties. + * Creates a new Document instance using the specified properties. * @param [properties] Properties to set - * @returns ClassificationEvaluationMetrics instance + * @returns Document instance */ - public static create(properties?: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1beta1.IDocument): google.cloud.automl.v1beta1.Document; /** - * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. - * @param message ClassificationEvaluationMetrics message or plain object to encode + * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. + * @param message Document message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. - * @param message ClassificationEvaluationMetrics message or plain object to encode + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. + * @param message Document message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IClassificationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClassificationEvaluationMetrics + * @returns Document * @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.automl.v1beta1.ClassificationEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.Document; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClassificationEvaluationMetrics + * @returns Document * @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.automl.v1beta1.ClassificationEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.Document; /** - * Verifies a ClassificationEvaluationMetrics message. + * Verifies a Document 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 ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClassificationEvaluationMetrics + * @returns Document */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Document; /** - * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. - * @param message ClassificationEvaluationMetrics + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @param message Document * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClassificationEvaluationMetrics to JSON. + * Converts this Document to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ClassificationEvaluationMetrics { - - /** Properties of a ConfidenceMetricsEntry. */ - interface IConfidenceMetricsEntry { - - /** ConfidenceMetricsEntry confidenceThreshold */ - confidenceThreshold?: (number|null); - - /** ConfidenceMetricsEntry positionThreshold */ - positionThreshold?: (number|null); - - /** ConfidenceMetricsEntry recall */ - recall?: (number|null); - - /** ConfidenceMetricsEntry precision */ - precision?: (number|null); - - /** ConfidenceMetricsEntry falsePositiveRate */ - falsePositiveRate?: (number|null); - - /** ConfidenceMetricsEntry f1Score */ - f1Score?: (number|null); - - /** ConfidenceMetricsEntry recallAt1 */ - recallAt1?: (number|null); - - /** ConfidenceMetricsEntry precisionAt1 */ - precisionAt1?: (number|null); - - /** ConfidenceMetricsEntry falsePositiveRateAt1 */ - falsePositiveRateAt1?: (number|null); + namespace Document { - /** ConfidenceMetricsEntry f1ScoreAt1 */ - f1ScoreAt1?: (number|null); + /** Properties of a Layout. */ + interface ILayout { - /** ConfidenceMetricsEntry truePositiveCount */ - truePositiveCount?: (number|Long|string|null); + /** Layout textSegment */ + textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - /** ConfidenceMetricsEntry falsePositiveCount */ - falsePositiveCount?: (number|Long|string|null); + /** Layout pageNumber */ + pageNumber?: (number|null); - /** ConfidenceMetricsEntry falseNegativeCount */ - falseNegativeCount?: (number|Long|string|null); + /** Layout boundingPoly */ + boundingPoly?: (google.cloud.automl.v1beta1.IBoundingPoly|null); - /** ConfidenceMetricsEntry trueNegativeCount */ - trueNegativeCount?: (number|Long|string|null); + /** Layout textSegmentType */ + textSegmentType?: (google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|null); } - /** Represents a ConfidenceMetricsEntry. */ - class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { - - /** - * Constructs a new ConfidenceMetricsEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry); - - /** ConfidenceMetricsEntry confidenceThreshold. */ - public confidenceThreshold: number; - - /** ConfidenceMetricsEntry positionThreshold. */ - public positionThreshold: number; - - /** ConfidenceMetricsEntry recall. */ - public recall: number; - - /** ConfidenceMetricsEntry precision. */ - public precision: number; - - /** ConfidenceMetricsEntry falsePositiveRate. */ - public falsePositiveRate: number; - - /** ConfidenceMetricsEntry f1Score. */ - public f1Score: number; - - /** ConfidenceMetricsEntry recallAt1. */ - public recallAt1: number; - - /** ConfidenceMetricsEntry precisionAt1. */ - public precisionAt1: number; - - /** ConfidenceMetricsEntry falsePositiveRateAt1. */ - public falsePositiveRateAt1: number; - - /** ConfidenceMetricsEntry f1ScoreAt1. */ - public f1ScoreAt1: number; - - /** ConfidenceMetricsEntry truePositiveCount. */ - public truePositiveCount: (number|Long|string); - - /** ConfidenceMetricsEntry falsePositiveCount. */ - public falsePositiveCount: (number|Long|string); - - /** ConfidenceMetricsEntry falseNegativeCount. */ - public falseNegativeCount: (number|Long|string); - - /** ConfidenceMetricsEntry trueNegativeCount. */ - public trueNegativeCount: (number|Long|string); + /** Represents a Layout. */ + class Layout implements ILayout { /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * Constructs a new Layout. * @param [properties] Properties to set - * @returns ConfidenceMetricsEntry instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidenceMetricsEntry - * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidenceMetricsEntry - * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidenceMetricsEntry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @param message ConfidenceMetricsEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @returns JSON object */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConfusionMatrix. */ - interface IConfusionMatrix { - - /** ConfusionMatrix annotationSpecId */ - annotationSpecId?: (string[]|null); - - /** ConfusionMatrix displayName */ - displayName?: (string[]|null); - - /** ConfusionMatrix row */ - row?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]|null); - } - - /** Represents a ConfusionMatrix. */ - class ConfusionMatrix implements IConfusionMatrix { + constructor(properties?: google.cloud.automl.v1beta1.Document.ILayout); - /** - * Constructs a new ConfusionMatrix. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix); + /** Layout textSegment. */ + public textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - /** ConfusionMatrix annotationSpecId. */ - public annotationSpecId: string[]; + /** Layout pageNumber. */ + public pageNumber: number; - /** ConfusionMatrix displayName. */ - public displayName: string[]; + /** Layout boundingPoly. */ + public boundingPoly?: (google.cloud.automl.v1beta1.IBoundingPoly|null); - /** ConfusionMatrix row. */ - public row: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow[]; + /** Layout textSegmentType. */ + public textSegmentType: (google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1beta1.Document.Layout.TextSegmentType); /** - * Creates a new ConfusionMatrix instance using the specified properties. + * Creates a new Layout instance using the specified properties. * @param [properties] Properties to set - * @returns ConfusionMatrix instance + * @returns Layout instance */ - public static create(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; + public static create(properties?: google.cloud.automl.v1beta1.Document.ILayout): google.cloud.automl.v1beta1.Document.Layout; /** - * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @param message ConfusionMatrix message or plain object to encode + * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. + * @param message Layout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @param message ConfusionMatrix message or plain object to encode + * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. + * @param message Layout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConfusionMatrix message from the specified reader or buffer. + * Decodes a Layout message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConfusionMatrix + * @returns Layout * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.Document.Layout; /** - * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. + * Decodes a Layout message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConfusionMatrix + * @returns Layout * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.Document.Layout; /** - * Verifies a ConfusionMatrix message. + * Verifies a Layout 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 ConfusionMatrix message from a plain object. Also converts values to their respective internal types. + * Creates a Layout message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConfusionMatrix + * @returns Layout */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Document.Layout; /** - * Creates a plain object from a ConfusionMatrix message. Also converts values to other types if specified. - * @param message ConfusionMatrix + * Creates a plain object from a Layout message. Also converts values to other types if specified. + * @param message Layout * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.Document.Layout, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConfusionMatrix to JSON. + * Converts this Layout to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ConfusionMatrix { - - /** Properties of a Row. */ - interface IRow { + namespace Layout { - /** Row exampleCount */ - exampleCount?: (number[]|null); + /** TextSegmentType enum. */ + enum TextSegmentType { + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0, + TOKEN = 1, + PARAGRAPH = 2, + FORM_FIELD = 3, + FORM_FIELD_NAME = 4, + FORM_FIELD_CONTENTS = 5, + TABLE = 6, + TABLE_HEADER = 7, + TABLE_ROW = 8, + TABLE_CELL = 9 } + } + } - /** Represents a Row. */ - class Row implements IRow { + /** Properties of a Row. */ + interface IRow { - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow); + /** Row columnSpecIds */ + columnSpecIds?: (string[]|null); - /** Row exampleCount. */ - public exampleCount: number[]; + /** Row values */ + values?: (google.protobuf.IValue[]|null); + } - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** Represents a Row. */ + class Row implements IRow { - /** - * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IRow); - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** Row columnSpecIds. */ + public columnSpecIds: string[]; - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** Row values. */ + public values: google.protobuf.IValue[]; - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.cloud.automl.v1beta1.IRow): google.cloud.automl.v1beta1.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.automl.v1beta1.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.automl.v1beta1.Row; + + /** + * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExamplePayload. */ + interface IExamplePayload { + + /** ExamplePayload image */ + image?: (google.cloud.automl.v1beta1.IImage|null); + + /** ExamplePayload textSnippet */ + textSnippet?: (google.cloud.automl.v1beta1.ITextSnippet|null); + + /** ExamplePayload document */ + document?: (google.cloud.automl.v1beta1.IDocument|null); + + /** ExamplePayload row */ + row?: (google.cloud.automl.v1beta1.IRow|null); + } + + /** Represents an ExamplePayload. */ + class ExamplePayload implements IExamplePayload { + + /** + * Constructs a new ExamplePayload. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IExamplePayload); + + /** ExamplePayload image. */ + public image?: (google.cloud.automl.v1beta1.IImage|null); + + /** ExamplePayload textSnippet. */ + public textSnippet?: (google.cloud.automl.v1beta1.ITextSnippet|null); + + /** ExamplePayload document. */ + public document?: (google.cloud.automl.v1beta1.IDocument|null); + + /** ExamplePayload row. */ + public row?: (google.cloud.automl.v1beta1.IRow|null); + + /** ExamplePayload payload. */ + public payload?: ("image"|"textSnippet"|"document"|"row"); + + /** + * Creates a new ExamplePayload instance using the specified properties. + * @param [properties] Properties to set + * @returns ExamplePayload instance + */ + public static create(properties?: google.cloud.automl.v1beta1.IExamplePayload): google.cloud.automl.v1beta1.ExamplePayload; + + /** + * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. + * @param message ExamplePayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. + * @param message ExamplePayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExamplePayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExamplePayload + * @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.automl.v1beta1.ExamplePayload; + + /** + * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExamplePayload + * @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.automl.v1beta1.ExamplePayload; - /** - * Verifies a Row 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); + /** + * Verifies an ExamplePayload 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 Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row; + /** + * Creates an ExamplePayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExamplePayload + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExamplePayload; - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. + * @param message ExamplePayload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ExamplePayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Converts this ExamplePayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a TimeSegment. */ - interface ITimeSegment { + /** Properties of an InputConfig. */ + interface IInputConfig { - /** TimeSegment startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); + /** InputConfig gcsSource */ + gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); - /** TimeSegment endTimeOffset */ - endTimeOffset?: (google.protobuf.IDuration|null); + /** InputConfig bigquerySource */ + bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); + + /** InputConfig params */ + params?: ({ [k: string]: string }|null); } - /** Represents a TimeSegment. */ - class TimeSegment implements ITimeSegment { + /** Represents an InputConfig. */ + class InputConfig implements IInputConfig { /** - * Constructs a new TimeSegment. + * Constructs a new InputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITimeSegment); + constructor(properties?: google.cloud.automl.v1beta1.IInputConfig); - /** TimeSegment startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); + /** InputConfig gcsSource. */ + public gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); - /** TimeSegment endTimeOffset. */ - public endTimeOffset?: (google.protobuf.IDuration|null); + /** InputConfig bigquerySource. */ + public bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); + + /** InputConfig params. */ + public params: { [k: string]: string }; + + /** InputConfig source. */ + public source?: ("gcsSource"|"bigquerySource"); /** - * Creates a new TimeSegment instance using the specified properties. + * Creates a new InputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns TimeSegment instance + * @returns InputConfig instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITimeSegment): google.cloud.automl.v1beta1.TimeSegment; + public static create(properties?: google.cloud.automl.v1beta1.IInputConfig): google.cloud.automl.v1beta1.InputConfig; /** - * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. - * @param message TimeSegment message or plain object to encode + * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. + * @param message InputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. - * @param message TimeSegment message or plain object to encode + * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. + * @param message InputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeSegment message from the specified reader or buffer. + * Decodes an InputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeSegment + * @returns InputConfig * @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.automl.v1beta1.TimeSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.InputConfig; /** - * Decodes a TimeSegment message from the specified reader or buffer, length delimited. + * Decodes an InputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeSegment + * @returns InputConfig * @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.automl.v1beta1.TimeSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.InputConfig; /** - * Verifies a TimeSegment message. + * Verifies an InputConfig 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 TimeSegment message from a plain object. Also converts values to their respective internal types. + * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeSegment + * @returns InputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TimeSegment; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.InputConfig; /** - * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. - * @param message TimeSegment + * Creates a plain object from an InputConfig message. Also converts values to other types if specified. + * @param message InputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TimeSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.InputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeSegment to JSON. + * Converts this InputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionAnnotation. */ - interface IImageObjectDetectionAnnotation { + /** Properties of a BatchPredictInputConfig. */ + interface IBatchPredictInputConfig { - /** ImageObjectDetectionAnnotation boundingBox */ - boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); + /** BatchPredictInputConfig gcsSource */ + gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); - /** ImageObjectDetectionAnnotation score */ - score?: (number|null); + /** BatchPredictInputConfig bigquerySource */ + bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); } - /** Represents an ImageObjectDetectionAnnotation. */ - class ImageObjectDetectionAnnotation implements IImageObjectDetectionAnnotation { + /** Represents a BatchPredictInputConfig. */ + class BatchPredictInputConfig implements IBatchPredictInputConfig { /** - * Constructs a new ImageObjectDetectionAnnotation. + * Constructs a new BatchPredictInputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation); + constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictInputConfig); - /** ImageObjectDetectionAnnotation boundingBox. */ - public boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); + /** BatchPredictInputConfig gcsSource. */ + public gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); - /** ImageObjectDetectionAnnotation score. */ - public score: number; + /** BatchPredictInputConfig bigquerySource. */ + public bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); + + /** BatchPredictInputConfig source. */ + public source?: ("gcsSource"|"bigquerySource"); /** - * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. + * Creates a new BatchPredictInputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ImageObjectDetectionAnnotation instance + * @returns BatchPredictInputConfig instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation): google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation; + public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictInputConfig): google.cloud.automl.v1beta1.BatchPredictInputConfig; /** - * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. - * @param message ImageObjectDetectionAnnotation message or plain object to encode + * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. + * @param message BatchPredictInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. - * @param message ImageObjectDetectionAnnotation message or plain object to encode + * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. + * @param message BatchPredictInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. + * Decodes a BatchPredictInputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionAnnotation + * @returns BatchPredictInputConfig * @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.automl.v1beta1.ImageObjectDetectionAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BatchPredictInputConfig; /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionAnnotation + * @returns BatchPredictInputConfig * @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.automl.v1beta1.ImageObjectDetectionAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BatchPredictInputConfig; /** - * Verifies an ImageObjectDetectionAnnotation message. + * Verifies a BatchPredictInputConfig 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 ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageObjectDetectionAnnotation + * @returns BatchPredictInputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictInputConfig; /** - * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. - * @param message ImageObjectDetectionAnnotation + * Creates a plain object from a BatchPredictInputConfig message. Also converts values to other types if specified. + * @param message BatchPredictInputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.BatchPredictInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageObjectDetectionAnnotation to JSON. + * Converts this BatchPredictInputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoObjectTrackingAnnotation. */ - interface IVideoObjectTrackingAnnotation { - - /** VideoObjectTrackingAnnotation instanceId */ - instanceId?: (string|null); - - /** VideoObjectTrackingAnnotation timeOffset */ - timeOffset?: (google.protobuf.IDuration|null); - - /** VideoObjectTrackingAnnotation boundingBox */ - boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); + /** Properties of a DocumentInputConfig. */ + interface IDocumentInputConfig { - /** VideoObjectTrackingAnnotation score */ - score?: (number|null); + /** DocumentInputConfig gcsSource */ + gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); } - /** Represents a VideoObjectTrackingAnnotation. */ - class VideoObjectTrackingAnnotation implements IVideoObjectTrackingAnnotation { + /** Represents a DocumentInputConfig. */ + class DocumentInputConfig implements IDocumentInputConfig { /** - * Constructs a new VideoObjectTrackingAnnotation. + * Constructs a new DocumentInputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation); - - /** VideoObjectTrackingAnnotation instanceId. */ - public instanceId: string; - - /** VideoObjectTrackingAnnotation timeOffset. */ - public timeOffset?: (google.protobuf.IDuration|null); - - /** VideoObjectTrackingAnnotation boundingBox. */ - public boundingBox?: (google.cloud.automl.v1beta1.IBoundingPoly|null); + constructor(properties?: google.cloud.automl.v1beta1.IDocumentInputConfig); - /** VideoObjectTrackingAnnotation score. */ - public score: number; + /** DocumentInputConfig gcsSource. */ + public gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); /** - * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. + * Creates a new DocumentInputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns VideoObjectTrackingAnnotation instance + * @returns DocumentInputConfig instance */ - public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation): google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation; + public static create(properties?: google.cloud.automl.v1beta1.IDocumentInputConfig): google.cloud.automl.v1beta1.DocumentInputConfig; /** - * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. - * @param message VideoObjectTrackingAnnotation message or plain object to encode + * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. + * @param message DocumentInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. - * @param message VideoObjectTrackingAnnotation message or plain object to encode + * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. + * @param message DocumentInputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. + * Decodes a DocumentInputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoObjectTrackingAnnotation + * @returns DocumentInputConfig * @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.automl.v1beta1.VideoObjectTrackingAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DocumentInputConfig; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. + * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoObjectTrackingAnnotation + * @returns DocumentInputConfig * @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.automl.v1beta1.VideoObjectTrackingAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DocumentInputConfig; /** - * Verifies a VideoObjectTrackingAnnotation message. + * Verifies a DocumentInputConfig 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 VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoObjectTrackingAnnotation + * @returns DocumentInputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DocumentInputConfig; /** - * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. - * @param message VideoObjectTrackingAnnotation + * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. + * @param message DocumentInputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DocumentInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoObjectTrackingAnnotation to JSON. + * Converts this DocumentInputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BoundingBoxMetricsEntry. */ - interface IBoundingBoxMetricsEntry { - - /** BoundingBoxMetricsEntry iouThreshold */ - iouThreshold?: (number|null); + /** Properties of an OutputConfig. */ + interface IOutputConfig { - /** BoundingBoxMetricsEntry meanAveragePrecision */ - meanAveragePrecision?: (number|null); + /** OutputConfig gcsDestination */ + gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - /** BoundingBoxMetricsEntry confidenceMetricsEntries */ - confidenceMetricsEntries?: (google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]|null); + /** OutputConfig bigqueryDestination */ + bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); } - /** Represents a BoundingBoxMetricsEntry. */ - class BoundingBoxMetricsEntry implements IBoundingBoxMetricsEntry { + /** Represents an OutputConfig. */ + class OutputConfig implements IOutputConfig { /** - * Constructs a new BoundingBoxMetricsEntry. + * Constructs a new OutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry); + constructor(properties?: google.cloud.automl.v1beta1.IOutputConfig); - /** BoundingBoxMetricsEntry iouThreshold. */ - public iouThreshold: number; + /** OutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - /** BoundingBoxMetricsEntry meanAveragePrecision. */ - public meanAveragePrecision: number; + /** OutputConfig bigqueryDestination. */ + public bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); - /** BoundingBoxMetricsEntry confidenceMetricsEntries. */ - public confidenceMetricsEntries: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry[]; + /** OutputConfig destination. */ + public destination?: ("gcsDestination"|"bigqueryDestination"); /** - * Creates a new BoundingBoxMetricsEntry instance using the specified properties. + * Creates a new OutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns BoundingBoxMetricsEntry instance + * @returns OutputConfig instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry; + public static create(properties?: google.cloud.automl.v1beta1.IOutputConfig): google.cloud.automl.v1beta1.OutputConfig; /** - * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. - * @param message BoundingBoxMetricsEntry message or plain object to encode + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. - * @param message BoundingBoxMetricsEntry message or plain object to encode + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BoundingBoxMetricsEntry + * @returns OutputConfig * @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.automl.v1beta1.BoundingBoxMetricsEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.OutputConfig; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BoundingBoxMetricsEntry + * @returns OutputConfig * @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.automl.v1beta1.BoundingBoxMetricsEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.OutputConfig; /** - * Verifies a BoundingBoxMetricsEntry message. + * Verifies an OutputConfig 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 BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BoundingBoxMetricsEntry + * @returns OutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.OutputConfig; /** - * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. - * @param message BoundingBoxMetricsEntry + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * @param message OutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BoundingBoxMetricsEntry to JSON. + * Converts this OutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BoundingBoxMetricsEntry { - - /** Properties of a ConfidenceMetricsEntry. */ - interface IConfidenceMetricsEntry { - - /** ConfidenceMetricsEntry confidenceThreshold */ - confidenceThreshold?: (number|null); - - /** ConfidenceMetricsEntry recall */ - recall?: (number|null); - - /** ConfidenceMetricsEntry precision */ - precision?: (number|null); - - /** ConfidenceMetricsEntry f1Score */ - f1Score?: (number|null); - } + /** Properties of a BatchPredictOutputConfig. */ + interface IBatchPredictOutputConfig { - /** Represents a ConfidenceMetricsEntry. */ - class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { + /** BatchPredictOutputConfig gcsDestination */ + gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - /** - * Constructs a new ConfidenceMetricsEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry); + /** BatchPredictOutputConfig bigqueryDestination */ + bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); + } - /** ConfidenceMetricsEntry confidenceThreshold. */ - public confidenceThreshold: number; + /** Represents a BatchPredictOutputConfig. */ + class BatchPredictOutputConfig implements IBatchPredictOutputConfig { - /** ConfidenceMetricsEntry recall. */ - public recall: number; + /** + * Constructs a new BatchPredictOutputConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictOutputConfig); - /** ConfidenceMetricsEntry precision. */ - public precision: number; + /** BatchPredictOutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - /** ConfidenceMetricsEntry f1Score. */ - public f1Score: number; + /** BatchPredictOutputConfig bigqueryDestination. */ + public bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidenceMetricsEntry instance - */ - public static create(properties?: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + /** BatchPredictOutputConfig destination. */ + public destination?: ("gcsDestination"|"bigqueryDestination"); - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new BatchPredictOutputConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchPredictOutputConfig instance + */ + public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictOutputConfig): google.cloud.automl.v1beta1.BatchPredictOutputConfig; - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. + * @param message BatchPredictOutputConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidenceMetricsEntry - * @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.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + /** + * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. + * @param message BatchPredictOutputConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidenceMetricsEntry - * @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.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + /** + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchPredictOutputConfig + * @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.automl.v1beta1.BatchPredictOutputConfig; - /** - * Verifies a ConfidenceMetricsEntry 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); + /** + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchPredictOutputConfig + * @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.automl.v1beta1.BatchPredictOutputConfig; - /** - * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidenceMetricsEntry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry; + /** + * Verifies a BatchPredictOutputConfig 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 plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @param message ConfidenceMetricsEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchPredictOutputConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictOutputConfig; - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. + * @param message BatchPredictOutputConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.BatchPredictOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchPredictOutputConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionEvaluationMetrics. */ - interface IImageObjectDetectionEvaluationMetrics { + /** Properties of a ModelExportOutputConfig. */ + interface IModelExportOutputConfig { - /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount */ - evaluatedBoundingBoxCount?: (number|null); + /** ModelExportOutputConfig gcsDestination */ + gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries */ - boundingBoxMetricsEntries?: (google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]|null); + /** ModelExportOutputConfig gcrDestination */ + gcrDestination?: (google.cloud.automl.v1beta1.IGcrDestination|null); - /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision */ - boundingBoxMeanAveragePrecision?: (number|null); + /** ModelExportOutputConfig modelFormat */ + modelFormat?: (string|null); + + /** ModelExportOutputConfig params */ + params?: ({ [k: string]: string }|null); } - /** Represents an ImageObjectDetectionEvaluationMetrics. */ - class ImageObjectDetectionEvaluationMetrics implements IImageObjectDetectionEvaluationMetrics { + /** Represents a ModelExportOutputConfig. */ + class ModelExportOutputConfig implements IModelExportOutputConfig { /** - * Constructs a new ImageObjectDetectionEvaluationMetrics. + * Constructs a new ModelExportOutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics); + constructor(properties?: google.cloud.automl.v1beta1.IModelExportOutputConfig); - /** ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. */ - public evaluatedBoundingBoxCount: number; + /** ModelExportOutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - /** ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. */ - public boundingBoxMetricsEntries: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]; + /** ModelExportOutputConfig gcrDestination. */ + public gcrDestination?: (google.cloud.automl.v1beta1.IGcrDestination|null); - /** ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. */ - public boundingBoxMeanAveragePrecision: number; + /** ModelExportOutputConfig modelFormat. */ + public modelFormat: string; + + /** ModelExportOutputConfig params. */ + public params: { [k: string]: string }; + + /** ModelExportOutputConfig destination. */ + public destination?: ("gcsDestination"|"gcrDestination"); /** - * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. + * Creates a new ModelExportOutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ImageObjectDetectionEvaluationMetrics instance + * @returns ModelExportOutputConfig instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics): google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1beta1.IModelExportOutputConfig): google.cloud.automl.v1beta1.ModelExportOutputConfig; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. - * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. + * @param message ModelExportOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. - * @param message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. + * @param message ModelExportOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionEvaluationMetrics + * @returns ModelExportOutputConfig * @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.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ModelExportOutputConfig; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionEvaluationMetrics + * @returns ModelExportOutputConfig * @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.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ModelExportOutputConfig; /** - * Verifies an ImageObjectDetectionEvaluationMetrics message. + * Verifies a ModelExportOutputConfig 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 ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageObjectDetectionEvaluationMetrics + * @returns ModelExportOutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ModelExportOutputConfig; /** - * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. - * @param message ImageObjectDetectionEvaluationMetrics + * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. + * @param message ModelExportOutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ModelExportOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageObjectDetectionEvaluationMetrics to JSON. + * Converts this ModelExportOutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoObjectTrackingEvaluationMetrics. */ - interface IVideoObjectTrackingEvaluationMetrics { - - /** VideoObjectTrackingEvaluationMetrics evaluatedFrameCount */ - evaluatedFrameCount?: (number|null); - - /** VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount */ - evaluatedBoundingBoxCount?: (number|null); - - /** VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries */ - boundingBoxMetricsEntries?: (google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]|null); + /** Properties of an ExportEvaluatedExamplesOutputConfig. */ + interface IExportEvaluatedExamplesOutputConfig { - /** VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision */ - boundingBoxMeanAveragePrecision?: (number|null); + /** ExportEvaluatedExamplesOutputConfig bigqueryDestination */ + bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); } - /** Represents a VideoObjectTrackingEvaluationMetrics. */ - class VideoObjectTrackingEvaluationMetrics implements IVideoObjectTrackingEvaluationMetrics { + /** Represents an ExportEvaluatedExamplesOutputConfig. */ + class ExportEvaluatedExamplesOutputConfig implements IExportEvaluatedExamplesOutputConfig { /** - * Constructs a new VideoObjectTrackingEvaluationMetrics. + * Constructs a new ExportEvaluatedExamplesOutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics); - - /** VideoObjectTrackingEvaluationMetrics evaluatedFrameCount. */ - public evaluatedFrameCount: number; - - /** VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount. */ - public evaluatedBoundingBoxCount: number; + constructor(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig); - /** VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries. */ - public boundingBoxMetricsEntries: google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry[]; + /** ExportEvaluatedExamplesOutputConfig bigqueryDestination. */ + public bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); - /** VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision. */ - public boundingBoxMeanAveragePrecision: number; + /** ExportEvaluatedExamplesOutputConfig destination. */ + public destination?: "bigqueryDestination"; /** - * Creates a new VideoObjectTrackingEvaluationMetrics instance using the specified properties. + * Creates a new ExportEvaluatedExamplesOutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns VideoObjectTrackingEvaluationMetrics instance + * @returns ExportEvaluatedExamplesOutputConfig instance */ - public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics): google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; /** - * Encodes the specified VideoObjectTrackingEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. - * @param message VideoObjectTrackingEvaluationMetrics message or plain object to encode + * Encodes the specified ExportEvaluatedExamplesOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. + * @param message ExportEvaluatedExamplesOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoObjectTrackingEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. - * @param message VideoObjectTrackingEvaluationMetrics message or plain object to encode + * Encodes the specified ExportEvaluatedExamplesOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. + * @param message ExportEvaluatedExamplesOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer. + * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoObjectTrackingEvaluationMetrics + * @returns ExportEvaluatedExamplesOutputConfig * @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.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; /** - * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoObjectTrackingEvaluationMetrics + * @returns ExportEvaluatedExamplesOutputConfig * @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.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; /** - * Verifies a VideoObjectTrackingEvaluationMetrics message. + * Verifies an ExportEvaluatedExamplesOutputConfig 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 VideoObjectTrackingEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEvaluatedExamplesOutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoObjectTrackingEvaluationMetrics + * @returns ExportEvaluatedExamplesOutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; /** - * Creates a plain object from a VideoObjectTrackingEvaluationMetrics message. Also converts values to other types if specified. - * @param message VideoObjectTrackingEvaluationMetrics + * Creates a plain object from an ExportEvaluatedExamplesOutputConfig message. Also converts values to other types if specified. + * @param message ExportEvaluatedExamplesOutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoObjectTrackingEvaluationMetrics to JSON. + * Converts this ExportEvaluatedExamplesOutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a NormalizedVertex. */ - interface INormalizedVertex { - - /** NormalizedVertex x */ - x?: (number|null); + /** Properties of a GcsSource. */ + interface IGcsSource { - /** NormalizedVertex y */ - y?: (number|null); + /** GcsSource inputUris */ + inputUris?: (string[]|null); } - /** Represents a NormalizedVertex. */ - class NormalizedVertex implements INormalizedVertex { + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { /** - * Constructs a new NormalizedVertex. + * Constructs a new GcsSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.INormalizedVertex); - - /** NormalizedVertex x. */ - public x: number; + constructor(properties?: google.cloud.automl.v1beta1.IGcsSource); - /** NormalizedVertex y. */ - public y: number; + /** GcsSource inputUris. */ + public inputUris: string[]; /** - * Creates a new NormalizedVertex instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @param [properties] Properties to set - * @returns NormalizedVertex instance + * @returns GcsSource instance */ - public static create(properties?: google.cloud.automl.v1beta1.INormalizedVertex): google.cloud.automl.v1beta1.NormalizedVertex; + public static create(properties?: google.cloud.automl.v1beta1.IGcsSource): google.cloud.automl.v1beta1.GcsSource; /** - * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. - * @param message NormalizedVertex message or plain object to encode + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. - * @param message NormalizedVertex message or plain object to encode + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NormalizedVertex message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NormalizedVertex + * @returns GcsSource * @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.automl.v1beta1.NormalizedVertex; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GcsSource; /** - * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NormalizedVertex + * @returns GcsSource * @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.automl.v1beta1.NormalizedVertex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GcsSource; /** - * Verifies a NormalizedVertex message. + * Verifies a GcsSource 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 NormalizedVertex message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NormalizedVertex + * @returns GcsSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.NormalizedVertex; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GcsSource; /** - * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. - * @param message NormalizedVertex + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NormalizedVertex to JSON. + * Converts this GcsSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BoundingPoly. */ - interface IBoundingPoly { + /** Properties of a BigQuerySource. */ + interface IBigQuerySource { - /** BoundingPoly normalizedVertices */ - normalizedVertices?: (google.cloud.automl.v1beta1.INormalizedVertex[]|null); + /** BigQuerySource inputUri */ + inputUri?: (string|null); } - /** Represents a BoundingPoly. */ - class BoundingPoly implements IBoundingPoly { + /** Represents a BigQuerySource. */ + class BigQuerySource implements IBigQuerySource { /** - * Constructs a new BoundingPoly. + * Constructs a new BigQuerySource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBoundingPoly); + constructor(properties?: google.cloud.automl.v1beta1.IBigQuerySource); - /** BoundingPoly normalizedVertices. */ - public normalizedVertices: google.cloud.automl.v1beta1.INormalizedVertex[]; + /** BigQuerySource inputUri. */ + public inputUri: string; /** - * Creates a new BoundingPoly instance using the specified properties. + * Creates a new BigQuerySource instance using the specified properties. * @param [properties] Properties to set - * @returns BoundingPoly instance + * @returns BigQuerySource instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBoundingPoly): google.cloud.automl.v1beta1.BoundingPoly; + public static create(properties?: google.cloud.automl.v1beta1.IBigQuerySource): google.cloud.automl.v1beta1.BigQuerySource; /** - * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. - * @param message BoundingPoly message or plain object to encode + * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. + * @param message BigQuerySource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. - * @param message BoundingPoly message or plain object to encode + * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. + * @param message BigQuerySource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BoundingPoly message from the specified reader or buffer. + * Decodes a BigQuerySource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BoundingPoly + * @returns BigQuerySource * @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.automl.v1beta1.BoundingPoly; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BigQuerySource; /** - * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. + * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BoundingPoly + * @returns BigQuerySource * @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.automl.v1beta1.BoundingPoly; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BigQuerySource; /** - * Verifies a BoundingPoly message. + * Verifies a BigQuerySource 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 BoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BoundingPoly + * @returns BigQuerySource */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BoundingPoly; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BigQuerySource; /** - * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. - * @param message BoundingPoly + * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. + * @param message BigQuerySource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.BigQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BoundingPoly to JSON. + * Converts this BigQuerySource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TablesDatasetMetadata. */ - interface ITablesDatasetMetadata { - - /** TablesDatasetMetadata primaryTableSpecId */ - primaryTableSpecId?: (string|null); - - /** TablesDatasetMetadata targetColumnSpecId */ - targetColumnSpecId?: (string|null); - - /** TablesDatasetMetadata weightColumnSpecId */ - weightColumnSpecId?: (string|null); - - /** TablesDatasetMetadata mlUseColumnSpecId */ - mlUseColumnSpecId?: (string|null); - - /** TablesDatasetMetadata targetColumnCorrelations */ - targetColumnCorrelations?: ({ [k: string]: google.cloud.automl.v1beta1.ICorrelationStats }|null); + /** Properties of a GcsDestination. */ + interface IGcsDestination { - /** TablesDatasetMetadata statsUpdateTime */ - statsUpdateTime?: (google.protobuf.ITimestamp|null); + /** GcsDestination outputUriPrefix */ + outputUriPrefix?: (string|null); } - /** Represents a TablesDatasetMetadata. */ - class TablesDatasetMetadata implements ITablesDatasetMetadata { + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { /** - * Constructs a new TablesDatasetMetadata. + * Constructs a new GcsDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITablesDatasetMetadata); - - /** TablesDatasetMetadata primaryTableSpecId. */ - public primaryTableSpecId: string; - - /** TablesDatasetMetadata targetColumnSpecId. */ - public targetColumnSpecId: string; - - /** TablesDatasetMetadata weightColumnSpecId. */ - public weightColumnSpecId: string; - - /** TablesDatasetMetadata mlUseColumnSpecId. */ - public mlUseColumnSpecId: string; - - /** TablesDatasetMetadata targetColumnCorrelations. */ - public targetColumnCorrelations: { [k: string]: google.cloud.automl.v1beta1.ICorrelationStats }; + constructor(properties?: google.cloud.automl.v1beta1.IGcsDestination); - /** TablesDatasetMetadata statsUpdateTime. */ - public statsUpdateTime?: (google.protobuf.ITimestamp|null); + /** GcsDestination outputUriPrefix. */ + public outputUriPrefix: string; /** - * Creates a new TablesDatasetMetadata instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @param [properties] Properties to set - * @returns TablesDatasetMetadata instance + * @returns GcsDestination instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITablesDatasetMetadata): google.cloud.automl.v1beta1.TablesDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IGcsDestination): google.cloud.automl.v1beta1.GcsDestination; /** - * Encodes the specified TablesDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. - * @param message TablesDatasetMetadata message or plain object to encode + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITablesDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TablesDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. - * @param message TablesDatasetMetadata message or plain object to encode + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TablesDatasetMetadata message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TablesDatasetMetadata + * @returns GcsDestination * @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.automl.v1beta1.TablesDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GcsDestination; /** - * Decodes a TablesDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TablesDatasetMetadata + * @returns GcsDestination * @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.automl.v1beta1.TablesDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GcsDestination; /** - * Verifies a TablesDatasetMetadata message. + * Verifies a GcsDestination 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 TablesDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TablesDatasetMetadata + * @returns GcsDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GcsDestination; /** - * Creates a plain object from a TablesDatasetMetadata message. Also converts values to other types if specified. - * @param message TablesDatasetMetadata + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TablesDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TablesDatasetMetadata to JSON. + * Converts this GcsDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TablesModelMetadata. */ - interface ITablesModelMetadata { - - /** TablesModelMetadata optimizationObjectiveRecallValue */ - optimizationObjectiveRecallValue?: (number|null); - - /** TablesModelMetadata optimizationObjectivePrecisionValue */ - optimizationObjectivePrecisionValue?: (number|null); - - /** TablesModelMetadata targetColumnSpec */ - targetColumnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); - - /** TablesModelMetadata inputFeatureColumnSpecs */ - inputFeatureColumnSpecs?: (google.cloud.automl.v1beta1.IColumnSpec[]|null); - - /** TablesModelMetadata optimizationObjective */ - optimizationObjective?: (string|null); - - /** TablesModelMetadata tablesModelColumnInfo */ - tablesModelColumnInfo?: (google.cloud.automl.v1beta1.ITablesModelColumnInfo[]|null); - - /** TablesModelMetadata trainBudgetMilliNodeHours */ - trainBudgetMilliNodeHours?: (number|Long|string|null); - - /** TablesModelMetadata trainCostMilliNodeHours */ - trainCostMilliNodeHours?: (number|Long|string|null); - - /** TablesModelMetadata disableEarlyStopping */ - disableEarlyStopping?: (boolean|null); - } - - /** Represents a TablesModelMetadata. */ - class TablesModelMetadata implements ITablesModelMetadata { - - /** - * Constructs a new TablesModelMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ITablesModelMetadata); - - /** TablesModelMetadata optimizationObjectiveRecallValue. */ - public optimizationObjectiveRecallValue: number; - - /** TablesModelMetadata optimizationObjectivePrecisionValue. */ - public optimizationObjectivePrecisionValue: number; - - /** TablesModelMetadata targetColumnSpec. */ - public targetColumnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); - - /** TablesModelMetadata inputFeatureColumnSpecs. */ - public inputFeatureColumnSpecs: google.cloud.automl.v1beta1.IColumnSpec[]; - - /** TablesModelMetadata optimizationObjective. */ - public optimizationObjective: string; - - /** TablesModelMetadata tablesModelColumnInfo. */ - public tablesModelColumnInfo: google.cloud.automl.v1beta1.ITablesModelColumnInfo[]; + /** Properties of a BigQueryDestination. */ + interface IBigQueryDestination { - /** TablesModelMetadata trainBudgetMilliNodeHours. */ - public trainBudgetMilliNodeHours: (number|Long|string); + /** BigQueryDestination outputUri */ + outputUri?: (string|null); + } - /** TablesModelMetadata trainCostMilliNodeHours. */ - public trainCostMilliNodeHours: (number|Long|string); + /** Represents a BigQueryDestination. */ + class BigQueryDestination implements IBigQueryDestination { - /** TablesModelMetadata disableEarlyStopping. */ - public disableEarlyStopping: boolean; + /** + * Constructs a new BigQueryDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IBigQueryDestination); - /** TablesModelMetadata additionalOptimizationObjectiveConfig. */ - public additionalOptimizationObjectiveConfig?: ("optimizationObjectiveRecallValue"|"optimizationObjectivePrecisionValue"); + /** BigQueryDestination outputUri. */ + public outputUri: string; /** - * Creates a new TablesModelMetadata instance using the specified properties. + * Creates a new BigQueryDestination instance using the specified properties. * @param [properties] Properties to set - * @returns TablesModelMetadata instance + * @returns BigQueryDestination instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITablesModelMetadata): google.cloud.automl.v1beta1.TablesModelMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IBigQueryDestination): google.cloud.automl.v1beta1.BigQueryDestination; /** - * Encodes the specified TablesModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. - * @param message TablesModelMetadata message or plain object to encode + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITablesModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TablesModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. - * @param message TablesModelMetadata message or plain object to encode + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TablesModelMetadata message from the specified reader or buffer. + * Decodes a BigQueryDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TablesModelMetadata + * @returns BigQueryDestination * @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.automl.v1beta1.TablesModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BigQueryDestination; /** - * Decodes a TablesModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TablesModelMetadata + * @returns BigQueryDestination * @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.automl.v1beta1.TablesModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BigQueryDestination; /** - * Verifies a TablesModelMetadata message. + * Verifies a BigQueryDestination 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 TablesModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TablesModelMetadata + * @returns BigQueryDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BigQueryDestination; /** - * Creates a plain object from a TablesModelMetadata message. Also converts values to other types if specified. - * @param message TablesModelMetadata + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @param message BigQueryDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TablesModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TablesModelMetadata to JSON. + * Converts this BigQueryDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TablesAnnotation. */ - interface ITablesAnnotation { - - /** TablesAnnotation score */ - score?: (number|null); - - /** TablesAnnotation predictionInterval */ - predictionInterval?: (google.cloud.automl.v1beta1.IDoubleRange|null); - - /** TablesAnnotation value */ - value?: (google.protobuf.IValue|null); - - /** TablesAnnotation tablesModelColumnInfo */ - tablesModelColumnInfo?: (google.cloud.automl.v1beta1.ITablesModelColumnInfo[]|null); + /** Properties of a GcrDestination. */ + interface IGcrDestination { - /** TablesAnnotation baselineScore */ - baselineScore?: (number|null); + /** GcrDestination outputUri */ + outputUri?: (string|null); } - /** Represents a TablesAnnotation. */ - class TablesAnnotation implements ITablesAnnotation { + /** Represents a GcrDestination. */ + class GcrDestination implements IGcrDestination { /** - * Constructs a new TablesAnnotation. + * Constructs a new GcrDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITablesAnnotation); - - /** TablesAnnotation score. */ - public score: number; - - /** TablesAnnotation predictionInterval. */ - public predictionInterval?: (google.cloud.automl.v1beta1.IDoubleRange|null); - - /** TablesAnnotation value. */ - public value?: (google.protobuf.IValue|null); - - /** TablesAnnotation tablesModelColumnInfo. */ - public tablesModelColumnInfo: google.cloud.automl.v1beta1.ITablesModelColumnInfo[]; + constructor(properties?: google.cloud.automl.v1beta1.IGcrDestination); - /** TablesAnnotation baselineScore. */ - public baselineScore: number; + /** GcrDestination outputUri. */ + public outputUri: string; /** - * Creates a new TablesAnnotation instance using the specified properties. + * Creates a new GcrDestination instance using the specified properties. * @param [properties] Properties to set - * @returns TablesAnnotation instance + * @returns GcrDestination instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITablesAnnotation): google.cloud.automl.v1beta1.TablesAnnotation; + public static create(properties?: google.cloud.automl.v1beta1.IGcrDestination): google.cloud.automl.v1beta1.GcrDestination; /** - * Encodes the specified TablesAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. - * @param message TablesAnnotation message or plain object to encode + * Encodes the specified GcrDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. + * @param message GcrDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITablesAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGcrDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TablesAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. - * @param message TablesAnnotation message or plain object to encode + * Encodes the specified GcrDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. + * @param message GcrDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGcrDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TablesAnnotation message from the specified reader or buffer. + * Decodes a GcrDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TablesAnnotation + * @returns GcrDestination * @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.automl.v1beta1.TablesAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GcrDestination; /** - * Decodes a TablesAnnotation message from the specified reader or buffer, length delimited. + * Decodes a GcrDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TablesAnnotation + * @returns GcrDestination * @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.automl.v1beta1.TablesAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GcrDestination; /** - * Verifies a TablesAnnotation message. + * Verifies a GcrDestination 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 TablesAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a GcrDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TablesAnnotation + * @returns GcrDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GcrDestination; /** - * Creates a plain object from a TablesAnnotation message. Also converts values to other types if specified. - * @param message TablesAnnotation + * Creates a plain object from a GcrDestination message. Also converts values to other types if specified. + * @param message GcrDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TablesAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GcrDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TablesAnnotation to JSON. + * Converts this GcrDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TablesModelColumnInfo. */ - interface ITablesModelColumnInfo { + /** Properties of a TextSegment. */ + interface ITextSegment { - /** TablesModelColumnInfo columnSpecName */ - columnSpecName?: (string|null); + /** TextSegment content */ + content?: (string|null); - /** TablesModelColumnInfo columnDisplayName */ - columnDisplayName?: (string|null); + /** TextSegment startOffset */ + startOffset?: (number|Long|string|null); - /** TablesModelColumnInfo featureImportance */ - featureImportance?: (number|null); + /** TextSegment endOffset */ + endOffset?: (number|Long|string|null); } - /** Represents a TablesModelColumnInfo. */ - class TablesModelColumnInfo implements ITablesModelColumnInfo { + /** Represents a TextSegment. */ + class TextSegment implements ITextSegment { /** - * Constructs a new TablesModelColumnInfo. + * Constructs a new TextSegment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITablesModelColumnInfo); + constructor(properties?: google.cloud.automl.v1beta1.ITextSegment); - /** TablesModelColumnInfo columnSpecName. */ - public columnSpecName: string; + /** TextSegment content. */ + public content: string; - /** TablesModelColumnInfo columnDisplayName. */ - public columnDisplayName: string; + /** TextSegment startOffset. */ + public startOffset: (number|Long|string); - /** TablesModelColumnInfo featureImportance. */ - public featureImportance: number; + /** TextSegment endOffset. */ + public endOffset: (number|Long|string); /** - * Creates a new TablesModelColumnInfo instance using the specified properties. + * Creates a new TextSegment instance using the specified properties. * @param [properties] Properties to set - * @returns TablesModelColumnInfo instance + * @returns TextSegment instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITablesModelColumnInfo): google.cloud.automl.v1beta1.TablesModelColumnInfo; + public static create(properties?: google.cloud.automl.v1beta1.ITextSegment): google.cloud.automl.v1beta1.TextSegment; /** - * Encodes the specified TablesModelColumnInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. - * @param message TablesModelColumnInfo message or plain object to encode + * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. + * @param message TextSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITablesModelColumnInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TablesModelColumnInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. - * @param message TablesModelColumnInfo message or plain object to encode + * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. + * @param message TextSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITablesModelColumnInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TablesModelColumnInfo message from the specified reader or buffer. + * Decodes a TextSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TablesModelColumnInfo + * @returns TextSegment * @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.automl.v1beta1.TablesModelColumnInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextSegment; /** - * Decodes a TablesModelColumnInfo message from the specified reader or buffer, length delimited. + * Decodes a TextSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TablesModelColumnInfo + * @returns TextSegment * @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.automl.v1beta1.TablesModelColumnInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextSegment; /** - * Verifies a TablesModelColumnInfo message. + * Verifies a TextSegment 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 TablesModelColumnInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TextSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TablesModelColumnInfo + * @returns TextSegment */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TablesModelColumnInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSegment; /** - * Creates a plain object from a TablesModelColumnInfo message. Also converts values to other types if specified. - * @param message TablesModelColumnInfo + * Creates a plain object from a TextSegment message. Also converts values to other types if specified. + * @param message TextSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TablesModelColumnInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TablesModelColumnInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ColumnSpec. */ - interface IColumnSpec { - - /** ColumnSpec name */ - name?: (string|null); - - /** ColumnSpec dataType */ - dataType?: (google.cloud.automl.v1beta1.IDataType|null); + public static toObject(message: google.cloud.automl.v1beta1.TextSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ColumnSpec displayName */ - displayName?: (string|null); + /** + * Converts this TextSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ColumnSpec dataStats */ - dataStats?: (google.cloud.automl.v1beta1.IDataStats|null); + /** Properties of a DoubleRange. */ + interface IDoubleRange { - /** ColumnSpec topCorrelatedColumns */ - topCorrelatedColumns?: (google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn[]|null); + /** DoubleRange start */ + start?: (number|null); - /** ColumnSpec etag */ - etag?: (string|null); + /** DoubleRange end */ + end?: (number|null); } - /** Represents a ColumnSpec. */ - class ColumnSpec implements IColumnSpec { + /** Represents a DoubleRange. */ + class DoubleRange implements IDoubleRange { /** - * Constructs a new ColumnSpec. + * Constructs a new DoubleRange. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IColumnSpec); - - /** ColumnSpec name. */ - public name: string; - - /** ColumnSpec dataType. */ - public dataType?: (google.cloud.automl.v1beta1.IDataType|null); - - /** ColumnSpec displayName. */ - public displayName: string; - - /** ColumnSpec dataStats. */ - public dataStats?: (google.cloud.automl.v1beta1.IDataStats|null); + constructor(properties?: google.cloud.automl.v1beta1.IDoubleRange); - /** ColumnSpec topCorrelatedColumns. */ - public topCorrelatedColumns: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn[]; + /** DoubleRange start. */ + public start: number; - /** ColumnSpec etag. */ - public etag: string; + /** DoubleRange end. */ + public end: number; /** - * Creates a new ColumnSpec instance using the specified properties. + * Creates a new DoubleRange instance using the specified properties. * @param [properties] Properties to set - * @returns ColumnSpec instance + * @returns DoubleRange instance */ - public static create(properties?: google.cloud.automl.v1beta1.IColumnSpec): google.cloud.automl.v1beta1.ColumnSpec; + public static create(properties?: google.cloud.automl.v1beta1.IDoubleRange): google.cloud.automl.v1beta1.DoubleRange; /** - * Encodes the specified ColumnSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. - * @param message ColumnSpec message or plain object to encode + * Encodes the specified DoubleRange message. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. + * @param message DoubleRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDoubleRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ColumnSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. - * @param message ColumnSpec message or plain object to encode + * Encodes the specified DoubleRange message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. + * @param message DoubleRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDoubleRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ColumnSpec message from the specified reader or buffer. + * Decodes a DoubleRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ColumnSpec + * @returns DoubleRange * @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.automl.v1beta1.ColumnSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DoubleRange; /** - * Decodes a ColumnSpec message from the specified reader or buffer, length delimited. + * Decodes a DoubleRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ColumnSpec + * @returns DoubleRange * @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.automl.v1beta1.ColumnSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DoubleRange; /** - * Verifies a ColumnSpec message. + * Verifies a DoubleRange 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 ColumnSpec message from a plain object. Also converts values to their respective internal types. + * Creates a DoubleRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ColumnSpec + * @returns DoubleRange */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ColumnSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DoubleRange; /** - * Creates a plain object from a ColumnSpec message. Also converts values to other types if specified. - * @param message ColumnSpec + * Creates a plain object from a DoubleRange message. Also converts values to other types if specified. + * @param message DoubleRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ColumnSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DoubleRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ColumnSpec to JSON. + * Converts this DoubleRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ColumnSpec { - - /** Properties of a CorrelatedColumn. */ - interface ICorrelatedColumn { - - /** CorrelatedColumn columnSpecId */ - columnSpecId?: (string|null); - - /** CorrelatedColumn correlationStats */ - correlationStats?: (google.cloud.automl.v1beta1.ICorrelationStats|null); - } - - /** Represents a CorrelatedColumn. */ - class CorrelatedColumn implements ICorrelatedColumn { - - /** - * Constructs a new CorrelatedColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn); - - /** CorrelatedColumn columnSpecId. */ - public columnSpecId: string; - - /** CorrelatedColumn correlationStats. */ - public correlationStats?: (google.cloud.automl.v1beta1.ICorrelationStats|null); - - /** - * Creates a new CorrelatedColumn instance using the specified properties. - * @param [properties] Properties to set - * @returns CorrelatedColumn instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn): google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn; - - /** - * Encodes the specified CorrelatedColumn message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. - * @param message CorrelatedColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a RegressionEvaluationMetrics. */ + interface IRegressionEvaluationMetrics { - /** - * Encodes the specified CorrelatedColumn message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. - * @param message CorrelatedColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn, writer?: $protobuf.Writer): $protobuf.Writer; + /** RegressionEvaluationMetrics rootMeanSquaredError */ + rootMeanSquaredError?: (number|null); - /** - * Decodes a CorrelatedColumn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CorrelatedColumn - * @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.automl.v1beta1.ColumnSpec.CorrelatedColumn; + /** RegressionEvaluationMetrics meanAbsoluteError */ + meanAbsoluteError?: (number|null); - /** - * Decodes a CorrelatedColumn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CorrelatedColumn - * @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.automl.v1beta1.ColumnSpec.CorrelatedColumn; + /** RegressionEvaluationMetrics meanAbsolutePercentageError */ + meanAbsolutePercentageError?: (number|null); - /** - * Verifies a CorrelatedColumn 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); + /** RegressionEvaluationMetrics rSquared */ + rSquared?: (number|null); - /** - * Creates a CorrelatedColumn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CorrelatedColumn - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn; + /** RegressionEvaluationMetrics rootMeanSquaredLogError */ + rootMeanSquaredLogError?: (number|null); + } - /** - * Creates a plain object from a CorrelatedColumn message. Also converts values to other types if specified. - * @param message CorrelatedColumn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a RegressionEvaluationMetrics. */ + class RegressionEvaluationMetrics implements IRegressionEvaluationMetrics { - /** - * Converts this CorrelatedColumn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Constructs a new RegressionEvaluationMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics); - /** Properties of a DataStats. */ - interface IDataStats { + /** RegressionEvaluationMetrics rootMeanSquaredError. */ + public rootMeanSquaredError: number; - /** DataStats float64Stats */ - float64Stats?: (google.cloud.automl.v1beta1.IFloat64Stats|null); + /** RegressionEvaluationMetrics meanAbsoluteError. */ + public meanAbsoluteError: number; - /** DataStats stringStats */ - stringStats?: (google.cloud.automl.v1beta1.IStringStats|null); + /** RegressionEvaluationMetrics meanAbsolutePercentageError. */ + public meanAbsolutePercentageError: number; - /** DataStats timestampStats */ - timestampStats?: (google.cloud.automl.v1beta1.ITimestampStats|null); + /** RegressionEvaluationMetrics rSquared. */ + public rSquared: number; - /** DataStats arrayStats */ - arrayStats?: (google.cloud.automl.v1beta1.IArrayStats|null); + /** RegressionEvaluationMetrics rootMeanSquaredLogError. */ + public rootMeanSquaredLogError: number; - /** DataStats structStats */ - structStats?: (google.cloud.automl.v1beta1.IStructStats|null); + /** + * Creates a new RegressionEvaluationMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns RegressionEvaluationMetrics instance + */ + public static create(properties?: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics): google.cloud.automl.v1beta1.RegressionEvaluationMetrics; - /** DataStats categoryStats */ - categoryStats?: (google.cloud.automl.v1beta1.ICategoryStats|null); + /** + * Encodes the specified RegressionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. + * @param message RegressionEvaluationMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** DataStats distinctValueCount */ - distinctValueCount?: (number|Long|string|null); + /** + * Encodes the specified RegressionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. + * @param message RegressionEvaluationMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** DataStats nullValueCount */ - nullValueCount?: (number|Long|string|null); + /** + * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegressionEvaluationMetrics + * @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.automl.v1beta1.RegressionEvaluationMetrics; - /** DataStats validValueCount */ - validValueCount?: (number|Long|string|null); - } + /** + * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegressionEvaluationMetrics + * @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.automl.v1beta1.RegressionEvaluationMetrics; - /** Represents a DataStats. */ - class DataStats implements IDataStats { + /** + * Verifies a RegressionEvaluationMetrics 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); /** - * Constructs a new DataStats. - * @param [properties] Properties to set + * Creates a RegressionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegressionEvaluationMetrics */ - constructor(properties?: google.cloud.automl.v1beta1.IDataStats); + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.RegressionEvaluationMetrics; - /** DataStats float64Stats. */ - public float64Stats?: (google.cloud.automl.v1beta1.IFloat64Stats|null); + /** + * Creates a plain object from a RegressionEvaluationMetrics message. Also converts values to other types if specified. + * @param message RegressionEvaluationMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.RegressionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DataStats stringStats. */ - public stringStats?: (google.cloud.automl.v1beta1.IStringStats|null); + /** + * Converts this RegressionEvaluationMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** DataStats timestampStats. */ - public timestampStats?: (google.cloud.automl.v1beta1.ITimestampStats|null); + /** Properties of a TextExtractionAnnotation. */ + interface ITextExtractionAnnotation { - /** DataStats arrayStats. */ - public arrayStats?: (google.cloud.automl.v1beta1.IArrayStats|null); + /** TextExtractionAnnotation textSegment */ + textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - /** DataStats structStats. */ - public structStats?: (google.cloud.automl.v1beta1.IStructStats|null); + /** TextExtractionAnnotation score */ + score?: (number|null); + } - /** DataStats categoryStats. */ - public categoryStats?: (google.cloud.automl.v1beta1.ICategoryStats|null); + /** Represents a TextExtractionAnnotation. */ + class TextExtractionAnnotation implements ITextExtractionAnnotation { - /** DataStats distinctValueCount. */ - public distinctValueCount: (number|Long|string); + /** + * Constructs a new TextExtractionAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionAnnotation); - /** DataStats nullValueCount. */ - public nullValueCount: (number|Long|string); + /** TextExtractionAnnotation textSegment. */ + public textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - /** DataStats validValueCount. */ - public validValueCount: (number|Long|string); + /** TextExtractionAnnotation score. */ + public score: number; - /** DataStats stats. */ - public stats?: ("float64Stats"|"stringStats"|"timestampStats"|"arrayStats"|"structStats"|"categoryStats"); + /** TextExtractionAnnotation annotation. */ + public annotation?: "textSegment"; /** - * Creates a new DataStats instance using the specified properties. + * Creates a new TextExtractionAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns DataStats instance + * @returns TextExtractionAnnotation instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDataStats): google.cloud.automl.v1beta1.DataStats; + public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionAnnotation): google.cloud.automl.v1beta1.TextExtractionAnnotation; /** - * Encodes the specified DataStats message. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. - * @param message DataStats message or plain object to encode + * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. + * @param message TextExtractionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDataStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. - * @param message DataStats message or plain object to encode + * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. + * @param message TextExtractionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDataStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataStats message from the specified reader or buffer. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataStats + * @returns TextExtractionAnnotation * @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.automl.v1beta1.DataStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextExtractionAnnotation; /** - * Decodes a DataStats message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataStats + * @returns TextExtractionAnnotation * @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.automl.v1beta1.DataStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextExtractionAnnotation; /** - * Verifies a DataStats message. + * Verifies a TextExtractionAnnotation 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 DataStats message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataStats + * @returns TextExtractionAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DataStats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionAnnotation; /** - * Creates a plain object from a DataStats message. Also converts values to other types if specified. - * @param message DataStats + * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. + * @param message TextExtractionAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DataStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextExtractionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataStats to JSON. + * Converts this TextExtractionAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Float64Stats. */ - interface IFloat64Stats { - - /** Float64Stats mean */ - mean?: (number|null); - - /** Float64Stats standardDeviation */ - standardDeviation?: (number|null); + /** Properties of a TextExtractionEvaluationMetrics. */ + interface ITextExtractionEvaluationMetrics { - /** Float64Stats quantiles */ - quantiles?: (number[]|null); + /** TextExtractionEvaluationMetrics auPrc */ + auPrc?: (number|null); - /** Float64Stats histogramBuckets */ - histogramBuckets?: (google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket[]|null); + /** TextExtractionEvaluationMetrics confidenceMetricsEntries */ + confidenceMetricsEntries?: (google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]|null); } - /** Represents a Float64Stats. */ - class Float64Stats implements IFloat64Stats { + /** Represents a TextExtractionEvaluationMetrics. */ + class TextExtractionEvaluationMetrics implements ITextExtractionEvaluationMetrics { /** - * Constructs a new Float64Stats. + * Constructs a new TextExtractionEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IFloat64Stats); - - /** Float64Stats mean. */ - public mean: number; - - /** Float64Stats standardDeviation. */ - public standardDeviation: number; + constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics); - /** Float64Stats quantiles. */ - public quantiles: number[]; + /** TextExtractionEvaluationMetrics auPrc. */ + public auPrc: number; - /** Float64Stats histogramBuckets. */ - public histogramBuckets: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket[]; + /** TextExtractionEvaluationMetrics confidenceMetricsEntries. */ + public confidenceMetricsEntries: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]; /** - * Creates a new Float64Stats instance using the specified properties. + * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns Float64Stats instance + * @returns TextExtractionEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1beta1.IFloat64Stats): google.cloud.automl.v1beta1.Float64Stats; + public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics; /** - * Encodes the specified Float64Stats message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. - * @param message Float64Stats message or plain object to encode + * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. + * @param message TextExtractionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IFloat64Stats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Float64Stats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. - * @param message Float64Stats message or plain object to encode + * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. + * @param message TextExtractionEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IFloat64Stats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Float64Stats message from the specified reader or buffer. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Float64Stats + * @returns TextExtractionEvaluationMetrics * @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.automl.v1beta1.Float64Stats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics; /** - * Decodes a Float64Stats message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Float64Stats + * @returns TextExtractionEvaluationMetrics * @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.automl.v1beta1.Float64Stats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics; /** - * Verifies a Float64Stats message. + * Verifies a TextExtractionEvaluationMetrics 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 Float64Stats message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Float64Stats + * @returns TextExtractionEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Float64Stats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics; /** - * Creates a plain object from a Float64Stats message. Also converts values to other types if specified. - * @param message Float64Stats + * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. + * @param message TextExtractionEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.Float64Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Float64Stats to JSON. + * Converts this TextExtractionEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Float64Stats { + namespace TextExtractionEvaluationMetrics { - /** Properties of a HistogramBucket. */ - interface IHistogramBucket { + /** Properties of a ConfidenceMetricsEntry. */ + interface IConfidenceMetricsEntry { - /** HistogramBucket min */ - min?: (number|null); + /** ConfidenceMetricsEntry confidenceThreshold */ + confidenceThreshold?: (number|null); - /** HistogramBucket max */ - max?: (number|null); + /** ConfidenceMetricsEntry recall */ + recall?: (number|null); - /** HistogramBucket count */ - count?: (number|Long|string|null); + /** ConfidenceMetricsEntry precision */ + precision?: (number|null); + + /** ConfidenceMetricsEntry f1Score */ + f1Score?: (number|null); } - /** Represents a HistogramBucket. */ - class HistogramBucket implements IHistogramBucket { + /** Represents a ConfidenceMetricsEntry. */ + class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { /** - * Constructs a new HistogramBucket. + * Constructs a new ConfidenceMetricsEntry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket); + constructor(properties?: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry); - /** HistogramBucket min. */ - public min: number; + /** ConfidenceMetricsEntry confidenceThreshold. */ + public confidenceThreshold: number; - /** HistogramBucket max. */ - public max: number; + /** ConfidenceMetricsEntry recall. */ + public recall: number; - /** HistogramBucket count. */ - public count: (number|Long|string); + /** ConfidenceMetricsEntry precision. */ + public precision: number; + + /** ConfidenceMetricsEntry f1Score. */ + public f1Score: number; /** - * Creates a new HistogramBucket instance using the specified properties. + * Creates a new ConfidenceMetricsEntry instance using the specified properties. * @param [properties] Properties to set - * @returns HistogramBucket instance + * @returns ConfidenceMetricsEntry instance */ - public static create(properties?: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket): google.cloud.automl.v1beta1.Float64Stats.HistogramBucket; + public static create(properties?: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; /** - * Encodes the specified HistogramBucket message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. - * @param message HistogramBucket message or plain object to encode + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HistogramBucket message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. - * @param message HistogramBucket message or plain object to encode + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @param message ConfidenceMetricsEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HistogramBucket message from the specified reader or buffer. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HistogramBucket + * @returns ConfidenceMetricsEntry * @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.automl.v1beta1.Float64Stats.HistogramBucket; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; /** - * Decodes a HistogramBucket message from the specified reader or buffer, length delimited. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HistogramBucket + * @returns ConfidenceMetricsEntry * @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.automl.v1beta1.Float64Stats.HistogramBucket; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; /** - * Verifies a HistogramBucket message. + * Verifies a ConfidenceMetricsEntry 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 HistogramBucket message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HistogramBucket + * @returns ConfidenceMetricsEntry */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Float64Stats.HistogramBucket; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; /** - * Creates a plain object from a HistogramBucket message. Also converts values to other types if specified. - * @param message HistogramBucket + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @param message ConfidenceMetricsEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.Float64Stats.HistogramBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HistogramBucket to JSON. + * Converts this ConfidenceMetricsEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** Properties of a StringStats. */ - interface IStringStats { + /** Properties of a TextSentimentAnnotation. */ + interface ITextSentimentAnnotation { - /** StringStats topUnigramStats */ - topUnigramStats?: (google.cloud.automl.v1beta1.StringStats.IUnigramStats[]|null); + /** TextSentimentAnnotation sentiment */ + sentiment?: (number|null); } - /** Represents a StringStats. */ - class StringStats implements IStringStats { + /** Represents a TextSentimentAnnotation. */ + class TextSentimentAnnotation implements ITextSentimentAnnotation { /** - * Constructs a new StringStats. + * Constructs a new TextSentimentAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IStringStats); + constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentAnnotation); - /** StringStats topUnigramStats. */ - public topUnigramStats: google.cloud.automl.v1beta1.StringStats.IUnigramStats[]; + /** TextSentimentAnnotation sentiment. */ + public sentiment: number; /** - * Creates a new StringStats instance using the specified properties. + * Creates a new TextSentimentAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns StringStats instance + * @returns TextSentimentAnnotation instance */ - public static create(properties?: google.cloud.automl.v1beta1.IStringStats): google.cloud.automl.v1beta1.StringStats; + public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentAnnotation): google.cloud.automl.v1beta1.TextSentimentAnnotation; /** - * Encodes the specified StringStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. - * @param message StringStats message or plain object to encode + * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. + * @param message TextSentimentAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IStringStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StringStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. - * @param message StringStats message or plain object to encode + * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. + * @param message TextSentimentAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IStringStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StringStats message from the specified reader or buffer. + * Decodes a TextSentimentAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StringStats + * @returns TextSentimentAnnotation * @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.automl.v1beta1.StringStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextSentimentAnnotation; /** - * Decodes a StringStats message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StringStats + * @returns TextSentimentAnnotation * @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.automl.v1beta1.StringStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextSentimentAnnotation; /** - * Verifies a StringStats message. + * Verifies a TextSentimentAnnotation 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 StringStats message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StringStats + * @returns TextSentimentAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StringStats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentAnnotation; /** - * Creates a plain object from a StringStats message. Also converts values to other types if specified. - * @param message StringStats + * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. + * @param message TextSentimentAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.StringStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextSentimentAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StringStats to JSON. + * Converts this TextSentimentAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace StringStats { - - /** Properties of an UnigramStats. */ - interface IUnigramStats { + /** Properties of a TextSentimentEvaluationMetrics. */ + interface ITextSentimentEvaluationMetrics { - /** UnigramStats value */ - value?: (string|null); + /** TextSentimentEvaluationMetrics precision */ + precision?: (number|null); - /** UnigramStats count */ - count?: (number|Long|string|null); - } + /** TextSentimentEvaluationMetrics recall */ + recall?: (number|null); - /** Represents an UnigramStats. */ - class UnigramStats implements IUnigramStats { + /** TextSentimentEvaluationMetrics f1Score */ + f1Score?: (number|null); - /** - * Constructs a new UnigramStats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.StringStats.IUnigramStats); + /** TextSentimentEvaluationMetrics meanAbsoluteError */ + meanAbsoluteError?: (number|null); - /** UnigramStats value. */ - public value: string; + /** TextSentimentEvaluationMetrics meanSquaredError */ + meanSquaredError?: (number|null); - /** UnigramStats count. */ - public count: (number|Long|string); + /** TextSentimentEvaluationMetrics linearKappa */ + linearKappa?: (number|null); - /** - * Creates a new UnigramStats instance using the specified properties. - * @param [properties] Properties to set - * @returns UnigramStats instance - */ - public static create(properties?: google.cloud.automl.v1beta1.StringStats.IUnigramStats): google.cloud.automl.v1beta1.StringStats.UnigramStats; + /** TextSentimentEvaluationMetrics quadraticKappa */ + quadraticKappa?: (number|null); - /** - * Encodes the specified UnigramStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. - * @param message UnigramStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.StringStats.IUnigramStats, writer?: $protobuf.Writer): $protobuf.Writer; + /** TextSentimentEvaluationMetrics confusionMatrix */ + confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); - /** - * Encodes the specified UnigramStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. - * @param message UnigramStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.StringStats.IUnigramStats, writer?: $protobuf.Writer): $protobuf.Writer; + /** TextSentimentEvaluationMetrics annotationSpecId */ + annotationSpecId?: (string[]|null); + } - /** - * Decodes an UnigramStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnigramStats - * @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.automl.v1beta1.StringStats.UnigramStats; + /** Represents a TextSentimentEvaluationMetrics. */ + class TextSentimentEvaluationMetrics implements ITextSentimentEvaluationMetrics { - /** - * Decodes an UnigramStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnigramStats - * @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.automl.v1beta1.StringStats.UnigramStats; + /** + * Constructs a new TextSentimentEvaluationMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics); - /** - * Verifies an UnigramStats 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); + /** TextSentimentEvaluationMetrics precision. */ + public precision: number; - /** - * Creates an UnigramStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnigramStats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StringStats.UnigramStats; + /** TextSentimentEvaluationMetrics recall. */ + public recall: number; - /** - * Creates a plain object from an UnigramStats message. Also converts values to other types if specified. - * @param message UnigramStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.StringStats.UnigramStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** TextSentimentEvaluationMetrics f1Score. */ + public f1Score: number; - /** - * Converts this UnigramStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** TextSentimentEvaluationMetrics meanAbsoluteError. */ + public meanAbsoluteError: number; - /** Properties of a TimestampStats. */ - interface ITimestampStats { + /** TextSentimentEvaluationMetrics meanSquaredError. */ + public meanSquaredError: number; - /** TimestampStats granularStats */ - granularStats?: ({ [k: string]: google.cloud.automl.v1beta1.TimestampStats.IGranularStats }|null); - } + /** TextSentimentEvaluationMetrics linearKappa. */ + public linearKappa: number; - /** Represents a TimestampStats. */ - class TimestampStats implements ITimestampStats { + /** TextSentimentEvaluationMetrics quadraticKappa. */ + public quadraticKappa: number; - /** - * Constructs a new TimestampStats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ITimestampStats); + /** TextSentimentEvaluationMetrics confusionMatrix. */ + public confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); - /** TimestampStats granularStats. */ - public granularStats: { [k: string]: google.cloud.automl.v1beta1.TimestampStats.IGranularStats }; + /** TextSentimentEvaluationMetrics annotationSpecId. */ + public annotationSpecId: string[]; /** - * Creates a new TimestampStats instance using the specified properties. + * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns TimestampStats instance + * @returns TextSentimentEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITimestampStats): google.cloud.automl.v1beta1.TimestampStats; + public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics): google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics; /** - * Encodes the specified TimestampStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. - * @param message TimestampStats message or plain object to encode + * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. + * @param message TextSentimentEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITimestampStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimestampStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. - * @param message TimestampStats message or plain object to encode + * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. + * @param message TextSentimentEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITimestampStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimestampStats message from the specified reader or buffer. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimestampStats + * @returns TextSentimentEvaluationMetrics * @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.automl.v1beta1.TimestampStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics; /** - * Decodes a TimestampStats message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimestampStats + * @returns TextSentimentEvaluationMetrics * @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.automl.v1beta1.TimestampStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics; /** - * Verifies a TimestampStats message. + * Verifies a TextSentimentEvaluationMetrics 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 TimestampStats message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimestampStats + * @returns TextSentimentEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TimestampStats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics; /** - * Creates a plain object from a TimestampStats message. Also converts values to other types if specified. - * @param message TimestampStats + * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. + * @param message TextSentimentEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TimestampStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimestampStats to JSON. + * Converts this TextSentimentEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace TimestampStats { - - /** Properties of a GranularStats. */ - interface IGranularStats { - - /** GranularStats buckets */ - buckets?: ({ [k: string]: (number|Long|string) }|null); - } - - /** Represents a GranularStats. */ - class GranularStats implements IGranularStats { - - /** - * Constructs a new GranularStats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.TimestampStats.IGranularStats); - - /** GranularStats buckets. */ - public buckets: { [k: string]: (number|Long|string) }; - - /** - * Creates a new GranularStats instance using the specified properties. - * @param [properties] Properties to set - * @returns GranularStats instance - */ - public static create(properties?: google.cloud.automl.v1beta1.TimestampStats.IGranularStats): google.cloud.automl.v1beta1.TimestampStats.GranularStats; - - /** - * Encodes the specified GranularStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. - * @param message GranularStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.TimestampStats.IGranularStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GranularStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. - * @param message GranularStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.TimestampStats.IGranularStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GranularStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GranularStats - * @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.automl.v1beta1.TimestampStats.GranularStats; - - /** - * Decodes a GranularStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GranularStats - * @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.automl.v1beta1.TimestampStats.GranularStats; - - /** - * Verifies a GranularStats 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 GranularStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GranularStats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TimestampStats.GranularStats; - - /** - * Creates a plain object from a GranularStats message. Also converts values to other types if specified. - * @param message GranularStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.TimestampStats.GranularStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GranularStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Properties of a TranslationDatasetMetadata. */ + interface ITranslationDatasetMetadata { - /** Properties of an ArrayStats. */ - interface IArrayStats { + /** TranslationDatasetMetadata sourceLanguageCode */ + sourceLanguageCode?: (string|null); - /** ArrayStats memberStats */ - memberStats?: (google.cloud.automl.v1beta1.IDataStats|null); + /** TranslationDatasetMetadata targetLanguageCode */ + targetLanguageCode?: (string|null); } - /** Represents an ArrayStats. */ - class ArrayStats implements IArrayStats { + /** Represents a TranslationDatasetMetadata. */ + class TranslationDatasetMetadata implements ITranslationDatasetMetadata { /** - * Constructs a new ArrayStats. + * Constructs a new TranslationDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IArrayStats); + constructor(properties?: google.cloud.automl.v1beta1.ITranslationDatasetMetadata); - /** ArrayStats memberStats. */ - public memberStats?: (google.cloud.automl.v1beta1.IDataStats|null); + /** TranslationDatasetMetadata sourceLanguageCode. */ + public sourceLanguageCode: string; + + /** TranslationDatasetMetadata targetLanguageCode. */ + public targetLanguageCode: string; /** - * Creates a new ArrayStats instance using the specified properties. + * Creates a new TranslationDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ArrayStats instance + * @returns TranslationDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IArrayStats): google.cloud.automl.v1beta1.ArrayStats; + public static create(properties?: google.cloud.automl.v1beta1.ITranslationDatasetMetadata): google.cloud.automl.v1beta1.TranslationDatasetMetadata; /** - * Encodes the specified ArrayStats message. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. - * @param message ArrayStats message or plain object to encode + * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. + * @param message TranslationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IArrayStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ArrayStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. - * @param message ArrayStats message or plain object to encode + * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. + * @param message TranslationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IArrayStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ArrayStats message from the specified reader or buffer. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ArrayStats + * @returns TranslationDatasetMetadata * @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.automl.v1beta1.ArrayStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TranslationDatasetMetadata; /** - * Decodes an ArrayStats message from the specified reader or buffer, length delimited. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ArrayStats + * @returns TranslationDatasetMetadata * @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.automl.v1beta1.ArrayStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TranslationDatasetMetadata; /** - * Verifies an ArrayStats message. + * Verifies a TranslationDatasetMetadata 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 ArrayStats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ArrayStats + * @returns TranslationDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ArrayStats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationDatasetMetadata; /** - * Creates a plain object from an ArrayStats message. Also converts values to other types if specified. - * @param message ArrayStats + * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. + * @param message TranslationDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ArrayStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TranslationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ArrayStats to JSON. + * Converts this TranslationDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StructStats. */ - interface IStructStats { + /** Properties of a TranslationEvaluationMetrics. */ + interface ITranslationEvaluationMetrics { - /** StructStats fieldStats */ - fieldStats?: ({ [k: string]: google.cloud.automl.v1beta1.IDataStats }|null); + /** TranslationEvaluationMetrics bleuScore */ + bleuScore?: (number|null); + + /** TranslationEvaluationMetrics baseBleuScore */ + baseBleuScore?: (number|null); } - /** Represents a StructStats. */ - class StructStats implements IStructStats { + /** Represents a TranslationEvaluationMetrics. */ + class TranslationEvaluationMetrics implements ITranslationEvaluationMetrics { /** - * Constructs a new StructStats. + * Constructs a new TranslationEvaluationMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IStructStats); + constructor(properties?: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics); - /** StructStats fieldStats. */ - public fieldStats: { [k: string]: google.cloud.automl.v1beta1.IDataStats }; + /** TranslationEvaluationMetrics bleuScore. */ + public bleuScore: number; + + /** TranslationEvaluationMetrics baseBleuScore. */ + public baseBleuScore: number; /** - * Creates a new StructStats instance using the specified properties. + * Creates a new TranslationEvaluationMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns StructStats instance + * @returns TranslationEvaluationMetrics instance */ - public static create(properties?: google.cloud.automl.v1beta1.IStructStats): google.cloud.automl.v1beta1.StructStats; + public static create(properties?: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics): google.cloud.automl.v1beta1.TranslationEvaluationMetrics; /** - * Encodes the specified StructStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. - * @param message StructStats message or plain object to encode + * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. + * @param message TranslationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IStructStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StructStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. - * @param message StructStats message or plain object to encode + * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. + * @param message TranslationEvaluationMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IStructStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StructStats message from the specified reader or buffer. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StructStats + * @returns TranslationEvaluationMetrics * @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.automl.v1beta1.StructStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TranslationEvaluationMetrics; /** - * Decodes a StructStats message from the specified reader or buffer, length delimited. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StructStats + * @returns TranslationEvaluationMetrics * @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.automl.v1beta1.StructStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TranslationEvaluationMetrics; /** - * Verifies a StructStats message. + * Verifies a TranslationEvaluationMetrics 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 StructStats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StructStats + * @returns TranslationEvaluationMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StructStats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationEvaluationMetrics; /** - * Creates a plain object from a StructStats message. Also converts values to other types if specified. - * @param message StructStats + * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. + * @param message TranslationEvaluationMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.StructStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TranslationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StructStats to JSON. + * Converts this TranslationEvaluationMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CategoryStats. */ - interface ICategoryStats { + /** Properties of a TranslationModelMetadata. */ + interface ITranslationModelMetadata { - /** CategoryStats topCategoryStats */ - topCategoryStats?: (google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats[]|null); + /** TranslationModelMetadata baseModel */ + baseModel?: (string|null); + + /** TranslationModelMetadata sourceLanguageCode */ + sourceLanguageCode?: (string|null); + + /** TranslationModelMetadata targetLanguageCode */ + targetLanguageCode?: (string|null); } - /** Represents a CategoryStats. */ - class CategoryStats implements ICategoryStats { + /** Represents a TranslationModelMetadata. */ + class TranslationModelMetadata implements ITranslationModelMetadata { /** - * Constructs a new CategoryStats. + * Constructs a new TranslationModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ICategoryStats); + constructor(properties?: google.cloud.automl.v1beta1.ITranslationModelMetadata); - /** CategoryStats topCategoryStats. */ - public topCategoryStats: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats[]; + /** TranslationModelMetadata baseModel. */ + public baseModel: string; + + /** TranslationModelMetadata sourceLanguageCode. */ + public sourceLanguageCode: string; + + /** TranslationModelMetadata targetLanguageCode. */ + public targetLanguageCode: string; /** - * Creates a new CategoryStats instance using the specified properties. + * Creates a new TranslationModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns CategoryStats instance + * @returns TranslationModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ICategoryStats): google.cloud.automl.v1beta1.CategoryStats; + public static create(properties?: google.cloud.automl.v1beta1.ITranslationModelMetadata): google.cloud.automl.v1beta1.TranslationModelMetadata; /** - * Encodes the specified CategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. - * @param message CategoryStats message or plain object to encode + * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. + * @param message TranslationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ICategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. - * @param message CategoryStats message or plain object to encode + * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. + * @param message TranslationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ICategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CategoryStats message from the specified reader or buffer. + * Decodes a TranslationModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CategoryStats + * @returns TranslationModelMetadata * @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.automl.v1beta1.CategoryStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TranslationModelMetadata; /** - * Decodes a CategoryStats message from the specified reader or buffer, length delimited. + * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CategoryStats + * @returns TranslationModelMetadata * @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.automl.v1beta1.CategoryStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TranslationModelMetadata; /** - * Verifies a CategoryStats message. + * Verifies a TranslationModelMetadata 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 CategoryStats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CategoryStats + * @returns TranslationModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CategoryStats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationModelMetadata; /** - * Creates a plain object from a CategoryStats message. Also converts values to other types if specified. - * @param message CategoryStats + * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. + * @param message TranslationModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.CategoryStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TranslationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CategoryStats to JSON. + * Converts this TranslationModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CategoryStats { - - /** Properties of a SingleCategoryStats. */ - interface ISingleCategoryStats { - - /** SingleCategoryStats value */ - value?: (string|null); - - /** SingleCategoryStats count */ - count?: (number|Long|string|null); - } - - /** Represents a SingleCategoryStats. */ - class SingleCategoryStats implements ISingleCategoryStats { - - /** - * Constructs a new SingleCategoryStats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats); - - /** SingleCategoryStats value. */ - public value: string; - - /** SingleCategoryStats count. */ - public count: (number|Long|string); - - /** - * Creates a new SingleCategoryStats instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleCategoryStats instance - */ - public static create(properties?: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats): google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats; - - /** - * Encodes the specified SingleCategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. - * @param message SingleCategoryStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SingleCategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. - * @param message SingleCategoryStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SingleCategoryStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleCategoryStats - * @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.automl.v1beta1.CategoryStats.SingleCategoryStats; - - /** - * Decodes a SingleCategoryStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleCategoryStats - * @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.automl.v1beta1.CategoryStats.SingleCategoryStats; - - /** - * Verifies a SingleCategoryStats 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 SingleCategoryStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleCategoryStats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats; - - /** - * Creates a plain object from a SingleCategoryStats message. Also converts values to other types if specified. - * @param message SingleCategoryStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SingleCategoryStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a CorrelationStats. */ - interface ICorrelationStats { + /** Properties of a TranslationAnnotation. */ + interface ITranslationAnnotation { - /** CorrelationStats cramersV */ - cramersV?: (number|null); + /** TranslationAnnotation translatedContent */ + translatedContent?: (google.cloud.automl.v1beta1.ITextSnippet|null); } - /** Represents a CorrelationStats. */ - class CorrelationStats implements ICorrelationStats { + /** Represents a TranslationAnnotation. */ + class TranslationAnnotation implements ITranslationAnnotation { /** - * Constructs a new CorrelationStats. + * Constructs a new TranslationAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ICorrelationStats); + constructor(properties?: google.cloud.automl.v1beta1.ITranslationAnnotation); - /** CorrelationStats cramersV. */ - public cramersV: number; + /** TranslationAnnotation translatedContent. */ + public translatedContent?: (google.cloud.automl.v1beta1.ITextSnippet|null); /** - * Creates a new CorrelationStats instance using the specified properties. + * Creates a new TranslationAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns CorrelationStats instance + * @returns TranslationAnnotation instance */ - public static create(properties?: google.cloud.automl.v1beta1.ICorrelationStats): google.cloud.automl.v1beta1.CorrelationStats; + public static create(properties?: google.cloud.automl.v1beta1.ITranslationAnnotation): google.cloud.automl.v1beta1.TranslationAnnotation; /** - * Encodes the specified CorrelationStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. - * @param message CorrelationStats message or plain object to encode + * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. + * @param message TranslationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ICorrelationStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CorrelationStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. - * @param message CorrelationStats message or plain object to encode + * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. + * @param message TranslationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ICorrelationStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CorrelationStats message from the specified reader or buffer. + * Decodes a TranslationAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CorrelationStats + * @returns TranslationAnnotation * @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.automl.v1beta1.CorrelationStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TranslationAnnotation; /** - * Decodes a CorrelationStats message from the specified reader or buffer, length delimited. + * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CorrelationStats + * @returns TranslationAnnotation * @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.automl.v1beta1.CorrelationStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TranslationAnnotation; /** - * Verifies a CorrelationStats message. + * Verifies a TranslationAnnotation 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 CorrelationStats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CorrelationStats + * @returns TranslationAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CorrelationStats; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationAnnotation; /** - * Creates a plain object from a CorrelationStats message. Also converts values to other types if specified. - * @param message CorrelationStats + * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. + * @param message TranslationAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.CorrelationStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TranslationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CorrelationStats to JSON. + * Converts this TranslationAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** TypeCode enum. */ - enum TypeCode { - TYPE_CODE_UNSPECIFIED = 0, - FLOAT64 = 3, - TIMESTAMP = 4, - STRING = 6, - ARRAY = 8, - STRUCT = 9, - CATEGORY = 10 - } - - /** Properties of a DataType. */ - interface IDataType { - - /** DataType listElementType */ - listElementType?: (google.cloud.automl.v1beta1.IDataType|null); - - /** DataType structType */ - structType?: (google.cloud.automl.v1beta1.IStructType|null); + /** Properties of an AnnotationSpec. */ + interface IAnnotationSpec { - /** DataType timeFormat */ - timeFormat?: (string|null); + /** AnnotationSpec name */ + name?: (string|null); - /** DataType typeCode */ - typeCode?: (google.cloud.automl.v1beta1.TypeCode|keyof typeof google.cloud.automl.v1beta1.TypeCode|null); + /** AnnotationSpec displayName */ + displayName?: (string|null); - /** DataType nullable */ - nullable?: (boolean|null); + /** AnnotationSpec exampleCount */ + exampleCount?: (number|null); } - /** Represents a DataType. */ - class DataType implements IDataType { + /** Represents an AnnotationSpec. */ + class AnnotationSpec implements IAnnotationSpec { /** - * Constructs a new DataType. + * Constructs a new AnnotationSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDataType); - - /** DataType listElementType. */ - public listElementType?: (google.cloud.automl.v1beta1.IDataType|null); - - /** DataType structType. */ - public structType?: (google.cloud.automl.v1beta1.IStructType|null); - - /** DataType timeFormat. */ - public timeFormat: string; + constructor(properties?: google.cloud.automl.v1beta1.IAnnotationSpec); - /** DataType typeCode. */ - public typeCode: (google.cloud.automl.v1beta1.TypeCode|keyof typeof google.cloud.automl.v1beta1.TypeCode); + /** AnnotationSpec name. */ + public name: string; - /** DataType nullable. */ - public nullable: boolean; + /** AnnotationSpec displayName. */ + public displayName: string; - /** DataType details. */ - public details?: ("listElementType"|"structType"|"timeFormat"); + /** AnnotationSpec exampleCount. */ + public exampleCount: number; /** - * Creates a new DataType instance using the specified properties. + * Creates a new AnnotationSpec instance using the specified properties. * @param [properties] Properties to set - * @returns DataType instance + * @returns AnnotationSpec instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDataType): google.cloud.automl.v1beta1.DataType; + public static create(properties?: google.cloud.automl.v1beta1.IAnnotationSpec): google.cloud.automl.v1beta1.AnnotationSpec; /** - * Encodes the specified DataType message. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. - * @param message DataType message or plain object to encode + * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. + * @param message AnnotationSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDataType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. - * @param message DataType message or plain object to encode + * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. + * @param message AnnotationSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDataType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataType message from the specified reader or buffer. + * Decodes an AnnotationSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataType + * @returns AnnotationSpec * @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.automl.v1beta1.DataType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.AnnotationSpec; /** - * Decodes a DataType message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataType + * @returns AnnotationSpec * @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.automl.v1beta1.DataType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.AnnotationSpec; /** - * Verifies a DataType message. + * Verifies an AnnotationSpec 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 DataType message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataType + * @returns AnnotationSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DataType; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.AnnotationSpec; /** - * Creates a plain object from a DataType message. Also converts values to other types if specified. - * @param message DataType + * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. + * @param message AnnotationSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DataType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.AnnotationSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataType to JSON. + * Converts this AnnotationSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StructType. */ - interface IStructType { + /** Properties of a Dataset. */ + interface IDataset { - /** StructType fields */ - fields?: ({ [k: string]: google.cloud.automl.v1beta1.IDataType }|null); + /** Dataset translationDatasetMetadata */ + translationDatasetMetadata?: (google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null); + + /** Dataset imageClassificationDatasetMetadata */ + imageClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null); + + /** Dataset textClassificationDatasetMetadata */ + textClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null); + + /** Dataset imageObjectDetectionDatasetMetadata */ + imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null); + + /** Dataset videoClassificationDatasetMetadata */ + videoClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null); + + /** Dataset videoObjectTrackingDatasetMetadata */ + videoObjectTrackingDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null); + + /** Dataset textExtractionDatasetMetadata */ + textExtractionDatasetMetadata?: (google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null); + + /** Dataset textSentimentDatasetMetadata */ + textSentimentDatasetMetadata?: (google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null); + + /** Dataset tablesDatasetMetadata */ + tablesDatasetMetadata?: (google.cloud.automl.v1beta1.ITablesDatasetMetadata|null); + + /** Dataset name */ + name?: (string|null); + + /** Dataset displayName */ + displayName?: (string|null); + + /** Dataset description */ + description?: (string|null); + + /** Dataset exampleCount */ + exampleCount?: (number|null); + + /** Dataset createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Dataset etag */ + etag?: (string|null); } - /** Represents a StructType. */ - class StructType implements IStructType { + /** Represents a Dataset. */ + class Dataset implements IDataset { /** - * Constructs a new StructType. + * Constructs a new Dataset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IStructType); + constructor(properties?: google.cloud.automl.v1beta1.IDataset); - /** StructType fields. */ - public fields: { [k: string]: google.cloud.automl.v1beta1.IDataType }; + /** Dataset translationDatasetMetadata. */ + public translationDatasetMetadata?: (google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null); + + /** Dataset imageClassificationDatasetMetadata. */ + public imageClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null); + + /** Dataset textClassificationDatasetMetadata. */ + public textClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null); + + /** Dataset imageObjectDetectionDatasetMetadata. */ + public imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null); + + /** Dataset videoClassificationDatasetMetadata. */ + public videoClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null); + + /** Dataset videoObjectTrackingDatasetMetadata. */ + public videoObjectTrackingDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null); + + /** Dataset textExtractionDatasetMetadata. */ + public textExtractionDatasetMetadata?: (google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null); + + /** Dataset textSentimentDatasetMetadata. */ + public textSentimentDatasetMetadata?: (google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null); + + /** Dataset tablesDatasetMetadata. */ + public tablesDatasetMetadata?: (google.cloud.automl.v1beta1.ITablesDatasetMetadata|null); + + /** Dataset name. */ + public name: string; + + /** Dataset displayName. */ + public displayName: string; + + /** Dataset description. */ + public description: string; + + /** Dataset exampleCount. */ + public exampleCount: number; + + /** Dataset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Dataset etag. */ + public etag: string; + + /** Dataset datasetMetadata. */ + public datasetMetadata?: ("translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"videoClassificationDatasetMetadata"|"videoObjectTrackingDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"|"tablesDatasetMetadata"); /** - * Creates a new StructType instance using the specified properties. + * Creates a new Dataset instance using the specified properties. * @param [properties] Properties to set - * @returns StructType instance + * @returns Dataset instance */ - public static create(properties?: google.cloud.automl.v1beta1.IStructType): google.cloud.automl.v1beta1.StructType; + public static create(properties?: google.cloud.automl.v1beta1.IDataset): google.cloud.automl.v1beta1.Dataset; /** - * Encodes the specified StructType message. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. - * @param message StructType message or plain object to encode + * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. + * @param message Dataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IStructType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StructType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. - * @param message StructType message or plain object to encode + * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. + * @param message Dataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IStructType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StructType message from the specified reader or buffer. + * Decodes a Dataset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StructType + * @returns Dataset * @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.automl.v1beta1.StructType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.Dataset; /** - * Decodes a StructType message from the specified reader or buffer, length delimited. + * Decodes a Dataset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StructType + * @returns Dataset * @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.automl.v1beta1.StructType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.Dataset; /** - * Verifies a StructType message. + * Verifies a Dataset 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 StructType message from a plain object. Also converts values to their respective internal types. + * Creates a Dataset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StructType + * @returns Dataset */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.StructType; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Dataset; /** - * Creates a plain object from a StructType message. Also converts values to other types if specified. - * @param message StructType + * Creates a plain object from a Dataset message. Also converts values to other types if specified. + * @param message Dataset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.StructType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.Dataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StructType to JSON. + * Converts this Dataset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Image. */ - interface IImage { - - /** Image imageBytes */ - imageBytes?: (Uint8Array|string|null); - - /** Image inputConfig */ - inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); + /** Properties of an ImageClassificationDatasetMetadata. */ + interface IImageClassificationDatasetMetadata { - /** Image thumbnailUri */ - thumbnailUri?: (string|null); + /** ImageClassificationDatasetMetadata classificationType */ + classificationType?: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType|null); } - /** Represents an Image. */ - class Image implements IImage { + /** Represents an ImageClassificationDatasetMetadata. */ + class ImageClassificationDatasetMetadata implements IImageClassificationDatasetMetadata { /** - * Constructs a new Image. + * Constructs a new ImageClassificationDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IImage); - - /** Image imageBytes. */ - public imageBytes: (Uint8Array|string); - - /** Image inputConfig. */ - public inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); - - /** Image thumbnailUri. */ - public thumbnailUri: string; + constructor(properties?: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata); - /** Image data. */ - public data?: ("imageBytes"|"inputConfig"); + /** ImageClassificationDatasetMetadata classificationType. */ + public classificationType: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType); /** - * Creates a new Image instance using the specified properties. + * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Image instance + * @returns ImageClassificationDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImage): google.cloud.automl.v1beta1.Image; + public static create(properties?: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata): google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata; /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. - * @param message Image message or plain object to encode + * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. + * @param message ImageClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. - * @param message Image message or plain object to encode + * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. + * @param message ImageClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Image message from the specified reader or buffer. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Image + * @returns ImageClassificationDatasetMetadata * @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.automl.v1beta1.Image; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata; /** - * Decodes an Image message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Image + * @returns ImageClassificationDatasetMetadata * @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.automl.v1beta1.Image; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata; /** - * Verifies an Image message. + * Verifies an ImageClassificationDatasetMetadata 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 Image message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Image + * @returns ImageClassificationDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Image; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata; /** - * Creates a plain object from an Image message. Also converts values to other types if specified. - * @param message Image + * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. + * @param message ImageClassificationDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Image to JSON. + * Converts this ImageClassificationDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSnippet. */ - interface ITextSnippet { - - /** TextSnippet content */ - content?: (string|null); - - /** TextSnippet mimeType */ - mimeType?: (string|null); - - /** TextSnippet contentUri */ - contentUri?: (string|null); + /** Properties of an ImageObjectDetectionDatasetMetadata. */ + interface IImageObjectDetectionDatasetMetadata { } - /** Represents a TextSnippet. */ - class TextSnippet implements ITextSnippet { + /** Represents an ImageObjectDetectionDatasetMetadata. */ + class ImageObjectDetectionDatasetMetadata implements IImageObjectDetectionDatasetMetadata { /** - * Constructs a new TextSnippet. + * Constructs a new ImageObjectDetectionDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextSnippet); - - /** TextSnippet content. */ - public content: string; - - /** TextSnippet mimeType. */ - public mimeType: string; - - /** TextSnippet contentUri. */ - public contentUri: string; + constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata); /** - * Creates a new TextSnippet instance using the specified properties. + * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextSnippet instance + * @returns ImageObjectDetectionDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextSnippet): google.cloud.automl.v1beta1.TextSnippet; + public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata): google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata; /** - * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. - * @param message TextSnippet message or plain object to encode + * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. - * @param message TextSnippet message or plain object to encode + * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSnippet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSnippet message from the specified reader or buffer. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSnippet + * @returns ImageObjectDetectionDatasetMetadata * @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.automl.v1beta1.TextSnippet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata; /** - * Decodes a TextSnippet message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSnippet + * @returns ImageObjectDetectionDatasetMetadata * @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.automl.v1beta1.TextSnippet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata; /** - * Verifies a TextSnippet message. + * Verifies an ImageObjectDetectionDatasetMetadata 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 TextSnippet message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSnippet + * @returns ImageObjectDetectionDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSnippet; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata; /** - * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. - * @param message TextSnippet + * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. + * @param message ImageObjectDetectionDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextSnippet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSnippet to JSON. + * Converts this ImageObjectDetectionDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DocumentDimensions. */ - interface IDocumentDimensions { + /** Properties of an ImageClassificationModelMetadata. */ + interface IImageClassificationModelMetadata { - /** DocumentDimensions unit */ - unit?: (google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|null); + /** ImageClassificationModelMetadata baseModelId */ + baseModelId?: (string|null); - /** DocumentDimensions width */ - width?: (number|null); + /** ImageClassificationModelMetadata trainBudget */ + trainBudget?: (number|Long|string|null); - /** DocumentDimensions height */ - height?: (number|null); + /** ImageClassificationModelMetadata trainCost */ + trainCost?: (number|Long|string|null); + + /** ImageClassificationModelMetadata stopReason */ + stopReason?: (string|null); + + /** ImageClassificationModelMetadata modelType */ + modelType?: (string|null); + + /** ImageClassificationModelMetadata nodeQps */ + nodeQps?: (number|null); + + /** ImageClassificationModelMetadata nodeCount */ + nodeCount?: (number|Long|string|null); } - /** Represents a DocumentDimensions. */ - class DocumentDimensions implements IDocumentDimensions { + /** Represents an ImageClassificationModelMetadata. */ + class ImageClassificationModelMetadata implements IImageClassificationModelMetadata { /** - * Constructs a new DocumentDimensions. + * Constructs a new ImageClassificationModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDocumentDimensions); + constructor(properties?: google.cloud.automl.v1beta1.IImageClassificationModelMetadata); - /** DocumentDimensions unit. */ - public unit: (google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|keyof typeof google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit); + /** ImageClassificationModelMetadata baseModelId. */ + public baseModelId: string; - /** DocumentDimensions width. */ - public width: number; + /** ImageClassificationModelMetadata trainBudget. */ + public trainBudget: (number|Long|string); - /** DocumentDimensions height. */ - public height: number; + /** ImageClassificationModelMetadata trainCost. */ + public trainCost: (number|Long|string); + + /** ImageClassificationModelMetadata stopReason. */ + public stopReason: string; + + /** ImageClassificationModelMetadata modelType. */ + public modelType: string; + + /** ImageClassificationModelMetadata nodeQps. */ + public nodeQps: number; + + /** ImageClassificationModelMetadata nodeCount. */ + public nodeCount: (number|Long|string); /** - * Creates a new DocumentDimensions instance using the specified properties. + * Creates a new ImageClassificationModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentDimensions instance + * @returns ImageClassificationModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDocumentDimensions): google.cloud.automl.v1beta1.DocumentDimensions; + public static create(properties?: google.cloud.automl.v1beta1.IImageClassificationModelMetadata): google.cloud.automl.v1beta1.ImageClassificationModelMetadata; /** - * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. - * @param message DocumentDimensions message or plain object to encode + * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. + * @param message ImageClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. - * @param message DocumentDimensions message or plain object to encode + * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. + * @param message ImageClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDocumentDimensions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentDimensions message from the specified reader or buffer. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentDimensions + * @returns ImageClassificationModelMetadata * @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.automl.v1beta1.DocumentDimensions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageClassificationModelMetadata; /** - * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentDimensions + * @returns ImageClassificationModelMetadata * @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.automl.v1beta1.DocumentDimensions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageClassificationModelMetadata; /** - * Verifies a DocumentDimensions message. + * Verifies an ImageClassificationModelMetadata 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 DocumentDimensions message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentDimensions + * @returns ImageClassificationModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DocumentDimensions; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageClassificationModelMetadata; /** - * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. - * @param message DocumentDimensions + * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. + * @param message ImageClassificationModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DocumentDimensions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImageClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentDimensions to JSON. + * Converts this ImageClassificationModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DocumentDimensions { - - /** DocumentDimensionUnit enum. */ - enum DocumentDimensionUnit { - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0, - INCH = 1, - CENTIMETER = 2, - POINT = 3 - } - } + /** Properties of an ImageObjectDetectionModelMetadata. */ + interface IImageObjectDetectionModelMetadata { - /** Properties of a Document. */ - interface IDocument { + /** ImageObjectDetectionModelMetadata modelType */ + modelType?: (string|null); - /** Document inputConfig */ - inputConfig?: (google.cloud.automl.v1beta1.IDocumentInputConfig|null); + /** ImageObjectDetectionModelMetadata nodeCount */ + nodeCount?: (number|Long|string|null); - /** Document documentText */ - documentText?: (google.cloud.automl.v1beta1.ITextSnippet|null); + /** ImageObjectDetectionModelMetadata nodeQps */ + nodeQps?: (number|null); - /** Document layout */ - layout?: (google.cloud.automl.v1beta1.Document.ILayout[]|null); + /** ImageObjectDetectionModelMetadata stopReason */ + stopReason?: (string|null); - /** Document documentDimensions */ - documentDimensions?: (google.cloud.automl.v1beta1.IDocumentDimensions|null); + /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours */ + trainBudgetMilliNodeHours?: (number|Long|string|null); - /** Document pageCount */ - pageCount?: (number|null); + /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours */ + trainCostMilliNodeHours?: (number|Long|string|null); } - /** Represents a Document. */ - class Document implements IDocument { + /** Represents an ImageObjectDetectionModelMetadata. */ + class ImageObjectDetectionModelMetadata implements IImageObjectDetectionModelMetadata { /** - * Constructs a new Document. + * Constructs a new ImageObjectDetectionModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDocument); + constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata); - /** Document inputConfig. */ - public inputConfig?: (google.cloud.automl.v1beta1.IDocumentInputConfig|null); + /** ImageObjectDetectionModelMetadata modelType. */ + public modelType: string; - /** Document documentText. */ - public documentText?: (google.cloud.automl.v1beta1.ITextSnippet|null); + /** ImageObjectDetectionModelMetadata nodeCount. */ + public nodeCount: (number|Long|string); - /** Document layout. */ - public layout: google.cloud.automl.v1beta1.Document.ILayout[]; + /** ImageObjectDetectionModelMetadata nodeQps. */ + public nodeQps: number; - /** Document documentDimensions. */ - public documentDimensions?: (google.cloud.automl.v1beta1.IDocumentDimensions|null); + /** ImageObjectDetectionModelMetadata stopReason. */ + public stopReason: string; - /** Document pageCount. */ - public pageCount: number; + /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. */ + public trainBudgetMilliNodeHours: (number|Long|string); + + /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours. */ + public trainCostMilliNodeHours: (number|Long|string); /** - * Creates a new Document instance using the specified properties. + * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Document instance + * @returns ImageObjectDetectionModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDocument): google.cloud.automl.v1beta1.Document; + public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Document + * @returns ImageObjectDetectionModelMetadata * @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.automl.v1beta1.Document; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Document + * @returns ImageObjectDetectionModelMetadata * @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.automl.v1beta1.Document; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; /** - * Verifies a Document message. + * Verifies an ImageObjectDetectionModelMetadata 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 Document message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Document - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Document; - - /** - * Creates a plain object from a Document message. Also converts values to other types if specified. - * @param message Document - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Document to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Document { - - /** Properties of a Layout. */ - interface ILayout { - - /** Layout textSegment */ - textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - - /** Layout pageNumber */ - pageNumber?: (number|null); - - /** Layout boundingPoly */ - boundingPoly?: (google.cloud.automl.v1beta1.IBoundingPoly|null); - - /** Layout textSegmentType */ - textSegmentType?: (google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|null); - } - - /** Represents a Layout. */ - class Layout implements ILayout { - - /** - * Constructs a new Layout. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.Document.ILayout); - - /** Layout textSegment. */ - public textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - - /** Layout pageNumber. */ - public pageNumber: number; - - /** Layout boundingPoly. */ - public boundingPoly?: (google.cloud.automl.v1beta1.IBoundingPoly|null); - - /** Layout textSegmentType. */ - public textSegmentType: (google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|keyof typeof google.cloud.automl.v1beta1.Document.Layout.TextSegmentType); - - /** - * Creates a new Layout instance using the specified properties. - * @param [properties] Properties to set - * @returns Layout instance - */ - public static create(properties?: google.cloud.automl.v1beta1.Document.ILayout): google.cloud.automl.v1beta1.Document.Layout; - - /** - * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. - * @param message Layout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. - * @param message Layout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.Document.ILayout, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Layout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Layout - * @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.automl.v1beta1.Document.Layout; - - /** - * Decodes a Layout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Layout - * @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.automl.v1beta1.Document.Layout; - - /** - * Verifies a Layout 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 Layout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Layout - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Document.Layout; - - /** - * Creates a plain object from a Layout message. Also converts values to other types if specified. - * @param message Layout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.Document.Layout, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Layout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + * Creates an ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageObjectDetectionModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; - namespace Layout { + /** + * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. + * @param message ImageObjectDetectionModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** TextSegmentType enum. */ - enum TextSegmentType { - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0, - TOKEN = 1, - PARAGRAPH = 2, - FORM_FIELD = 3, - FORM_FIELD_NAME = 4, - FORM_FIELD_CONTENTS = 5, - TABLE = 6, - TABLE_HEADER = 7, - TABLE_ROW = 8, - TABLE_CELL = 9 - } - } + /** + * Converts this ImageObjectDetectionModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a Row. */ - interface IRow { - - /** Row columnSpecIds */ - columnSpecIds?: (string[]|null); + /** Properties of an ImageClassificationModelDeploymentMetadata. */ + interface IImageClassificationModelDeploymentMetadata { - /** Row values */ - values?: (google.protobuf.IValue[]|null); + /** ImageClassificationModelDeploymentMetadata nodeCount */ + nodeCount?: (number|Long|string|null); } - /** Represents a Row. */ - class Row implements IRow { + /** Represents an ImageClassificationModelDeploymentMetadata. */ + class ImageClassificationModelDeploymentMetadata implements IImageClassificationModelDeploymentMetadata { /** - * Constructs a new Row. + * Constructs a new ImageClassificationModelDeploymentMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IRow); - - /** Row columnSpecIds. */ - public columnSpecIds: string[]; + constructor(properties?: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata); - /** Row values. */ - public values: google.protobuf.IValue[]; + /** ImageClassificationModelDeploymentMetadata nodeCount. */ + public nodeCount: (number|Long|string); /** - * Creates a new Row instance using the specified properties. + * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Row instance + * @returns ImageClassificationModelDeploymentMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IRow): google.cloud.automl.v1beta1.Row; + public static create(properties?: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; /** - * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. + * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. + * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Row + * @returns ImageClassificationModelDeploymentMetadata * @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.automl.v1beta1.Row; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Row + * @returns ImageClassificationModelDeploymentMetadata * @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.automl.v1beta1.Row; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; /** - * Verifies a Row message. + * Verifies an ImageClassificationModelDeploymentMetadata 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 Row message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Row + * @returns ImageClassificationModelDeploymentMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Row; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row + * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. + * @param message ImageClassificationModelDeploymentMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Row to JSON. + * Converts this ImageClassificationModelDeploymentMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExamplePayload. */ - interface IExamplePayload { - - /** ExamplePayload image */ - image?: (google.cloud.automl.v1beta1.IImage|null); - - /** ExamplePayload textSnippet */ - textSnippet?: (google.cloud.automl.v1beta1.ITextSnippet|null); - - /** ExamplePayload document */ - document?: (google.cloud.automl.v1beta1.IDocument|null); + /** Properties of an ImageObjectDetectionModelDeploymentMetadata. */ + interface IImageObjectDetectionModelDeploymentMetadata { - /** ExamplePayload row */ - row?: (google.cloud.automl.v1beta1.IRow|null); + /** ImageObjectDetectionModelDeploymentMetadata nodeCount */ + nodeCount?: (number|Long|string|null); } - /** Represents an ExamplePayload. */ - class ExamplePayload implements IExamplePayload { + /** Represents an ImageObjectDetectionModelDeploymentMetadata. */ + class ImageObjectDetectionModelDeploymentMetadata implements IImageObjectDetectionModelDeploymentMetadata { /** - * Constructs a new ExamplePayload. + * Constructs a new ImageObjectDetectionModelDeploymentMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExamplePayload); - - /** ExamplePayload image. */ - public image?: (google.cloud.automl.v1beta1.IImage|null); - - /** ExamplePayload textSnippet. */ - public textSnippet?: (google.cloud.automl.v1beta1.ITextSnippet|null); - - /** ExamplePayload document. */ - public document?: (google.cloud.automl.v1beta1.IDocument|null); - - /** ExamplePayload row. */ - public row?: (google.cloud.automl.v1beta1.IRow|null); + constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata); - /** ExamplePayload payload. */ - public payload?: ("image"|"textSnippet"|"document"|"row"); + /** ImageObjectDetectionModelDeploymentMetadata nodeCount. */ + public nodeCount: (number|Long|string); /** - * Creates a new ExamplePayload instance using the specified properties. + * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ExamplePayload instance + * @returns ImageObjectDetectionModelDeploymentMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExamplePayload): google.cloud.automl.v1beta1.ExamplePayload; + public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; /** - * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. - * @param message ExamplePayload message or plain object to encode + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. - * @param message ExamplePayload message or plain object to encode + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. + * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExamplePayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExamplePayload message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExamplePayload + * @returns ImageObjectDetectionModelDeploymentMetadata * @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.automl.v1beta1.ExamplePayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; /** - * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExamplePayload + * @returns ImageObjectDetectionModelDeploymentMetadata * @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.automl.v1beta1.ExamplePayload; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; /** - * Verifies an ExamplePayload message. + * Verifies an ImageObjectDetectionModelDeploymentMetadata 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 ExamplePayload message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExamplePayload + * @returns ImageObjectDetectionModelDeploymentMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExamplePayload; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; /** - * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. - * @param message ExamplePayload + * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. + * @param message ImageObjectDetectionModelDeploymentMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExamplePayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExamplePayload to JSON. + * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an InputConfig. */ - interface IInputConfig { - - /** InputConfig gcsSource */ - gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); - - /** InputConfig bigquerySource */ - bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); + /** Properties of a TextClassificationDatasetMetadata. */ + interface ITextClassificationDatasetMetadata { - /** InputConfig params */ - params?: ({ [k: string]: string }|null); + /** TextClassificationDatasetMetadata classificationType */ + classificationType?: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType|null); } - /** Represents an InputConfig. */ - class InputConfig implements IInputConfig { + /** Represents a TextClassificationDatasetMetadata. */ + class TextClassificationDatasetMetadata implements ITextClassificationDatasetMetadata { /** - * Constructs a new InputConfig. + * Constructs a new TextClassificationDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IInputConfig); - - /** InputConfig gcsSource. */ - public gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); - - /** InputConfig bigquerySource. */ - public bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); - - /** InputConfig params. */ - public params: { [k: string]: string }; + constructor(properties?: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata); - /** InputConfig source. */ - public source?: ("gcsSource"|"bigquerySource"); + /** TextClassificationDatasetMetadata classificationType. */ + public classificationType: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType); /** - * Creates a new InputConfig instance using the specified properties. + * Creates a new TextClassificationDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns InputConfig instance + * @returns TextClassificationDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IInputConfig): google.cloud.automl.v1beta1.InputConfig; + public static create(properties?: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; /** - * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. - * @param message InputConfig message or plain object to encode + * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. + * @param message TextClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. - * @param message InputConfig message or plain object to encode + * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. + * @param message TextClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InputConfig message from the specified reader or buffer. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InputConfig + * @returns TextClassificationDatasetMetadata * @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.automl.v1beta1.InputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; /** - * Decodes an InputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InputConfig + * @returns TextClassificationDatasetMetadata * @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.automl.v1beta1.InputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; /** - * Verifies an InputConfig message. + * Verifies a TextClassificationDatasetMetadata 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 InputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InputConfig + * @returns TextClassificationDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.InputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; /** - * Creates a plain object from an InputConfig message. Also converts values to other types if specified. - * @param message InputConfig + * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. + * @param message TextClassificationDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.InputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InputConfig to JSON. + * Converts this TextClassificationDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictInputConfig. */ - interface IBatchPredictInputConfig { - - /** BatchPredictInputConfig gcsSource */ - gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); + /** Properties of a TextClassificationModelMetadata. */ + interface ITextClassificationModelMetadata { - /** BatchPredictInputConfig bigquerySource */ - bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); + /** TextClassificationModelMetadata classificationType */ + classificationType?: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType|null); } - /** Represents a BatchPredictInputConfig. */ - class BatchPredictInputConfig implements IBatchPredictInputConfig { + /** Represents a TextClassificationModelMetadata. */ + class TextClassificationModelMetadata implements ITextClassificationModelMetadata { /** - * Constructs a new BatchPredictInputConfig. + * Constructs a new TextClassificationModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictInputConfig); - - /** BatchPredictInputConfig gcsSource. */ - public gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); - - /** BatchPredictInputConfig bigquerySource. */ - public bigquerySource?: (google.cloud.automl.v1beta1.IBigQuerySource|null); + constructor(properties?: google.cloud.automl.v1beta1.ITextClassificationModelMetadata); - /** BatchPredictInputConfig source. */ - public source?: ("gcsSource"|"bigquerySource"); + /** TextClassificationModelMetadata classificationType. */ + public classificationType: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType); /** - * Creates a new BatchPredictInputConfig instance using the specified properties. + * Creates a new TextClassificationModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictInputConfig instance + * @returns TextClassificationModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictInputConfig): google.cloud.automl.v1beta1.BatchPredictInputConfig; + public static create(properties?: google.cloud.automl.v1beta1.ITextClassificationModelMetadata): google.cloud.automl.v1beta1.TextClassificationModelMetadata; /** - * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. - * @param message BatchPredictInputConfig message or plain object to encode + * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. + * @param message TextClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. - * @param message BatchPredictInputConfig message or plain object to encode + * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. + * @param message TextClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictInputConfig + * @returns TextClassificationModelMetadata * @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.automl.v1beta1.BatchPredictInputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextClassificationModelMetadata; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictInputConfig + * @returns TextClassificationModelMetadata * @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.automl.v1beta1.BatchPredictInputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextClassificationModelMetadata; /** - * Verifies a BatchPredictInputConfig message. + * Verifies a TextClassificationModelMetadata 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 BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictInputConfig + * @returns TextClassificationModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictInputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextClassificationModelMetadata; /** - * Creates a plain object from a BatchPredictInputConfig message. Also converts values to other types if specified. - * @param message BatchPredictInputConfig + * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. + * @param message TextClassificationModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BatchPredictInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictInputConfig to JSON. + * Converts this TextClassificationModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DocumentInputConfig. */ - interface IDocumentInputConfig { - - /** DocumentInputConfig gcsSource */ - gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); + /** Properties of a TextExtractionDatasetMetadata. */ + interface ITextExtractionDatasetMetadata { } - /** Represents a DocumentInputConfig. */ - class DocumentInputConfig implements IDocumentInputConfig { + /** Represents a TextExtractionDatasetMetadata. */ + class TextExtractionDatasetMetadata implements ITextExtractionDatasetMetadata { /** - * Constructs a new DocumentInputConfig. + * Constructs a new TextExtractionDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDocumentInputConfig); - - /** DocumentInputConfig gcsSource. */ - public gcsSource?: (google.cloud.automl.v1beta1.IGcsSource|null); + constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata); /** - * Creates a new DocumentInputConfig instance using the specified properties. + * Creates a new TextExtractionDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentInputConfig instance + * @returns TextExtractionDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDocumentInputConfig): google.cloud.automl.v1beta1.DocumentInputConfig; + public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata): google.cloud.automl.v1beta1.TextExtractionDatasetMetadata; /** - * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. - * @param message DocumentInputConfig message or plain object to encode + * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. + * @param message TextExtractionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. - * @param message DocumentInputConfig message or plain object to encode + * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. + * @param message TextExtractionDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDocumentInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentInputConfig + * @returns TextExtractionDatasetMetadata * @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.automl.v1beta1.DocumentInputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextExtractionDatasetMetadata; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentInputConfig + * @returns TextExtractionDatasetMetadata * @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.automl.v1beta1.DocumentInputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextExtractionDatasetMetadata; /** - * Verifies a DocumentInputConfig message. + * Verifies a TextExtractionDatasetMetadata 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 DocumentInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentInputConfig + * @returns TextExtractionDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DocumentInputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionDatasetMetadata; /** - * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. - * @param message DocumentInputConfig + * Creates a plain object from a TextExtractionDatasetMetadata message. Also converts values to other types if specified. + * @param message TextExtractionDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DocumentInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextExtractionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentInputConfig to JSON. + * Converts this TextExtractionDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OutputConfig. */ - interface IOutputConfig { - - /** OutputConfig gcsDestination */ - gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - - /** OutputConfig bigqueryDestination */ - bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); + /** Properties of a TextExtractionModelMetadata. */ + interface ITextExtractionModelMetadata { } - /** Represents an OutputConfig. */ - class OutputConfig implements IOutputConfig { + /** Represents a TextExtractionModelMetadata. */ + class TextExtractionModelMetadata implements ITextExtractionModelMetadata { /** - * Constructs a new OutputConfig. + * Constructs a new TextExtractionModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IOutputConfig); - - /** OutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - - /** OutputConfig bigqueryDestination. */ - public bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); - - /** OutputConfig destination. */ - public destination?: ("gcsDestination"|"bigqueryDestination"); + constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionModelMetadata); /** - * Creates a new OutputConfig instance using the specified properties. + * Creates a new TextExtractionModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns OutputConfig instance + * @returns TextExtractionModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IOutputConfig): google.cloud.automl.v1beta1.OutputConfig; + public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionModelMetadata): google.cloud.automl.v1beta1.TextExtractionModelMetadata; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. + * @param message TextExtractionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. + * @param message TextExtractionModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputConfig + * @returns TextExtractionModelMetadata * @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.automl.v1beta1.OutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextExtractionModelMetadata; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputConfig + * @returns TextExtractionModelMetadata * @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.automl.v1beta1.OutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextExtractionModelMetadata; /** - * Verifies an OutputConfig message. + * Verifies a TextExtractionModelMetadata 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 OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputConfig + * @returns TextExtractionModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.OutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionModelMetadata; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. - * @param message OutputConfig + * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. + * @param message TextExtractionModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextExtractionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputConfig to JSON. + * Converts this TextExtractionModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictOutputConfig. */ - interface IBatchPredictOutputConfig { - - /** BatchPredictOutputConfig gcsDestination */ - gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); + /** Properties of a TextSentimentDatasetMetadata. */ + interface ITextSentimentDatasetMetadata { - /** BatchPredictOutputConfig bigqueryDestination */ - bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); + /** TextSentimentDatasetMetadata sentimentMax */ + sentimentMax?: (number|null); } - /** Represents a BatchPredictOutputConfig. */ - class BatchPredictOutputConfig implements IBatchPredictOutputConfig { + /** Represents a TextSentimentDatasetMetadata. */ + class TextSentimentDatasetMetadata implements ITextSentimentDatasetMetadata { /** - * Constructs a new BatchPredictOutputConfig. + * Constructs a new TextSentimentDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictOutputConfig); - - /** BatchPredictOutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - - /** BatchPredictOutputConfig bigqueryDestination. */ - public bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); + constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata); - /** BatchPredictOutputConfig destination. */ - public destination?: ("gcsDestination"|"bigqueryDestination"); + /** TextSentimentDatasetMetadata sentimentMax. */ + public sentimentMax: number; /** - * Creates a new BatchPredictOutputConfig instance using the specified properties. + * Creates a new TextSentimentDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictOutputConfig instance + * @returns TextSentimentDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictOutputConfig): google.cloud.automl.v1beta1.BatchPredictOutputConfig; + public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata): google.cloud.automl.v1beta1.TextSentimentDatasetMetadata; /** - * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. - * @param message BatchPredictOutputConfig message or plain object to encode + * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. + * @param message TextSentimentDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. - * @param message BatchPredictOutputConfig message or plain object to encode + * Encodes the specified TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. + * @param message TextSentimentDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictOutputConfig + * @returns TextSentimentDatasetMetadata * @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.automl.v1beta1.BatchPredictOutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextSentimentDatasetMetadata; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictOutputConfig + * @returns TextSentimentDatasetMetadata * @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.automl.v1beta1.BatchPredictOutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextSentimentDatasetMetadata; /** - * Verifies a BatchPredictOutputConfig message. + * Verifies a TextSentimentDatasetMetadata 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 BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictOutputConfig + * @returns TextSentimentDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictOutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentDatasetMetadata; /** - * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. - * @param message BatchPredictOutputConfig + * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. + * @param message TextSentimentDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BatchPredictOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextSentimentDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictOutputConfig to JSON. + * Converts this TextSentimentDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ModelExportOutputConfig. */ - interface IModelExportOutputConfig { - - /** ModelExportOutputConfig gcsDestination */ - gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - - /** ModelExportOutputConfig gcrDestination */ - gcrDestination?: (google.cloud.automl.v1beta1.IGcrDestination|null); - - /** ModelExportOutputConfig modelFormat */ - modelFormat?: (string|null); - - /** ModelExportOutputConfig params */ - params?: ({ [k: string]: string }|null); + /** Properties of a TextSentimentModelMetadata. */ + interface ITextSentimentModelMetadata { } - /** Represents a ModelExportOutputConfig. */ - class ModelExportOutputConfig implements IModelExportOutputConfig { + /** Represents a TextSentimentModelMetadata. */ + class TextSentimentModelMetadata implements ITextSentimentModelMetadata { /** - * Constructs a new ModelExportOutputConfig. + * Constructs a new TextSentimentModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IModelExportOutputConfig); - - /** ModelExportOutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.automl.v1beta1.IGcsDestination|null); - - /** ModelExportOutputConfig gcrDestination. */ - public gcrDestination?: (google.cloud.automl.v1beta1.IGcrDestination|null); - - /** ModelExportOutputConfig modelFormat. */ - public modelFormat: string; - - /** ModelExportOutputConfig params. */ - public params: { [k: string]: string }; - - /** ModelExportOutputConfig destination. */ - public destination?: ("gcsDestination"|"gcrDestination"); + constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentModelMetadata); /** - * Creates a new ModelExportOutputConfig instance using the specified properties. + * Creates a new TextSentimentModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ModelExportOutputConfig instance + * @returns TextSentimentModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IModelExportOutputConfig): google.cloud.automl.v1beta1.ModelExportOutputConfig; + public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentModelMetadata): google.cloud.automl.v1beta1.TextSentimentModelMetadata; /** - * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. - * @param message ModelExportOutputConfig message or plain object to encode + * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. + * @param message TextSentimentModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. - * @param message ModelExportOutputConfig message or plain object to encode + * Encodes the specified TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. + * @param message TextSentimentModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IModelExportOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ModelExportOutputConfig + * @returns TextSentimentModelMetadata * @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.automl.v1beta1.ModelExportOutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextSentimentModelMetadata; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ModelExportOutputConfig + * @returns TextSentimentModelMetadata * @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.automl.v1beta1.ModelExportOutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextSentimentModelMetadata; /** - * Verifies a ModelExportOutputConfig message. + * Verifies a TextSentimentModelMetadata 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 ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ModelExportOutputConfig + * @returns TextSentimentModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ModelExportOutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentModelMetadata; /** - * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. - * @param message ModelExportOutputConfig + * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. + * @param message TextSentimentModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ModelExportOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.TextSentimentModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ModelExportOutputConfig to JSON. + * Converts this TextSentimentModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportEvaluatedExamplesOutputConfig. */ - interface IExportEvaluatedExamplesOutputConfig { - - /** ExportEvaluatedExamplesOutputConfig bigqueryDestination */ - bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); + /** Properties of a VideoClassificationDatasetMetadata. */ + interface IVideoClassificationDatasetMetadata { } - /** Represents an ExportEvaluatedExamplesOutputConfig. */ - class ExportEvaluatedExamplesOutputConfig implements IExportEvaluatedExamplesOutputConfig { + /** Represents a VideoClassificationDatasetMetadata. */ + class VideoClassificationDatasetMetadata implements IVideoClassificationDatasetMetadata { /** - * Constructs a new ExportEvaluatedExamplesOutputConfig. + * Constructs a new VideoClassificationDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig); - - /** ExportEvaluatedExamplesOutputConfig bigqueryDestination. */ - public bigqueryDestination?: (google.cloud.automl.v1beta1.IBigQueryDestination|null); - - /** ExportEvaluatedExamplesOutputConfig destination. */ - public destination?: "bigqueryDestination"; + constructor(properties?: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata); /** - * Creates a new ExportEvaluatedExamplesOutputConfig instance using the specified properties. + * Creates a new VideoClassificationDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ExportEvaluatedExamplesOutputConfig instance + * @returns VideoClassificationDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; + public static create(properties?: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata): google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata; /** - * Encodes the specified ExportEvaluatedExamplesOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. - * @param message ExportEvaluatedExamplesOutputConfig message or plain object to encode + * Encodes the specified VideoClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. + * @param message VideoClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportEvaluatedExamplesOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. - * @param message ExportEvaluatedExamplesOutputConfig message or plain object to encode + * Encodes the specified VideoClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. + * @param message VideoClassificationDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer. + * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportEvaluatedExamplesOutputConfig + * @returns VideoClassificationDatasetMetadata * @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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata; /** - * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportEvaluatedExamplesOutputConfig + * @returns VideoClassificationDatasetMetadata * @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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata; /** - * Verifies an ExportEvaluatedExamplesOutputConfig message. + * Verifies a VideoClassificationDatasetMetadata 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 ExportEvaluatedExamplesOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a VideoClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportEvaluatedExamplesOutputConfig + * @returns VideoClassificationDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata; /** - * Creates a plain object from an ExportEvaluatedExamplesOutputConfig message. Also converts values to other types if specified. - * @param message ExportEvaluatedExamplesOutputConfig + * Creates a plain object from a VideoClassificationDatasetMetadata message. Also converts values to other types if specified. + * @param message VideoClassificationDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportEvaluatedExamplesOutputConfig to JSON. + * Converts this VideoClassificationDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsSource. */ - interface IGcsSource { - - /** GcsSource inputUris */ - inputUris?: (string[]|null); + /** Properties of a VideoObjectTrackingDatasetMetadata. */ + interface IVideoObjectTrackingDatasetMetadata { } - /** Represents a GcsSource. */ - class GcsSource implements IGcsSource { + /** Represents a VideoObjectTrackingDatasetMetadata. */ + class VideoObjectTrackingDatasetMetadata implements IVideoObjectTrackingDatasetMetadata { /** - * Constructs a new GcsSource. + * Constructs a new VideoObjectTrackingDatasetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGcsSource); - - /** GcsSource inputUris. */ - public inputUris: string[]; + constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata); /** - * Creates a new GcsSource instance using the specified properties. + * Creates a new VideoObjectTrackingDatasetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns GcsSource instance + * @returns VideoObjectTrackingDatasetMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGcsSource): google.cloud.automl.v1beta1.GcsSource; + public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata): google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified VideoObjectTrackingDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. + * @param message VideoObjectTrackingDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified VideoObjectTrackingDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. + * @param message VideoObjectTrackingDatasetMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsSource + * @returns VideoObjectTrackingDatasetMetadata * @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.automl.v1beta1.GcsSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsSource + * @returns VideoObjectTrackingDatasetMetadata * @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.automl.v1beta1.GcsSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata; /** - * Verifies a GcsSource message. + * Verifies a VideoObjectTrackingDatasetMetadata 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 GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsSource + * @returns VideoObjectTrackingDatasetMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GcsSource; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @param message GcsSource + * Creates a plain object from a VideoObjectTrackingDatasetMetadata message. Also converts values to other types if specified. + * @param message VideoObjectTrackingDatasetMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsSource to JSON. + * Converts this VideoObjectTrackingDatasetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BigQuerySource. */ - interface IBigQuerySource { - - /** BigQuerySource inputUri */ - inputUri?: (string|null); + /** Properties of a VideoClassificationModelMetadata. */ + interface IVideoClassificationModelMetadata { } - /** Represents a BigQuerySource. */ - class BigQuerySource implements IBigQuerySource { + /** Represents a VideoClassificationModelMetadata. */ + class VideoClassificationModelMetadata implements IVideoClassificationModelMetadata { /** - * Constructs a new BigQuerySource. + * Constructs a new VideoClassificationModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBigQuerySource); - - /** BigQuerySource inputUri. */ - public inputUri: string; + constructor(properties?: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata); /** - * Creates a new BigQuerySource instance using the specified properties. + * Creates a new VideoClassificationModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BigQuerySource instance + * @returns VideoClassificationModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBigQuerySource): google.cloud.automl.v1beta1.BigQuerySource; + public static create(properties?: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata): google.cloud.automl.v1beta1.VideoClassificationModelMetadata; /** - * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. - * @param message BigQuerySource message or plain object to encode + * Encodes the specified VideoClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. + * @param message VideoClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. - * @param message BigQuerySource message or plain object to encode + * Encodes the specified VideoClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. + * @param message VideoClassificationModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQuerySource message from the specified reader or buffer. + * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQuerySource + * @returns VideoClassificationModelMetadata * @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.automl.v1beta1.BigQuerySource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.VideoClassificationModelMetadata; /** - * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. + * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQuerySource + * @returns VideoClassificationModelMetadata * @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.automl.v1beta1.BigQuerySource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.VideoClassificationModelMetadata; /** - * Verifies a BigQuerySource message. + * Verifies a VideoClassificationModelMetadata 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 BigQuerySource message from a plain object. Also converts values to their respective internal types. + * Creates a VideoClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQuerySource + * @returns VideoClassificationModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BigQuerySource; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoClassificationModelMetadata; /** - * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. - * @param message BigQuerySource + * Creates a plain object from a VideoClassificationModelMetadata message. Also converts values to other types if specified. + * @param message VideoClassificationModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BigQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.VideoClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQuerySource to JSON. + * Converts this VideoClassificationModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsDestination. */ - interface IGcsDestination { - - /** GcsDestination outputUriPrefix */ - outputUriPrefix?: (string|null); + /** Properties of a VideoObjectTrackingModelMetadata. */ + interface IVideoObjectTrackingModelMetadata { } - /** Represents a GcsDestination. */ - class GcsDestination implements IGcsDestination { + /** Represents a VideoObjectTrackingModelMetadata. */ + class VideoObjectTrackingModelMetadata implements IVideoObjectTrackingModelMetadata { /** - * Constructs a new GcsDestination. + * Constructs a new VideoObjectTrackingModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGcsDestination); - - /** GcsDestination outputUriPrefix. */ - public outputUriPrefix: string; + constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata); /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new VideoObjectTrackingModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns GcsDestination instance + * @returns VideoObjectTrackingModelMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGcsDestination): google.cloud.automl.v1beta1.GcsDestination; + public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata): google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified VideoObjectTrackingModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. + * @param message VideoObjectTrackingModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified VideoObjectTrackingModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. + * @param message VideoObjectTrackingModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsDestination + * @returns VideoObjectTrackingModelMetadata * @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.automl.v1beta1.GcsDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsDestination + * @returns VideoObjectTrackingModelMetadata * @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.automl.v1beta1.GcsDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata; /** - * Verifies a GcsDestination message. + * Verifies a VideoObjectTrackingModelMetadata 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 GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsDestination + * @returns VideoObjectTrackingModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GcsDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @param message GcsDestination + * Creates a plain object from a VideoObjectTrackingModelMetadata message. Also converts values to other types if specified. + * @param message VideoObjectTrackingModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsDestination to JSON. + * Converts this VideoObjectTrackingModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BigQueryDestination. */ - interface IBigQueryDestination { + /** Properties of a Model. */ + interface IModel { - /** BigQueryDestination outputUri */ - outputUri?: (string|null); + /** Model translationModelMetadata */ + translationModelMetadata?: (google.cloud.automl.v1beta1.ITranslationModelMetadata|null); + + /** Model imageClassificationModelMetadata */ + imageClassificationModelMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null); + + /** Model textClassificationModelMetadata */ + textClassificationModelMetadata?: (google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null); + + /** Model imageObjectDetectionModelMetadata */ + imageObjectDetectionModelMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null); + + /** Model videoClassificationModelMetadata */ + videoClassificationModelMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null); + + /** Model videoObjectTrackingModelMetadata */ + videoObjectTrackingModelMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null); + + /** Model textExtractionModelMetadata */ + textExtractionModelMetadata?: (google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null); + + /** Model tablesModelMetadata */ + tablesModelMetadata?: (google.cloud.automl.v1beta1.ITablesModelMetadata|null); + + /** Model textSentimentModelMetadata */ + textSentimentModelMetadata?: (google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null); + + /** Model name */ + name?: (string|null); + + /** Model displayName */ + displayName?: (string|null); + + /** Model datasetId */ + datasetId?: (string|null); + + /** Model createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Model updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Model deploymentState */ + deploymentState?: (google.cloud.automl.v1beta1.Model.DeploymentState|keyof typeof google.cloud.automl.v1beta1.Model.DeploymentState|null); } - /** Represents a BigQueryDestination. */ - class BigQueryDestination implements IBigQueryDestination { + /** Represents a Model. */ + class Model implements IModel { /** - * Constructs a new BigQueryDestination. + * Constructs a new Model. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBigQueryDestination); + constructor(properties?: google.cloud.automl.v1beta1.IModel); - /** BigQueryDestination outputUri. */ - public outputUri: string; + /** Model translationModelMetadata. */ + public translationModelMetadata?: (google.cloud.automl.v1beta1.ITranslationModelMetadata|null); + + /** Model imageClassificationModelMetadata. */ + public imageClassificationModelMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null); + + /** Model textClassificationModelMetadata. */ + public textClassificationModelMetadata?: (google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null); + + /** Model imageObjectDetectionModelMetadata. */ + public imageObjectDetectionModelMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null); + + /** Model videoClassificationModelMetadata. */ + public videoClassificationModelMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null); + + /** Model videoObjectTrackingModelMetadata. */ + public videoObjectTrackingModelMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null); + + /** Model textExtractionModelMetadata. */ + public textExtractionModelMetadata?: (google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null); + + /** Model tablesModelMetadata. */ + public tablesModelMetadata?: (google.cloud.automl.v1beta1.ITablesModelMetadata|null); + + /** Model textSentimentModelMetadata. */ + public textSentimentModelMetadata?: (google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null); + + /** Model name. */ + public name: string; + + /** Model displayName. */ + public displayName: string; + + /** Model datasetId. */ + public datasetId: string; + + /** Model createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Model updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Model deploymentState. */ + public deploymentState: (google.cloud.automl.v1beta1.Model.DeploymentState|keyof typeof google.cloud.automl.v1beta1.Model.DeploymentState); + + /** Model modelMetadata. */ + public modelMetadata?: ("translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"videoClassificationModelMetadata"|"videoObjectTrackingModelMetadata"|"textExtractionModelMetadata"|"tablesModelMetadata"|"textSentimentModelMetadata"); /** - * Creates a new BigQueryDestination instance using the specified properties. + * Creates a new Model instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryDestination instance + * @returns Model instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBigQueryDestination): google.cloud.automl.v1beta1.BigQueryDestination; + public static create(properties?: google.cloud.automl.v1beta1.IModel): google.cloud.automl.v1beta1.Model; /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode + * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. + * @param message Model message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode + /** + * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. + * @param message Model message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryDestination message from the specified reader or buffer. + * Decodes a Model message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryDestination + * @returns Model * @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.automl.v1beta1.BigQueryDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.Model; /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * Decodes a Model message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryDestination + * @returns Model * @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.automl.v1beta1.BigQueryDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.Model; /** - * Verifies a BigQueryDestination message. + * Verifies a Model 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 BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * Creates a Model message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryDestination + * @returns Model */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BigQueryDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Model; /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. - * @param message BigQueryDestination + * Creates a plain object from a Model message. Also converts values to other types if specified. + * @param message Model * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryDestination to JSON. + * Converts this Model to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcrDestination. */ - interface IGcrDestination { + namespace Model { - /** GcrDestination outputUri */ - outputUri?: (string|null); + /** DeploymentState enum. */ + enum DeploymentState { + DEPLOYMENT_STATE_UNSPECIFIED = 0, + DEPLOYED = 1, + UNDEPLOYED = 2 + } } - /** Represents a GcrDestination. */ - class GcrDestination implements IGcrDestination { + /** Properties of a ModelEvaluation. */ + interface IModelEvaluation { + + /** ModelEvaluation classificationEvaluationMetrics */ + classificationEvaluationMetrics?: (google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null); + + /** ModelEvaluation regressionEvaluationMetrics */ + regressionEvaluationMetrics?: (google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null); + + /** ModelEvaluation translationEvaluationMetrics */ + translationEvaluationMetrics?: (google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null); + + /** ModelEvaluation imageObjectDetectionEvaluationMetrics */ + imageObjectDetectionEvaluationMetrics?: (google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null); + + /** ModelEvaluation videoObjectTrackingEvaluationMetrics */ + videoObjectTrackingEvaluationMetrics?: (google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null); + + /** ModelEvaluation textSentimentEvaluationMetrics */ + textSentimentEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null); + + /** ModelEvaluation textExtractionEvaluationMetrics */ + textExtractionEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null); + + /** ModelEvaluation name */ + name?: (string|null); + + /** ModelEvaluation annotationSpecId */ + annotationSpecId?: (string|null); + + /** ModelEvaluation displayName */ + displayName?: (string|null); + + /** ModelEvaluation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ModelEvaluation evaluatedExampleCount */ + evaluatedExampleCount?: (number|null); + } + + /** Represents a ModelEvaluation. */ + class ModelEvaluation implements IModelEvaluation { /** - * Constructs a new GcrDestination. + * Constructs a new ModelEvaluation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IGcrDestination); + constructor(properties?: google.cloud.automl.v1beta1.IModelEvaluation); - /** GcrDestination outputUri. */ - public outputUri: string; + /** ModelEvaluation classificationEvaluationMetrics. */ + public classificationEvaluationMetrics?: (google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null); + + /** ModelEvaluation regressionEvaluationMetrics. */ + public regressionEvaluationMetrics?: (google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null); + + /** ModelEvaluation translationEvaluationMetrics. */ + public translationEvaluationMetrics?: (google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null); + + /** ModelEvaluation imageObjectDetectionEvaluationMetrics. */ + public imageObjectDetectionEvaluationMetrics?: (google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null); + + /** ModelEvaluation videoObjectTrackingEvaluationMetrics. */ + public videoObjectTrackingEvaluationMetrics?: (google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null); + + /** ModelEvaluation textSentimentEvaluationMetrics. */ + public textSentimentEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null); + + /** ModelEvaluation textExtractionEvaluationMetrics. */ + public textExtractionEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null); + + /** ModelEvaluation name. */ + public name: string; + + /** ModelEvaluation annotationSpecId. */ + public annotationSpecId: string; + + /** ModelEvaluation displayName. */ + public displayName: string; + + /** ModelEvaluation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ModelEvaluation evaluatedExampleCount. */ + public evaluatedExampleCount: number; + + /** ModelEvaluation metrics. */ + public metrics?: ("classificationEvaluationMetrics"|"regressionEvaluationMetrics"|"translationEvaluationMetrics"|"imageObjectDetectionEvaluationMetrics"|"videoObjectTrackingEvaluationMetrics"|"textSentimentEvaluationMetrics"|"textExtractionEvaluationMetrics"); /** - * Creates a new GcrDestination instance using the specified properties. + * Creates a new ModelEvaluation instance using the specified properties. * @param [properties] Properties to set - * @returns GcrDestination instance + * @returns ModelEvaluation instance */ - public static create(properties?: google.cloud.automl.v1beta1.IGcrDestination): google.cloud.automl.v1beta1.GcrDestination; + public static create(properties?: google.cloud.automl.v1beta1.IModelEvaluation): google.cloud.automl.v1beta1.ModelEvaluation; /** - * Encodes the specified GcrDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. - * @param message GcrDestination message or plain object to encode + * Encodes the specified ModelEvaluation message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. + * @param message ModelEvaluation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IGcrDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcrDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. - * @param message GcrDestination message or plain object to encode + * Encodes the specified ModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. + * @param message ModelEvaluation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IGcrDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcrDestination message from the specified reader or buffer. + * Decodes a ModelEvaluation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcrDestination + * @returns ModelEvaluation * @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.automl.v1beta1.GcrDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ModelEvaluation; /** - * Decodes a GcrDestination message from the specified reader or buffer, length delimited. + * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcrDestination + * @returns ModelEvaluation * @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.automl.v1beta1.GcrDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ModelEvaluation; /** - * Verifies a GcrDestination message. + * Verifies a ModelEvaluation 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 GcrDestination message from a plain object. Also converts values to their respective internal types. + * Creates a ModelEvaluation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcrDestination + * @returns ModelEvaluation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GcrDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ModelEvaluation; /** - * Creates a plain object from a GcrDestination message. Also converts values to other types if specified. - * @param message GcrDestination + * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. + * @param message ModelEvaluation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.GcrDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ModelEvaluation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcrDestination to JSON. + * Converts this ModelEvaluation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSegment. */ - interface ITextSegment { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** TextSegment content */ - content?: (string|null); + /** OperationMetadata deleteDetails */ + deleteDetails?: (google.cloud.automl.v1beta1.IDeleteOperationMetadata|null); - /** TextSegment startOffset */ - startOffset?: (number|Long|string|null); + /** OperationMetadata deployModelDetails */ + deployModelDetails?: (google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null); - /** TextSegment endOffset */ - endOffset?: (number|Long|string|null); + /** OperationMetadata undeployModelDetails */ + undeployModelDetails?: (google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null); + + /** OperationMetadata createModelDetails */ + createModelDetails?: (google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null); + + /** OperationMetadata importDataDetails */ + importDataDetails?: (google.cloud.automl.v1beta1.IImportDataOperationMetadata|null); + + /** OperationMetadata batchPredictDetails */ + batchPredictDetails?: (google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null); + + /** OperationMetadata exportDataDetails */ + exportDataDetails?: (google.cloud.automl.v1beta1.IExportDataOperationMetadata|null); + + /** OperationMetadata exportModelDetails */ + exportModelDetails?: (google.cloud.automl.v1beta1.IExportModelOperationMetadata|null); + + /** OperationMetadata exportEvaluatedExamplesDetails */ + exportEvaluatedExamplesDetails?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null); + + /** OperationMetadata progressPercent */ + progressPercent?: (number|null); + + /** OperationMetadata partialFailures */ + partialFailures?: (google.rpc.IStatus[]|null); + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a TextSegment. */ - class TextSegment implements ITextSegment { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IOperationMetadata); + + /** OperationMetadata deleteDetails. */ + public deleteDetails?: (google.cloud.automl.v1beta1.IDeleteOperationMetadata|null); + + /** OperationMetadata deployModelDetails. */ + public deployModelDetails?: (google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null); + + /** OperationMetadata undeployModelDetails. */ + public undeployModelDetails?: (google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null); + + /** OperationMetadata createModelDetails. */ + public createModelDetails?: (google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null); + + /** OperationMetadata importDataDetails. */ + public importDataDetails?: (google.cloud.automl.v1beta1.IImportDataOperationMetadata|null); + + /** OperationMetadata batchPredictDetails. */ + public batchPredictDetails?: (google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null); + + /** OperationMetadata exportDataDetails. */ + public exportDataDetails?: (google.cloud.automl.v1beta1.IExportDataOperationMetadata|null); + + /** OperationMetadata exportModelDetails. */ + public exportModelDetails?: (google.cloud.automl.v1beta1.IExportModelOperationMetadata|null); + + /** OperationMetadata exportEvaluatedExamplesDetails. */ + public exportEvaluatedExamplesDetails?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null); - /** - * Constructs a new TextSegment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ITextSegment); + /** OperationMetadata progressPercent. */ + public progressPercent: number; - /** TextSegment content. */ - public content: string; + /** OperationMetadata partialFailures. */ + public partialFailures: google.rpc.IStatus[]; - /** TextSegment startOffset. */ - public startOffset: (number|Long|string); + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** TextSegment endOffset. */ - public endOffset: (number|Long|string); + /** OperationMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata details. */ + public details?: ("deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"|"exportEvaluatedExamplesDetails"); /** - * Creates a new TextSegment instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextSegment instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextSegment): google.cloud.automl.v1beta1.TextSegment; + public static create(properties?: google.cloud.automl.v1beta1.IOperationMetadata): google.cloud.automl.v1beta1.OperationMetadata; /** - * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. - * @param message TextSegment message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. - * @param message TextSegment message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSegment message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSegment + * @returns OperationMetadata * @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.automl.v1beta1.TextSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.OperationMetadata; /** - * Decodes a TextSegment message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSegment + * @returns OperationMetadata * @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.automl.v1beta1.TextSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.OperationMetadata; /** - * Verifies a TextSegment message. + * Verifies an OperationMetadata 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 TextSegment message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSegment + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSegment; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.OperationMetadata; /** - * Creates a plain object from a TextSegment message. Also converts values to other types if specified. - * @param message TextSegment + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSegment to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DoubleRange. */ - interface IDoubleRange { - - /** DoubleRange start */ - start?: (number|null); - - /** DoubleRange end */ - end?: (number|null); + /** Properties of a DeleteOperationMetadata. */ + interface IDeleteOperationMetadata { } - /** Represents a DoubleRange. */ - class DoubleRange implements IDoubleRange { + /** Represents a DeleteOperationMetadata. */ + class DeleteOperationMetadata implements IDeleteOperationMetadata { /** - * Constructs a new DoubleRange. + * Constructs a new DeleteOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDoubleRange); - - /** DoubleRange start. */ - public start: number; - - /** DoubleRange end. */ - public end: number; + constructor(properties?: google.cloud.automl.v1beta1.IDeleteOperationMetadata); /** - * Creates a new DoubleRange instance using the specified properties. + * Creates a new DeleteOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DoubleRange instance + * @returns DeleteOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDoubleRange): google.cloud.automl.v1beta1.DoubleRange; + public static create(properties?: google.cloud.automl.v1beta1.IDeleteOperationMetadata): google.cloud.automl.v1beta1.DeleteOperationMetadata; /** - * Encodes the specified DoubleRange message. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. - * @param message DoubleRange message or plain object to encode + * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. + * @param message DeleteOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDoubleRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DoubleRange message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. - * @param message DoubleRange message or plain object to encode + * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. + * @param message DeleteOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDoubleRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DoubleRange message from the specified reader or buffer. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DoubleRange + * @returns DeleteOperationMetadata * @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.automl.v1beta1.DoubleRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DeleteOperationMetadata; /** - * Decodes a DoubleRange message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DoubleRange + * @returns DeleteOperationMetadata * @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.automl.v1beta1.DoubleRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DeleteOperationMetadata; /** - * Verifies a DoubleRange message. + * Verifies a DeleteOperationMetadata 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 DoubleRange message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DoubleRange + * @returns DeleteOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DoubleRange; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeleteOperationMetadata; /** - * Creates a plain object from a DoubleRange message. Also converts values to other types if specified. - * @param message DoubleRange + * Creates a plain object from a DeleteOperationMetadata message. Also converts values to other types if specified. + * @param message DeleteOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DoubleRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DeleteOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DoubleRange to JSON. + * Converts this DeleteOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RegressionEvaluationMetrics. */ - interface IRegressionEvaluationMetrics { - - /** RegressionEvaluationMetrics rootMeanSquaredError */ - rootMeanSquaredError?: (number|null); - - /** RegressionEvaluationMetrics meanAbsoluteError */ - meanAbsoluteError?: (number|null); - - /** RegressionEvaluationMetrics meanAbsolutePercentageError */ - meanAbsolutePercentageError?: (number|null); - - /** RegressionEvaluationMetrics rSquared */ - rSquared?: (number|null); - - /** RegressionEvaluationMetrics rootMeanSquaredLogError */ - rootMeanSquaredLogError?: (number|null); + /** Properties of a DeployModelOperationMetadata. */ + interface IDeployModelOperationMetadata { } - /** Represents a RegressionEvaluationMetrics. */ - class RegressionEvaluationMetrics implements IRegressionEvaluationMetrics { + /** Represents a DeployModelOperationMetadata. */ + class DeployModelOperationMetadata implements IDeployModelOperationMetadata { /** - * Constructs a new RegressionEvaluationMetrics. + * Constructs a new DeployModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics); - - /** RegressionEvaluationMetrics rootMeanSquaredError. */ - public rootMeanSquaredError: number; - - /** RegressionEvaluationMetrics meanAbsoluteError. */ - public meanAbsoluteError: number; - - /** RegressionEvaluationMetrics meanAbsolutePercentageError. */ - public meanAbsolutePercentageError: number; - - /** RegressionEvaluationMetrics rSquared. */ - public rSquared: number; - - /** RegressionEvaluationMetrics rootMeanSquaredLogError. */ - public rootMeanSquaredLogError: number; + constructor(properties?: google.cloud.automl.v1beta1.IDeployModelOperationMetadata); /** - * Creates a new RegressionEvaluationMetrics instance using the specified properties. + * Creates a new DeployModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns RegressionEvaluationMetrics instance + * @returns DeployModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics): google.cloud.automl.v1beta1.RegressionEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1beta1.IDeployModelOperationMetadata): google.cloud.automl.v1beta1.DeployModelOperationMetadata; /** - * Encodes the specified RegressionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. - * @param message RegressionEvaluationMetrics message or plain object to encode + * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. + * @param message DeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RegressionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. - * @param message RegressionEvaluationMetrics message or plain object to encode + * Encodes the specified DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. + * @param message DeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IRegressionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RegressionEvaluationMetrics + * @returns DeployModelOperationMetadata * @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.automl.v1beta1.RegressionEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DeployModelOperationMetadata; /** - * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RegressionEvaluationMetrics + * @returns DeployModelOperationMetadata * @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.automl.v1beta1.RegressionEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DeployModelOperationMetadata; /** - * Verifies a RegressionEvaluationMetrics message. + * Verifies a DeployModelOperationMetadata 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 RegressionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RegressionEvaluationMetrics + * @returns DeployModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.RegressionEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeployModelOperationMetadata; /** - * Creates a plain object from a RegressionEvaluationMetrics message. Also converts values to other types if specified. - * @param message RegressionEvaluationMetrics + * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. + * @param message DeployModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.RegressionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RegressionEvaluationMetrics to JSON. + * Converts this DeployModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextExtractionAnnotation. */ - interface ITextExtractionAnnotation { - - /** TextExtractionAnnotation textSegment */ - textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - - /** TextExtractionAnnotation score */ - score?: (number|null); + /** Properties of an UndeployModelOperationMetadata. */ + interface IUndeployModelOperationMetadata { } - /** Represents a TextExtractionAnnotation. */ - class TextExtractionAnnotation implements ITextExtractionAnnotation { - - /** - * Constructs a new TextExtractionAnnotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionAnnotation); - - /** TextExtractionAnnotation textSegment. */ - public textSegment?: (google.cloud.automl.v1beta1.ITextSegment|null); - - /** TextExtractionAnnotation score. */ - public score: number; + /** Represents an UndeployModelOperationMetadata. */ + class UndeployModelOperationMetadata implements IUndeployModelOperationMetadata { - /** TextExtractionAnnotation annotation. */ - public annotation?: "textSegment"; + /** + * Constructs a new UndeployModelOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata); /** - * Creates a new TextExtractionAnnotation instance using the specified properties. + * Creates a new UndeployModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionAnnotation instance + * @returns UndeployModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionAnnotation): google.cloud.automl.v1beta1.TextExtractionAnnotation; + public static create(properties?: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata): google.cloud.automl.v1beta1.UndeployModelOperationMetadata; /** - * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. - * @param message TextExtractionAnnotation message or plain object to encode + * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. + * @param message UndeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. - * @param message TextExtractionAnnotation message or plain object to encode + * Encodes the specified UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. + * @param message UndeployModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer. + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionAnnotation + * @returns UndeployModelOperationMetadata * @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.automl.v1beta1.TextExtractionAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.UndeployModelOperationMetadata; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionAnnotation + * @returns UndeployModelOperationMetadata * @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.automl.v1beta1.TextExtractionAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.UndeployModelOperationMetadata; /** - * Verifies a TextExtractionAnnotation message. + * Verifies an UndeployModelOperationMetadata 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 TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionAnnotation + * @returns UndeployModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UndeployModelOperationMetadata; /** - * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. - * @param message TextExtractionAnnotation + * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. + * @param message UndeployModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextExtractionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.UndeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextExtractionAnnotation to JSON. + * Converts this UndeployModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextExtractionEvaluationMetrics. */ - interface ITextExtractionEvaluationMetrics { - - /** TextExtractionEvaluationMetrics auPrc */ - auPrc?: (number|null); - - /** TextExtractionEvaluationMetrics confidenceMetricsEntries */ - confidenceMetricsEntries?: (google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]|null); + /** Properties of a CreateModelOperationMetadata. */ + interface ICreateModelOperationMetadata { } - /** Represents a TextExtractionEvaluationMetrics. */ - class TextExtractionEvaluationMetrics implements ITextExtractionEvaluationMetrics { + /** Represents a CreateModelOperationMetadata. */ + class CreateModelOperationMetadata implements ICreateModelOperationMetadata { /** - * Constructs a new TextExtractionEvaluationMetrics. + * Constructs a new CreateModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics); - - /** TextExtractionEvaluationMetrics auPrc. */ - public auPrc: number; - - /** TextExtractionEvaluationMetrics confidenceMetricsEntries. */ - public confidenceMetricsEntries: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry[]; + constructor(properties?: google.cloud.automl.v1beta1.ICreateModelOperationMetadata); /** - * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. + * Creates a new CreateModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionEvaluationMetrics instance + * @returns CreateModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1beta1.ICreateModelOperationMetadata): google.cloud.automl.v1beta1.CreateModelOperationMetadata; /** - * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. - * @param message TextExtractionEvaluationMetrics message or plain object to encode + * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. + * @param message CreateModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. - * @param message TextExtractionEvaluationMetrics message or plain object to encode + * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. + * @param message CreateModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionEvaluationMetrics + * @returns CreateModelOperationMetadata * @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.automl.v1beta1.TextExtractionEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.CreateModelOperationMetadata; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionEvaluationMetrics + * @returns CreateModelOperationMetadata * @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.automl.v1beta1.TextExtractionEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.CreateModelOperationMetadata; /** - * Verifies a TextExtractionEvaluationMetrics message. + * Verifies a CreateModelOperationMetadata 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 TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionEvaluationMetrics + * @returns CreateModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CreateModelOperationMetadata; /** - * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. - * @param message TextExtractionEvaluationMetrics + * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. + * @param message CreateModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.CreateModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextExtractionEvaluationMetrics to JSON. + * Converts this CreateModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace TextExtractionEvaluationMetrics { - - /** Properties of a ConfidenceMetricsEntry. */ - interface IConfidenceMetricsEntry { - - /** ConfidenceMetricsEntry confidenceThreshold */ - confidenceThreshold?: (number|null); - - /** ConfidenceMetricsEntry recall */ - recall?: (number|null); - - /** ConfidenceMetricsEntry precision */ - precision?: (number|null); - - /** ConfidenceMetricsEntry f1Score */ - f1Score?: (number|null); - } - - /** Represents a ConfidenceMetricsEntry. */ - class ConfidenceMetricsEntry implements IConfidenceMetricsEntry { - - /** - * Constructs a new ConfidenceMetricsEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry); - - /** ConfidenceMetricsEntry confidenceThreshold. */ - public confidenceThreshold: number; - - /** ConfidenceMetricsEntry recall. */ - public recall: number; - - /** ConfidenceMetricsEntry precision. */ - public precision: number; - - /** ConfidenceMetricsEntry f1Score. */ - public f1Score: number; - - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidenceMetricsEntry instance - */ - public static create(properties?: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @param message ConfidenceMetricsEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidenceMetricsEntry - * @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.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidenceMetricsEntry - * @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.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Verifies a ConfidenceMetricsEntry 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 ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidenceMetricsEntry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry; - - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @param message ConfidenceMetricsEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a TextSentimentAnnotation. */ - interface ITextSentimentAnnotation { - - /** TextSentimentAnnotation sentiment */ - sentiment?: (number|null); + /** Properties of an ImportDataOperationMetadata. */ + interface IImportDataOperationMetadata { } - /** Represents a TextSentimentAnnotation. */ - class TextSentimentAnnotation implements ITextSentimentAnnotation { + /** Represents an ImportDataOperationMetadata. */ + class ImportDataOperationMetadata implements IImportDataOperationMetadata { /** - * Constructs a new TextSentimentAnnotation. + * Constructs a new ImportDataOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentAnnotation); - - /** TextSentimentAnnotation sentiment. */ - public sentiment: number; + constructor(properties?: google.cloud.automl.v1beta1.IImportDataOperationMetadata); /** - * Creates a new TextSentimentAnnotation instance using the specified properties. + * Creates a new ImportDataOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentAnnotation instance + * @returns ImportDataOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentAnnotation): google.cloud.automl.v1beta1.TextSentimentAnnotation; + public static create(properties?: google.cloud.automl.v1beta1.IImportDataOperationMetadata): google.cloud.automl.v1beta1.ImportDataOperationMetadata; /** - * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. - * @param message TextSentimentAnnotation message or plain object to encode + * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. + * @param message ImportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. - * @param message TextSentimentAnnotation message or plain object to encode + * Encodes the specified ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. + * @param message ImportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentAnnotation + * @returns ImportDataOperationMetadata * @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.automl.v1beta1.TextSentimentAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImportDataOperationMetadata; /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentAnnotation + * @returns ImportDataOperationMetadata * @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.automl.v1beta1.TextSentimentAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImportDataOperationMetadata; /** - * Verifies a TextSentimentAnnotation message. + * Verifies an ImportDataOperationMetadata 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 TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentAnnotation + * @returns ImportDataOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImportDataOperationMetadata; /** - * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. - * @param message TextSentimentAnnotation + * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. + * @param message ImportDataOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextSentimentAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentAnnotation to JSON. + * Converts this ImportDataOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSentimentEvaluationMetrics. */ - interface ITextSentimentEvaluationMetrics { - - /** TextSentimentEvaluationMetrics precision */ - precision?: (number|null); - - /** TextSentimentEvaluationMetrics recall */ - recall?: (number|null); - - /** TextSentimentEvaluationMetrics f1Score */ - f1Score?: (number|null); - - /** TextSentimentEvaluationMetrics meanAbsoluteError */ - meanAbsoluteError?: (number|null); - - /** TextSentimentEvaluationMetrics meanSquaredError */ - meanSquaredError?: (number|null); - - /** TextSentimentEvaluationMetrics linearKappa */ - linearKappa?: (number|null); - - /** TextSentimentEvaluationMetrics quadraticKappa */ - quadraticKappa?: (number|null); - - /** TextSentimentEvaluationMetrics confusionMatrix */ - confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + /** Properties of an ExportDataOperationMetadata. */ + interface IExportDataOperationMetadata { - /** TextSentimentEvaluationMetrics annotationSpecId */ - annotationSpecId?: (string[]|null); + /** ExportDataOperationMetadata outputInfo */ + outputInfo?: (google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null); } - /** Represents a TextSentimentEvaluationMetrics. */ - class TextSentimentEvaluationMetrics implements ITextSentimentEvaluationMetrics { + /** Represents an ExportDataOperationMetadata. */ + class ExportDataOperationMetadata implements IExportDataOperationMetadata { /** - * Constructs a new TextSentimentEvaluationMetrics. + * Constructs a new ExportDataOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics); - - /** TextSentimentEvaluationMetrics precision. */ - public precision: number; - - /** TextSentimentEvaluationMetrics recall. */ - public recall: number; - - /** TextSentimentEvaluationMetrics f1Score. */ - public f1Score: number; - - /** TextSentimentEvaluationMetrics meanAbsoluteError. */ - public meanAbsoluteError: number; - - /** TextSentimentEvaluationMetrics meanSquaredError. */ - public meanSquaredError: number; - - /** TextSentimentEvaluationMetrics linearKappa. */ - public linearKappa: number; - - /** TextSentimentEvaluationMetrics quadraticKappa. */ - public quadraticKappa: number; - - /** TextSentimentEvaluationMetrics confusionMatrix. */ - public confusionMatrix?: (google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null); + constructor(properties?: google.cloud.automl.v1beta1.IExportDataOperationMetadata); - /** TextSentimentEvaluationMetrics annotationSpecId. */ - public annotationSpecId: string[]; + /** ExportDataOperationMetadata outputInfo. */ + public outputInfo?: (google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null); /** - * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. + * Creates a new ExportDataOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentEvaluationMetrics instance + * @returns ExportDataOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics): google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics; + public static create(properties?: google.cloud.automl.v1beta1.IExportDataOperationMetadata): google.cloud.automl.v1beta1.ExportDataOperationMetadata; /** - * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. - * @param message TextSentimentEvaluationMetrics message or plain object to encode + * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. + * @param message ExportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. - * @param message TextSentimentEvaluationMetrics message or plain object to encode + * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. + * @param message ExportDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentEvaluationMetrics + * @returns ExportDataOperationMetadata * @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.automl.v1beta1.TextSentimentEvaluationMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ExportDataOperationMetadata; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentEvaluationMetrics + * @returns ExportDataOperationMetadata * @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.automl.v1beta1.TextSentimentEvaluationMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ExportDataOperationMetadata; /** - * Verifies a TextSentimentEvaluationMetrics message. + * Verifies an ExportDataOperationMetadata 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 TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentEvaluationMetrics + * @returns ExportDataOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportDataOperationMetadata; /** - * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. - * @param message TextSentimentEvaluationMetrics + * Creates a plain object from an ExportDataOperationMetadata message. Also converts values to other types if specified. + * @param message ExportDataOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentEvaluationMetrics to JSON. + * Converts this ExportDataOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TranslationDatasetMetadata. */ - interface ITranslationDatasetMetadata { + namespace ExportDataOperationMetadata { + + /** Properties of an ExportDataOutputInfo. */ + interface IExportDataOutputInfo { + + /** ExportDataOutputInfo gcsOutputDirectory */ + gcsOutputDirectory?: (string|null); + + /** ExportDataOutputInfo bigqueryOutputDataset */ + bigqueryOutputDataset?: (string|null); + } + + /** Represents an ExportDataOutputInfo. */ + class ExportDataOutputInfo implements IExportDataOutputInfo { + + /** + * Constructs a new ExportDataOutputInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo); + + /** ExportDataOutputInfo gcsOutputDirectory. */ + public gcsOutputDirectory: string; + + /** ExportDataOutputInfo bigqueryOutputDataset. */ + public bigqueryOutputDataset: string; + + /** ExportDataOutputInfo outputLocation. */ + public outputLocation?: ("gcsOutputDirectory"|"bigqueryOutputDataset"); + + /** + * Creates a new ExportDataOutputInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportDataOutputInfo instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo): google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. + * @param message ExportDataOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. + * @param message ExportDataOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportDataOutputInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportDataOutputInfo + * @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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportDataOutputInfo + * @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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Verifies an ExportDataOutputInfo 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 ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportDataOutputInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + + /** + * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. + * @param message ExportDataOutputInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportDataOutputInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a BatchPredictOperationMetadata. */ + interface IBatchPredictOperationMetadata { - /** TranslationDatasetMetadata sourceLanguageCode */ - sourceLanguageCode?: (string|null); + /** BatchPredictOperationMetadata inputConfig */ + inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); - /** TranslationDatasetMetadata targetLanguageCode */ - targetLanguageCode?: (string|null); + /** BatchPredictOperationMetadata outputInfo */ + outputInfo?: (google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); } - /** Represents a TranslationDatasetMetadata. */ - class TranslationDatasetMetadata implements ITranslationDatasetMetadata { + /** Represents a BatchPredictOperationMetadata. */ + class BatchPredictOperationMetadata implements IBatchPredictOperationMetadata { /** - * Constructs a new TranslationDatasetMetadata. + * Constructs a new BatchPredictOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITranslationDatasetMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata); - /** TranslationDatasetMetadata sourceLanguageCode. */ - public sourceLanguageCode: string; + /** BatchPredictOperationMetadata inputConfig. */ + public inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); - /** TranslationDatasetMetadata targetLanguageCode. */ - public targetLanguageCode: string; + /** BatchPredictOperationMetadata outputInfo. */ + public outputInfo?: (google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); /** - * Creates a new TranslationDatasetMetadata instance using the specified properties. + * Creates a new BatchPredictOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TranslationDatasetMetadata instance + * @returns BatchPredictOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITranslationDatasetMetadata): google.cloud.automl.v1beta1.TranslationDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata): google.cloud.automl.v1beta1.BatchPredictOperationMetadata; /** - * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. - * @param message TranslationDatasetMetadata message or plain object to encode + * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. + * @param message BatchPredictOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. - * @param message TranslationDatasetMetadata message or plain object to encode + * Encodes the specified BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. + * @param message BatchPredictOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TranslationDatasetMetadata + * @returns BatchPredictOperationMetadata * @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.automl.v1beta1.TranslationDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BatchPredictOperationMetadata; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TranslationDatasetMetadata + * @returns BatchPredictOperationMetadata * @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.automl.v1beta1.TranslationDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BatchPredictOperationMetadata; /** - * Verifies a TranslationDatasetMetadata message. + * Verifies a BatchPredictOperationMetadata 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 TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TranslationDatasetMetadata + * @returns BatchPredictOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictOperationMetadata; /** - * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. - * @param message TranslationDatasetMetadata + * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. + * @param message BatchPredictOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TranslationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TranslationDatasetMetadata to JSON. + * Converts this BatchPredictOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TranslationEvaluationMetrics. */ - interface ITranslationEvaluationMetrics { + namespace BatchPredictOperationMetadata { - /** TranslationEvaluationMetrics bleuScore */ - bleuScore?: (number|null); + /** Properties of a BatchPredictOutputInfo. */ + interface IBatchPredictOutputInfo { - /** TranslationEvaluationMetrics baseBleuScore */ - baseBleuScore?: (number|null); - } + /** BatchPredictOutputInfo gcsOutputDirectory */ + gcsOutputDirectory?: (string|null); - /** Represents a TranslationEvaluationMetrics. */ - class TranslationEvaluationMetrics implements ITranslationEvaluationMetrics { + /** BatchPredictOutputInfo bigqueryOutputDataset */ + bigqueryOutputDataset?: (string|null); + } - /** - * Constructs a new TranslationEvaluationMetrics. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics); + /** Represents a BatchPredictOutputInfo. */ + class BatchPredictOutputInfo implements IBatchPredictOutputInfo { - /** TranslationEvaluationMetrics bleuScore. */ - public bleuScore: number; + /** + * Constructs a new BatchPredictOutputInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo); - /** TranslationEvaluationMetrics baseBleuScore. */ - public baseBleuScore: number; + /** BatchPredictOutputInfo gcsOutputDirectory. */ + public gcsOutputDirectory: string; - /** - * Creates a new TranslationEvaluationMetrics instance using the specified properties. - * @param [properties] Properties to set - * @returns TranslationEvaluationMetrics instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics): google.cloud.automl.v1beta1.TranslationEvaluationMetrics; + /** BatchPredictOutputInfo bigqueryOutputDataset. */ + public bigqueryOutputDataset: string; - /** - * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. - * @param message TranslationEvaluationMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + /** BatchPredictOutputInfo outputLocation. */ + public outputLocation?: ("gcsOutputDirectory"|"bigqueryOutputDataset"); - /** - * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. - * @param message TranslationEvaluationMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationEvaluationMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new BatchPredictOutputInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchPredictOutputInfo instance + */ + public static create(properties?: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo): google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranslationEvaluationMetrics - * @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.automl.v1beta1.TranslationEvaluationMetrics; + /** + * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @param message BatchPredictOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranslationEvaluationMetrics - * @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.automl.v1beta1.TranslationEvaluationMetrics; + /** + * Encodes the specified BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @param message BatchPredictOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a TranslationEvaluationMetrics 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); + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchPredictOutputInfo + * @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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - /** - * Creates a TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranslationEvaluationMetrics - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationEvaluationMetrics; + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchPredictOutputInfo + * @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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - /** - * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. - * @param message TranslationEvaluationMetrics - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.TranslationEvaluationMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a BatchPredictOutputInfo 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); - /** - * Converts this TranslationEvaluationMetrics to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchPredictOutputInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; - /** Properties of a TranslationModelMetadata. */ - interface ITranslationModelMetadata { + /** + * Creates a plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. + * @param message BatchPredictOutputInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** TranslationModelMetadata baseModel */ - baseModel?: (string|null); + /** + * Converts this BatchPredictOutputInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** TranslationModelMetadata sourceLanguageCode */ - sourceLanguageCode?: (string|null); + /** Properties of an ExportModelOperationMetadata. */ + interface IExportModelOperationMetadata { - /** TranslationModelMetadata targetLanguageCode */ - targetLanguageCode?: (string|null); + /** ExportModelOperationMetadata outputInfo */ + outputInfo?: (google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null); } - /** Represents a TranslationModelMetadata. */ - class TranslationModelMetadata implements ITranslationModelMetadata { - + /** Represents an ExportModelOperationMetadata. */ + class ExportModelOperationMetadata implements IExportModelOperationMetadata { + /** - * Constructs a new TranslationModelMetadata. + * Constructs a new ExportModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITranslationModelMetadata); - - /** TranslationModelMetadata baseModel. */ - public baseModel: string; - - /** TranslationModelMetadata sourceLanguageCode. */ - public sourceLanguageCode: string; + constructor(properties?: google.cloud.automl.v1beta1.IExportModelOperationMetadata); - /** TranslationModelMetadata targetLanguageCode. */ - public targetLanguageCode: string; + /** ExportModelOperationMetadata outputInfo. */ + public outputInfo?: (google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null); /** - * Creates a new TranslationModelMetadata instance using the specified properties. + * Creates a new ExportModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TranslationModelMetadata instance + * @returns ExportModelOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITranslationModelMetadata): google.cloud.automl.v1beta1.TranslationModelMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IExportModelOperationMetadata): google.cloud.automl.v1beta1.ExportModelOperationMetadata; /** - * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. - * @param message TranslationModelMetadata message or plain object to encode + * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. + * @param message ExportModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. - * @param message TranslationModelMetadata message or plain object to encode + * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. + * @param message ExportModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TranslationModelMetadata + * @returns ExportModelOperationMetadata * @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.automl.v1beta1.TranslationModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ExportModelOperationMetadata; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TranslationModelMetadata + * @returns ExportModelOperationMetadata * @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.automl.v1beta1.TranslationModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ExportModelOperationMetadata; /** - * Verifies a TranslationModelMetadata message. + * Verifies an ExportModelOperationMetadata 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 TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TranslationModelMetadata + * @returns ExportModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportModelOperationMetadata; /** - * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. - * @param message TranslationModelMetadata + * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. + * @param message ExportModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TranslationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TranslationModelMetadata to JSON. + * Converts this ExportModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TranslationAnnotation. */ - interface ITranslationAnnotation { - - /** TranslationAnnotation translatedContent */ - translatedContent?: (google.cloud.automl.v1beta1.ITextSnippet|null); - } + namespace ExportModelOperationMetadata { - /** Represents a TranslationAnnotation. */ - class TranslationAnnotation implements ITranslationAnnotation { + /** Properties of an ExportModelOutputInfo. */ + interface IExportModelOutputInfo { - /** - * Constructs a new TranslationAnnotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ITranslationAnnotation); + /** ExportModelOutputInfo gcsOutputDirectory */ + gcsOutputDirectory?: (string|null); + } - /** TranslationAnnotation translatedContent. */ - public translatedContent?: (google.cloud.automl.v1beta1.ITextSnippet|null); + /** Represents an ExportModelOutputInfo. */ + class ExportModelOutputInfo implements IExportModelOutputInfo { - /** - * Creates a new TranslationAnnotation instance using the specified properties. - * @param [properties] Properties to set - * @returns TranslationAnnotation instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ITranslationAnnotation): google.cloud.automl.v1beta1.TranslationAnnotation; + /** + * Constructs a new ExportModelOutputInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo); - /** - * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. - * @param message TranslationAnnotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExportModelOutputInfo gcsOutputDirectory. */ + public gcsOutputDirectory: string; - /** - * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. - * @param message TranslationAnnotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITranslationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ExportModelOutputInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportModelOutputInfo instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo): google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** - * Decodes a TranslationAnnotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranslationAnnotation - * @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.automl.v1beta1.TranslationAnnotation; + /** + * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @param message ExportModelOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranslationAnnotation - * @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.automl.v1beta1.TranslationAnnotation; + /** + * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @param message ExportModelOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a TranslationAnnotation 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); + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportModelOutputInfo + * @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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** - * Creates a TranslationAnnotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranslationAnnotation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TranslationAnnotation; + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportModelOutputInfo + * @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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** - * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. - * @param message TranslationAnnotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.TranslationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an ExportModelOutputInfo 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); - /** - * Converts this TranslationAnnotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportModelOutputInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; - /** Properties of an AnnotationSpec. */ - interface IAnnotationSpec { + /** + * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. + * @param message ExportModelOutputInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AnnotationSpec name */ - name?: (string|null); + /** + * Converts this ExportModelOutputInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** AnnotationSpec displayName */ - displayName?: (string|null); + /** Properties of an ExportEvaluatedExamplesOperationMetadata. */ + interface IExportEvaluatedExamplesOperationMetadata { - /** AnnotationSpec exampleCount */ - exampleCount?: (number|null); + /** ExportEvaluatedExamplesOperationMetadata outputInfo */ + outputInfo?: (google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null); } - /** Represents an AnnotationSpec. */ - class AnnotationSpec implements IAnnotationSpec { + /** Represents an ExportEvaluatedExamplesOperationMetadata. */ + class ExportEvaluatedExamplesOperationMetadata implements IExportEvaluatedExamplesOperationMetadata { /** - * Constructs a new AnnotationSpec. + * Constructs a new ExportEvaluatedExamplesOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IAnnotationSpec); - - /** AnnotationSpec name. */ - public name: string; - - /** AnnotationSpec displayName. */ - public displayName: string; + constructor(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata); - /** AnnotationSpec exampleCount. */ - public exampleCount: number; + /** ExportEvaluatedExamplesOperationMetadata outputInfo. */ + public outputInfo?: (google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null); /** - * Creates a new AnnotationSpec instance using the specified properties. + * Creates a new ExportEvaluatedExamplesOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationSpec instance + * @returns ExportEvaluatedExamplesOperationMetadata instance */ - public static create(properties?: google.cloud.automl.v1beta1.IAnnotationSpec): google.cloud.automl.v1beta1.AnnotationSpec; + public static create(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; /** - * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. - * @param message AnnotationSpec message or plain object to encode + * Encodes the specified ExportEvaluatedExamplesOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. + * @param message ExportEvaluatedExamplesOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. - * @param message AnnotationSpec message or plain object to encode + * Encodes the specified ExportEvaluatedExamplesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. + * @param message ExportEvaluatedExamplesOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationSpec message from the specified reader or buffer. + * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationSpec + * @returns ExportEvaluatedExamplesOperationMetadata * @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.automl.v1beta1.AnnotationSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; /** - * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. + * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationSpec + * @returns ExportEvaluatedExamplesOperationMetadata * @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.automl.v1beta1.AnnotationSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; /** - * Verifies an AnnotationSpec message. + * Verifies an ExportEvaluatedExamplesOperationMetadata 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 AnnotationSpec message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEvaluatedExamplesOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationSpec + * @returns ExportEvaluatedExamplesOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.AnnotationSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; /** - * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. - * @param message AnnotationSpec + * Creates a plain object from an ExportEvaluatedExamplesOperationMetadata message. Also converts values to other types if specified. + * @param message ExportEvaluatedExamplesOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.AnnotationSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationSpec to JSON. + * Converts this ExportEvaluatedExamplesOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Dataset. */ - interface IDataset { - - /** Dataset translationDatasetMetadata */ - translationDatasetMetadata?: (google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null); + namespace ExportEvaluatedExamplesOperationMetadata { - /** Dataset imageClassificationDatasetMetadata */ - imageClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null); + /** Properties of an ExportEvaluatedExamplesOutputInfo. */ + interface IExportEvaluatedExamplesOutputInfo { - /** Dataset textClassificationDatasetMetadata */ - textClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null); + /** ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset */ + bigqueryOutputDataset?: (string|null); + } - /** Dataset imageObjectDetectionDatasetMetadata */ - imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null); + /** Represents an ExportEvaluatedExamplesOutputInfo. */ + class ExportEvaluatedExamplesOutputInfo implements IExportEvaluatedExamplesOutputInfo { - /** Dataset videoClassificationDatasetMetadata */ - videoClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null); + /** + * Constructs a new ExportEvaluatedExamplesOutputInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo); - /** Dataset videoObjectTrackingDatasetMetadata */ - videoObjectTrackingDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null); + /** ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset. */ + public bigqueryOutputDataset: string; - /** Dataset textExtractionDatasetMetadata */ - textExtractionDatasetMetadata?: (google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null); + /** + * Creates a new ExportEvaluatedExamplesOutputInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportEvaluatedExamplesOutputInfo instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - /** Dataset textSentimentDatasetMetadata */ - textSentimentDatasetMetadata?: (google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null); + /** + * Encodes the specified ExportEvaluatedExamplesOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. + * @param message ExportEvaluatedExamplesOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Dataset tablesDatasetMetadata */ - tablesDatasetMetadata?: (google.cloud.automl.v1beta1.ITablesDatasetMetadata|null); + /** + * Encodes the specified ExportEvaluatedExamplesOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. + * @param message ExportEvaluatedExamplesOutputInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Dataset name */ - name?: (string|null); + /** + * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportEvaluatedExamplesOutputInfo + * @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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - /** Dataset displayName */ - displayName?: (string|null); + /** + * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportEvaluatedExamplesOutputInfo + * @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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - /** Dataset description */ - description?: (string|null); + /** + * Verifies an ExportEvaluatedExamplesOutputInfo 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); - /** Dataset exampleCount */ - exampleCount?: (number|null); + /** + * Creates an ExportEvaluatedExamplesOutputInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportEvaluatedExamplesOutputInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - /** Dataset createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a plain object from an ExportEvaluatedExamplesOutputInfo message. Also converts values to other types if specified. + * @param message ExportEvaluatedExamplesOutputInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Dataset etag */ - etag?: (string|null); + /** + * Converts this ExportEvaluatedExamplesOutputInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a Dataset. */ - class Dataset implements IDataset { + /** Represents a PredictionService */ + class PredictionService extends $protobuf.rpc.Service { /** - * Constructs a new Dataset. - * @param [properties] Properties to set + * Constructs a new PredictionService 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.automl.v1beta1.IDataset); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Dataset translationDatasetMetadata. */ - public translationDatasetMetadata?: (google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null); + /** + * Creates new PredictionService 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): PredictionService; - /** Dataset imageClassificationDatasetMetadata. */ - public imageClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null); + /** + * Calls Predict. + * @param request PredictRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PredictResponse + */ + public predict(request: google.cloud.automl.v1beta1.IPredictRequest, callback: google.cloud.automl.v1beta1.PredictionService.PredictCallback): void; - /** Dataset textClassificationDatasetMetadata. */ - public textClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null); + /** + * Calls Predict. + * @param request PredictRequest message or plain object + * @returns Promise + */ + public predict(request: google.cloud.automl.v1beta1.IPredictRequest): Promise; - /** Dataset imageObjectDetectionDatasetMetadata. */ - public imageObjectDetectionDatasetMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null); + /** + * Calls BatchPredict. + * @param request BatchPredictRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchPredict(request: google.cloud.automl.v1beta1.IBatchPredictRequest, callback: google.cloud.automl.v1beta1.PredictionService.BatchPredictCallback): void; - /** Dataset videoClassificationDatasetMetadata. */ - public videoClassificationDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null); + /** + * Calls BatchPredict. + * @param request BatchPredictRequest message or plain object + * @returns Promise + */ + public batchPredict(request: google.cloud.automl.v1beta1.IBatchPredictRequest): Promise; + } - /** Dataset videoObjectTrackingDatasetMetadata. */ - public videoObjectTrackingDatasetMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null); + namespace PredictionService { - /** Dataset textExtractionDatasetMetadata. */ - public textExtractionDatasetMetadata?: (google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null); + /** + * Callback as used by {@link google.cloud.automl.v1beta1.PredictionService#predict}. + * @param error Error, if any + * @param [response] PredictResponse + */ + type PredictCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.PredictResponse) => void; - /** Dataset textSentimentDatasetMetadata. */ - public textSentimentDatasetMetadata?: (google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null); + /** + * Callback as used by {@link google.cloud.automl.v1beta1.PredictionService#batchPredict}. + * @param error Error, if any + * @param [response] Operation + */ + type BatchPredictCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** Dataset tablesDatasetMetadata. */ - public tablesDatasetMetadata?: (google.cloud.automl.v1beta1.ITablesDatasetMetadata|null); + /** Properties of a PredictRequest. */ + interface IPredictRequest { - /** Dataset name. */ - public name: string; + /** PredictRequest name */ + name?: (string|null); - /** Dataset displayName. */ - public displayName: string; + /** PredictRequest payload */ + payload?: (google.cloud.automl.v1beta1.IExamplePayload|null); - /** Dataset description. */ - public description: string; + /** PredictRequest params */ + params?: ({ [k: string]: string }|null); + } - /** Dataset exampleCount. */ - public exampleCount: number; + /** Represents a PredictRequest. */ + class PredictRequest implements IPredictRequest { - /** Dataset createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new PredictRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IPredictRequest); - /** Dataset etag. */ - public etag: string; + /** PredictRequest name. */ + public name: string; + + /** PredictRequest payload. */ + public payload?: (google.cloud.automl.v1beta1.IExamplePayload|null); - /** Dataset datasetMetadata. */ - public datasetMetadata?: ("translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"videoClassificationDatasetMetadata"|"videoObjectTrackingDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"|"tablesDatasetMetadata"); + /** PredictRequest params. */ + public params: { [k: string]: string }; /** - * Creates a new Dataset instance using the specified properties. + * Creates a new PredictRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Dataset instance + * @returns PredictRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDataset): google.cloud.automl.v1beta1.Dataset; + public static create(properties?: google.cloud.automl.v1beta1.IPredictRequest): google.cloud.automl.v1beta1.PredictRequest; /** - * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. - * @param message Dataset message or plain object to encode + * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. + * @param message PredictRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. - * @param message Dataset message or plain object to encode + * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. + * @param message PredictRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Dataset message from the specified reader or buffer. + * Decodes a PredictRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Dataset + * @returns PredictRequest * @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.automl.v1beta1.Dataset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.PredictRequest; /** - * Decodes a Dataset message from the specified reader or buffer, length delimited. + * Decodes a PredictRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Dataset + * @returns PredictRequest * @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.automl.v1beta1.Dataset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.PredictRequest; /** - * Verifies a Dataset message. + * Verifies a PredictRequest 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 Dataset message from a plain object. Also converts values to their respective internal types. + * Creates a PredictRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Dataset + * @returns PredictRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Dataset; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.PredictRequest; /** - * Creates a plain object from a Dataset message. Also converts values to other types if specified. - * @param message Dataset + * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. + * @param message PredictRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.Dataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.PredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Dataset to JSON. + * Converts this PredictRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageClassificationDatasetMetadata. */ - interface IImageClassificationDatasetMetadata { + /** Properties of a PredictResponse. */ + interface IPredictResponse { - /** ImageClassificationDatasetMetadata classificationType */ - classificationType?: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType|null); + /** PredictResponse payload */ + payload?: (google.cloud.automl.v1beta1.IAnnotationPayload[]|null); + + /** PredictResponse preprocessedInput */ + preprocessedInput?: (google.cloud.automl.v1beta1.IExamplePayload|null); + + /** PredictResponse metadata */ + metadata?: ({ [k: string]: string }|null); } - /** Represents an ImageClassificationDatasetMetadata. */ - class ImageClassificationDatasetMetadata implements IImageClassificationDatasetMetadata { + /** Represents a PredictResponse. */ + class PredictResponse implements IPredictResponse { /** - * Constructs a new ImageClassificationDatasetMetadata. + * Constructs a new PredictResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IPredictResponse); - /** ImageClassificationDatasetMetadata classificationType. */ - public classificationType: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType); + /** PredictResponse payload. */ + public payload: google.cloud.automl.v1beta1.IAnnotationPayload[]; + + /** PredictResponse preprocessedInput. */ + public preprocessedInput?: (google.cloud.automl.v1beta1.IExamplePayload|null); + + /** PredictResponse metadata. */ + public metadata: { [k: string]: string }; /** - * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. + * Creates a new PredictResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImageClassificationDatasetMetadata instance + * @returns PredictResponse instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata): google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IPredictResponse): google.cloud.automl.v1beta1.PredictResponse; /** - * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. - * @param message ImageClassificationDatasetMetadata message or plain object to encode + * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. + * @param message PredictResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. - * @param message ImageClassificationDatasetMetadata message or plain object to encode + * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. + * @param message PredictResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes a PredictResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageClassificationDatasetMetadata + * @returns PredictResponse * @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.automl.v1beta1.ImageClassificationDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.PredictResponse; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a PredictResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageClassificationDatasetMetadata + * @returns PredictResponse * @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.automl.v1beta1.ImageClassificationDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.PredictResponse; /** - * Verifies an ImageClassificationDatasetMetadata message. + * Verifies a PredictResponse 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 ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PredictResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageClassificationDatasetMetadata + * @returns PredictResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.PredictResponse; /** - * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. - * @param message ImageClassificationDatasetMetadata + * Creates a plain object from a PredictResponse message. Also converts values to other types if specified. + * @param message PredictResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.PredictResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageClassificationDatasetMetadata to JSON. + * Converts this PredictResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionDatasetMetadata. */ - interface IImageObjectDetectionDatasetMetadata { + /** Properties of a BatchPredictRequest. */ + interface IBatchPredictRequest { + + /** BatchPredictRequest name */ + name?: (string|null); + + /** BatchPredictRequest inputConfig */ + inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); + + /** BatchPredictRequest outputConfig */ + outputConfig?: (google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null); + + /** BatchPredictRequest params */ + params?: ({ [k: string]: string }|null); } - /** Represents an ImageObjectDetectionDatasetMetadata. */ - class ImageObjectDetectionDatasetMetadata implements IImageObjectDetectionDatasetMetadata { + /** Represents a BatchPredictRequest. */ + class BatchPredictRequest implements IBatchPredictRequest { /** - * Constructs a new ImageObjectDetectionDatasetMetadata. + * Constructs a new BatchPredictRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictRequest); + + /** BatchPredictRequest name. */ + public name: string; + + /** BatchPredictRequest inputConfig. */ + public inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); + + /** BatchPredictRequest outputConfig. */ + public outputConfig?: (google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null); + + /** BatchPredictRequest params. */ + public params: { [k: string]: string }; /** - * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. + * Creates a new BatchPredictRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImageObjectDetectionDatasetMetadata instance + * @returns BatchPredictRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata): google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictRequest): google.cloud.automl.v1beta1.BatchPredictRequest; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. - * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode + * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. + * @param message BatchPredictRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. - * @param message ImageObjectDetectionDatasetMetadata message or plain object to encode + * Encodes the specified BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. + * @param message BatchPredictRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. + * Decodes a BatchPredictRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionDatasetMetadata + * @returns BatchPredictRequest * @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.automl.v1beta1.ImageObjectDetectionDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BatchPredictRequest; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionDatasetMetadata + * @returns BatchPredictRequest * @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.automl.v1beta1.ImageObjectDetectionDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BatchPredictRequest; /** - * Verifies an ImageObjectDetectionDatasetMetadata message. + * Verifies a BatchPredictRequest 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 ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageObjectDetectionDatasetMetadata + * @returns BatchPredictRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictRequest; /** - * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. - * @param message ImageObjectDetectionDatasetMetadata + * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. + * @param message BatchPredictRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImageObjectDetectionDatasetMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ImageClassificationModelMetadata. */ - interface IImageClassificationModelMetadata { - - /** ImageClassificationModelMetadata baseModelId */ - baseModelId?: (string|null); - - /** ImageClassificationModelMetadata trainBudget */ - trainBudget?: (number|Long|string|null); - - /** ImageClassificationModelMetadata trainCost */ - trainCost?: (number|Long|string|null); - - /** ImageClassificationModelMetadata stopReason */ - stopReason?: (string|null); - - /** ImageClassificationModelMetadata modelType */ - modelType?: (string|null); - - /** ImageClassificationModelMetadata nodeQps */ - nodeQps?: (number|null); - - /** ImageClassificationModelMetadata nodeCount */ - nodeCount?: (number|Long|string|null); - } - - /** Represents an ImageClassificationModelMetadata. */ - class ImageClassificationModelMetadata implements IImageClassificationModelMetadata { + public static toObject(message: google.cloud.automl.v1beta1.BatchPredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new ImageClassificationModelMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.IImageClassificationModelMetadata); - - /** ImageClassificationModelMetadata baseModelId. */ - public baseModelId: string; - - /** ImageClassificationModelMetadata trainBudget. */ - public trainBudget: (number|Long|string); + * Converts this BatchPredictRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ImageClassificationModelMetadata trainCost. */ - public trainCost: (number|Long|string); + /** Properties of a BatchPredictResult. */ + interface IBatchPredictResult { - /** ImageClassificationModelMetadata stopReason. */ - public stopReason: string; + /** BatchPredictResult metadata */ + metadata?: ({ [k: string]: string }|null); + } - /** ImageClassificationModelMetadata modelType. */ - public modelType: string; + /** Represents a BatchPredictResult. */ + class BatchPredictResult implements IBatchPredictResult { - /** ImageClassificationModelMetadata nodeQps. */ - public nodeQps: number; + /** + * Constructs a new BatchPredictResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictResult); - /** ImageClassificationModelMetadata nodeCount. */ - public nodeCount: (number|Long|string); + /** BatchPredictResult metadata. */ + public metadata: { [k: string]: string }; /** - * Creates a new ImageClassificationModelMetadata instance using the specified properties. + * Creates a new BatchPredictResult instance using the specified properties. * @param [properties] Properties to set - * @returns ImageClassificationModelMetadata instance + * @returns BatchPredictResult instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImageClassificationModelMetadata): google.cloud.automl.v1beta1.ImageClassificationModelMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictResult): google.cloud.automl.v1beta1.BatchPredictResult; /** - * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. - * @param message ImageClassificationModelMetadata message or plain object to encode + * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. + * @param message BatchPredictResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. - * @param message ImageClassificationModelMetadata message or plain object to encode + * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. + * @param message BatchPredictResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. + * Decodes a BatchPredictResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageClassificationModelMetadata + * @returns BatchPredictResult * @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.automl.v1beta1.ImageClassificationModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.BatchPredictResult; /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageClassificationModelMetadata + * @returns BatchPredictResult * @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.automl.v1beta1.ImageClassificationModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.BatchPredictResult; /** - * Verifies an ImageClassificationModelMetadata message. + * Verifies a BatchPredictResult 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 ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageClassificationModelMetadata + * @returns BatchPredictResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageClassificationModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictResult; /** - * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. - * @param message ImageClassificationModelMetadata + * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. + * @param message BatchPredictResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ImageClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.BatchPredictResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageClassificationModelMetadata to JSON. + * Converts this BatchPredictResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageObjectDetectionModelMetadata. */ - interface IImageObjectDetectionModelMetadata { + /** Represents an AutoMl */ + class AutoMl extends $protobuf.rpc.Service { - /** ImageObjectDetectionModelMetadata modelType */ - modelType?: (string|null); + /** + * Constructs a new AutoMl 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); - /** ImageObjectDetectionModelMetadata nodeCount */ - nodeCount?: (number|Long|string|null); + /** + * Creates new AutoMl 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): AutoMl; - /** ImageObjectDetectionModelMetadata nodeQps */ - nodeQps?: (number|null); + /** + * Calls CreateDataset. + * @param request CreateDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dataset + */ + public createDataset(request: google.cloud.automl.v1beta1.ICreateDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.CreateDatasetCallback): void; - /** ImageObjectDetectionModelMetadata stopReason */ - stopReason?: (string|null); + /** + * Calls CreateDataset. + * @param request CreateDatasetRequest message or plain object + * @returns Promise + */ + public createDataset(request: google.cloud.automl.v1beta1.ICreateDatasetRequest): Promise; - /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours */ - trainBudgetMilliNodeHours?: (number|Long|string|null); + /** + * Calls GetDataset. + * @param request GetDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dataset + */ + public getDataset(request: google.cloud.automl.v1beta1.IGetDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetDatasetCallback): void; - /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours */ - trainCostMilliNodeHours?: (number|Long|string|null); - } + /** + * Calls GetDataset. + * @param request GetDatasetRequest message or plain object + * @returns Promise + */ + public getDataset(request: google.cloud.automl.v1beta1.IGetDatasetRequest): Promise; - /** Represents an ImageObjectDetectionModelMetadata. */ - class ImageObjectDetectionModelMetadata implements IImageObjectDetectionModelMetadata { + /** + * Calls ListDatasets. + * @param request ListDatasetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDatasetsResponse + */ + public listDatasets(request: google.cloud.automl.v1beta1.IListDatasetsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListDatasetsCallback): void; /** - * Constructs a new ImageObjectDetectionModelMetadata. - * @param [properties] Properties to set + * Calls ListDatasets. + * @param request ListDatasetsRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata); + public listDatasets(request: google.cloud.automl.v1beta1.IListDatasetsRequest): Promise; - /** ImageObjectDetectionModelMetadata modelType. */ - public modelType: string; + /** + * Calls UpdateDataset. + * @param request UpdateDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dataset + */ + public updateDataset(request: google.cloud.automl.v1beta1.IUpdateDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.UpdateDatasetCallback): void; - /** ImageObjectDetectionModelMetadata nodeCount. */ - public nodeCount: (number|Long|string); + /** + * Calls UpdateDataset. + * @param request UpdateDatasetRequest message or plain object + * @returns Promise + */ + public updateDataset(request: google.cloud.automl.v1beta1.IUpdateDatasetRequest): Promise; - /** ImageObjectDetectionModelMetadata nodeQps. */ - public nodeQps: number; + /** + * Calls DeleteDataset. + * @param request DeleteDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataset(request: google.cloud.automl.v1beta1.IDeleteDatasetRequest, callback: google.cloud.automl.v1beta1.AutoMl.DeleteDatasetCallback): void; - /** ImageObjectDetectionModelMetadata stopReason. */ - public stopReason: string; + /** + * Calls DeleteDataset. + * @param request DeleteDatasetRequest message or plain object + * @returns Promise + */ + public deleteDataset(request: google.cloud.automl.v1beta1.IDeleteDatasetRequest): Promise; - /** ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. */ - public trainBudgetMilliNodeHours: (number|Long|string); + /** + * Calls ImportData. + * @param request ImportDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importData(request: google.cloud.automl.v1beta1.IImportDataRequest, callback: google.cloud.automl.v1beta1.AutoMl.ImportDataCallback): void; - /** ImageObjectDetectionModelMetadata trainCostMilliNodeHours. */ - public trainCostMilliNodeHours: (number|Long|string); + /** + * Calls ImportData. + * @param request ImportDataRequest message or plain object + * @returns Promise + */ + public importData(request: google.cloud.automl.v1beta1.IImportDataRequest): Promise; /** - * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageObjectDetectionModelMetadata instance + * Calls ExportData. + * @param request ExportDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; + public exportData(request: google.cloud.automl.v1beta1.IExportDataRequest, callback: google.cloud.automl.v1beta1.AutoMl.ExportDataCallback): void; /** - * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportData. + * @param request ExportDataRequest message or plain object + * @returns Promise + */ + public exportData(request: google.cloud.automl.v1beta1.IExportDataRequest): Promise; + + /** + * Calls GetAnnotationSpec. + * @param request GetAnnotationSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnnotationSpec + */ + public getAnnotationSpec(request: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpecCallback): void; + + /** + * Calls GetAnnotationSpec. + * @param request GetAnnotationSpecRequest message or plain object + * @returns Promise + */ + public getAnnotationSpec(request: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest): Promise; + + /** + * Calls GetTableSpec. + * @param request GetTableSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TableSpec + */ + public getTableSpec(request: google.cloud.automl.v1beta1.IGetTableSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetTableSpecCallback): void; + + /** + * Calls GetTableSpec. + * @param request GetTableSpecRequest message or plain object + * @returns Promise + */ + public getTableSpec(request: google.cloud.automl.v1beta1.IGetTableSpecRequest): Promise; + + /** + * Calls ListTableSpecs. + * @param request ListTableSpecsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTableSpecsResponse + */ + public listTableSpecs(request: google.cloud.automl.v1beta1.IListTableSpecsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListTableSpecsCallback): void; + + /** + * Calls ListTableSpecs. + * @param request ListTableSpecsRequest message or plain object + * @returns Promise + */ + public listTableSpecs(request: google.cloud.automl.v1beta1.IListTableSpecsRequest): Promise; + + /** + * Calls UpdateTableSpec. + * @param request UpdateTableSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TableSpec */ - public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public updateTableSpec(request: google.cloud.automl.v1beta1.IUpdateTableSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.UpdateTableSpecCallback): void; /** - * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateTableSpec. + * @param request UpdateTableSpecRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public updateTableSpec(request: google.cloud.automl.v1beta1.IUpdateTableSpecRequest): Promise; /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionModelMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetColumnSpec. + * @param request GetColumnSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ColumnSpec */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; + public getColumnSpec(request: google.cloud.automl.v1beta1.IGetColumnSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetColumnSpecCallback): void; /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionModelMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetColumnSpec. + * @param request GetColumnSpecRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; + public getColumnSpec(request: google.cloud.automl.v1beta1.IGetColumnSpecRequest): Promise; /** - * Verifies an ImageObjectDetectionModelMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListColumnSpecs. + * @param request ListColumnSpecsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListColumnSpecsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listColumnSpecs(request: google.cloud.automl.v1beta1.IListColumnSpecsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListColumnSpecsCallback): void; /** - * Creates an ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageObjectDetectionModelMetadata + * Calls ListColumnSpecs. + * @param request ListColumnSpecsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata; + public listColumnSpecs(request: google.cloud.automl.v1beta1.IListColumnSpecsRequest): Promise; /** - * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. - * @param message ImageObjectDetectionModelMetadata - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateColumnSpec. + * @param request UpdateColumnSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ColumnSpec */ - public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateColumnSpec(request: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, callback: google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpecCallback): void; /** - * Converts this ImageObjectDetectionModelMetadata to JSON. - * @returns JSON object + * Calls UpdateColumnSpec. + * @param request UpdateColumnSpecRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ImageClassificationModelDeploymentMetadata. */ - interface IImageClassificationModelDeploymentMetadata { - - /** ImageClassificationModelDeploymentMetadata nodeCount */ - nodeCount?: (number|Long|string|null); - } - - /** Represents an ImageClassificationModelDeploymentMetadata. */ - class ImageClassificationModelDeploymentMetadata implements IImageClassificationModelDeploymentMetadata { + public updateColumnSpec(request: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest): Promise; /** - * Constructs a new ImageClassificationModelDeploymentMetadata. - * @param [properties] Properties to set + * Calls CreateModel. + * @param request CreateModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata); - - /** ImageClassificationModelDeploymentMetadata nodeCount. */ - public nodeCount: (number|Long|string); + public createModel(request: google.cloud.automl.v1beta1.ICreateModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.CreateModelCallback): void; /** - * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageClassificationModelDeploymentMetadata instance + * Calls CreateModel. + * @param request CreateModelRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; + public createModel(request: google.cloud.automl.v1beta1.ICreateModelRequest): Promise; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. - * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetModel. + * @param request GetModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Model */ - public static encode(message: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public getModel(request: google.cloud.automl.v1beta1.IGetModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetModelCallback): void; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. - * @param message ImageClassificationModelDeploymentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetModel. + * @param request GetModelRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public getModel(request: google.cloud.automl.v1beta1.IGetModelRequest): Promise; /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageClassificationModelDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListModels. + * @param request ListModelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListModelsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; + public listModels(request: google.cloud.automl.v1beta1.IListModelsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListModelsCallback): void; /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageClassificationModelDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListModels. + * @param request ListModelsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; + public listModels(request: google.cloud.automl.v1beta1.IListModelsRequest): Promise; /** - * Verifies an ImageClassificationModelDeploymentMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteModel. + * @param request DeleteModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteModel(request: google.cloud.automl.v1beta1.IDeleteModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.DeleteModelCallback): void; /** - * Creates an ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageClassificationModelDeploymentMetadata + * Calls DeleteModel. + * @param request DeleteModelRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata; + public deleteModel(request: google.cloud.automl.v1beta1.IDeleteModelRequest): Promise; /** - * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. - * @param message ImageClassificationModelDeploymentMetadata - * @param [options] Conversion options - * @returns Plain object + * Calls DeployModel. + * @param request DeployModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deployModel(request: google.cloud.automl.v1beta1.IDeployModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.DeployModelCallback): void; /** - * Converts this ImageClassificationModelDeploymentMetadata to JSON. - * @returns JSON object + * Calls DeployModel. + * @param request DeployModelRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ImageObjectDetectionModelDeploymentMetadata. */ - interface IImageObjectDetectionModelDeploymentMetadata { - - /** ImageObjectDetectionModelDeploymentMetadata nodeCount */ - nodeCount?: (number|Long|string|null); - } - - /** Represents an ImageObjectDetectionModelDeploymentMetadata. */ - class ImageObjectDetectionModelDeploymentMetadata implements IImageObjectDetectionModelDeploymentMetadata { + public deployModel(request: google.cloud.automl.v1beta1.IDeployModelRequest): Promise; /** - * Constructs a new ImageObjectDetectionModelDeploymentMetadata. - * @param [properties] Properties to set + * Calls UndeployModel. + * @param request UndeployModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata); - - /** ImageObjectDetectionModelDeploymentMetadata nodeCount. */ - public nodeCount: (number|Long|string); + public undeployModel(request: google.cloud.automl.v1beta1.IUndeployModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.UndeployModelCallback): void; /** - * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageObjectDetectionModelDeploymentMetadata instance + * Calls UndeployModel. + * @param request UndeployModelRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; + public undeployModel(request: google.cloud.automl.v1beta1.IUndeployModelRequest): Promise; /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportModel. + * @param request ExportModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public exportModel(request: google.cloud.automl.v1beta1.IExportModelRequest, callback: google.cloud.automl.v1beta1.AutoMl.ExportModelCallback): void; /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. - * @param message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportModel. + * @param request ExportModelRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public exportModel(request: google.cloud.automl.v1beta1.IExportModelRequest): Promise; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageObjectDetectionModelDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ExportEvaluatedExamples. + * @param request ExportEvaluatedExamplesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; + public exportEvaluatedExamples(request: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, callback: google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamplesCallback): void; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageObjectDetectionModelDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ExportEvaluatedExamples. + * @param request ExportEvaluatedExamplesRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; + public exportEvaluatedExamples(request: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest): Promise; /** - * Verifies an ImageObjectDetectionModelDeploymentMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetModelEvaluation. + * @param request GetModelEvaluationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ModelEvaluation */ - public static verify(message: { [k: string]: any }): (string|null); + public getModelEvaluation(request: google.cloud.automl.v1beta1.IGetModelEvaluationRequest, callback: google.cloud.automl.v1beta1.AutoMl.GetModelEvaluationCallback): void; /** - * Creates an ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageObjectDetectionModelDeploymentMetadata + * Calls GetModelEvaluation. + * @param request GetModelEvaluationRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata; + public getModelEvaluation(request: google.cloud.automl.v1beta1.IGetModelEvaluationRequest): Promise; /** - * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. - * @param message ImageObjectDetectionModelDeploymentMetadata - * @param [options] Conversion options - * @returns Plain object + * Calls ListModelEvaluations. + * @param request ListModelEvaluationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListModelEvaluationsResponse */ - public static toObject(message: google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listModelEvaluations(request: google.cloud.automl.v1beta1.IListModelEvaluationsRequest, callback: google.cloud.automl.v1beta1.AutoMl.ListModelEvaluationsCallback): void; /** - * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. - * @returns JSON object + * Calls ListModelEvaluations. + * @param request ListModelEvaluationsRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TextClassificationDatasetMetadata. */ - interface ITextClassificationDatasetMetadata { - - /** TextClassificationDatasetMetadata classificationType */ - classificationType?: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType|null); + public listModelEvaluations(request: google.cloud.automl.v1beta1.IListModelEvaluationsRequest): Promise; } - /** Represents a TextClassificationDatasetMetadata. */ - class TextClassificationDatasetMetadata implements ITextClassificationDatasetMetadata { + namespace AutoMl { /** - * Constructs a new TextClassificationDatasetMetadata. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#createDataset}. + * @param error Error, if any + * @param [response] Dataset */ - constructor(properties?: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata); - - /** TextClassificationDatasetMetadata classificationType. */ - public classificationType: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType); + type CreateDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Dataset) => void; /** - * Creates a new TextClassificationDatasetMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns TextClassificationDatasetMetadata instance + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getDataset}. + * @param error Error, if any + * @param [response] Dataset */ - public static create(properties?: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; + type GetDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Dataset) => void; /** - * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. - * @param message TextClassificationDatasetMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listDatasets}. + * @param error Error, if any + * @param [response] ListDatasetsResponse */ - public static encode(message: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + type ListDatasetsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListDatasetsResponse) => void; /** - * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. - * @param message TextClassificationDatasetMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateDataset}. + * @param error Error, if any + * @param [response] Dataset */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateDatasetCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Dataset) => void; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextClassificationDatasetMetadata - * @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.automl.v1beta1.AutoMl#deleteDataset}. + * @param error Error, if any + * @param [response] Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; + type DeleteDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextClassificationDatasetMetadata - * @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.automl.v1beta1.AutoMl#importData}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; + type ImportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a TextClassificationDatasetMetadata 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.automl.v1beta1.AutoMl#exportData}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type ExportDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextClassificationDatasetMetadata + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getAnnotationSpec}. + * @param error Error, if any + * @param [response] AnnotationSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextClassificationDatasetMetadata; + type GetAnnotationSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.AnnotationSpec) => void; /** - * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. - * @param message TextClassificationDatasetMetadata - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getTableSpec}. + * @param error Error, if any + * @param [response] TableSpec */ - public static toObject(message: google.cloud.automl.v1beta1.TextClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetTableSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.TableSpec) => void; /** - * Converts this TextClassificationDatasetMetadata to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listTableSpecs}. + * @param error Error, if any + * @param [response] ListTableSpecsResponse */ - public toJSON(): { [k: string]: any }; - } + type ListTableSpecsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListTableSpecsResponse) => void; - /** Properties of a TextClassificationModelMetadata. */ - interface ITextClassificationModelMetadata { + /** + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateTableSpec}. + * @param error Error, if any + * @param [response] TableSpec + */ + type UpdateTableSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.TableSpec) => void; - /** TextClassificationModelMetadata classificationType */ - classificationType?: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType|null); - } + /** + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getColumnSpec}. + * @param error Error, if any + * @param [response] ColumnSpec + */ + type GetColumnSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ColumnSpec) => void; - /** Represents a TextClassificationModelMetadata. */ - class TextClassificationModelMetadata implements ITextClassificationModelMetadata { + /** + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listColumnSpecs}. + * @param error Error, if any + * @param [response] ListColumnSpecsResponse + */ + type ListColumnSpecsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListColumnSpecsResponse) => void; /** - * Constructs a new TextClassificationModelMetadata. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateColumnSpec}. + * @param error Error, if any + * @param [response] ColumnSpec */ - constructor(properties?: google.cloud.automl.v1beta1.ITextClassificationModelMetadata); + type UpdateColumnSpecCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ColumnSpec) => void; - /** TextClassificationModelMetadata classificationType. */ - public classificationType: (google.cloud.automl.v1beta1.ClassificationType|keyof typeof google.cloud.automl.v1beta1.ClassificationType); + /** + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#createModel}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a new TextClassificationModelMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns TextClassificationModelMetadata instance + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getModel}. + * @param error Error, if any + * @param [response] Model */ - public static create(properties?: google.cloud.automl.v1beta1.ITextClassificationModelMetadata): google.cloud.automl.v1beta1.TextClassificationModelMetadata; + type GetModelCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.Model) => void; /** - * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. - * @param message TextClassificationModelMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModels}. + * @param error Error, if any + * @param [response] ListModelsResponse */ - public static encode(message: google.cloud.automl.v1beta1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + type ListModelsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListModelsResponse) => void; /** - * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. - * @param message TextClassificationModelMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deleteModel}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextClassificationModelMetadata - * @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.automl.v1beta1.AutoMl#deployModel}. + * @param error Error, if any + * @param [response] Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.TextClassificationModelMetadata; + type DeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextClassificationModelMetadata - * @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.automl.v1beta1.AutoMl#undeployModel}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.TextClassificationModelMetadata; + type UndeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a TextClassificationModelMetadata 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.automl.v1beta1.AutoMl#exportModel}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type ExportModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextClassificationModelMetadata + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportEvaluatedExamples}. + * @param error Error, if any + * @param [response] Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextClassificationModelMetadata; + type ExportEvaluatedExamplesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. - * @param message TextClassificationModelMetadata - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getModelEvaluation}. + * @param error Error, if any + * @param [response] ModelEvaluation */ - public static toObject(message: google.cloud.automl.v1beta1.TextClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetModelEvaluationCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ModelEvaluation) => void; /** - * Converts this TextClassificationModelMetadata to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModelEvaluations}. + * @param error Error, if any + * @param [response] ListModelEvaluationsResponse */ - public toJSON(): { [k: string]: any }; + type ListModelEvaluationsCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.ListModelEvaluationsResponse) => void; } - /** Properties of a TextExtractionDatasetMetadata. */ - interface ITextExtractionDatasetMetadata { + /** Properties of a CreateDatasetRequest. */ + interface ICreateDatasetRequest { + + /** CreateDatasetRequest parent */ + parent?: (string|null); + + /** CreateDatasetRequest dataset */ + dataset?: (google.cloud.automl.v1beta1.IDataset|null); } - /** Represents a TextExtractionDatasetMetadata. */ - class TextExtractionDatasetMetadata implements ITextExtractionDatasetMetadata { + /** Represents a CreateDatasetRequest. */ + class CreateDatasetRequest implements ICreateDatasetRequest { /** - * Constructs a new TextExtractionDatasetMetadata. + * Constructs a new CreateDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata); + constructor(properties?: google.cloud.automl.v1beta1.ICreateDatasetRequest); + + /** CreateDatasetRequest parent. */ + public parent: string; + + /** CreateDatasetRequest dataset. */ + public dataset?: (google.cloud.automl.v1beta1.IDataset|null); /** - * Creates a new TextExtractionDatasetMetadata instance using the specified properties. + * Creates a new CreateDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionDatasetMetadata instance + * @returns CreateDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata): google.cloud.automl.v1beta1.TextExtractionDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.ICreateDatasetRequest): google.cloud.automl.v1beta1.CreateDatasetRequest; /** - * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. - * @param message TextExtractionDatasetMetadata message or plain object to encode + * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. + * @param message CreateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. - * @param message TextExtractionDatasetMetadata message or plain object to encode + * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. + * @param message CreateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. + * Decodes a CreateDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionDatasetMetadata + * @returns CreateDatasetRequest * @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.automl.v1beta1.TextExtractionDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.CreateDatasetRequest; /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionDatasetMetadata + * @returns CreateDatasetRequest * @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.automl.v1beta1.TextExtractionDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.CreateDatasetRequest; /** - * Verifies a TextExtractionDatasetMetadata message. + * Verifies a CreateDatasetRequest 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 TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionDatasetMetadata + * @returns CreateDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CreateDatasetRequest; /** - * Creates a plain object from a TextExtractionDatasetMetadata message. Also converts values to other types if specified. - * @param message TextExtractionDatasetMetadata + * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified. + * @param message CreateDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextExtractionDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.CreateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextExtractionDatasetMetadata to JSON. + * Converts this CreateDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextExtractionModelMetadata. */ - interface ITextExtractionModelMetadata { + /** Properties of a GetDatasetRequest. */ + interface IGetDatasetRequest { + + /** GetDatasetRequest name */ + name?: (string|null); } - /** Represents a TextExtractionModelMetadata. */ - class TextExtractionModelMetadata implements ITextExtractionModelMetadata { + /** Represents a GetDatasetRequest. */ + class GetDatasetRequest implements IGetDatasetRequest { /** - * Constructs a new TextExtractionModelMetadata. + * Constructs a new GetDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextExtractionModelMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IGetDatasetRequest); + + /** GetDatasetRequest name. */ + public name: string; /** - * Creates a new TextExtractionModelMetadata instance using the specified properties. + * Creates a new GetDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TextExtractionModelMetadata instance + * @returns GetDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextExtractionModelMetadata): google.cloud.automl.v1beta1.TextExtractionModelMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IGetDatasetRequest): google.cloud.automl.v1beta1.GetDatasetRequest; /** - * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. - * @param message TextExtractionModelMetadata message or plain object to encode + * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. + * @param message GetDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. - * @param message TextExtractionModelMetadata message or plain object to encode + * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. + * @param message GetDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextExtractionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. + * Decodes a GetDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextExtractionModelMetadata + * @returns GetDatasetRequest * @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.automl.v1beta1.TextExtractionModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GetDatasetRequest; /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextExtractionModelMetadata + * @returns GetDatasetRequest * @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.automl.v1beta1.TextExtractionModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GetDatasetRequest; /** - * Verifies a TextExtractionModelMetadata message. + * Verifies a GetDatasetRequest 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 TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextExtractionModelMetadata + * @returns GetDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextExtractionModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetDatasetRequest; /** - * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. - * @param message TextExtractionModelMetadata + * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified. + * @param message GetDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextExtractionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GetDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextExtractionModelMetadata to JSON. + * Converts this GetDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSentimentDatasetMetadata. */ - interface ITextSentimentDatasetMetadata { + /** Properties of a ListDatasetsRequest. */ + interface IListDatasetsRequest { - /** TextSentimentDatasetMetadata sentimentMax */ - sentimentMax?: (number|null); + /** ListDatasetsRequest parent */ + parent?: (string|null); + + /** ListDatasetsRequest filter */ + filter?: (string|null); + + /** ListDatasetsRequest pageSize */ + pageSize?: (number|null); + + /** ListDatasetsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a TextSentimentDatasetMetadata. */ - class TextSentimentDatasetMetadata implements ITextSentimentDatasetMetadata { + /** Represents a ListDatasetsRequest. */ + class ListDatasetsRequest implements IListDatasetsRequest { /** - * Constructs a new TextSentimentDatasetMetadata. + * Constructs a new ListDatasetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IListDatasetsRequest); - /** TextSentimentDatasetMetadata sentimentMax. */ - public sentimentMax: number; + /** ListDatasetsRequest parent. */ + public parent: string; + + /** ListDatasetsRequest filter. */ + public filter: string; + + /** ListDatasetsRequest pageSize. */ + public pageSize: number; + + /** ListDatasetsRequest pageToken. */ + public pageToken: string; /** - * Creates a new TextSentimentDatasetMetadata instance using the specified properties. + * Creates a new ListDatasetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentDatasetMetadata instance + * @returns ListDatasetsRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata): google.cloud.automl.v1beta1.TextSentimentDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IListDatasetsRequest): google.cloud.automl.v1beta1.ListDatasetsRequest; /** - * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. - * @param message TextSentimentDatasetMetadata message or plain object to encode + * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. + * @param message ListDatasetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. - * @param message TextSentimentDatasetMetadata message or plain object to encode + * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. + * @param message ListDatasetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. + * Decodes a ListDatasetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentDatasetMetadata + * @returns ListDatasetsRequest * @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.automl.v1beta1.TextSentimentDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListDatasetsRequest; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentDatasetMetadata + * @returns ListDatasetsRequest * @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.automl.v1beta1.TextSentimentDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListDatasetsRequest; /** - * Verifies a TextSentimentDatasetMetadata message. + * Verifies a ListDatasetsRequest 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 TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListDatasetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentDatasetMetadata + * @returns ListDatasetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListDatasetsRequest; /** - * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. - * @param message TextSentimentDatasetMetadata + * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified. + * @param message ListDatasetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextSentimentDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListDatasetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentDatasetMetadata to JSON. + * Converts this ListDatasetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextSentimentModelMetadata. */ - interface ITextSentimentModelMetadata { + /** Properties of a ListDatasetsResponse. */ + interface IListDatasetsResponse { + + /** ListDatasetsResponse datasets */ + datasets?: (google.cloud.automl.v1beta1.IDataset[]|null); + + /** ListDatasetsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a TextSentimentModelMetadata. */ - class TextSentimentModelMetadata implements ITextSentimentModelMetadata { + /** Represents a ListDatasetsResponse. */ + class ListDatasetsResponse implements IListDatasetsResponse { /** - * Constructs a new TextSentimentModelMetadata. + * Constructs a new ListDatasetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITextSentimentModelMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IListDatasetsResponse); + + /** ListDatasetsResponse datasets. */ + public datasets: google.cloud.automl.v1beta1.IDataset[]; + + /** ListDatasetsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new TextSentimentModelMetadata instance using the specified properties. + * Creates a new ListDatasetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TextSentimentModelMetadata instance + * @returns ListDatasetsResponse instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITextSentimentModelMetadata): google.cloud.automl.v1beta1.TextSentimentModelMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IListDatasetsResponse): google.cloud.automl.v1beta1.ListDatasetsResponse; /** - * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. - * @param message TextSentimentModelMetadata message or plain object to encode + * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. + * @param message ListDatasetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. - * @param message TextSentimentModelMetadata message or plain object to encode + * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. + * @param message ListDatasetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITextSentimentModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. + * Decodes a ListDatasetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextSentimentModelMetadata + * @returns ListDatasetsResponse * @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.automl.v1beta1.TextSentimentModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListDatasetsResponse; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextSentimentModelMetadata + * @returns ListDatasetsResponse * @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.automl.v1beta1.TextSentimentModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListDatasetsResponse; /** - * Verifies a TextSentimentModelMetadata message. + * Verifies a ListDatasetsResponse 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 TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListDatasetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextSentimentModelMetadata + * @returns ListDatasetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TextSentimentModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListDatasetsResponse; /** - * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. - * @param message TextSentimentModelMetadata + * Creates a plain object from a ListDatasetsResponse message. Also converts values to other types if specified. + * @param message ListDatasetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TextSentimentModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListDatasetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextSentimentModelMetadata to JSON. + * Converts this ListDatasetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoClassificationDatasetMetadata. */ - interface IVideoClassificationDatasetMetadata { + /** Properties of an UpdateDatasetRequest. */ + interface IUpdateDatasetRequest { + + /** UpdateDatasetRequest dataset */ + dataset?: (google.cloud.automl.v1beta1.IDataset|null); + + /** UpdateDatasetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a VideoClassificationDatasetMetadata. */ - class VideoClassificationDatasetMetadata implements IVideoClassificationDatasetMetadata { + /** Represents an UpdateDatasetRequest. */ + class UpdateDatasetRequest implements IUpdateDatasetRequest { /** - * Constructs a new VideoClassificationDatasetMetadata. + * Constructs a new UpdateDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IUpdateDatasetRequest); + + /** UpdateDatasetRequest dataset. */ + public dataset?: (google.cloud.automl.v1beta1.IDataset|null); + + /** UpdateDatasetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new VideoClassificationDatasetMetadata instance using the specified properties. + * Creates a new UpdateDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VideoClassificationDatasetMetadata instance + * @returns UpdateDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata): google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IUpdateDatasetRequest): google.cloud.automl.v1beta1.UpdateDatasetRequest; /** - * Encodes the specified VideoClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. - * @param message VideoClassificationDatasetMetadata message or plain object to encode + * Encodes the specified UpdateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. + * @param message UpdateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. - * @param message VideoClassificationDatasetMetadata message or plain object to encode + * Encodes the specified UpdateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. + * @param message UpdateDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes an UpdateDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoClassificationDatasetMetadata + * @returns UpdateDatasetRequest * @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.automl.v1beta1.VideoClassificationDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.UpdateDatasetRequest; /** - * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoClassificationDatasetMetadata + * @returns UpdateDatasetRequest * @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.automl.v1beta1.VideoClassificationDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.UpdateDatasetRequest; /** - * Verifies a VideoClassificationDatasetMetadata message. + * Verifies an UpdateDatasetRequest 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 VideoClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoClassificationDatasetMetadata + * @returns UpdateDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UpdateDatasetRequest; /** - * Creates a plain object from a VideoClassificationDatasetMetadata message. Also converts values to other types if specified. - * @param message VideoClassificationDatasetMetadata + * Creates a plain object from an UpdateDatasetRequest message. Also converts values to other types if specified. + * @param message UpdateDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.UpdateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoClassificationDatasetMetadata to JSON. + * Converts this UpdateDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoObjectTrackingDatasetMetadata. */ - interface IVideoObjectTrackingDatasetMetadata { + /** Properties of a DeleteDatasetRequest. */ + interface IDeleteDatasetRequest { + + /** DeleteDatasetRequest name */ + name?: (string|null); } - /** Represents a VideoObjectTrackingDatasetMetadata. */ - class VideoObjectTrackingDatasetMetadata implements IVideoObjectTrackingDatasetMetadata { + /** Represents a DeleteDatasetRequest. */ + class DeleteDatasetRequest implements IDeleteDatasetRequest { /** - * Constructs a new VideoObjectTrackingDatasetMetadata. + * Constructs a new DeleteDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IDeleteDatasetRequest); + + /** DeleteDatasetRequest name. */ + public name: string; /** - * Creates a new VideoObjectTrackingDatasetMetadata instance using the specified properties. + * Creates a new DeleteDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VideoObjectTrackingDatasetMetadata instance + * @returns DeleteDatasetRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata): google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IDeleteDatasetRequest): google.cloud.automl.v1beta1.DeleteDatasetRequest; /** - * Encodes the specified VideoObjectTrackingDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. - * @param message VideoObjectTrackingDatasetMetadata message or plain object to encode + * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. + * @param message DeleteDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoObjectTrackingDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. - * @param message VideoObjectTrackingDatasetMetadata message or plain object to encode + * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. + * @param message DeleteDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer. + * Decodes a DeleteDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoObjectTrackingDatasetMetadata + * @returns DeleteDatasetRequest * @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.automl.v1beta1.VideoObjectTrackingDatasetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DeleteDatasetRequest; /** - * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoObjectTrackingDatasetMetadata + * @returns DeleteDatasetRequest * @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.automl.v1beta1.VideoObjectTrackingDatasetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DeleteDatasetRequest; /** - * Verifies a VideoObjectTrackingDatasetMetadata message. + * Verifies a DeleteDatasetRequest 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 VideoObjectTrackingDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoObjectTrackingDatasetMetadata + * @returns DeleteDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeleteDatasetRequest; /** - * Creates a plain object from a VideoObjectTrackingDatasetMetadata message. Also converts values to other types if specified. - * @param message VideoObjectTrackingDatasetMetadata + * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified. + * @param message DeleteDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DeleteDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoObjectTrackingDatasetMetadata to JSON. + * Converts this DeleteDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoClassificationModelMetadata. */ - interface IVideoClassificationModelMetadata { + /** Properties of an ImportDataRequest. */ + interface IImportDataRequest { + + /** ImportDataRequest name */ + name?: (string|null); + + /** ImportDataRequest inputConfig */ + inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); } - /** Represents a VideoClassificationModelMetadata. */ - class VideoClassificationModelMetadata implements IVideoClassificationModelMetadata { + /** Represents an ImportDataRequest. */ + class ImportDataRequest implements IImportDataRequest { /** - * Constructs a new VideoClassificationModelMetadata. + * Constructs a new ImportDataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IImportDataRequest); + + /** ImportDataRequest name. */ + public name: string; + + /** ImportDataRequest inputConfig. */ + public inputConfig?: (google.cloud.automl.v1beta1.IInputConfig|null); /** - * Creates a new VideoClassificationModelMetadata instance using the specified properties. + * Creates a new ImportDataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VideoClassificationModelMetadata instance + * @returns ImportDataRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata): google.cloud.automl.v1beta1.VideoClassificationModelMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IImportDataRequest): google.cloud.automl.v1beta1.ImportDataRequest; /** - * Encodes the specified VideoClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. - * @param message VideoClassificationModelMetadata message or plain object to encode + * Encodes the specified ImportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. + * @param message ImportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. - * @param message VideoClassificationModelMetadata message or plain object to encode + * Encodes the specified ImportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. + * @param message ImportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoClassificationModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IImportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer. + * Decodes an ImportDataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoClassificationModelMetadata + * @returns ImportDataRequest * @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.automl.v1beta1.VideoClassificationModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ImportDataRequest; /** - * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoClassificationModelMetadata + * @returns ImportDataRequest * @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.automl.v1beta1.VideoClassificationModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ImportDataRequest; /** - * Verifies a VideoClassificationModelMetadata message. + * Verifies an ImportDataRequest 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 VideoClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoClassificationModelMetadata + * @returns ImportDataRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoClassificationModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImportDataRequest; /** - * Creates a plain object from a VideoClassificationModelMetadata message. Also converts values to other types if specified. - * @param message VideoClassificationModelMetadata + * Creates a plain object from an ImportDataRequest message. Also converts values to other types if specified. + * @param message ImportDataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.VideoClassificationModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ImportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoClassificationModelMetadata to JSON. + * Converts this ImportDataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoObjectTrackingModelMetadata. */ - interface IVideoObjectTrackingModelMetadata { + /** Properties of an ExportDataRequest. */ + interface IExportDataRequest { + + /** ExportDataRequest name */ + name?: (string|null); + + /** ExportDataRequest outputConfig */ + outputConfig?: (google.cloud.automl.v1beta1.IOutputConfig|null); } - /** Represents a VideoObjectTrackingModelMetadata. */ - class VideoObjectTrackingModelMetadata implements IVideoObjectTrackingModelMetadata { + /** Represents an ExportDataRequest. */ + class ExportDataRequest implements IExportDataRequest { /** - * Constructs a new VideoObjectTrackingModelMetadata. + * Constructs a new ExportDataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IExportDataRequest); + + /** ExportDataRequest name. */ + public name: string; + + /** ExportDataRequest outputConfig. */ + public outputConfig?: (google.cloud.automl.v1beta1.IOutputConfig|null); /** - * Creates a new VideoObjectTrackingModelMetadata instance using the specified properties. + * Creates a new ExportDataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VideoObjectTrackingModelMetadata instance + * @returns ExportDataRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata): google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IExportDataRequest): google.cloud.automl.v1beta1.ExportDataRequest; /** - * Encodes the specified VideoObjectTrackingModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. - * @param message VideoObjectTrackingModelMetadata message or plain object to encode + * Encodes the specified ExportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. + * @param message ExportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoObjectTrackingModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. - * @param message VideoObjectTrackingModelMetadata message or plain object to encode + * Encodes the specified ExportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. + * @param message ExportDataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer. + * Decodes an ExportDataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoObjectTrackingModelMetadata + * @returns ExportDataRequest * @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.automl.v1beta1.VideoObjectTrackingModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ExportDataRequest; /** - * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportDataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoObjectTrackingModelMetadata + * @returns ExportDataRequest * @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.automl.v1beta1.VideoObjectTrackingModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ExportDataRequest; /** - * Verifies a VideoObjectTrackingModelMetadata message. + * Verifies an ExportDataRequest 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 VideoObjectTrackingModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoObjectTrackingModelMetadata + * @returns ExportDataRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportDataRequest; /** - * Creates a plain object from a VideoObjectTrackingModelMetadata message. Also converts values to other types if specified. - * @param message VideoObjectTrackingModelMetadata + * Creates a plain object from an ExportDataRequest message. Also converts values to other types if specified. + * @param message ExportDataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ExportDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoObjectTrackingModelMetadata to JSON. + * Converts this ExportDataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Model. */ - interface IModel { - - /** Model translationModelMetadata */ - translationModelMetadata?: (google.cloud.automl.v1beta1.ITranslationModelMetadata|null); - - /** Model imageClassificationModelMetadata */ - imageClassificationModelMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null); - - /** Model textClassificationModelMetadata */ - textClassificationModelMetadata?: (google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null); - - /** Model imageObjectDetectionModelMetadata */ - imageObjectDetectionModelMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null); - - /** Model videoClassificationModelMetadata */ - videoClassificationModelMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null); - - /** Model videoObjectTrackingModelMetadata */ - videoObjectTrackingModelMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null); - - /** Model textExtractionModelMetadata */ - textExtractionModelMetadata?: (google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null); - - /** Model tablesModelMetadata */ - tablesModelMetadata?: (google.cloud.automl.v1beta1.ITablesModelMetadata|null); - - /** Model textSentimentModelMetadata */ - textSentimentModelMetadata?: (google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null); + /** Properties of a GetAnnotationSpecRequest. */ + interface IGetAnnotationSpecRequest { - /** Model name */ + /** GetAnnotationSpecRequest name */ name?: (string|null); - - /** Model displayName */ - displayName?: (string|null); - - /** Model datasetId */ - datasetId?: (string|null); - - /** Model createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Model updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Model deploymentState */ - deploymentState?: (google.cloud.automl.v1beta1.Model.DeploymentState|keyof typeof google.cloud.automl.v1beta1.Model.DeploymentState|null); } - /** Represents a Model. */ - class Model implements IModel { + /** Represents a GetAnnotationSpecRequest. */ + class GetAnnotationSpecRequest implements IGetAnnotationSpecRequest { /** - * Constructs a new Model. + * Constructs a new GetAnnotationSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IModel); - - /** Model translationModelMetadata. */ - public translationModelMetadata?: (google.cloud.automl.v1beta1.ITranslationModelMetadata|null); - - /** Model imageClassificationModelMetadata. */ - public imageClassificationModelMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null); - - /** Model textClassificationModelMetadata. */ - public textClassificationModelMetadata?: (google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null); - - /** Model imageObjectDetectionModelMetadata. */ - public imageObjectDetectionModelMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null); - - /** Model videoClassificationModelMetadata. */ - public videoClassificationModelMetadata?: (google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null); - - /** Model videoObjectTrackingModelMetadata. */ - public videoObjectTrackingModelMetadata?: (google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null); - - /** Model textExtractionModelMetadata. */ - public textExtractionModelMetadata?: (google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null); - - /** Model tablesModelMetadata. */ - public tablesModelMetadata?: (google.cloud.automl.v1beta1.ITablesModelMetadata|null); - - /** Model textSentimentModelMetadata. */ - public textSentimentModelMetadata?: (google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null); + constructor(properties?: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest); - /** Model name. */ + /** GetAnnotationSpecRequest name. */ public name: string; - /** Model displayName. */ - public displayName: string; - - /** Model datasetId. */ - public datasetId: string; - - /** Model createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Model updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Model deploymentState. */ - public deploymentState: (google.cloud.automl.v1beta1.Model.DeploymentState|keyof typeof google.cloud.automl.v1beta1.Model.DeploymentState); - - /** Model modelMetadata. */ - public modelMetadata?: ("translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"videoClassificationModelMetadata"|"videoObjectTrackingModelMetadata"|"textExtractionModelMetadata"|"tablesModelMetadata"|"textSentimentModelMetadata"); - /** - * Creates a new Model instance using the specified properties. + * Creates a new GetAnnotationSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Model instance + * @returns GetAnnotationSpecRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IModel): google.cloud.automl.v1beta1.Model; + public static create(properties?: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest): google.cloud.automl.v1beta1.GetAnnotationSpecRequest; /** - * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. - * @param message Model message or plain object to encode + * Encodes the specified GetAnnotationSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. + * @param message GetAnnotationSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. - * @param message Model message or plain object to encode + * Encodes the specified GetAnnotationSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. + * @param message GetAnnotationSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IModel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Model message from the specified reader or buffer. + * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Model + * @returns GetAnnotationSpecRequest * @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.automl.v1beta1.Model; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GetAnnotationSpecRequest; /** - * Decodes a Model message from the specified reader or buffer, length delimited. + * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Model + * @returns GetAnnotationSpecRequest * @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.automl.v1beta1.Model; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GetAnnotationSpecRequest; /** - * Verifies a Model message. + * Verifies a GetAnnotationSpecRequest 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 Model message from a plain object. Also converts values to their respective internal types. + * Creates a GetAnnotationSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Model + * @returns GetAnnotationSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.Model; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetAnnotationSpecRequest; /** - * Creates a plain object from a Model message. Also converts values to other types if specified. - * @param message Model + * Creates a plain object from a GetAnnotationSpecRequest message. Also converts values to other types if specified. + * @param message GetAnnotationSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GetAnnotationSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Model to JSON. + * Converts this GetAnnotationSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Model { - - /** DeploymentState enum. */ - enum DeploymentState { - DEPLOYMENT_STATE_UNSPECIFIED = 0, - DEPLOYED = 1, - UNDEPLOYED = 2 - } - } - - /** Properties of a ModelEvaluation. */ - interface IModelEvaluation { - - /** ModelEvaluation classificationEvaluationMetrics */ - classificationEvaluationMetrics?: (google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null); - - /** ModelEvaluation regressionEvaluationMetrics */ - regressionEvaluationMetrics?: (google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null); - - /** ModelEvaluation translationEvaluationMetrics */ - translationEvaluationMetrics?: (google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null); - - /** ModelEvaluation imageObjectDetectionEvaluationMetrics */ - imageObjectDetectionEvaluationMetrics?: (google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null); - - /** ModelEvaluation videoObjectTrackingEvaluationMetrics */ - videoObjectTrackingEvaluationMetrics?: (google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null); - - /** ModelEvaluation textSentimentEvaluationMetrics */ - textSentimentEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null); - - /** ModelEvaluation textExtractionEvaluationMetrics */ - textExtractionEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null); + /** Properties of a GetTableSpecRequest. */ + interface IGetTableSpecRequest { - /** ModelEvaluation name */ + /** GetTableSpecRequest name */ name?: (string|null); - /** ModelEvaluation annotationSpecId */ - annotationSpecId?: (string|null); - - /** ModelEvaluation displayName */ - displayName?: (string|null); - - /** ModelEvaluation createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ModelEvaluation evaluatedExampleCount */ - evaluatedExampleCount?: (number|null); - } - - /** Represents a ModelEvaluation. */ - class ModelEvaluation implements IModelEvaluation { - - /** - * Constructs a new ModelEvaluation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.IModelEvaluation); - - /** ModelEvaluation classificationEvaluationMetrics. */ - public classificationEvaluationMetrics?: (google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null); - - /** ModelEvaluation regressionEvaluationMetrics. */ - public regressionEvaluationMetrics?: (google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null); - - /** ModelEvaluation translationEvaluationMetrics. */ - public translationEvaluationMetrics?: (google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null); - - /** ModelEvaluation imageObjectDetectionEvaluationMetrics. */ - public imageObjectDetectionEvaluationMetrics?: (google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null); - - /** ModelEvaluation videoObjectTrackingEvaluationMetrics. */ - public videoObjectTrackingEvaluationMetrics?: (google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null); - - /** ModelEvaluation textSentimentEvaluationMetrics. */ - public textSentimentEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null); - - /** ModelEvaluation textExtractionEvaluationMetrics. */ - public textExtractionEvaluationMetrics?: (google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null); - - /** ModelEvaluation name. */ - public name: string; - - /** ModelEvaluation annotationSpecId. */ - public annotationSpecId: string; + /** GetTableSpecRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + } - /** ModelEvaluation displayName. */ - public displayName: string; + /** Represents a GetTableSpecRequest. */ + class GetTableSpecRequest implements IGetTableSpecRequest { - /** ModelEvaluation createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new GetTableSpecRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IGetTableSpecRequest); - /** ModelEvaluation evaluatedExampleCount. */ - public evaluatedExampleCount: number; + /** GetTableSpecRequest name. */ + public name: string; - /** ModelEvaluation metrics. */ - public metrics?: ("classificationEvaluationMetrics"|"regressionEvaluationMetrics"|"translationEvaluationMetrics"|"imageObjectDetectionEvaluationMetrics"|"videoObjectTrackingEvaluationMetrics"|"textSentimentEvaluationMetrics"|"textExtractionEvaluationMetrics"); + /** GetTableSpecRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ModelEvaluation instance using the specified properties. + * Creates a new GetTableSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ModelEvaluation instance + * @returns GetTableSpecRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IModelEvaluation): google.cloud.automl.v1beta1.ModelEvaluation; + public static create(properties?: google.cloud.automl.v1beta1.IGetTableSpecRequest): google.cloud.automl.v1beta1.GetTableSpecRequest; /** - * Encodes the specified ModelEvaluation message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. - * @param message ModelEvaluation message or plain object to encode + * Encodes the specified GetTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. + * @param message GetTableSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGetTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. - * @param message ModelEvaluation message or plain object to encode + * Encodes the specified GetTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. + * @param message GetTableSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ModelEvaluation message from the specified reader or buffer. + * Decodes a GetTableSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ModelEvaluation + * @returns GetTableSpecRequest * @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.automl.v1beta1.ModelEvaluation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GetTableSpecRequest; /** - * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. + * Decodes a GetTableSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ModelEvaluation + * @returns GetTableSpecRequest * @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.automl.v1beta1.ModelEvaluation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GetTableSpecRequest; /** - * Verifies a ModelEvaluation message. + * Verifies a GetTableSpecRequest 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 ModelEvaluation message from a plain object. Also converts values to their respective internal types. + * Creates a GetTableSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ModelEvaluation + * @returns GetTableSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ModelEvaluation; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetTableSpecRequest; /** - * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. - * @param message ModelEvaluation + * Creates a plain object from a GetTableSpecRequest message. Also converts values to other types if specified. + * @param message GetTableSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ModelEvaluation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GetTableSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ModelEvaluation to JSON. + * Converts this GetTableSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata deleteDetails */ - deleteDetails?: (google.cloud.automl.v1beta1.IDeleteOperationMetadata|null); - - /** OperationMetadata deployModelDetails */ - deployModelDetails?: (google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null); - - /** OperationMetadata undeployModelDetails */ - undeployModelDetails?: (google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null); - - /** OperationMetadata createModelDetails */ - createModelDetails?: (google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null); - - /** OperationMetadata importDataDetails */ - importDataDetails?: (google.cloud.automl.v1beta1.IImportDataOperationMetadata|null); - - /** OperationMetadata batchPredictDetails */ - batchPredictDetails?: (google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null); - - /** OperationMetadata exportDataDetails */ - exportDataDetails?: (google.cloud.automl.v1beta1.IExportDataOperationMetadata|null); - - /** OperationMetadata exportModelDetails */ - exportModelDetails?: (google.cloud.automl.v1beta1.IExportModelOperationMetadata|null); + /** Properties of a ListTableSpecsRequest. */ + interface IListTableSpecsRequest { - /** OperationMetadata exportEvaluatedExamplesDetails */ - exportEvaluatedExamplesDetails?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null); + /** ListTableSpecsRequest parent */ + parent?: (string|null); - /** OperationMetadata progressPercent */ - progressPercent?: (number|null); + /** ListTableSpecsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); - /** OperationMetadata partialFailures */ - partialFailures?: (google.rpc.IStatus[]|null); + /** ListTableSpecsRequest filter */ + filter?: (string|null); - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListTableSpecsRequest pageSize */ + pageSize?: (number|null); - /** OperationMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListTableSpecsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a ListTableSpecsRequest. */ + class ListTableSpecsRequest implements IListTableSpecsRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new ListTableSpecsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IOperationMetadata); - - /** OperationMetadata deleteDetails. */ - public deleteDetails?: (google.cloud.automl.v1beta1.IDeleteOperationMetadata|null); - - /** OperationMetadata deployModelDetails. */ - public deployModelDetails?: (google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null); - - /** OperationMetadata undeployModelDetails. */ - public undeployModelDetails?: (google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null); - - /** OperationMetadata createModelDetails. */ - public createModelDetails?: (google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null); - - /** OperationMetadata importDataDetails. */ - public importDataDetails?: (google.cloud.automl.v1beta1.IImportDataOperationMetadata|null); - - /** OperationMetadata batchPredictDetails. */ - public batchPredictDetails?: (google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null); - - /** OperationMetadata exportDataDetails. */ - public exportDataDetails?: (google.cloud.automl.v1beta1.IExportDataOperationMetadata|null); - - /** OperationMetadata exportModelDetails. */ - public exportModelDetails?: (google.cloud.automl.v1beta1.IExportModelOperationMetadata|null); - - /** OperationMetadata exportEvaluatedExamplesDetails. */ - public exportEvaluatedExamplesDetails?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null); + constructor(properties?: google.cloud.automl.v1beta1.IListTableSpecsRequest); - /** OperationMetadata progressPercent. */ - public progressPercent: number; + /** ListTableSpecsRequest parent. */ + public parent: string; - /** OperationMetadata partialFailures. */ - public partialFailures: google.rpc.IStatus[]; + /** ListTableSpecsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListTableSpecsRequest filter. */ + public filter: string; - /** OperationMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListTableSpecsRequest pageSize. */ + public pageSize: number; - /** OperationMetadata details. */ - public details?: ("deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"|"exportEvaluatedExamplesDetails"); + /** ListTableSpecsRequest pageToken. */ + public pageToken: string; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListTableSpecsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns ListTableSpecsRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IOperationMetadata): google.cloud.automl.v1beta1.OperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IListTableSpecsRequest): google.cloud.automl.v1beta1.ListTableSpecsRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListTableSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. + * @param message ListTableSpecsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListTableSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListTableSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. + * @param message ListTableSpecsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListTableSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListTableSpecsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns ListTableSpecsRequest * @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.automl.v1beta1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListTableSpecsRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListTableSpecsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns ListTableSpecsRequest * @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.automl.v1beta1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListTableSpecsRequest; /** - * Verifies an OperationMetadata message. + * Verifies a ListTableSpecsRequest 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListTableSpecsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns ListTableSpecsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListTableSpecsRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a ListTableSpecsRequest message. Also converts values to other types if specified. + * @param message ListTableSpecsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListTableSpecsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListTableSpecsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteOperationMetadata. */ - interface IDeleteOperationMetadata { + /** Properties of a ListTableSpecsResponse. */ + interface IListTableSpecsResponse { + + /** ListTableSpecsResponse tableSpecs */ + tableSpecs?: (google.cloud.automl.v1beta1.ITableSpec[]|null); + + /** ListTableSpecsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteOperationMetadata. */ - class DeleteOperationMetadata implements IDeleteOperationMetadata { + /** Represents a ListTableSpecsResponse. */ + class ListTableSpecsResponse implements IListTableSpecsResponse { /** - * Constructs a new DeleteOperationMetadata. + * Constructs a new ListTableSpecsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDeleteOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IListTableSpecsResponse); + + /** ListTableSpecsResponse tableSpecs. */ + public tableSpecs: google.cloud.automl.v1beta1.ITableSpec[]; + + /** ListTableSpecsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteOperationMetadata instance using the specified properties. + * Creates a new ListTableSpecsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteOperationMetadata instance + * @returns ListTableSpecsResponse instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDeleteOperationMetadata): google.cloud.automl.v1beta1.DeleteOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IListTableSpecsResponse): google.cloud.automl.v1beta1.ListTableSpecsResponse; /** - * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. - * @param message DeleteOperationMetadata message or plain object to encode + * Encodes the specified ListTableSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. + * @param message ListTableSpecsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListTableSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. - * @param message DeleteOperationMetadata message or plain object to encode + /** + * Encodes the specified ListTableSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. + * @param message ListTableSpecsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeleteOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListTableSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer. + * Decodes a ListTableSpecsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteOperationMetadata + * @returns ListTableSpecsResponse * @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.automl.v1beta1.DeleteOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListTableSpecsResponse; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListTableSpecsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteOperationMetadata + * @returns ListTableSpecsResponse * @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.automl.v1beta1.DeleteOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListTableSpecsResponse; /** - * Verifies a DeleteOperationMetadata message. + * Verifies a ListTableSpecsResponse 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 DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListTableSpecsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteOperationMetadata + * @returns ListTableSpecsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeleteOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListTableSpecsResponse; /** - * Creates a plain object from a DeleteOperationMetadata message. Also converts values to other types if specified. - * @param message DeleteOperationMetadata + * Creates a plain object from a ListTableSpecsResponse message. Also converts values to other types if specified. + * @param message ListTableSpecsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DeleteOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListTableSpecsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteOperationMetadata to JSON. + * Converts this ListTableSpecsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeployModelOperationMetadata. */ - interface IDeployModelOperationMetadata { + /** Properties of an UpdateTableSpecRequest. */ + interface IUpdateTableSpecRequest { + + /** UpdateTableSpecRequest tableSpec */ + tableSpec?: (google.cloud.automl.v1beta1.ITableSpec|null); + + /** UpdateTableSpecRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a DeployModelOperationMetadata. */ - class DeployModelOperationMetadata implements IDeployModelOperationMetadata { + /** Represents an UpdateTableSpecRequest. */ + class UpdateTableSpecRequest implements IUpdateTableSpecRequest { /** - * Constructs a new DeployModelOperationMetadata. + * Constructs a new UpdateTableSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IDeployModelOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IUpdateTableSpecRequest); + + /** UpdateTableSpecRequest tableSpec. */ + public tableSpec?: (google.cloud.automl.v1beta1.ITableSpec|null); + + /** UpdateTableSpecRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new DeployModelOperationMetadata instance using the specified properties. + * Creates a new UpdateTableSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeployModelOperationMetadata instance + * @returns UpdateTableSpecRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IDeployModelOperationMetadata): google.cloud.automl.v1beta1.DeployModelOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IUpdateTableSpecRequest): google.cloud.automl.v1beta1.UpdateTableSpecRequest; /** - * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. - * @param message DeployModelOperationMetadata message or plain object to encode + * Encodes the specified UpdateTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. + * @param message UpdateTableSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IUpdateTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. - * @param message DeployModelOperationMetadata message or plain object to encode + * Encodes the specified UpdateTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. + * @param message UpdateTableSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IUpdateTableSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. + * Decodes an UpdateTableSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeployModelOperationMetadata + * @returns UpdateTableSpecRequest * @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.automl.v1beta1.DeployModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.UpdateTableSpecRequest; /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateTableSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeployModelOperationMetadata + * @returns UpdateTableSpecRequest * @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.automl.v1beta1.DeployModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.UpdateTableSpecRequest; /** - * Verifies a DeployModelOperationMetadata message. + * Verifies an UpdateTableSpecRequest 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 DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTableSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeployModelOperationMetadata + * @returns UpdateTableSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeployModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UpdateTableSpecRequest; /** - * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. - * @param message DeployModelOperationMetadata + * Creates a plain object from an UpdateTableSpecRequest message. Also converts values to other types if specified. + * @param message UpdateTableSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.DeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.UpdateTableSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeployModelOperationMetadata to JSON. + * Converts this UpdateTableSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UndeployModelOperationMetadata. */ - interface IUndeployModelOperationMetadata { + /** Properties of a GetColumnSpecRequest. */ + interface IGetColumnSpecRequest { + + /** GetColumnSpecRequest name */ + name?: (string|null); + + /** GetColumnSpecRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UndeployModelOperationMetadata. */ - class UndeployModelOperationMetadata implements IUndeployModelOperationMetadata { + /** Represents a GetColumnSpecRequest. */ + class GetColumnSpecRequest implements IGetColumnSpecRequest { /** - * Constructs a new UndeployModelOperationMetadata. + * Constructs a new GetColumnSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IGetColumnSpecRequest); + + /** GetColumnSpecRequest name. */ + public name: string; + + /** GetColumnSpecRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new UndeployModelOperationMetadata instance using the specified properties. + * Creates a new GetColumnSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UndeployModelOperationMetadata instance + * @returns GetColumnSpecRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata): google.cloud.automl.v1beta1.UndeployModelOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IGetColumnSpecRequest): google.cloud.automl.v1beta1.GetColumnSpecRequest; /** - * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. - * @param message UndeployModelOperationMetadata message or plain object to encode + * Encodes the specified GetColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. + * @param message GetColumnSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGetColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. - * @param message UndeployModelOperationMetadata message or plain object to encode + * Encodes the specified GetColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. + * @param message GetColumnSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IUndeployModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. + * Decodes a GetColumnSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UndeployModelOperationMetadata + * @returns GetColumnSpecRequest * @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.automl.v1beta1.UndeployModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GetColumnSpecRequest; /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetColumnSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UndeployModelOperationMetadata + * @returns GetColumnSpecRequest * @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.automl.v1beta1.UndeployModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GetColumnSpecRequest; /** - * Verifies an UndeployModelOperationMetadata message. + * Verifies a GetColumnSpecRequest 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 UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetColumnSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UndeployModelOperationMetadata + * @returns GetColumnSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UndeployModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetColumnSpecRequest; /** - * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. - * @param message UndeployModelOperationMetadata + * Creates a plain object from a GetColumnSpecRequest message. Also converts values to other types if specified. + * @param message GetColumnSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.UndeployModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GetColumnSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UndeployModelOperationMetadata to JSON. + * Converts this GetColumnSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateModelOperationMetadata. */ - interface ICreateModelOperationMetadata { + /** Properties of a ListColumnSpecsRequest. */ + interface IListColumnSpecsRequest { + + /** ListColumnSpecsRequest parent */ + parent?: (string|null); + + /** ListColumnSpecsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListColumnSpecsRequest filter */ + filter?: (string|null); + + /** ListColumnSpecsRequest pageSize */ + pageSize?: (number|null); + + /** ListColumnSpecsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CreateModelOperationMetadata. */ - class CreateModelOperationMetadata implements ICreateModelOperationMetadata { + /** Represents a ListColumnSpecsRequest. */ + class ListColumnSpecsRequest implements IListColumnSpecsRequest { /** - * Constructs a new CreateModelOperationMetadata. + * Constructs a new ListColumnSpecsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ICreateModelOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IListColumnSpecsRequest); + + /** ListColumnSpecsRequest parent. */ + public parent: string; + + /** ListColumnSpecsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListColumnSpecsRequest filter. */ + public filter: string; + + /** ListColumnSpecsRequest pageSize. */ + public pageSize: number; + + /** ListColumnSpecsRequest pageToken. */ + public pageToken: string; /** - * Creates a new CreateModelOperationMetadata instance using the specified properties. + * Creates a new ListColumnSpecsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateModelOperationMetadata instance + * @returns ListColumnSpecsRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.ICreateModelOperationMetadata): google.cloud.automl.v1beta1.CreateModelOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IListColumnSpecsRequest): google.cloud.automl.v1beta1.ListColumnSpecsRequest; /** - * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. - * @param message CreateModelOperationMetadata message or plain object to encode + * Encodes the specified ListColumnSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. + * @param message ListColumnSpecsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListColumnSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. - * @param message CreateModelOperationMetadata message or plain object to encode + * Encodes the specified ListColumnSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. + * @param message ListColumnSpecsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ICreateModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListColumnSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. + * Decodes a ListColumnSpecsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateModelOperationMetadata + * @returns ListColumnSpecsRequest * @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.automl.v1beta1.CreateModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListColumnSpecsRequest; /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListColumnSpecsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateModelOperationMetadata + * @returns ListColumnSpecsRequest * @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.automl.v1beta1.CreateModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListColumnSpecsRequest; /** - * Verifies a CreateModelOperationMetadata message. + * Verifies a ListColumnSpecsRequest 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 CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListColumnSpecsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateModelOperationMetadata + * @returns ListColumnSpecsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CreateModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListColumnSpecsRequest; - /** - * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. - * @param message CreateModelOperationMetadata + /** + * Creates a plain object from a ListColumnSpecsRequest message. Also converts values to other types if specified. + * @param message ListColumnSpecsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.CreateModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListColumnSpecsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateModelOperationMetadata to JSON. + * Converts this ListColumnSpecsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImportDataOperationMetadata. */ - interface IImportDataOperationMetadata { + /** Properties of a ListColumnSpecsResponse. */ + interface IListColumnSpecsResponse { + + /** ListColumnSpecsResponse columnSpecs */ + columnSpecs?: (google.cloud.automl.v1beta1.IColumnSpec[]|null); + + /** ListColumnSpecsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ImportDataOperationMetadata. */ - class ImportDataOperationMetadata implements IImportDataOperationMetadata { + /** Represents a ListColumnSpecsResponse. */ + class ListColumnSpecsResponse implements IListColumnSpecsResponse { /** - * Constructs a new ImportDataOperationMetadata. + * Constructs a new ListColumnSpecsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IImportDataOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IListColumnSpecsResponse); + + /** ListColumnSpecsResponse columnSpecs. */ + public columnSpecs: google.cloud.automl.v1beta1.IColumnSpec[]; + + /** ListColumnSpecsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ImportDataOperationMetadata instance using the specified properties. + * Creates a new ListColumnSpecsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDataOperationMetadata instance + * @returns ListColumnSpecsResponse instance */ - public static create(properties?: google.cloud.automl.v1beta1.IImportDataOperationMetadata): google.cloud.automl.v1beta1.ImportDataOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IListColumnSpecsResponse): google.cloud.automl.v1beta1.ListColumnSpecsResponse; /** - * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. - * @param message ImportDataOperationMetadata message or plain object to encode + * Encodes the specified ListColumnSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. + * @param message ListColumnSpecsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListColumnSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. - * @param message ImportDataOperationMetadata message or plain object to encode + * Encodes the specified ListColumnSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. + * @param message ListColumnSpecsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IImportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListColumnSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. + * Decodes a ListColumnSpecsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDataOperationMetadata + * @returns ListColumnSpecsResponse * @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.automl.v1beta1.ImportDataOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListColumnSpecsResponse; /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListColumnSpecsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDataOperationMetadata + * @returns ListColumnSpecsResponse * @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.automl.v1beta1.ImportDataOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListColumnSpecsResponse; /** - * Verifies an ImportDataOperationMetadata message. + * Verifies a ListColumnSpecsResponse 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 ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListColumnSpecsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDataOperationMetadata + * @returns ListColumnSpecsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ImportDataOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListColumnSpecsResponse; /** - * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. - * @param message ImportDataOperationMetadata + * Creates a plain object from a ListColumnSpecsResponse message. Also converts values to other types if specified. + * @param message ListColumnSpecsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ImportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListColumnSpecsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDataOperationMetadata to JSON. + * Converts this ListColumnSpecsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportDataOperationMetadata. */ - interface IExportDataOperationMetadata { + /** Properties of an UpdateColumnSpecRequest. */ + interface IUpdateColumnSpecRequest { - /** ExportDataOperationMetadata outputInfo */ - outputInfo?: (google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null); + /** UpdateColumnSpecRequest columnSpec */ + columnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); + + /** UpdateColumnSpecRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an ExportDataOperationMetadata. */ - class ExportDataOperationMetadata implements IExportDataOperationMetadata { + /** Represents an UpdateColumnSpecRequest. */ + class UpdateColumnSpecRequest implements IUpdateColumnSpecRequest { /** - * Constructs a new ExportDataOperationMetadata. + * Constructs a new UpdateColumnSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExportDataOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest); - /** ExportDataOperationMetadata outputInfo. */ - public outputInfo?: (google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null); + /** UpdateColumnSpecRequest columnSpec. */ + public columnSpec?: (google.cloud.automl.v1beta1.IColumnSpec|null); + + /** UpdateColumnSpecRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ExportDataOperationMetadata instance using the specified properties. + * Creates a new UpdateColumnSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportDataOperationMetadata instance + * @returns UpdateColumnSpecRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExportDataOperationMetadata): google.cloud.automl.v1beta1.ExportDataOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest): google.cloud.automl.v1beta1.UpdateColumnSpecRequest; /** - * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. - * @param message ExportDataOperationMetadata message or plain object to encode + * Encodes the specified UpdateColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. + * @param message UpdateColumnSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. - * @param message ExportDataOperationMetadata message or plain object to encode + * Encodes the specified UpdateColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. + * @param message UpdateColumnSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. + * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportDataOperationMetadata + * @returns UpdateColumnSpecRequest * @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.automl.v1beta1.ExportDataOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.UpdateColumnSpecRequest; /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportDataOperationMetadata + * @returns UpdateColumnSpecRequest * @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.automl.v1beta1.ExportDataOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.UpdateColumnSpecRequest; /** - * Verifies an ExportDataOperationMetadata message. + * Verifies an UpdateColumnSpecRequest 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 ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateColumnSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportDataOperationMetadata + * @returns UpdateColumnSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportDataOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UpdateColumnSpecRequest; /** - * Creates a plain object from an ExportDataOperationMetadata message. Also converts values to other types if specified. - * @param message ExportDataOperationMetadata + * Creates a plain object from an UpdateColumnSpecRequest message. Also converts values to other types if specified. + * @param message UpdateColumnSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.UpdateColumnSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportDataOperationMetadata to JSON. + * Converts this UpdateColumnSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ExportDataOperationMetadata { - - /** Properties of an ExportDataOutputInfo. */ - interface IExportDataOutputInfo { - - /** ExportDataOutputInfo gcsOutputDirectory */ - gcsOutputDirectory?: (string|null); + /** Properties of a CreateModelRequest. */ + interface ICreateModelRequest { - /** ExportDataOutputInfo bigqueryOutputDataset */ - bigqueryOutputDataset?: (string|null); - } + /** CreateModelRequest parent */ + parent?: (string|null); - /** Represents an ExportDataOutputInfo. */ - class ExportDataOutputInfo implements IExportDataOutputInfo { + /** CreateModelRequest model */ + model?: (google.cloud.automl.v1beta1.IModel|null); + } - /** - * Constructs a new ExportDataOutputInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo); + /** Represents a CreateModelRequest. */ + class CreateModelRequest implements ICreateModelRequest { - /** ExportDataOutputInfo gcsOutputDirectory. */ - public gcsOutputDirectory: string; + /** + * Constructs a new CreateModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ICreateModelRequest); - /** ExportDataOutputInfo bigqueryOutputDataset. */ - public bigqueryOutputDataset: string; + /** CreateModelRequest parent. */ + public parent: string; - /** ExportDataOutputInfo outputLocation. */ - public outputLocation?: ("gcsOutputDirectory"|"bigqueryOutputDataset"); + /** CreateModelRequest model. */ + public model?: (google.cloud.automl.v1beta1.IModel|null); - /** - * Creates a new ExportDataOutputInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportDataOutputInfo instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo): google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + /** + * Creates a new CreateModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateModelRequest instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ICreateModelRequest): google.cloud.automl.v1beta1.CreateModelRequest; - /** - * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. - * @param message ExportDataOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CreateModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. + * @param message CreateModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. - * @param message ExportDataOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CreateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. + * @param message CreateModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.ICreateModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportDataOutputInfo - * @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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + /** + * Decodes a CreateModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateModelRequest + * @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.automl.v1beta1.CreateModelRequest; - /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportDataOutputInfo - * @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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + /** + * Decodes a CreateModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateModelRequest + * @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.automl.v1beta1.CreateModelRequest; - /** - * Verifies an ExportDataOutputInfo 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); + /** + * Verifies a CreateModelRequest 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 ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportDataOutputInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo; + /** + * Creates a CreateModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.CreateModelRequest; - /** - * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. - * @param message ExportDataOutputInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a CreateModelRequest message. Also converts values to other types if specified. + * @param message CreateModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.CreateModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ExportDataOutputInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this CreateModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictOperationMetadata. */ - interface IBatchPredictOperationMetadata { - - /** BatchPredictOperationMetadata inputConfig */ - inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); + /** Properties of a GetModelRequest. */ + interface IGetModelRequest { - /** BatchPredictOperationMetadata outputInfo */ - outputInfo?: (google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); + /** GetModelRequest name */ + name?: (string|null); } - /** Represents a BatchPredictOperationMetadata. */ - class BatchPredictOperationMetadata implements IBatchPredictOperationMetadata { + /** Represents a GetModelRequest. */ + class GetModelRequest implements IGetModelRequest { /** - * Constructs a new BatchPredictOperationMetadata. + * Constructs a new GetModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata); - - /** BatchPredictOperationMetadata inputConfig. */ - public inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); + constructor(properties?: google.cloud.automl.v1beta1.IGetModelRequest); - /** BatchPredictOperationMetadata outputInfo. */ - public outputInfo?: (google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null); + /** GetModelRequest name. */ + public name: string; /** - * Creates a new BatchPredictOperationMetadata instance using the specified properties. + * Creates a new GetModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictOperationMetadata instance + * @returns GetModelRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata): google.cloud.automl.v1beta1.BatchPredictOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IGetModelRequest): google.cloud.automl.v1beta1.GetModelRequest; /** - * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. - * @param message BatchPredictOperationMetadata message or plain object to encode + * Encodes the specified GetModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. + * @param message GetModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. - * @param message BatchPredictOperationMetadata message or plain object to encode + * Encodes the specified GetModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. + * @param message GetModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. + * Decodes a GetModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictOperationMetadata + * @returns GetModelRequest * @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.automl.v1beta1.BatchPredictOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GetModelRequest; /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictOperationMetadata + * @returns GetModelRequest * @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.automl.v1beta1.BatchPredictOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GetModelRequest; /** - * Verifies a BatchPredictOperationMetadata message. + * Verifies a GetModelRequest 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 BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictOperationMetadata + * @returns GetModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetModelRequest; /** - * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. - * @param message BatchPredictOperationMetadata + * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. + * @param message GetModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GetModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictOperationMetadata to JSON. + * Converts this GetModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BatchPredictOperationMetadata { + /** Properties of a ListModelsRequest. */ + interface IListModelsRequest { - /** Properties of a BatchPredictOutputInfo. */ - interface IBatchPredictOutputInfo { + /** ListModelsRequest parent */ + parent?: (string|null); - /** BatchPredictOutputInfo gcsOutputDirectory */ - gcsOutputDirectory?: (string|null); + /** ListModelsRequest filter */ + filter?: (string|null); - /** BatchPredictOutputInfo bigqueryOutputDataset */ - bigqueryOutputDataset?: (string|null); - } + /** ListModelsRequest pageSize */ + pageSize?: (number|null); - /** Represents a BatchPredictOutputInfo. */ - class BatchPredictOutputInfo implements IBatchPredictOutputInfo { + /** ListModelsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Constructs a new BatchPredictOutputInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo); + /** Represents a ListModelsRequest. */ + class ListModelsRequest implements IListModelsRequest { - /** BatchPredictOutputInfo gcsOutputDirectory. */ - public gcsOutputDirectory: string; + /** + * Constructs a new ListModelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IListModelsRequest); - /** BatchPredictOutputInfo bigqueryOutputDataset. */ - public bigqueryOutputDataset: string; + /** ListModelsRequest parent. */ + public parent: string; - /** BatchPredictOutputInfo outputLocation. */ - public outputLocation?: ("gcsOutputDirectory"|"bigqueryOutputDataset"); + /** ListModelsRequest filter. */ + public filter: string; - /** - * Creates a new BatchPredictOutputInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchPredictOutputInfo instance - */ - public static create(properties?: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo): google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; + /** ListModelsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @param message BatchPredictOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListModelsRequest pageToken. */ + public pageToken: string; - /** - * Encodes the specified BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @param message BatchPredictOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ListModelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListModelsRequest instance + */ + public static create(properties?: google.cloud.automl.v1beta1.IListModelsRequest): google.cloud.automl.v1beta1.ListModelsRequest; - /** - * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchPredictOutputInfo - * @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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; + /** + * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. + * @param message ListModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a BatchPredictOutputInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchPredictOutputInfo - * @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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; + /** + * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. + * @param message ListModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a BatchPredictOutputInfo 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); + /** + * Decodes a ListModelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListModelsRequest + * @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.automl.v1beta1.ListModelsRequest; + + /** + * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListModelsRequest + * @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.automl.v1beta1.ListModelsRequest; - /** - * Creates a BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchPredictOutputInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo; + /** + * Verifies a ListModelsRequest 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 plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. - * @param message BatchPredictOutputInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a ListModelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListModelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelsRequest; - /** - * Converts this BatchPredictOutputInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. + * @param message ListModelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ListModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListModelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of an ExportModelOperationMetadata. */ - interface IExportModelOperationMetadata { + /** Properties of a ListModelsResponse. */ + interface IListModelsResponse { - /** ExportModelOperationMetadata outputInfo */ - outputInfo?: (google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null); + /** ListModelsResponse model */ + model?: (google.cloud.automl.v1beta1.IModel[]|null); + + /** ListModelsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ExportModelOperationMetadata. */ - class ExportModelOperationMetadata implements IExportModelOperationMetadata { + /** Represents a ListModelsResponse. */ + class ListModelsResponse implements IListModelsResponse { /** - * Constructs a new ExportModelOperationMetadata. + * Constructs a new ListModelsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExportModelOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IListModelsResponse); - /** ExportModelOperationMetadata outputInfo. */ - public outputInfo?: (google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null); + /** ListModelsResponse model. */ + public model: google.cloud.automl.v1beta1.IModel[]; + + /** ListModelsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ExportModelOperationMetadata instance using the specified properties. + * Creates a new ListModelsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExportModelOperationMetadata instance + * @returns ListModelsResponse instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExportModelOperationMetadata): google.cloud.automl.v1beta1.ExportModelOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IListModelsResponse): google.cloud.automl.v1beta1.ListModelsResponse; /** - * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. - * @param message ExportModelOperationMetadata message or plain object to encode + * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. + * @param message ListModelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. - * @param message ExportModelOperationMetadata message or plain object to encode + * Encodes the specified ListModelsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. + * @param message ListModelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. + * Decodes a ListModelsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportModelOperationMetadata + * @returns ListModelsResponse * @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.automl.v1beta1.ExportModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListModelsResponse; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportModelOperationMetadata + * @returns ListModelsResponse * @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.automl.v1beta1.ExportModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListModelsResponse; /** - * Verifies an ExportModelOperationMetadata message. + * Verifies a ListModelsResponse 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 ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportModelOperationMetadata + * @returns ListModelsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelsResponse; /** - * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. - * @param message ExportModelOperationMetadata + * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. + * @param message ListModelsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportModelOperationMetadata to JSON. + * Converts this ListModelsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ExportModelOperationMetadata { - - /** Properties of an ExportModelOutputInfo. */ - interface IExportModelOutputInfo { + /** Properties of a DeleteModelRequest. */ + interface IDeleteModelRequest { - /** ExportModelOutputInfo gcsOutputDirectory */ - gcsOutputDirectory?: (string|null); - } + /** DeleteModelRequest name */ + name?: (string|null); + } - /** Represents an ExportModelOutputInfo. */ - class ExportModelOutputInfo implements IExportModelOutputInfo { + /** Represents a DeleteModelRequest. */ + class DeleteModelRequest implements IDeleteModelRequest { - /** - * Constructs a new ExportModelOutputInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo); + /** + * Constructs a new DeleteModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.IDeleteModelRequest); - /** ExportModelOutputInfo gcsOutputDirectory. */ - public gcsOutputDirectory: string; + /** DeleteModelRequest name. */ + public name: string; - /** - * Creates a new ExportModelOutputInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportModelOutputInfo instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo): google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; + /** + * Creates a new DeleteModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteModelRequest instance + */ + public static create(properties?: google.cloud.automl.v1beta1.IDeleteModelRequest): google.cloud.automl.v1beta1.DeleteModelRequest; - /** - * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. - * @param message ExportModelOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DeleteModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. + * @param message DeleteModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.automl.v1beta1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. - * @param message ExportModelOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DeleteModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. + * @param message DeleteModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeleteModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportModelOutputInfo - * @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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; + /** + * Decodes a DeleteModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteModelRequest + * @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.automl.v1beta1.DeleteModelRequest; - /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportModelOutputInfo - * @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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; + /** + * Decodes a DeleteModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteModelRequest + * @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.automl.v1beta1.DeleteModelRequest; - /** - * Verifies an ExportModelOutputInfo 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); + /** + * Verifies a DeleteModelRequest 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 ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportModelOutputInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo; + /** + * Creates a DeleteModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeleteModelRequest; - /** - * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. - * @param message ExportModelOutputInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a DeleteModelRequest message. Also converts values to other types if specified. + * @param message DeleteModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.DeleteModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ExportModelOutputInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this DeleteModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of an ExportEvaluatedExamplesOperationMetadata. */ - interface IExportEvaluatedExamplesOperationMetadata { + /** Properties of a DeployModelRequest. */ + interface IDeployModelRequest { - /** ExportEvaluatedExamplesOperationMetadata outputInfo */ - outputInfo?: (google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null); + /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata */ + imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null); + + /** DeployModelRequest imageClassificationModelDeploymentMetadata */ + imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null); + + /** DeployModelRequest name */ + name?: (string|null); } - /** Represents an ExportEvaluatedExamplesOperationMetadata. */ - class ExportEvaluatedExamplesOperationMetadata implements IExportEvaluatedExamplesOperationMetadata { + /** Represents a DeployModelRequest. */ + class DeployModelRequest implements IDeployModelRequest { /** - * Constructs a new ExportEvaluatedExamplesOperationMetadata. + * Constructs a new DeployModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata); + constructor(properties?: google.cloud.automl.v1beta1.IDeployModelRequest); - /** ExportEvaluatedExamplesOperationMetadata outputInfo. */ - public outputInfo?: (google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null); + /** DeployModelRequest imageObjectDetectionModelDeploymentMetadata. */ + public imageObjectDetectionModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null); + + /** DeployModelRequest imageClassificationModelDeploymentMetadata. */ + public imageClassificationModelDeploymentMetadata?: (google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null); + + /** DeployModelRequest name. */ + public name: string; + + /** DeployModelRequest modelDeploymentMetadata. */ + public modelDeploymentMetadata?: ("imageObjectDetectionModelDeploymentMetadata"|"imageClassificationModelDeploymentMetadata"); /** - * Creates a new ExportEvaluatedExamplesOperationMetadata instance using the specified properties. + * Creates a new DeployModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportEvaluatedExamplesOperationMetadata instance + * @returns DeployModelRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; + public static create(properties?: google.cloud.automl.v1beta1.IDeployModelRequest): google.cloud.automl.v1beta1.DeployModelRequest; /** - * Encodes the specified ExportEvaluatedExamplesOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. - * @param message ExportEvaluatedExamplesOperationMetadata message or plain object to encode + * Encodes the specified DeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. + * @param message DeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportEvaluatedExamplesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. - * @param message ExportEvaluatedExamplesOperationMetadata message or plain object to encode + * Encodes the specified DeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. + * @param message DeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IDeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer. + * Decodes a DeployModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportEvaluatedExamplesOperationMetadata + * @returns DeployModelRequest * @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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.DeployModelRequest; /** - * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeployModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportEvaluatedExamplesOperationMetadata + * @returns DeployModelRequest * @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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.DeployModelRequest; /** - * Verifies an ExportEvaluatedExamplesOperationMetadata message. + * Verifies a DeployModelRequest 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 ExportEvaluatedExamplesOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeployModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportEvaluatedExamplesOperationMetadata + * @returns DeployModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.DeployModelRequest; /** - * Creates a plain object from an ExportEvaluatedExamplesOperationMetadata message. Also converts values to other types if specified. - * @param message ExportEvaluatedExamplesOperationMetadata + * Creates a plain object from a DeployModelRequest message. Also converts values to other types if specified. + * @param message DeployModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.DeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportEvaluatedExamplesOperationMetadata to JSON. + * Converts this DeployModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ExportEvaluatedExamplesOperationMetadata { - - /** Properties of an ExportEvaluatedExamplesOutputInfo. */ - interface IExportEvaluatedExamplesOutputInfo { - - /** ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset */ - bigqueryOutputDataset?: (string|null); - } - - /** Represents an ExportEvaluatedExamplesOutputInfo. */ - class ExportEvaluatedExamplesOutputInfo implements IExportEvaluatedExamplesOutputInfo { - - /** - * Constructs a new ExportEvaluatedExamplesOutputInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo); - - /** ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset. */ - public bigqueryOutputDataset: string; - - /** - * Creates a new ExportEvaluatedExamplesOutputInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportEvaluatedExamplesOutputInfo instance - */ - public static create(properties?: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - - /** - * Encodes the specified ExportEvaluatedExamplesOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. - * @param message ExportEvaluatedExamplesOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportEvaluatedExamplesOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. - * @param message ExportEvaluatedExamplesOutputInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportEvaluatedExamplesOutputInfo - * @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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - - /** - * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportEvaluatedExamplesOutputInfo - * @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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - - /** - * Verifies an ExportEvaluatedExamplesOutputInfo 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 ExportEvaluatedExamplesOutputInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportEvaluatedExamplesOutputInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo; - - /** - * Creates a plain object from an ExportEvaluatedExamplesOutputInfo message. Also converts values to other types if specified. - * @param message ExportEvaluatedExamplesOutputInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportEvaluatedExamplesOutputInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a TableSpec. */ - interface ITableSpec { + /** Properties of an UndeployModelRequest. */ + interface IUndeployModelRequest { - /** TableSpec name */ + /** UndeployModelRequest name */ name?: (string|null); - - /** TableSpec timeColumnSpecId */ - timeColumnSpecId?: (string|null); - - /** TableSpec rowCount */ - rowCount?: (number|Long|string|null); - - /** TableSpec validRowCount */ - validRowCount?: (number|Long|string|null); - - /** TableSpec columnCount */ - columnCount?: (number|Long|string|null); - - /** TableSpec inputConfigs */ - inputConfigs?: (google.cloud.automl.v1beta1.IInputConfig[]|null); - - /** TableSpec etag */ - etag?: (string|null); } - /** Represents a TableSpec. */ - class TableSpec implements ITableSpec { + /** Represents an UndeployModelRequest. */ + class UndeployModelRequest implements IUndeployModelRequest { /** - * Constructs a new TableSpec. + * Constructs a new UndeployModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.ITableSpec); + constructor(properties?: google.cloud.automl.v1beta1.IUndeployModelRequest); - /** TableSpec name. */ + /** UndeployModelRequest name. */ public name: string; - /** TableSpec timeColumnSpecId. */ - public timeColumnSpecId: string; - - /** TableSpec rowCount. */ - public rowCount: (number|Long|string); - - /** TableSpec validRowCount. */ - public validRowCount: (number|Long|string); - - /** TableSpec columnCount. */ - public columnCount: (number|Long|string); - - /** TableSpec inputConfigs. */ - public inputConfigs: google.cloud.automl.v1beta1.IInputConfig[]; - - /** TableSpec etag. */ - public etag: string; - /** - * Creates a new TableSpec instance using the specified properties. + * Creates a new UndeployModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TableSpec instance + * @returns UndeployModelRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.ITableSpec): google.cloud.automl.v1beta1.TableSpec; + public static create(properties?: google.cloud.automl.v1beta1.IUndeployModelRequest): google.cloud.automl.v1beta1.UndeployModelRequest; /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode + * Encodes the specified UndeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. + * @param message UndeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode + * Encodes the specified UndeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. + * @param message UndeployModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IUndeployModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TableSpec message from the specified reader or buffer. + * Decodes an UndeployModelRequest 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 UndeployModelRequest * @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.automl.v1beta1.TableSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.UndeployModelRequest; /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. + * Decodes an UndeployModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TableSpec + * @returns UndeployModelRequest * @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.automl.v1beta1.TableSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.UndeployModelRequest; /** - * Verifies a TableSpec message. + * Verifies an UndeployModelRequest 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 an UndeployModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TableSpec + * @returns UndeployModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TableSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.UndeployModelRequest; /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. - * @param message TableSpec + * Creates a plain object from an UndeployModelRequest message. Also converts values to other types if specified. + * @param message UndeployModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.TableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.UndeployModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TableSpec to JSON. + * Converts this UndeployModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a PredictionService */ - class PredictionService extends $protobuf.rpc.Service { + /** Properties of an ExportModelRequest. */ + interface IExportModelRequest { + + /** ExportModelRequest name */ + name?: (string|null); + + /** ExportModelRequest outputConfig */ + outputConfig?: (google.cloud.automl.v1beta1.IModelExportOutputConfig|null); + } + + /** Represents an ExportModelRequest. */ + class ExportModelRequest implements IExportModelRequest { /** - * Constructs a new PredictionService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new ExportModelRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.automl.v1beta1.IExportModelRequest); + + /** ExportModelRequest name. */ + public name: string; + + /** ExportModelRequest outputConfig. */ + public outputConfig?: (google.cloud.automl.v1beta1.IModelExportOutputConfig|null); /** - * Creates new PredictionService 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 ExportModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportModelRequest instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PredictionService; + public static create(properties?: google.cloud.automl.v1beta1.IExportModelRequest): google.cloud.automl.v1beta1.ExportModelRequest; /** - * Calls Predict. - * @param request PredictRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PredictResponse + * Encodes the specified ExportModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. + * @param message ExportModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public predict(request: google.cloud.automl.v1beta1.IPredictRequest, callback: google.cloud.automl.v1beta1.PredictionService.PredictCallback): void; + public static encode(message: google.cloud.automl.v1beta1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls Predict. - * @param request PredictRequest message or plain object - * @returns Promise + * Encodes the specified ExportModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. + * @param message ExportModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public predict(request: google.cloud.automl.v1beta1.IPredictRequest): Promise; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls BatchPredict. - * @param request BatchPredictRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes an ExportModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public batchPredict(request: google.cloud.automl.v1beta1.IBatchPredictRequest, callback: google.cloud.automl.v1beta1.PredictionService.BatchPredictCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ExportModelRequest; /** - * Calls BatchPredict. - * @param request BatchPredictRequest message or plain object - * @returns Promise + * Decodes an ExportModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public batchPredict(request: google.cloud.automl.v1beta1.IBatchPredictRequest): Promise; - } + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ExportModelRequest; - namespace PredictionService { + /** + * Verifies an ExportModelRequest 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); /** - * Callback as used by {@link google.cloud.automl.v1beta1.PredictionService#predict}. - * @param error Error, if any - * @param [response] PredictResponse + * Creates an ExportModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportModelRequest */ - type PredictCallback = (error: (Error|null), response?: google.cloud.automl.v1beta1.PredictResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportModelRequest; /** - * Callback as used by {@link google.cloud.automl.v1beta1.PredictionService#batchPredict}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from an ExportModelRequest message. Also converts values to other types if specified. + * @param message ExportModelRequest + * @param [options] Conversion options + * @returns Plain object */ - type BatchPredictCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.automl.v1beta1.ExportModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a PredictRequest. */ - interface IPredictRequest { + /** Properties of an ExportEvaluatedExamplesRequest. */ + interface IExportEvaluatedExamplesRequest { - /** PredictRequest name */ + /** ExportEvaluatedExamplesRequest name */ name?: (string|null); - /** PredictRequest payload */ - payload?: (google.cloud.automl.v1beta1.IExamplePayload|null); - - /** PredictRequest params */ - params?: ({ [k: string]: string }|null); + /** ExportEvaluatedExamplesRequest outputConfig */ + outputConfig?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null); } - /** Represents a PredictRequest. */ - class PredictRequest implements IPredictRequest { + /** Represents an ExportEvaluatedExamplesRequest. */ + class ExportEvaluatedExamplesRequest implements IExportEvaluatedExamplesRequest { /** - * Constructs a new PredictRequest. + * Constructs a new ExportEvaluatedExamplesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IPredictRequest); + constructor(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest); - /** PredictRequest name. */ + /** ExportEvaluatedExamplesRequest name. */ public name: string; - /** PredictRequest payload. */ - public payload?: (google.cloud.automl.v1beta1.IExamplePayload|null); - - /** PredictRequest params. */ - public params: { [k: string]: string }; + /** ExportEvaluatedExamplesRequest outputConfig. */ + public outputConfig?: (google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null); /** - * Creates a new PredictRequest instance using the specified properties. + * Creates a new ExportEvaluatedExamplesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PredictRequest instance + * @returns ExportEvaluatedExamplesRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IPredictRequest): google.cloud.automl.v1beta1.PredictRequest; + public static create(properties?: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest): google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; /** - * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. - * @param message PredictRequest message or plain object to encode + * Encodes the specified ExportEvaluatedExamplesRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. + * @param message ExportEvaluatedExamplesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. - * @param message PredictRequest message or plain object to encode + * Encodes the specified ExportEvaluatedExamplesRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. + * @param message ExportEvaluatedExamplesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PredictRequest message from the specified reader or buffer. + * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PredictRequest + * @returns ExportEvaluatedExamplesRequest * @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.automl.v1beta1.PredictRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; /** - * Decodes a PredictRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PredictRequest + * @returns ExportEvaluatedExamplesRequest * @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.automl.v1beta1.PredictRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; /** - * Verifies a PredictRequest message. + * Verifies an ExportEvaluatedExamplesRequest 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 PredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEvaluatedExamplesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PredictRequest + * @returns ExportEvaluatedExamplesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.PredictRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; /** - * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. - * @param message PredictRequest + * Creates a plain object from an ExportEvaluatedExamplesRequest message. Also converts values to other types if specified. + * @param message ExportEvaluatedExamplesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.PredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PredictRequest to JSON. + * Converts this ExportEvaluatedExamplesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PredictResponse. */ - interface IPredictResponse { - - /** PredictResponse payload */ - payload?: (google.cloud.automl.v1beta1.IAnnotationPayload[]|null); - - /** PredictResponse preprocessedInput */ - preprocessedInput?: (google.cloud.automl.v1beta1.IExamplePayload|null); + /** Properties of a GetModelEvaluationRequest. */ + interface IGetModelEvaluationRequest { - /** PredictResponse metadata */ - metadata?: ({ [k: string]: string }|null); + /** GetModelEvaluationRequest name */ + name?: (string|null); } - /** Represents a PredictResponse. */ - class PredictResponse implements IPredictResponse { + /** Represents a GetModelEvaluationRequest. */ + class GetModelEvaluationRequest implements IGetModelEvaluationRequest { /** - * Constructs a new PredictResponse. + * Constructs a new GetModelEvaluationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IPredictResponse); - - /** PredictResponse payload. */ - public payload: google.cloud.automl.v1beta1.IAnnotationPayload[]; - - /** PredictResponse preprocessedInput. */ - public preprocessedInput?: (google.cloud.automl.v1beta1.IExamplePayload|null); + constructor(properties?: google.cloud.automl.v1beta1.IGetModelEvaluationRequest); - /** PredictResponse metadata. */ - public metadata: { [k: string]: string }; + /** GetModelEvaluationRequest name. */ + public name: string; /** - * Creates a new PredictResponse instance using the specified properties. + * Creates a new GetModelEvaluationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PredictResponse instance + * @returns GetModelEvaluationRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IPredictResponse): google.cloud.automl.v1beta1.PredictResponse; + public static create(properties?: google.cloud.automl.v1beta1.IGetModelEvaluationRequest): google.cloud.automl.v1beta1.GetModelEvaluationRequest; /** - * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. - * @param message PredictResponse message or plain object to encode + * Encodes the specified GetModelEvaluationRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. + * @param message GetModelEvaluationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. - * @param message PredictResponse message or plain object to encode + * Encodes the specified GetModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. + * @param message GetModelEvaluationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IPredictResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IGetModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PredictResponse message from the specified reader or buffer. + * Decodes a GetModelEvaluationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PredictResponse + * @returns GetModelEvaluationRequest * @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.automl.v1beta1.PredictResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.GetModelEvaluationRequest; /** - * Decodes a PredictResponse message from the specified reader or buffer, length delimited. + * Decodes a GetModelEvaluationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PredictResponse + * @returns GetModelEvaluationRequest * @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.automl.v1beta1.PredictResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.GetModelEvaluationRequest; /** - * Verifies a PredictResponse message. + * Verifies a GetModelEvaluationRequest 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 PredictResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PredictResponse + * @returns GetModelEvaluationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.PredictResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.GetModelEvaluationRequest; /** - * Creates a plain object from a PredictResponse message. Also converts values to other types if specified. - * @param message PredictResponse + * Creates a plain object from a GetModelEvaluationRequest message. Also converts values to other types if specified. + * @param message GetModelEvaluationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.PredictResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.GetModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PredictResponse to JSON. + * Converts this GetModelEvaluationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictRequest. */ - interface IBatchPredictRequest { + /** Properties of a ListModelEvaluationsRequest. */ + interface IListModelEvaluationsRequest { - /** BatchPredictRequest name */ - name?: (string|null); + /** ListModelEvaluationsRequest parent */ + parent?: (string|null); - /** BatchPredictRequest inputConfig */ - inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); + /** ListModelEvaluationsRequest filter */ + filter?: (string|null); - /** BatchPredictRequest outputConfig */ - outputConfig?: (google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null); + /** ListModelEvaluationsRequest pageSize */ + pageSize?: (number|null); - /** BatchPredictRequest params */ - params?: ({ [k: string]: string }|null); + /** ListModelEvaluationsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a BatchPredictRequest. */ - class BatchPredictRequest implements IBatchPredictRequest { + /** Represents a ListModelEvaluationsRequest. */ + class ListModelEvaluationsRequest implements IListModelEvaluationsRequest { /** - * Constructs a new BatchPredictRequest. + * Constructs a new ListModelEvaluationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictRequest); + constructor(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsRequest); - /** BatchPredictRequest name. */ - public name: string; + /** ListModelEvaluationsRequest parent. */ + public parent: string; - /** BatchPredictRequest inputConfig. */ - public inputConfig?: (google.cloud.automl.v1beta1.IBatchPredictInputConfig|null); + /** ListModelEvaluationsRequest filter. */ + public filter: string; - /** BatchPredictRequest outputConfig. */ - public outputConfig?: (google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null); + /** ListModelEvaluationsRequest pageSize. */ + public pageSize: number; - /** BatchPredictRequest params. */ - public params: { [k: string]: string }; + /** ListModelEvaluationsRequest pageToken. */ + public pageToken: string; /** - * Creates a new BatchPredictRequest instance using the specified properties. + * Creates a new ListModelEvaluationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictRequest instance + * @returns ListModelEvaluationsRequest instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictRequest): google.cloud.automl.v1beta1.BatchPredictRequest; + public static create(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsRequest): google.cloud.automl.v1beta1.ListModelEvaluationsRequest; /** - * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. - * @param message BatchPredictRequest message or plain object to encode + * Encodes the specified ListModelEvaluationsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. + * @param message ListModelEvaluationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. - * @param message BatchPredictRequest message or plain object to encode + * Encodes the specified ListModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. + * @param message ListModelEvaluationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer. + * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictRequest + * @returns ListModelEvaluationsRequest * @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.automl.v1beta1.BatchPredictRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListModelEvaluationsRequest; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. + * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictRequest + * @returns ListModelEvaluationsRequest * @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.automl.v1beta1.BatchPredictRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListModelEvaluationsRequest; /** - * Verifies a BatchPredictRequest message. + * Verifies a ListModelEvaluationsRequest 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 BatchPredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchPredictRequest + * @returns ListModelEvaluationsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelEvaluationsRequest; /** - * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. - * @param message BatchPredictRequest + * Creates a plain object from a ListModelEvaluationsRequest message. Also converts values to other types if specified. + * @param message ListModelEvaluationsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.automl.v1beta1.BatchPredictRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.automl.v1beta1.ListModelEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchPredictRequest to JSON. + * Converts this ListModelEvaluationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchPredictResult. */ - interface IBatchPredictResult { + /** Properties of a ListModelEvaluationsResponse. */ + interface IListModelEvaluationsResponse { - /** BatchPredictResult metadata */ - metadata?: ({ [k: string]: string }|null); + /** ListModelEvaluationsResponse modelEvaluation */ + modelEvaluation?: (google.cloud.automl.v1beta1.IModelEvaluation[]|null); + + /** ListModelEvaluationsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a BatchPredictResult. */ - class BatchPredictResult implements IBatchPredictResult { + /** Represents a ListModelEvaluationsResponse. */ + class ListModelEvaluationsResponse implements IListModelEvaluationsResponse { /** - * Constructs a new BatchPredictResult. + * Constructs a new ListModelEvaluationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.automl.v1beta1.IBatchPredictResult); + constructor(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsResponse); - /** BatchPredictResult metadata. */ - public metadata: { [k: string]: string }; + /** ListModelEvaluationsResponse modelEvaluation. */ + public modelEvaluation: google.cloud.automl.v1beta1.IModelEvaluation[]; + + /** ListModelEvaluationsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new BatchPredictResult instance using the specified properties. + * Creates a new ListModelEvaluationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BatchPredictResult instance + * @returns ListModelEvaluationsResponse instance */ - public static create(properties?: google.cloud.automl.v1beta1.IBatchPredictResult): google.cloud.automl.v1beta1.BatchPredictResult; + public static create(properties?: google.cloud.automl.v1beta1.IListModelEvaluationsResponse): google.cloud.automl.v1beta1.ListModelEvaluationsResponse; /** - * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. - * @param message BatchPredictResult message or plain object to encode + * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. + * @param message ListModelEvaluationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.automl.v1beta1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.automl.v1beta1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. - * @param message BatchPredictResult message or plain object to encode + * Encodes the specified ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. + * @param message ListModelEvaluationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.automl.v1beta1.IBatchPredictResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.automl.v1beta1.IListModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchPredictResult message from the specified reader or buffer. + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchPredictResult + * @returns ListModelEvaluationsResponse * @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.automl.v1beta1.BatchPredictResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.automl.v1beta1.ListModelEvaluationsResponse; /** - * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchPredictResult + * @returns ListModelEvaluationsResponse * @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.automl.v1beta1.BatchPredictResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.automl.v1beta1.ListModelEvaluationsResponse; /** - * Verifies a BatchPredictResult message. + * Verifies a ListModelEvaluationsResponse 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 BatchPredictResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchPredictResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.BatchPredictResult; - - /** - * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. - * @param message BatchPredictResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.automl.v1beta1.BatchPredictResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchPredictResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** 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|keyof typeof 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|keyof typeof google.api.ResourceDescriptor.History); + public static verify(message: { [k: string]: any }): (string|null); - /** ResourceDescriptor plural. */ - public plural: string; + /** + * Creates a ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListModelEvaluationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.ListModelEvaluationsResponse; - /** ResourceDescriptor singular. */ - public singular: string; + /** + * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. + * @param message ListModelEvaluationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.automl.v1beta1.ListModelEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this ListModelEvaluationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a TableSpec. */ + interface ITableSpec { - /** - * 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; + /** TableSpec name */ + name?: (string|null); - /** - * 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; + /** TableSpec timeColumnSpecId */ + timeColumnSpecId?: (string|null); - /** - * 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; + /** TableSpec rowCount */ + rowCount?: (number|Long|string|null); - /** - * 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); + /** TableSpec validRowCount */ + validRowCount?: (number|Long|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; + /** TableSpec columnCount */ + columnCount?: (number|Long|string|null); - /** - * 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 }; + /** TableSpec inputConfigs */ + inputConfigs?: (google.cloud.automl.v1beta1.IInputConfig[]|null); - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** TableSpec etag */ + etag?: (string|null); + } - namespace ResourceDescriptor { + /** Represents a TableSpec. */ + class TableSpec implements ITableSpec { - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } + /** + * Constructs a new TableSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.automl.v1beta1.ITableSpec); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** TableSpec name. */ + public name: string; - /** ResourceReference type */ - type?: (string|null); + /** TableSpec timeColumnSpecId. */ + public timeColumnSpecId: string; - /** ResourceReference childType */ - childType?: (string|null); - } + /** TableSpec rowCount. */ + public rowCount: (number|Long|string); - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** TableSpec validRowCount. */ + public validRowCount: (number|Long|string); - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** TableSpec columnCount. */ + public columnCount: (number|Long|string); - /** ResourceReference type. */ - public type: string; + /** TableSpec inputConfigs. */ + public inputConfigs: google.cloud.automl.v1beta1.IInputConfig[]; - /** ResourceReference childType. */ - public childType: string; + /** TableSpec etag. */ + public etag: 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; + /** + * Creates a new TableSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns TableSpec instance + */ + public static create(properties?: google.cloud.automl.v1beta1.ITableSpec): google.cloud.automl.v1beta1.TableSpec; - /** - * 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 TableSpec message. Does not implicitly {@link google.cloud.automl.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.automl.v1beta1.ITableSpec, 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; + /** + * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.automl.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.automl.v1beta1.ITableSpec, 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 TableSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @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.automl.v1beta1.TableSpec; - /** - * 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; + /** + * Decodes a TableSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.automl.v1beta1.TableSpec; - /** - * 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); + /** + * 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 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 TableSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.automl.v1beta1.TableSpec; - /** - * 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 }; + /** + * 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.automl.v1beta1.TableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this TableSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } + } + + /** Namespace api. */ + namespace api { /** Properties of a Http. */ interface IHttp { @@ -24543,6 +24317,232 @@ export namespace google { 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|keyof typeof 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|keyof typeof 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; + + /** + * 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. */ @@ -26402,11 +26402,11 @@ export namespace google { /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - /** FieldOptions .google.api.fieldBehavior */ ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } /** Represents a FieldOptions. */ @@ -27671,97 +27671,97 @@ export namespace google { } } - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Properties of a Duration. */ + interface IDuration { - /** Timestamp seconds */ + /** Duration seconds */ seconds?: (number|Long|string|null); - /** Timestamp nanos */ + /** Duration nanos */ nanos?: (number|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Timestamp. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.protobuf.IDuration); - /** Timestamp seconds. */ + /** Duration seconds. */ public seconds: (number|Long|string); - /** Timestamp nanos. */ + /** Duration nanos. */ public nanos: number; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @returns Duration * @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.protobuf.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @returns Duration * @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.protobuf.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a Timestamp message. + * Verifies a Duration 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -27863,102 +27863,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.protobuf.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a Struct. */ interface IStruct { @@ -28267,6 +28171,102 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an Empty. */ interface IEmpty { } diff --git a/packages/google-cloud-automl/protos/protos.js b/packages/google-cloud-automl/protos/protos.js index 16107da9214..8192f97e650 100644 --- a/packages/google-cloud-automl/protos/protos.js +++ b/packages/google-cloud-automl/protos/protos.js @@ -66,37 +66,30 @@ */ var v1 = {}; - v1.OperationMetadata = (function() { + v1.AnnotationPayload = (function() { /** - * Properties of an OperationMetadata. + * Properties of an AnnotationPayload. * @memberof google.cloud.automl.v1 - * @interface IOperationMetadata - * @property {google.cloud.automl.v1.IDeleteOperationMetadata|null} [deleteDetails] OperationMetadata deleteDetails - * @property {google.cloud.automl.v1.IDeployModelOperationMetadata|null} [deployModelDetails] OperationMetadata deployModelDetails - * @property {google.cloud.automl.v1.IUndeployModelOperationMetadata|null} [undeployModelDetails] OperationMetadata undeployModelDetails - * @property {google.cloud.automl.v1.ICreateModelOperationMetadata|null} [createModelDetails] OperationMetadata createModelDetails - * @property {google.cloud.automl.v1.ICreateDatasetOperationMetadata|null} [createDatasetDetails] OperationMetadata createDatasetDetails - * @property {google.cloud.automl.v1.IImportDataOperationMetadata|null} [importDataDetails] OperationMetadata importDataDetails - * @property {google.cloud.automl.v1.IBatchPredictOperationMetadata|null} [batchPredictDetails] OperationMetadata batchPredictDetails - * @property {google.cloud.automl.v1.IExportDataOperationMetadata|null} [exportDataDetails] OperationMetadata exportDataDetails - * @property {google.cloud.automl.v1.IExportModelOperationMetadata|null} [exportModelDetails] OperationMetadata exportModelDetails - * @property {number|null} [progressPercent] OperationMetadata progressPercent - * @property {Array.|null} [partialFailures] OperationMetadata partialFailures - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime + * @interface IAnnotationPayload + * @property {google.cloud.automl.v1.ITranslationAnnotation|null} [translation] AnnotationPayload translation + * @property {google.cloud.automl.v1.IClassificationAnnotation|null} [classification] AnnotationPayload classification + * @property {google.cloud.automl.v1.IImageObjectDetectionAnnotation|null} [imageObjectDetection] AnnotationPayload imageObjectDetection + * @property {google.cloud.automl.v1.ITextExtractionAnnotation|null} [textExtraction] AnnotationPayload textExtraction + * @property {google.cloud.automl.v1.ITextSentimentAnnotation|null} [textSentiment] AnnotationPayload textSentiment + * @property {string|null} [annotationSpecId] AnnotationPayload annotationSpecId + * @property {string|null} [displayName] AnnotationPayload displayName */ /** - * Constructs a new OperationMetadata. + * Constructs a new AnnotationPayload. * @memberof google.cloud.automl.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents an AnnotationPayload. + * @implements IAnnotationPayload * @constructor - * @param {google.cloud.automl.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IAnnotationPayload=} [properties] Properties to set */ - function OperationMetadata(properties) { - this.partialFailures = []; + function AnnotationPayload(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104,248 +97,167 @@ } /** - * OperationMetadata deleteDetails. - * @member {google.cloud.automl.v1.IDeleteOperationMetadata|null|undefined} deleteDetails - * @memberof google.cloud.automl.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.deleteDetails = null; - - /** - * OperationMetadata deployModelDetails. - * @member {google.cloud.automl.v1.IDeployModelOperationMetadata|null|undefined} deployModelDetails - * @memberof google.cloud.automl.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.deployModelDetails = null; - - /** - * OperationMetadata undeployModelDetails. - * @member {google.cloud.automl.v1.IUndeployModelOperationMetadata|null|undefined} undeployModelDetails - * @memberof google.cloud.automl.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.undeployModelDetails = null; - - /** - * OperationMetadata createModelDetails. - * @member {google.cloud.automl.v1.ICreateModelOperationMetadata|null|undefined} createModelDetails - * @memberof google.cloud.automl.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createModelDetails = null; - - /** - * OperationMetadata createDatasetDetails. - * @member {google.cloud.automl.v1.ICreateDatasetOperationMetadata|null|undefined} createDatasetDetails - * @memberof google.cloud.automl.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createDatasetDetails = null; - - /** - * OperationMetadata importDataDetails. - * @member {google.cloud.automl.v1.IImportDataOperationMetadata|null|undefined} importDataDetails - * @memberof google.cloud.automl.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.importDataDetails = null; - - /** - * OperationMetadata batchPredictDetails. - * @member {google.cloud.automl.v1.IBatchPredictOperationMetadata|null|undefined} batchPredictDetails - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload translation. + * @member {google.cloud.automl.v1.ITranslationAnnotation|null|undefined} translation + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - OperationMetadata.prototype.batchPredictDetails = null; + AnnotationPayload.prototype.translation = null; /** - * OperationMetadata exportDataDetails. - * @member {google.cloud.automl.v1.IExportDataOperationMetadata|null|undefined} exportDataDetails - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload classification. + * @member {google.cloud.automl.v1.IClassificationAnnotation|null|undefined} classification + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - OperationMetadata.prototype.exportDataDetails = null; + AnnotationPayload.prototype.classification = null; /** - * OperationMetadata exportModelDetails. - * @member {google.cloud.automl.v1.IExportModelOperationMetadata|null|undefined} exportModelDetails - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload imageObjectDetection. + * @member {google.cloud.automl.v1.IImageObjectDetectionAnnotation|null|undefined} imageObjectDetection + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - OperationMetadata.prototype.exportModelDetails = null; + AnnotationPayload.prototype.imageObjectDetection = null; /** - * OperationMetadata progressPercent. - * @member {number} progressPercent - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload textExtraction. + * @member {google.cloud.automl.v1.ITextExtractionAnnotation|null|undefined} textExtraction + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - OperationMetadata.prototype.progressPercent = 0; + AnnotationPayload.prototype.textExtraction = null; /** - * OperationMetadata partialFailures. - * @member {Array.} partialFailures - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload textSentiment. + * @member {google.cloud.automl.v1.ITextSentimentAnnotation|null|undefined} textSentiment + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - OperationMetadata.prototype.partialFailures = $util.emptyArray; + AnnotationPayload.prototype.textSentiment = null; /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload annotationSpecId. + * @member {string} annotationSpecId + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - OperationMetadata.prototype.createTime = null; + AnnotationPayload.prototype.annotationSpecId = ""; /** - * OperationMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - OperationMetadata.prototype.updateTime = null; + AnnotationPayload.prototype.displayName = ""; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * OperationMetadata details. - * @member {"deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"createDatasetDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"|undefined} details - * @memberof google.cloud.automl.v1.OperationMetadata + * AnnotationPayload detail. + * @member {"translation"|"classification"|"imageObjectDetection"|"textExtraction"|"textSentiment"|undefined} detail + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance */ - Object.defineProperty(OperationMetadata.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["deleteDetails", "deployModelDetails", "undeployModelDetails", "createModelDetails", "createDatasetDetails", "importDataDetails", "batchPredictDetails", "exportDataDetails", "exportModelDetails"]), + Object.defineProperty(AnnotationPayload.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["translation", "classification", "imageObjectDetection", "textExtraction", "textSentiment"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new AnnotationPayload instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @static - * @param {google.cloud.automl.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.automl.v1.IAnnotationPayload=} [properties] Properties to set + * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + AnnotationPayload.create = function create(properties) { + return new AnnotationPayload(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @static - * @param {google.cloud.automl.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IAnnotationPayload} message AnnotationPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + AnnotationPayload.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.partialFailures != null && message.partialFailures.length) - for (var i = 0; i < message.partialFailures.length; ++i) - $root.google.rpc.Status.encode(message.partialFailures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) - $root.google.cloud.automl.v1.DeleteOperationMetadata.encode(message.deleteDetails, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) - $root.google.cloud.automl.v1.CreateModelOperationMetadata.encode(message.createModelDetails, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.progressPercent); - if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) - $root.google.cloud.automl.v1.ImportDataOperationMetadata.encode(message.importDataDetails, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) - $root.google.cloud.automl.v1.BatchPredictOperationMetadata.encode(message.batchPredictDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) - $root.google.cloud.automl.v1.ExportDataOperationMetadata.encode(message.exportDataDetails, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) - $root.google.cloud.automl.v1.ExportModelOperationMetadata.encode(message.exportModelDetails, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) - $root.google.cloud.automl.v1.DeployModelOperationMetadata.encode(message.deployModelDetails, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) - $root.google.cloud.automl.v1.UndeployModelOperationMetadata.encode(message.undeployModelDetails, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.createDatasetDetails != null && message.hasOwnProperty("createDatasetDetails")) - $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.encode(message.createDatasetDetails, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId); + if (message.translation != null && message.hasOwnProperty("translation")) + $root.google.cloud.automl.v1.TranslationAnnotation.encode(message.translation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.classification != null && message.hasOwnProperty("classification")) + $root.google.cloud.automl.v1.ClassificationAnnotation.encode(message.classification, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) + $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.encode(message.imageObjectDetection, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) + $root.google.cloud.automl.v1.TextExtractionAnnotation.encode(message.textExtraction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) + $root.google.cloud.automl.v1.TextSentimentAnnotation.encode(message.textSentiment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @static - * @param {google.cloud.automl.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IAnnotationPayload} message AnnotationPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationPayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes an AnnotationPayload message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + AnnotationPayload.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.automl.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.AnnotationPayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - message.deleteDetails = $root.google.cloud.automl.v1.DeleteOperationMetadata.decode(reader, reader.uint32()); - break; - case 24: - message.deployModelDetails = $root.google.cloud.automl.v1.DeployModelOperationMetadata.decode(reader, reader.uint32()); - break; - case 25: - message.undeployModelDetails = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.decode(reader, reader.uint32()); - break; - case 10: - message.createModelDetails = $root.google.cloud.automl.v1.CreateModelOperationMetadata.decode(reader, reader.uint32()); - break; - case 30: - message.createDatasetDetails = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.decode(reader, reader.uint32()); - break; - case 15: - message.importDataDetails = $root.google.cloud.automl.v1.ImportDataOperationMetadata.decode(reader, reader.uint32()); - break; - case 16: - message.batchPredictDetails = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.decode(reader, reader.uint32()); + case 2: + message.translation = $root.google.cloud.automl.v1.TranslationAnnotation.decode(reader, reader.uint32()); break; - case 21: - message.exportDataDetails = $root.google.cloud.automl.v1.ExportDataOperationMetadata.decode(reader, reader.uint32()); + case 3: + message.classification = $root.google.cloud.automl.v1.ClassificationAnnotation.decode(reader, reader.uint32()); break; - case 22: - message.exportModelDetails = $root.google.cloud.automl.v1.ExportModelOperationMetadata.decode(reader, reader.uint32()); + case 4: + message.imageObjectDetection = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.decode(reader, reader.uint32()); break; - case 13: - message.progressPercent = reader.int32(); + case 6: + message.textExtraction = $root.google.cloud.automl.v1.TextExtractionAnnotation.decode(reader, reader.uint32()); break; - case 2: - if (!(message.partialFailures && message.partialFailures.length)) - message.partialFailures = []; - message.partialFailures.push($root.google.rpc.Status.decode(reader, reader.uint32())); + case 7: + message.textSentiment = $root.google.cloud.automl.v1.TextSentimentAnnotation.decode(reader, reader.uint32()); break; - case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 1: + message.annotationSpecId = reader.string(); break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 5: + message.displayName = reader.string(); break; default: reader.skipType(tag & 7); @@ -356,338 +268,231 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + AnnotationPayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies an AnnotationPayload message. * @function verify - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + AnnotationPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { - properties.details = 1; - { - var error = $root.google.cloud.automl.v1.DeleteOperationMetadata.verify(message.deleteDetails); - if (error) - return "deleteDetails." + error; - } - } - if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1.DeployModelOperationMetadata.verify(message.deployModelDetails); - if (error) - return "deployModelDetails." + error; - } - } - if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.verify(message.undeployModelDetails); - if (error) - return "undeployModelDetails." + error; - } - } - if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1.CreateModelOperationMetadata.verify(message.createModelDetails); - if (error) - return "createModelDetails." + error; - } - } - if (message.createDatasetDetails != null && message.hasOwnProperty("createDatasetDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; + if (message.translation != null && message.hasOwnProperty("translation")) { + properties.detail = 1; { - var error = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.verify(message.createDatasetDetails); + var error = $root.google.cloud.automl.v1.TranslationAnnotation.verify(message.translation); if (error) - return "createDatasetDetails." + error; + return "translation." + error; } } - if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; + if (message.classification != null && message.hasOwnProperty("classification")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; { - var error = $root.google.cloud.automl.v1.ImportDataOperationMetadata.verify(message.importDataDetails); + var error = $root.google.cloud.automl.v1.ClassificationAnnotation.verify(message.classification); if (error) - return "importDataDetails." + error; + return "classification." + error; } } - if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; + if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; { - var error = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.verify(message.batchPredictDetails); + var error = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify(message.imageObjectDetection); if (error) - return "batchPredictDetails." + error; + return "imageObjectDetection." + error; } } - if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; + if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; { - var error = $root.google.cloud.automl.v1.ExportDataOperationMetadata.verify(message.exportDataDetails); + var error = $root.google.cloud.automl.v1.TextExtractionAnnotation.verify(message.textExtraction); if (error) - return "exportDataDetails." + error; + return "textExtraction." + error; } } - if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; + if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; { - var error = $root.google.cloud.automl.v1.ExportModelOperationMetadata.verify(message.exportModelDetails); - if (error) - return "exportModelDetails." + error; - } - } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - if (!$util.isInteger(message.progressPercent)) - return "progressPercent: integer expected"; - if (message.partialFailures != null && message.hasOwnProperty("partialFailures")) { - if (!Array.isArray(message.partialFailures)) - return "partialFailures: array expected"; - for (var i = 0; i < message.partialFailures.length; ++i) { - var error = $root.google.rpc.Status.verify(message.partialFailures[i]); + var error = $root.google.cloud.automl.v1.TextSentimentAnnotation.verify(message.textSentiment); if (error) - return "partialFailures." + error; + return "textSentiment." + error; } } - 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.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + if (!$util.isString(message.annotationSpecId)) + return "annotationSpecId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationPayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.OperationMetadata) + AnnotationPayload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.AnnotationPayload) return object; - var message = new $root.google.cloud.automl.v1.OperationMetadata(); - if (object.deleteDetails != null) { - if (typeof object.deleteDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.deleteDetails: object expected"); - message.deleteDetails = $root.google.cloud.automl.v1.DeleteOperationMetadata.fromObject(object.deleteDetails); - } - if (object.deployModelDetails != null) { - if (typeof object.deployModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.deployModelDetails: object expected"); - message.deployModelDetails = $root.google.cloud.automl.v1.DeployModelOperationMetadata.fromObject(object.deployModelDetails); + var message = new $root.google.cloud.automl.v1.AnnotationPayload(); + if (object.translation != null) { + if (typeof object.translation !== "object") + throw TypeError(".google.cloud.automl.v1.AnnotationPayload.translation: object expected"); + message.translation = $root.google.cloud.automl.v1.TranslationAnnotation.fromObject(object.translation); } - if (object.undeployModelDetails != null) { - if (typeof object.undeployModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.undeployModelDetails: object expected"); - message.undeployModelDetails = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.fromObject(object.undeployModelDetails); + if (object.classification != null) { + if (typeof object.classification !== "object") + throw TypeError(".google.cloud.automl.v1.AnnotationPayload.classification: object expected"); + message.classification = $root.google.cloud.automl.v1.ClassificationAnnotation.fromObject(object.classification); } - if (object.createModelDetails != null) { - if (typeof object.createModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.createModelDetails: object expected"); - message.createModelDetails = $root.google.cloud.automl.v1.CreateModelOperationMetadata.fromObject(object.createModelDetails); + if (object.imageObjectDetection != null) { + if (typeof object.imageObjectDetection !== "object") + throw TypeError(".google.cloud.automl.v1.AnnotationPayload.imageObjectDetection: object expected"); + message.imageObjectDetection = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.fromObject(object.imageObjectDetection); } - if (object.createDatasetDetails != null) { - if (typeof object.createDatasetDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.createDatasetDetails: object expected"); - message.createDatasetDetails = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.fromObject(object.createDatasetDetails); + if (object.textExtraction != null) { + if (typeof object.textExtraction !== "object") + throw TypeError(".google.cloud.automl.v1.AnnotationPayload.textExtraction: object expected"); + message.textExtraction = $root.google.cloud.automl.v1.TextExtractionAnnotation.fromObject(object.textExtraction); } - if (object.importDataDetails != null) { - if (typeof object.importDataDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.importDataDetails: object expected"); - message.importDataDetails = $root.google.cloud.automl.v1.ImportDataOperationMetadata.fromObject(object.importDataDetails); + if (object.textSentiment != null) { + if (typeof object.textSentiment !== "object") + throw TypeError(".google.cloud.automl.v1.AnnotationPayload.textSentiment: object expected"); + message.textSentiment = $root.google.cloud.automl.v1.TextSentimentAnnotation.fromObject(object.textSentiment); } - if (object.batchPredictDetails != null) { - if (typeof object.batchPredictDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.batchPredictDetails: object expected"); - message.batchPredictDetails = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.fromObject(object.batchPredictDetails); + if (object.annotationSpecId != null) + message.annotationSpecId = String(object.annotationSpecId); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.AnnotationPayload + * @static + * @param {google.cloud.automl.v1.AnnotationPayload} message AnnotationPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotationPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.annotationSpecId = ""; + object.displayName = ""; } - if (object.exportDataDetails != null) { - if (typeof object.exportDataDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.exportDataDetails: object expected"); - message.exportDataDetails = $root.google.cloud.automl.v1.ExportDataOperationMetadata.fromObject(object.exportDataDetails); + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + object.annotationSpecId = message.annotationSpecId; + if (message.translation != null && message.hasOwnProperty("translation")) { + object.translation = $root.google.cloud.automl.v1.TranslationAnnotation.toObject(message.translation, options); + if (options.oneofs) + object.detail = "translation"; } - if (object.exportModelDetails != null) { - if (typeof object.exportModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.exportModelDetails: object expected"); - message.exportModelDetails = $root.google.cloud.automl.v1.ExportModelOperationMetadata.fromObject(object.exportModelDetails); - } - if (object.progressPercent != null) - message.progressPercent = object.progressPercent | 0; - if (object.partialFailures) { - if (!Array.isArray(object.partialFailures)) - throw TypeError(".google.cloud.automl.v1.OperationMetadata.partialFailures: array expected"); - message.partialFailures = []; - for (var i = 0; i < object.partialFailures.length; ++i) { - if (typeof object.partialFailures[i] !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.partialFailures: object expected"); - message.partialFailures[i] = $root.google.rpc.Status.fromObject(object.partialFailures[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1.OperationMetadata.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.automl.v1.OperationMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.OperationMetadata - * @static - * @param {google.cloud.automl.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.partialFailures = []; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - object.progressPercent = 0; - } - if (message.partialFailures && message.partialFailures.length) { - object.partialFailures = []; - for (var j = 0; j < message.partialFailures.length; ++j) - object.partialFailures[j] = $root.google.rpc.Status.toObject(message.partialFailures[j], options); - } - 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.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { - object.deleteDetails = $root.google.cloud.automl.v1.DeleteOperationMetadata.toObject(message.deleteDetails, options); - if (options.oneofs) - object.details = "deleteDetails"; - } - if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { - object.createModelDetails = $root.google.cloud.automl.v1.CreateModelOperationMetadata.toObject(message.createModelDetails, options); - if (options.oneofs) - object.details = "createModelDetails"; - } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - object.progressPercent = message.progressPercent; - if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { - object.importDataDetails = $root.google.cloud.automl.v1.ImportDataOperationMetadata.toObject(message.importDataDetails, options); - if (options.oneofs) - object.details = "importDataDetails"; - } - if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { - object.batchPredictDetails = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.toObject(message.batchPredictDetails, options); - if (options.oneofs) - object.details = "batchPredictDetails"; - } - if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { - object.exportDataDetails = $root.google.cloud.automl.v1.ExportDataOperationMetadata.toObject(message.exportDataDetails, options); - if (options.oneofs) - object.details = "exportDataDetails"; - } - if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { - object.exportModelDetails = $root.google.cloud.automl.v1.ExportModelOperationMetadata.toObject(message.exportModelDetails, options); + if (message.classification != null && message.hasOwnProperty("classification")) { + object.classification = $root.google.cloud.automl.v1.ClassificationAnnotation.toObject(message.classification, options); if (options.oneofs) - object.details = "exportModelDetails"; + object.detail = "classification"; } - if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { - object.deployModelDetails = $root.google.cloud.automl.v1.DeployModelOperationMetadata.toObject(message.deployModelDetails, options); + if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { + object.imageObjectDetection = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.toObject(message.imageObjectDetection, options); if (options.oneofs) - object.details = "deployModelDetails"; + object.detail = "imageObjectDetection"; } - if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { - object.undeployModelDetails = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.toObject(message.undeployModelDetails, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { + object.textExtraction = $root.google.cloud.automl.v1.TextExtractionAnnotation.toObject(message.textExtraction, options); if (options.oneofs) - object.details = "undeployModelDetails"; + object.detail = "textExtraction"; } - if (message.createDatasetDetails != null && message.hasOwnProperty("createDatasetDetails")) { - object.createDatasetDetails = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.toObject(message.createDatasetDetails, options); + if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { + object.textSentiment = $root.google.cloud.automl.v1.TextSentimentAnnotation.toObject(message.textSentiment, options); if (options.oneofs) - object.details = "createDatasetDetails"; + object.detail = "textSentiment"; } return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this AnnotationPayload to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.OperationMetadata + * @memberof google.cloud.automl.v1.AnnotationPayload * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + AnnotationPayload.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OperationMetadata; + return AnnotationPayload; })(); - v1.DeleteOperationMetadata = (function() { + /** + * ClassificationType enum. + * @name google.cloud.automl.v1.ClassificationType + * @enum {string} + * @property {number} CLASSIFICATION_TYPE_UNSPECIFIED=0 CLASSIFICATION_TYPE_UNSPECIFIED value + * @property {number} MULTICLASS=1 MULTICLASS value + * @property {number} MULTILABEL=2 MULTILABEL value + */ + v1.ClassificationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLASSIFICATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MULTICLASS"] = 1; + values[valuesById[2] = "MULTILABEL"] = 2; + return values; + })(); + + v1.ClassificationAnnotation = (function() { /** - * Properties of a DeleteOperationMetadata. + * Properties of a ClassificationAnnotation. * @memberof google.cloud.automl.v1 - * @interface IDeleteOperationMetadata + * @interface IClassificationAnnotation + * @property {number|null} [score] ClassificationAnnotation score */ /** - * Constructs a new DeleteOperationMetadata. + * Constructs a new ClassificationAnnotation. * @memberof google.cloud.automl.v1 - * @classdesc Represents a DeleteOperationMetadata. - * @implements IDeleteOperationMetadata + * @classdesc Represents a ClassificationAnnotation. + * @implements IClassificationAnnotation * @constructor - * @param {google.cloud.automl.v1.IDeleteOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IClassificationAnnotation=} [properties] Properties to set */ - function DeleteOperationMetadata(properties) { + function ClassificationAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -695,63 +500,76 @@ } /** - * Creates a new DeleteOperationMetadata instance using the specified properties. + * ClassificationAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @instance + */ + ClassificationAnnotation.prototype.score = 0; + + /** + * Creates a new ClassificationAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static - * @param {google.cloud.automl.v1.IDeleteOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata instance + * @param {google.cloud.automl.v1.IClassificationAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation instance */ - DeleteOperationMetadata.create = function create(properties) { - return new DeleteOperationMetadata(properties); + ClassificationAnnotation.create = function create(properties) { + return new ClassificationAnnotation(properties); }; /** - * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. + * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static - * @param {google.cloud.automl.v1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationMetadata.encode = function encode(message, writer) { + ClassificationAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); return writer; }; /** - * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. + * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static - * @param {google.cloud.automl.v1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer. + * Decodes a ClassificationAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata + * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOperationMetadata.decode = function decode(reader, length) { + ClassificationAnnotation.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.automl.v1.DeleteOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ClassificationAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.score = reader.float(); + break; default: reader.skipType(tag & 7); break; @@ -761,93 +579,114 @@ }; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata + * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteOperationMetadata message. + * Verifies a ClassificationAnnotation message. * @function verify - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteOperationMetadata.verify = function verify(message) { + ClassificationAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; return null; }; /** - * Creates a DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata + * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation */ - DeleteOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.DeleteOperationMetadata) + ClassificationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ClassificationAnnotation) return object; - return new $root.google.cloud.automl.v1.DeleteOperationMetadata(); + var message = new $root.google.cloud.automl.v1.ClassificationAnnotation(); + if (object.score != null) + message.score = Number(object.score); + return message; }; /** - * Creates a plain object from a DeleteOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @static - * @param {google.cloud.automl.v1.DeleteOperationMetadata} message DeleteOperationMetadata + * @param {google.cloud.automl.v1.ClassificationAnnotation} message ClassificationAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOperationMetadata.toObject = function toObject() { - return {}; + ClassificationAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.score = 0; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + return object; }; /** - * Converts this DeleteOperationMetadata to JSON. + * Converts this ClassificationAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationAnnotation * @instance * @returns {Object.} JSON object */ - DeleteOperationMetadata.prototype.toJSON = function toJSON() { + ClassificationAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteOperationMetadata; + return ClassificationAnnotation; })(); - v1.DeployModelOperationMetadata = (function() { + v1.ClassificationEvaluationMetrics = (function() { /** - * Properties of a DeployModelOperationMetadata. + * Properties of a ClassificationEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @interface IDeployModelOperationMetadata + * @interface IClassificationEvaluationMetrics + * @property {number|null} [auPrc] ClassificationEvaluationMetrics auPrc + * @property {number|null} [auRoc] ClassificationEvaluationMetrics auRoc + * @property {number|null} [logLoss] ClassificationEvaluationMetrics logLoss + * @property {Array.|null} [confidenceMetricsEntry] ClassificationEvaluationMetrics confidenceMetricsEntry + * @property {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] ClassificationEvaluationMetrics confusionMatrix + * @property {Array.|null} [annotationSpecId] ClassificationEvaluationMetrics annotationSpecId */ /** - * Constructs a new DeployModelOperationMetadata. + * Constructs a new ClassificationEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @classdesc Represents a DeployModelOperationMetadata. - * @implements IDeployModelOperationMetadata + * @classdesc Represents a ClassificationEvaluationMetrics. + * @implements IClassificationEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1.IDeployModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics=} [properties] Properties to set */ - function DeployModelOperationMetadata(properties) { + function ClassificationEvaluationMetrics(properties) { + this.confidenceMetricsEntry = []; + this.annotationSpecId = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -855,63 +694,147 @@ } /** - * Creates a new DeployModelOperationMetadata instance using the specified properties. + * ClassificationEvaluationMetrics auPrc. + * @member {number} auPrc + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @instance + */ + ClassificationEvaluationMetrics.prototype.auPrc = 0; + + /** + * ClassificationEvaluationMetrics auRoc. + * @member {number} auRoc + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @instance + */ + ClassificationEvaluationMetrics.prototype.auRoc = 0; + + /** + * ClassificationEvaluationMetrics logLoss. + * @member {number} logLoss + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @instance + */ + ClassificationEvaluationMetrics.prototype.logLoss = 0; + + /** + * ClassificationEvaluationMetrics confidenceMetricsEntry. + * @member {Array.} confidenceMetricsEntry + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @instance + */ + ClassificationEvaluationMetrics.prototype.confidenceMetricsEntry = $util.emptyArray; + + /** + * ClassificationEvaluationMetrics confusionMatrix. + * @member {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @instance + */ + ClassificationEvaluationMetrics.prototype.confusionMatrix = null; + + /** + * ClassificationEvaluationMetrics annotationSpecId. + * @member {Array.} annotationSpecId + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @instance + */ + ClassificationEvaluationMetrics.prototype.annotationSpecId = $util.emptyArray; + + /** + * Creates a new ClassificationEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IDeployModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata instance + * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics instance */ - DeployModelOperationMetadata.create = function create(properties) { - return new DeployModelOperationMetadata(properties); + ClassificationEvaluationMetrics.create = function create(properties) { + return new ClassificationEvaluationMetrics(properties); }; /** - * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. + * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployModelOperationMetadata.encode = function encode(message, writer) { + ClassificationEvaluationMetrics.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); + if (message.confidenceMetricsEntry != null && message.confidenceMetricsEntry.length) + for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) + $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntry[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.annotationSpecId != null && message.annotationSpecId.length) + for (var i = 0; i < message.annotationSpecId.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.annotationSpecId[i]); + if (message.auRoc != null && message.hasOwnProperty("auRoc")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.auRoc); + if (message.logLoss != null && message.hasOwnProperty("logLoss")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.logLoss); return writer; }; /** - * Encodes the specified DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. + * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ClassificationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployModelOperationMetadata.decode = function decode(reader, length) { + ClassificationEvaluationMetrics.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.automl.v1.DeployModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.auPrc = reader.float(); + break; + case 6: + message.auRoc = reader.float(); + break; + case 7: + message.logLoss = reader.float(); + break; + case 3: + if (!(message.confidenceMetricsEntry && message.confidenceMetricsEntry.length)) + message.confidenceMetricsEntry = []; + message.confidenceMetricsEntry.push($root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); + break; + case 4: + message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.annotationSpecId && message.annotationSpecId.length)) + message.annotationSpecId = []; + message.annotationSpecId.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -921,923 +844,716 @@ }; /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ClassificationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployModelOperationMetadata message. + * Verifies a ClassificationEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployModelOperationMetadata.verify = function verify(message) { + ClassificationEvaluationMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + if (typeof message.auPrc !== "number") + return "auPrc: number expected"; + if (message.auRoc != null && message.hasOwnProperty("auRoc")) + if (typeof message.auRoc !== "number") + return "auRoc: number expected"; + if (message.logLoss != null && message.hasOwnProperty("logLoss")) + if (typeof message.logLoss !== "number") + return "logLoss: number expected"; + if (message.confidenceMetricsEntry != null && message.hasOwnProperty("confidenceMetricsEntry")) { + if (!Array.isArray(message.confidenceMetricsEntry)) + return "confidenceMetricsEntry: array expected"; + for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) { + var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntry[i]); + if (error) + return "confidenceMetricsEntry." + error; + } + } + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { + var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); + if (error) + return "confusionMatrix." + error; + } + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { + if (!Array.isArray(message.annotationSpecId)) + return "annotationSpecId: array expected"; + for (var i = 0; i < message.annotationSpecId.length; ++i) + if (!$util.isString(message.annotationSpecId[i])) + return "annotationSpecId: string[] expected"; + } return null; }; /** - * Creates a DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics */ - DeployModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.DeployModelOperationMetadata) + ClassificationEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics) return object; - return new $root.google.cloud.automl.v1.DeployModelOperationMetadata(); + var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics(); + if (object.auPrc != null) + message.auPrc = Number(object.auPrc); + if (object.auRoc != null) + message.auRoc = Number(object.auRoc); + if (object.logLoss != null) + message.logLoss = Number(object.logLoss); + if (object.confidenceMetricsEntry) { + if (!Array.isArray(object.confidenceMetricsEntry)) + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.confidenceMetricsEntry: array expected"); + message.confidenceMetricsEntry = []; + for (var i = 0; i < object.confidenceMetricsEntry.length; ++i) { + if (typeof object.confidenceMetricsEntry[i] !== "object") + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.confidenceMetricsEntry: object expected"); + message.confidenceMetricsEntry[i] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntry[i]); + } + } + if (object.confusionMatrix != null) { + if (typeof object.confusionMatrix !== "object") + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.confusionMatrix: object expected"); + message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); + } + if (object.annotationSpecId) { + if (!Array.isArray(object.annotationSpecId)) + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.annotationSpecId: array expected"); + message.annotationSpecId = []; + for (var i = 0; i < object.annotationSpecId.length; ++i) + message.annotationSpecId[i] = String(object.annotationSpecId[i]); + } + return message; }; /** - * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @static - * @param {google.cloud.automl.v1.DeployModelOperationMetadata} message DeployModelOperationMetadata + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics} message ClassificationEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployModelOperationMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DeployModelOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.DeployModelOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - DeployModelOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeployModelOperationMetadata; - })(); - - v1.UndeployModelOperationMetadata = (function() { - - /** - * Properties of an UndeployModelOperationMetadata. - * @memberof google.cloud.automl.v1 - * @interface IUndeployModelOperationMetadata - */ - - /** - * Constructs a new UndeployModelOperationMetadata. - * @memberof google.cloud.automl.v1 - * @classdesc Represents an UndeployModelOperationMetadata. - * @implements IUndeployModelOperationMetadata - * @constructor - * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata=} [properties] Properties to set - */ - function UndeployModelOperationMetadata(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 new UndeployModelOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata instance - */ - UndeployModelOperationMetadata.create = function create(properties) { - return new UndeployModelOperationMetadata(properties); - }; - - /** - * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndeployModelOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndeployModelOperationMetadata.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.automl.v1.UndeployModelOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } + ClassificationEvaluationMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.confidenceMetricsEntry = []; + object.annotationSpecId = []; } - return message; - }; - - /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UndeployModelOperationMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UndeployModelOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata - */ - UndeployModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.UndeployModelOperationMetadata) - return object; - return new $root.google.cloud.automl.v1.UndeployModelOperationMetadata(); - }; - - /** - * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.UndeployModelOperationMetadata} message UndeployModelOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UndeployModelOperationMetadata.toObject = function toObject() { - return {}; + if (options.defaults) { + object.auPrc = 0; + object.confusionMatrix = null; + object.auRoc = 0; + object.logLoss = 0; + } + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; + if (message.confidenceMetricsEntry && message.confidenceMetricsEntry.length) { + object.confidenceMetricsEntry = []; + for (var j = 0; j < message.confidenceMetricsEntry.length; ++j) + object.confidenceMetricsEntry[j] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntry[j], options); + } + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + object.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); + if (message.annotationSpecId && message.annotationSpecId.length) { + object.annotationSpecId = []; + for (var j = 0; j < message.annotationSpecId.length; ++j) + object.annotationSpecId[j] = message.annotationSpecId[j]; + } + if (message.auRoc != null && message.hasOwnProperty("auRoc")) + object.auRoc = options.json && !isFinite(message.auRoc) ? String(message.auRoc) : message.auRoc; + if (message.logLoss != null && message.hasOwnProperty("logLoss")) + object.logLoss = options.json && !isFinite(message.logLoss) ? String(message.logLoss) : message.logLoss; + return object; }; /** - * Converts this UndeployModelOperationMetadata to JSON. + * Converts this ClassificationEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics * @instance * @returns {Object.} JSON object */ - UndeployModelOperationMetadata.prototype.toJSON = function toJSON() { + ClassificationEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UndeployModelOperationMetadata; - })(); + ClassificationEvaluationMetrics.ConfidenceMetricsEntry = (function() { - v1.CreateDatasetOperationMetadata = (function() { + /** + * Properties of a ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @interface IConfidenceMetricsEntry + * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold + * @property {number|null} [positionThreshold] ConfidenceMetricsEntry positionThreshold + * @property {number|null} [recall] ConfidenceMetricsEntry recall + * @property {number|null} [precision] ConfidenceMetricsEntry precision + * @property {number|null} [falsePositiveRate] ConfidenceMetricsEntry falsePositiveRate + * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score + * @property {number|null} [recallAt1] ConfidenceMetricsEntry recallAt1 + * @property {number|null} [precisionAt1] ConfidenceMetricsEntry precisionAt1 + * @property {number|null} [falsePositiveRateAt1] ConfidenceMetricsEntry falsePositiveRateAt1 + * @property {number|null} [f1ScoreAt1] ConfidenceMetricsEntry f1ScoreAt1 + * @property {number|Long|null} [truePositiveCount] ConfidenceMetricsEntry truePositiveCount + * @property {number|Long|null} [falsePositiveCount] ConfidenceMetricsEntry falsePositiveCount + * @property {number|Long|null} [falseNegativeCount] ConfidenceMetricsEntry falseNegativeCount + * @property {number|Long|null} [trueNegativeCount] ConfidenceMetricsEntry trueNegativeCount + */ - /** - * Properties of a CreateDatasetOperationMetadata. - * @memberof google.cloud.automl.v1 - * @interface ICreateDatasetOperationMetadata - */ + /** + * Constructs a new ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @classdesc Represents a ConfidenceMetricsEntry. + * @implements IConfidenceMetricsEntry + * @constructor + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + */ + function ConfidenceMetricsEntry(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]]; + } - /** - * Constructs a new CreateDatasetOperationMetadata. - * @memberof google.cloud.automl.v1 - * @classdesc Represents a CreateDatasetOperationMetadata. - * @implements ICreateDatasetOperationMetadata - * @constructor - * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata=} [properties] Properties to set - */ - function CreateDatasetOperationMetadata(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]]; - } + /** + * ConfidenceMetricsEntry confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; - /** - * Creates a new CreateDatasetOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata instance - */ - CreateDatasetOperationMetadata.create = function create(properties) { - return new CreateDatasetOperationMetadata(properties); - }; + /** + * ConfidenceMetricsEntry positionThreshold. + * @member {number} positionThreshold + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.positionThreshold = 0; - /** - * Encodes the specified CreateDatasetOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata} message CreateDatasetOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDatasetOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * ConfidenceMetricsEntry recall. + * @member {number} recall + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.recall = 0; - /** - * Encodes the specified CreateDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata} message CreateDatasetOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDatasetOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ConfidenceMetricsEntry precision. + * @member {number} precision + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precision = 0; - /** - * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDatasetOperationMetadata.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.automl.v1.CreateDatasetOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ConfidenceMetricsEntry falsePositiveRate. + * @member {number} falsePositiveRate + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falsePositiveRate = 0; - /** - * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDatasetOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ConfidenceMetricsEntry f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1Score = 0; - /** - * Verifies a CreateDatasetOperationMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDatasetOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * ConfidenceMetricsEntry recallAt1. + * @member {number} recallAt1 + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.recallAt1 = 0; - /** - * Creates a CreateDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata - */ - CreateDatasetOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.CreateDatasetOperationMetadata) - return object; - return new $root.google.cloud.automl.v1.CreateDatasetOperationMetadata(); - }; + /** + * ConfidenceMetricsEntry precisionAt1. + * @member {number} precisionAt1 + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precisionAt1 = 0; - /** - * Creates a plain object from a CreateDatasetOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @static - * @param {google.cloud.automl.v1.CreateDatasetOperationMetadata} message CreateDatasetOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDatasetOperationMetadata.toObject = function toObject() { - return {}; - }; + /** + * ConfidenceMetricsEntry falsePositiveRateAt1. + * @member {number} falsePositiveRateAt1 + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falsePositiveRateAt1 = 0; - /** - * Converts this CreateDatasetOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - CreateDatasetOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ConfidenceMetricsEntry f1ScoreAt1. + * @member {number} f1ScoreAt1 + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1ScoreAt1 = 0; - return CreateDatasetOperationMetadata; - })(); + /** + * ConfidenceMetricsEntry truePositiveCount. + * @member {number|Long} truePositiveCount + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.truePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - v1.CreateModelOperationMetadata = (function() { + /** + * ConfidenceMetricsEntry falsePositiveCount. + * @member {number|Long} falsePositiveCount + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falsePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Properties of a CreateModelOperationMetadata. - * @memberof google.cloud.automl.v1 - * @interface ICreateModelOperationMetadata - */ + /** + * ConfidenceMetricsEntry falseNegativeCount. + * @member {number|Long} falseNegativeCount + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falseNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Constructs a new CreateModelOperationMetadata. - * @memberof google.cloud.automl.v1 - * @classdesc Represents a CreateModelOperationMetadata. - * @implements ICreateModelOperationMetadata - * @constructor - * @param {google.cloud.automl.v1.ICreateModelOperationMetadata=} [properties] Properties to set - */ - function CreateModelOperationMetadata(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]]; - } + /** + * ConfidenceMetricsEntry trueNegativeCount. + * @member {number|Long} trueNegativeCount + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.trueNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a new CreateModelOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.ICreateModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata instance - */ - CreateModelOperationMetadata.create = function create(properties) { - return new CreateModelOperationMetadata(properties); - }; + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance + */ + ConfidenceMetricsEntry.create = function create(properties) { + return new ConfidenceMetricsEntry(properties); + }; - /** - * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateModelOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateModelOperationMetadata.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.automl.v1.CreateModelOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateModelOperationMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateModelOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata - */ - CreateModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.CreateModelOperationMetadata) - return object; - return new $root.google.cloud.automl.v1.CreateModelOperationMetadata(); - }; - - /** - * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @static - * @param {google.cloud.automl.v1.CreateModelOperationMetadata} message CreateModelOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateModelOperationMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this CreateModelOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.CreateModelOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - CreateModelOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateModelOperationMetadata; - })(); - - v1.ImportDataOperationMetadata = (function() { - - /** - * Properties of an ImportDataOperationMetadata. - * @memberof google.cloud.automl.v1 - * @interface IImportDataOperationMetadata - */ - - /** - * Constructs a new ImportDataOperationMetadata. - * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImportDataOperationMetadata. - * @implements IImportDataOperationMetadata - * @constructor - * @param {google.cloud.automl.v1.IImportDataOperationMetadata=} [properties] Properties to set - */ - function ImportDataOperationMetadata(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 new ImportDataOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.IImportDataOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata instance - */ - ImportDataOperationMetadata.create = function create(properties) { - return new ImportDataOperationMetadata(properties); - }; - - /** - * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportDataOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); + if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.recallAt1); + if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.precisionAt1); + if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.f1ScoreAt1); + if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) + writer.uint32(/* id 8, wireType 5 =*/69).float(message.falsePositiveRate); + if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.falsePositiveRateAt1); + if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.truePositiveCount); + if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.falsePositiveCount); + if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.falseNegativeCount); + if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.trueNegativeCount); + if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.positionThreshold); + return writer; + }; - /** - * Encodes the specified ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportDataOperationMetadata.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.automl.v1.ImportDataOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.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.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.confidenceThreshold = reader.float(); + break; + case 14: + message.positionThreshold = reader.int32(); + break; + case 2: + message.recall = reader.float(); + break; + case 3: + message.precision = reader.float(); + break; + case 8: + message.falsePositiveRate = reader.float(); + break; + case 4: + message.f1Score = reader.float(); + break; + case 5: + message.recallAt1 = reader.float(); + break; + case 6: + message.precisionAt1 = reader.float(); + break; + case 9: + message.falsePositiveRateAt1 = reader.float(); + break; + case 7: + message.f1ScoreAt1 = reader.float(); + break; + case 10: + message.truePositiveCount = reader.int64(); + break; + case 11: + message.falsePositiveCount = reader.int64(); + break; + case 12: + message.falseNegativeCount = reader.int64(); + break; + case 13: + message.trueNegativeCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; - - /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportDataOperationMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportDataOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata - */ - ImportDataOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImportDataOperationMetadata) - return object; - return new $root.google.cloud.automl.v1.ImportDataOperationMetadata(); - }; - - /** - * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.ImportDataOperationMetadata} message ImportDataOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportDataOperationMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ImportDataOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.ImportDataOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportDataOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImportDataOperationMetadata; - })(); - - v1.ExportDataOperationMetadata = (function() { - - /** - * Properties of an ExportDataOperationMetadata. - * @memberof google.cloud.automl.v1 - * @interface IExportDataOperationMetadata - * @property {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null} [outputInfo] ExportDataOperationMetadata outputInfo - */ - - /** - * Constructs a new ExportDataOperationMetadata. - * @memberof google.cloud.automl.v1 - * @classdesc Represents an ExportDataOperationMetadata. - * @implements IExportDataOperationMetadata - * @constructor - * @param {google.cloud.automl.v1.IExportDataOperationMetadata=} [properties] Properties to set - */ - function ExportDataOperationMetadata(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]]; - } - - /** - * ExportDataOperationMetadata outputInfo. - * @member {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null|undefined} outputInfo - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @instance - */ - ExportDataOperationMetadata.prototype.outputInfo = null; - - /** - * Creates a new ExportDataOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.IExportDataOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata instance - */ - ExportDataOperationMetadata.create = function create(properties) { - return new ExportDataOperationMetadata(properties); - }; - - /** - * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportDataOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.encode(message.outputInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return message; + }; - /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportDataOperationMetadata.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.automl.v1.ExportDataOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.outputInfo = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Verifies a ConfidenceMetricsEntry message. + * @function verify + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidenceMetricsEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) + if (!$util.isInteger(message.positionThreshold)) + return "positionThreshold: integer expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) + if (typeof message.falsePositiveRate !== "number") + return "falsePositiveRate: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; + if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) + if (typeof message.recallAt1 !== "number") + return "recallAt1: number expected"; + if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) + if (typeof message.precisionAt1 !== "number") + return "precisionAt1: number expected"; + if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) + if (typeof message.falsePositiveRateAt1 !== "number") + return "falsePositiveRateAt1: number expected"; + if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) + if (typeof message.f1ScoreAt1 !== "number") + return "f1ScoreAt1: number expected"; + if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) + if (!$util.isInteger(message.truePositiveCount) && !(message.truePositiveCount && $util.isInteger(message.truePositiveCount.low) && $util.isInteger(message.truePositiveCount.high))) + return "truePositiveCount: integer|Long expected"; + if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) + if (!$util.isInteger(message.falsePositiveCount) && !(message.falsePositiveCount && $util.isInteger(message.falsePositiveCount.low) && $util.isInteger(message.falsePositiveCount.high))) + return "falsePositiveCount: integer|Long expected"; + if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) + if (!$util.isInteger(message.falseNegativeCount) && !(message.falseNegativeCount && $util.isInteger(message.falseNegativeCount.low) && $util.isInteger(message.falseNegativeCount.high))) + return "falseNegativeCount: integer|Long expected"; + if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) + if (!$util.isInteger(message.trueNegativeCount) && !(message.trueNegativeCount && $util.isInteger(message.trueNegativeCount.low) && $util.isInteger(message.trueNegativeCount.high))) + return "trueNegativeCount: integer|Long expected"; + return null; + }; - /** - * Verifies an ExportDataOperationMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportDataOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { - var error = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify(message.outputInfo); - if (error) - return "outputInfo." + error; - } - return null; - }; + /** + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + */ + ConfidenceMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) + return object; + var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.positionThreshold != null) + message.positionThreshold = object.positionThreshold | 0; + if (object.recall != null) + message.recall = Number(object.recall); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.falsePositiveRate != null) + message.falsePositiveRate = Number(object.falsePositiveRate); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); + if (object.recallAt1 != null) + message.recallAt1 = Number(object.recallAt1); + if (object.precisionAt1 != null) + message.precisionAt1 = Number(object.precisionAt1); + if (object.falsePositiveRateAt1 != null) + message.falsePositiveRateAt1 = Number(object.falsePositiveRateAt1); + if (object.f1ScoreAt1 != null) + message.f1ScoreAt1 = Number(object.f1ScoreAt1); + if (object.truePositiveCount != null) + if ($util.Long) + (message.truePositiveCount = $util.Long.fromValue(object.truePositiveCount)).unsigned = false; + else if (typeof object.truePositiveCount === "string") + message.truePositiveCount = parseInt(object.truePositiveCount, 10); + else if (typeof object.truePositiveCount === "number") + message.truePositiveCount = object.truePositiveCount; + else if (typeof object.truePositiveCount === "object") + message.truePositiveCount = new $util.LongBits(object.truePositiveCount.low >>> 0, object.truePositiveCount.high >>> 0).toNumber(); + if (object.falsePositiveCount != null) + if ($util.Long) + (message.falsePositiveCount = $util.Long.fromValue(object.falsePositiveCount)).unsigned = false; + else if (typeof object.falsePositiveCount === "string") + message.falsePositiveCount = parseInt(object.falsePositiveCount, 10); + else if (typeof object.falsePositiveCount === "number") + message.falsePositiveCount = object.falsePositiveCount; + else if (typeof object.falsePositiveCount === "object") + message.falsePositiveCount = new $util.LongBits(object.falsePositiveCount.low >>> 0, object.falsePositiveCount.high >>> 0).toNumber(); + if (object.falseNegativeCount != null) + if ($util.Long) + (message.falseNegativeCount = $util.Long.fromValue(object.falseNegativeCount)).unsigned = false; + else if (typeof object.falseNegativeCount === "string") + message.falseNegativeCount = parseInt(object.falseNegativeCount, 10); + else if (typeof object.falseNegativeCount === "number") + message.falseNegativeCount = object.falseNegativeCount; + else if (typeof object.falseNegativeCount === "object") + message.falseNegativeCount = new $util.LongBits(object.falseNegativeCount.low >>> 0, object.falseNegativeCount.high >>> 0).toNumber(); + if (object.trueNegativeCount != null) + if ($util.Long) + (message.trueNegativeCount = $util.Long.fromValue(object.trueNegativeCount)).unsigned = false; + else if (typeof object.trueNegativeCount === "string") + message.trueNegativeCount = parseInt(object.trueNegativeCount, 10); + else if (typeof object.trueNegativeCount === "number") + message.trueNegativeCount = object.trueNegativeCount; + else if (typeof object.trueNegativeCount === "object") + message.trueNegativeCount = new $util.LongBits(object.trueNegativeCount.low >>> 0, object.trueNegativeCount.high >>> 0).toNumber(); + return message; + }; - /** - * Creates an ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata - */ - ExportDataOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ExportDataOperationMetadata) + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidenceMetricsEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.confidenceThreshold = 0; + object.recall = 0; + object.precision = 0; + object.f1Score = 0; + object.recallAt1 = 0; + object.precisionAt1 = 0; + object.f1ScoreAt1 = 0; + object.falsePositiveRate = 0; + object.falsePositiveRateAt1 = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.truePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.truePositiveCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.falsePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.falsePositiveCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.falseNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.falseNegativeCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trueNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trueNegativeCount = options.longs === String ? "0" : 0; + object.positionThreshold = 0; + } + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) + object.recallAt1 = options.json && !isFinite(message.recallAt1) ? String(message.recallAt1) : message.recallAt1; + if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) + object.precisionAt1 = options.json && !isFinite(message.precisionAt1) ? String(message.precisionAt1) : message.precisionAt1; + if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) + object.f1ScoreAt1 = options.json && !isFinite(message.f1ScoreAt1) ? String(message.f1ScoreAt1) : message.f1ScoreAt1; + if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) + object.falsePositiveRate = options.json && !isFinite(message.falsePositiveRate) ? String(message.falsePositiveRate) : message.falsePositiveRate; + if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) + object.falsePositiveRateAt1 = options.json && !isFinite(message.falsePositiveRateAt1) ? String(message.falsePositiveRateAt1) : message.falsePositiveRateAt1; + if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) + if (typeof message.truePositiveCount === "number") + object.truePositiveCount = options.longs === String ? String(message.truePositiveCount) : message.truePositiveCount; + else + object.truePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.truePositiveCount) : options.longs === Number ? new $util.LongBits(message.truePositiveCount.low >>> 0, message.truePositiveCount.high >>> 0).toNumber() : message.truePositiveCount; + if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) + if (typeof message.falsePositiveCount === "number") + object.falsePositiveCount = options.longs === String ? String(message.falsePositiveCount) : message.falsePositiveCount; + else + object.falsePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.falsePositiveCount) : options.longs === Number ? new $util.LongBits(message.falsePositiveCount.low >>> 0, message.falsePositiveCount.high >>> 0).toNumber() : message.falsePositiveCount; + if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) + if (typeof message.falseNegativeCount === "number") + object.falseNegativeCount = options.longs === String ? String(message.falseNegativeCount) : message.falseNegativeCount; + else + object.falseNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.falseNegativeCount) : options.longs === Number ? new $util.LongBits(message.falseNegativeCount.low >>> 0, message.falseNegativeCount.high >>> 0).toNumber() : message.falseNegativeCount; + if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) + if (typeof message.trueNegativeCount === "number") + object.trueNegativeCount = options.longs === String ? String(message.trueNegativeCount) : message.trueNegativeCount; + else + object.trueNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.trueNegativeCount) : options.longs === Number ? new $util.LongBits(message.trueNegativeCount.low >>> 0, message.trueNegativeCount.high >>> 0).toNumber() : message.trueNegativeCount; + if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) + object.positionThreshold = message.positionThreshold; return object; - var message = new $root.google.cloud.automl.v1.ExportDataOperationMetadata(); - if (object.outputInfo != null) { - if (typeof object.outputInfo !== "object") - throw TypeError(".google.cloud.automl.v1.ExportDataOperationMetadata.outputInfo: object expected"); - message.outputInfo = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.fromObject(object.outputInfo); - } - return message; - }; + }; - /** - * Creates a plain object from an ExportDataOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @static - * @param {google.cloud.automl.v1.ExportDataOperationMetadata} message ExportDataOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportDataOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.outputInfo = null; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - object.outputInfo = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.toObject(message.outputInfo, options); - return object; - }; + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + * @returns {Object.} JSON object + */ + ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ExportDataOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - ExportDataOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ConfidenceMetricsEntry; + })(); - ExportDataOperationMetadata.ExportDataOutputInfo = (function() { + ClassificationEvaluationMetrics.ConfusionMatrix = (function() { /** - * Properties of an ExportDataOutputInfo. - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @interface IExportDataOutputInfo - * @property {string|null} [gcsOutputDirectory] ExportDataOutputInfo gcsOutputDirectory + * Properties of a ConfusionMatrix. + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @interface IConfusionMatrix + * @property {Array.|null} [annotationSpecId] ConfusionMatrix annotationSpecId + * @property {Array.|null} [displayName] ConfusionMatrix displayName + * @property {Array.|null} [row] ConfusionMatrix row */ /** - * Constructs a new ExportDataOutputInfo. - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata - * @classdesc Represents an ExportDataOutputInfo. - * @implements IExportDataOutputInfo + * Constructs a new ConfusionMatrix. + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @classdesc Represents a ConfusionMatrix. + * @implements IConfusionMatrix * @constructor - * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set */ - function ExportDataOutputInfo(properties) { + function ConfusionMatrix(properties) { + this.annotationSpecId = []; + this.displayName = []; + this.row = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1845,208 +1561,494 @@ } /** - * ExportDataOutputInfo gcsOutputDirectory. - * @member {string} gcsOutputDirectory - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * ConfusionMatrix annotationSpecId. + * @member {Array.} annotationSpecId + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix * @instance */ - ExportDataOutputInfo.prototype.gcsOutputDirectory = ""; + ConfusionMatrix.prototype.annotationSpecId = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ConfusionMatrix displayName. + * @member {Array.} displayName + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @instance + */ + ConfusionMatrix.prototype.displayName = $util.emptyArray; /** - * ExportDataOutputInfo outputLocation. - * @member {"gcsOutputDirectory"|undefined} outputLocation - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * ConfusionMatrix row. + * @member {Array.} row + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix * @instance */ - Object.defineProperty(ExportDataOutputInfo.prototype, "outputLocation", { - get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory"]), - set: $util.oneOfSetter($oneOfFields) - }); + ConfusionMatrix.prototype.row = $util.emptyArray; /** - * Creates a new ExportDataOutputInfo instance using the specified properties. + * Creates a new ConfusionMatrix instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix * @static - * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo instance + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix instance */ - ExportDataOutputInfo.create = function create(properties) { - return new ExportDataOutputInfo(properties); + ConfusionMatrix.create = function create(properties) { + return new ConfusionMatrix(properties); }; /** - * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. + * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix * @static - * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportDataOutputInfo.encode = function encode(message, writer) { + ConfusionMatrix.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); + if (message.annotationSpecId != null && message.annotationSpecId.length) + for (var i = 0; i < message.annotationSpecId.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId[i]); + if (message.row != null && message.row.length) + for (var i = 0; i < message.row.length; ++i) + $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.encode(message.row[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.displayName != null && message.displayName.length) + for (var i = 0; i < message.displayName.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName[i]); return writer; }; /** - * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. + * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix * @static - * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportDataOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { + ConfusionMatrix.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer. + * Decodes a ConfusionMatrix message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportDataOutputInfo.decode = function decode(reader, length) { + ConfusionMatrix.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.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsOutputDirectory = reader.string(); + if (!(message.annotationSpecId && message.annotationSpecId.length)) + message.annotationSpecId = []; + message.annotationSpecId.push(reader.string()); + break; + case 3: + if (!(message.displayName && message.displayName.length)) + message.displayName = []; + message.displayName.push(reader.string()); + break; + case 2: + if (!(message.row && message.row.length)) + message.row = []; + message.row.push($root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } - } - return message; - }; + } + return message; + }; + + /** + * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfusionMatrix.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfusionMatrix message. + * @function verify + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfusionMatrix.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { + if (!Array.isArray(message.annotationSpecId)) + return "annotationSpecId: array expected"; + for (var i = 0; i < message.annotationSpecId.length; ++i) + if (!$util.isString(message.annotationSpecId[i])) + return "annotationSpecId: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + if (!Array.isArray(message.displayName)) + return "displayName: array expected"; + for (var i = 0; i < message.displayName.length; ++i) + if (!$util.isString(message.displayName[i])) + return "displayName: string[] expected"; + } + if (message.row != null && message.hasOwnProperty("row")) { + if (!Array.isArray(message.row)) + return "row: array expected"; + for (var i = 0; i < message.row.length; ++i) { + var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify(message.row[i]); + if (error) + return "row." + error; + } + } + return null; + }; + + /** + * Creates a ConfusionMatrix message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix + */ + ConfusionMatrix.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix) + return object; + var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix(); + if (object.annotationSpecId) { + if (!Array.isArray(object.annotationSpecId)) + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.annotationSpecId: array expected"); + message.annotationSpecId = []; + for (var i = 0; i < object.annotationSpecId.length; ++i) + message.annotationSpecId[i] = String(object.annotationSpecId[i]); + } + if (object.displayName) { + if (!Array.isArray(object.displayName)) + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.displayName: array expected"); + message.displayName = []; + for (var i = 0; i < object.displayName.length; ++i) + message.displayName[i] = String(object.displayName[i]); + } + if (object.row) { + if (!Array.isArray(object.row)) + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.row: array expected"); + message.row = []; + for (var i = 0; i < object.row.length; ++i) { + if (typeof object.row[i] !== "object") + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.row: object expected"); + message.row[i] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.fromObject(object.row[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ConfusionMatrix message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} message ConfusionMatrix + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfusionMatrix.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.annotationSpecId = []; + object.row = []; + object.displayName = []; + } + if (message.annotationSpecId && message.annotationSpecId.length) { + object.annotationSpecId = []; + for (var j = 0; j < message.annotationSpecId.length; ++j) + object.annotationSpecId[j] = message.annotationSpecId[j]; + } + if (message.row && message.row.length) { + object.row = []; + for (var j = 0; j < message.row.length; ++j) + object.row[j] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.toObject(message.row[j], options); + } + if (message.displayName && message.displayName.length) { + object.displayName = []; + for (var j = 0; j < message.displayName.length; ++j) + object.displayName[j] = message.displayName[j]; + } + return object; + }; + + /** + * Converts this ConfusionMatrix to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @instance + * @returns {Object.} JSON object + */ + ConfusionMatrix.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ConfusionMatrix.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @interface IRow + * @property {Array.|null} [exampleCount] Row exampleCount + */ + + /** + * Constructs a new Row. + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.exampleCount = []; + 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]]; + } + + /** + * Row exampleCount. + * @member {Array.} exampleCount + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @instance + */ + Row.prototype.exampleCount = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exampleCount != null && message.exampleCount.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.exampleCount.length; ++i) + writer.int32(message.exampleCount[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.exampleCount && message.exampleCount.length)) + message.exampleCount = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.exampleCount.push(reader.int32()); + } else + message.exampleCount.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportDataOutputInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExportDataOutputInfo message. - * @function verify - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportDataOutputInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - properties.outputLocation = 1; - if (!$util.isString(message.gcsOutputDirectory)) - return "gcsOutputDirectory: string expected"; - } - return null; - }; + /** + * Verifies a Row message. + * @function verify + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) { + if (!Array.isArray(message.exampleCount)) + return "exampleCount: array expected"; + for (var i = 0; i < message.exampleCount.length; ++i) + if (!$util.isInteger(message.exampleCount[i])) + return "exampleCount: integer[] expected"; + } + return null; + }; - /** - * Creates an ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo - */ - ExportDataOutputInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo) + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) + return object; + var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); + if (object.exampleCount) { + if (!Array.isArray(object.exampleCount)) + throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.exampleCount: array expected"); + message.exampleCount = []; + for (var i = 0; i < object.exampleCount.length; ++i) + message.exampleCount[i] = object.exampleCount[i] | 0; + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exampleCount = []; + if (message.exampleCount && message.exampleCount.length) { + object.exampleCount = []; + for (var j = 0; j < message.exampleCount.length; ++j) + object.exampleCount[j] = message.exampleCount[j]; + } return object; - var message = new $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo(); - if (object.gcsOutputDirectory != null) - message.gcsOutputDirectory = String(object.gcsOutputDirectory); - return message; - }; + }; - /** - * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} message ExportDataOutputInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportDataOutputInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - object.gcsOutputDirectory = message.gcsOutputDirectory; - if (options.oneofs) - object.outputLocation = "gcsOutputDirectory"; - } - return object; - }; + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ExportDataOutputInfo to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo - * @instance - * @returns {Object.} JSON object - */ - ExportDataOutputInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Row; + })(); - return ExportDataOutputInfo; + return ConfusionMatrix; })(); - return ExportDataOperationMetadata; + return ClassificationEvaluationMetrics; })(); - v1.BatchPredictOperationMetadata = (function() { + v1.ImageObjectDetectionAnnotation = (function() { /** - * Properties of a BatchPredictOperationMetadata. + * Properties of an ImageObjectDetectionAnnotation. * @memberof google.cloud.automl.v1 - * @interface IBatchPredictOperationMetadata - * @property {google.cloud.automl.v1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictOperationMetadata inputConfig - * @property {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null} [outputInfo] BatchPredictOperationMetadata outputInfo + * @interface IImageObjectDetectionAnnotation + * @property {google.cloud.automl.v1.IBoundingPoly|null} [boundingBox] ImageObjectDetectionAnnotation boundingBox + * @property {number|null} [score] ImageObjectDetectionAnnotation score */ /** - * Constructs a new BatchPredictOperationMetadata. + * Constructs a new ImageObjectDetectionAnnotation. * @memberof google.cloud.automl.v1 - * @classdesc Represents a BatchPredictOperationMetadata. - * @implements IBatchPredictOperationMetadata + * @classdesc Represents an ImageObjectDetectionAnnotation. + * @implements IImageObjectDetectionAnnotation * @constructor - * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation=} [properties] Properties to set */ - function BatchPredictOperationMetadata(properties) { + function ImageObjectDetectionAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2054,423 +2056,216 @@ } /** - * BatchPredictOperationMetadata inputConfig. - * @member {google.cloud.automl.v1.IBatchPredictInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * ImageObjectDetectionAnnotation boundingBox. + * @member {google.cloud.automl.v1.IBoundingPoly|null|undefined} boundingBox + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation * @instance */ - BatchPredictOperationMetadata.prototype.inputConfig = null; + ImageObjectDetectionAnnotation.prototype.boundingBox = null; /** - * BatchPredictOperationMetadata outputInfo. - * @member {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null|undefined} outputInfo - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * ImageObjectDetectionAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation * @instance */ - BatchPredictOperationMetadata.prototype.outputInfo = null; + ImageObjectDetectionAnnotation.prototype.score = 0; /** - * Creates a new BatchPredictOperationMetadata instance using the specified properties. + * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation * @static - * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata instance + * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation instance */ - BatchPredictOperationMetadata.create = function create(properties) { - return new BatchPredictOperationMetadata(properties); + ImageObjectDetectionAnnotation.create = function create(properties) { + return new ImageObjectDetectionAnnotation(properties); }; /** - * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. + * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation * @static - * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOperationMetadata.encode = function encode(message, writer) { + ImageObjectDetectionAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) + $root.google.cloud.automl.v1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); return writer; }; /** - * Encodes the specified BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. + * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation * @static - * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata + * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictOperationMetadata.decode = function decode(reader, length) { + ImageObjectDetectionAnnotation.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.automl.v1.BatchPredictOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.decode(reader, reader.uint32()); + message.boundingBox = $root.google.cloud.automl.v1.BoundingPoly.decode(reader, reader.uint32()); break; case 2: - message.outputInfo = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchPredictOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchPredictOperationMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchPredictOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.automl.v1.BatchPredictInputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { - var error = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify(message.outputInfo); - if (error) - return "outputInfo." + error; - } - return null; - }; - - /** - * Creates a BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata - */ - BatchPredictOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BatchPredictOperationMetadata) - return object; - var message = new $root.google.cloud.automl.v1.BatchPredictOperationMetadata(); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictOperationMetadata.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.fromObject(object.inputConfig); - } - if (object.outputInfo != null) { - if (typeof object.outputInfo !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictOperationMetadata.outputInfo: object expected"); - message.outputInfo = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.fromObject(object.outputInfo); - } - return message; - }; - - /** - * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata - * @static - * @param {google.cloud.automl.v1.BatchPredictOperationMetadata} message BatchPredictOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchPredictOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inputConfig = null; - object.outputInfo = null; - } - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.toObject(message.inputConfig, options); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - object.outputInfo = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.toObject(message.outputInfo, options); - return object; - }; - - /** - * Converts this BatchPredictOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - BatchPredictOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - BatchPredictOperationMetadata.BatchPredictOutputInfo = (function() { - - /** - * Properties of a BatchPredictOutputInfo. - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata - * @interface IBatchPredictOutputInfo - * @property {string|null} [gcsOutputDirectory] BatchPredictOutputInfo gcsOutputDirectory - */ - - /** - * Constructs a new BatchPredictOutputInfo. - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata - * @classdesc Represents a BatchPredictOutputInfo. - * @implements IBatchPredictOutputInfo - * @constructor - * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set - */ - function BatchPredictOutputInfo(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]]; - } - - /** - * BatchPredictOutputInfo gcsOutputDirectory. - * @member {string} gcsOutputDirectory - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @instance - */ - BatchPredictOutputInfo.prototype.gcsOutputDirectory = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BatchPredictOutputInfo outputLocation. - * @member {"gcsOutputDirectory"|undefined} outputLocation - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @instance - */ - Object.defineProperty(BatchPredictOutputInfo.prototype, "outputLocation", { - get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BatchPredictOutputInfo instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo instance - */ - BatchPredictOutputInfo.create = function create(properties) { - return new BatchPredictOutputInfo(properties); - }; - - /** - * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchPredictOutputInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); - return writer; - }; - - /** - * Encodes the specified BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchPredictOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchPredictOutputInfo.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.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gcsOutputDirectory = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + message.score = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a BatchPredictOutputInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchPredictOutputInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a BatchPredictOutputInfo message. - * @function verify - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchPredictOutputInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - properties.outputLocation = 1; - if (!$util.isString(message.gcsOutputDirectory)) - return "gcsOutputDirectory: string expected"; - } - return null; - }; + /** + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageObjectDetectionAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo - */ - BatchPredictOutputInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - return object; - var message = new $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); - if (object.gcsOutputDirectory != null) - message.gcsOutputDirectory = String(object.gcsOutputDirectory); - return message; - }; + /** + * Verifies an ImageObjectDetectionAnnotation message. + * @function verify + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageObjectDetectionAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) { + var error = $root.google.cloud.automl.v1.BoundingPoly.verify(message.boundingBox); + if (error) + return "boundingBox." + error; + } + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + return null; + }; - /** - * Creates a plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} message BatchPredictOutputInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchPredictOutputInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - object.gcsOutputDirectory = message.gcsOutputDirectory; - if (options.oneofs) - object.outputLocation = "gcsOutputDirectory"; - } + /** + * Creates an ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + */ + ImageObjectDetectionAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation) return object; - }; + var message = new $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation(); + if (object.boundingBox != null) { + if (typeof object.boundingBox !== "object") + throw TypeError(".google.cloud.automl.v1.ImageObjectDetectionAnnotation.boundingBox: object expected"); + message.boundingBox = $root.google.cloud.automl.v1.BoundingPoly.fromObject(object.boundingBox); + } + if (object.score != null) + message.score = Number(object.score); + return message; + }; - /** - * Converts this BatchPredictOutputInfo to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @instance - * @returns {Object.} JSON object - */ - BatchPredictOutputInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @static + * @param {google.cloud.automl.v1.ImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageObjectDetectionAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.boundingBox = null; + object.score = 0; + } + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) + object.boundingBox = $root.google.cloud.automl.v1.BoundingPoly.toObject(message.boundingBox, options); + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + return object; + }; - return BatchPredictOutputInfo; - })(); + /** + * Converts this ImageObjectDetectionAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @instance + * @returns {Object.} JSON object + */ + ImageObjectDetectionAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return BatchPredictOperationMetadata; + return ImageObjectDetectionAnnotation; })(); - v1.ExportModelOperationMetadata = (function() { + v1.BoundingBoxMetricsEntry = (function() { /** - * Properties of an ExportModelOperationMetadata. + * Properties of a BoundingBoxMetricsEntry. * @memberof google.cloud.automl.v1 - * @interface IExportModelOperationMetadata - * @property {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null} [outputInfo] ExportModelOperationMetadata outputInfo + * @interface IBoundingBoxMetricsEntry + * @property {number|null} [iouThreshold] BoundingBoxMetricsEntry iouThreshold + * @property {number|null} [meanAveragePrecision] BoundingBoxMetricsEntry meanAveragePrecision + * @property {Array.|null} [confidenceMetricsEntries] BoundingBoxMetricsEntry confidenceMetricsEntries */ /** - * Constructs a new ExportModelOperationMetadata. + * Constructs a new BoundingBoxMetricsEntry. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ExportModelOperationMetadata. - * @implements IExportModelOperationMetadata + * @classdesc Represents a BoundingBoxMetricsEntry. + * @implements IBoundingBoxMetricsEntry * @constructor - * @param {google.cloud.automl.v1.IExportModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry=} [properties] Properties to set */ - function ExportModelOperationMetadata(properties) { + function BoundingBoxMetricsEntry(properties) { + this.confidenceMetricsEntries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2478,75 +2273,104 @@ } /** - * ExportModelOperationMetadata outputInfo. - * @member {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null|undefined} outputInfo - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * BoundingBoxMetricsEntry iouThreshold. + * @member {number} iouThreshold + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @instance */ - ExportModelOperationMetadata.prototype.outputInfo = null; + BoundingBoxMetricsEntry.prototype.iouThreshold = 0; /** - * Creates a new ExportModelOperationMetadata instance using the specified properties. + * BoundingBoxMetricsEntry meanAveragePrecision. + * @member {number} meanAveragePrecision + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @instance + */ + BoundingBoxMetricsEntry.prototype.meanAveragePrecision = 0; + + /** + * BoundingBoxMetricsEntry confidenceMetricsEntries. + * @member {Array.} confidenceMetricsEntries + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @instance + */ + BoundingBoxMetricsEntry.prototype.confidenceMetricsEntries = $util.emptyArray; + + /** + * Creates a new BoundingBoxMetricsEntry instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1.IExportModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata instance + * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry instance */ - ExportModelOperationMetadata.create = function create(properties) { - return new ExportModelOperationMetadata(properties); + BoundingBoxMetricsEntry.create = function create(properties) { + return new BoundingBoxMetricsEntry(properties); }; /** - * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. + * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelOperationMetadata.encode = function encode(message, writer) { + BoundingBoxMetricsEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.iouThreshold); + if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.meanAveragePrecision); + if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) + $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. + * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + BoundingBoxMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelOperationMetadata.decode = function decode(reader, length) { + BoundingBoxMetricsEntry.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.automl.v1.ExportModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.BoundingBoxMetricsEntry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.iouThreshold = reader.float(); + break; case 2: - message.outputInfo = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.decode(reader, reader.uint32()); + message.meanAveragePrecision = reader.float(); + break; + case 3: + if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) + message.confidenceMetricsEntries = []; + message.confidenceMetricsEntries.push($root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -2557,109 +2381,142 @@ }; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + BoundingBoxMetricsEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportModelOperationMetadata message. + * Verifies a BoundingBoxMetricsEntry message. * @function verify - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportModelOperationMetadata.verify = function verify(message) { + BoundingBoxMetricsEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { - var error = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify(message.outputInfo); - if (error) - return "outputInfo." + error; + if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) + if (typeof message.iouThreshold !== "number") + return "iouThreshold: number expected"; + if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) + if (typeof message.meanAveragePrecision !== "number") + return "meanAveragePrecision: number expected"; + if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { + if (!Array.isArray(message.confidenceMetricsEntries)) + return "confidenceMetricsEntries: array expected"; + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { + var error = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); + if (error) + return "confidenceMetricsEntries." + error; + } } return null; }; /** - * Creates an ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry */ - ExportModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ExportModelOperationMetadata) + BoundingBoxMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BoundingBoxMetricsEntry) return object; - var message = new $root.google.cloud.automl.v1.ExportModelOperationMetadata(); - if (object.outputInfo != null) { - if (typeof object.outputInfo !== "object") - throw TypeError(".google.cloud.automl.v1.ExportModelOperationMetadata.outputInfo: object expected"); - message.outputInfo = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.fromObject(object.outputInfo); + var message = new $root.google.cloud.automl.v1.BoundingBoxMetricsEntry(); + if (object.iouThreshold != null) + message.iouThreshold = Number(object.iouThreshold); + if (object.meanAveragePrecision != null) + message.meanAveragePrecision = Number(object.meanAveragePrecision); + if (object.confidenceMetricsEntries) { + if (!Array.isArray(object.confidenceMetricsEntries)) + throw TypeError(".google.cloud.automl.v1.BoundingBoxMetricsEntry.confidenceMetricsEntries: array expected"); + message.confidenceMetricsEntries = []; + for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { + if (typeof object.confidenceMetricsEntries[i] !== "object") + throw TypeError(".google.cloud.automl.v1.BoundingBoxMetricsEntry.confidenceMetricsEntries: object expected"); + message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); + } } return message; }; /** - * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1.ExportModelOperationMetadata} message ExportModelOperationMetadata + * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry} message BoundingBoxMetricsEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportModelOperationMetadata.toObject = function toObject(message, options) { + BoundingBoxMetricsEntry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.outputInfo = null; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - object.outputInfo = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.toObject(message.outputInfo, options); + if (options.arrays || options.defaults) + object.confidenceMetricsEntries = []; + if (options.defaults) { + object.iouThreshold = 0; + object.meanAveragePrecision = 0; + } + if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) + object.iouThreshold = options.json && !isFinite(message.iouThreshold) ? String(message.iouThreshold) : message.iouThreshold; + if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) + object.meanAveragePrecision = options.json && !isFinite(message.meanAveragePrecision) ? String(message.meanAveragePrecision) : message.meanAveragePrecision; + if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { + object.confidenceMetricsEntries = []; + for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) + object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); + } return object; }; /** - * Converts this ExportModelOperationMetadata to JSON. + * Converts this BoundingBoxMetricsEntry to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry * @instance * @returns {Object.} JSON object */ - ExportModelOperationMetadata.prototype.toJSON = function toJSON() { + BoundingBoxMetricsEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ExportModelOperationMetadata.ExportModelOutputInfo = (function() { + BoundingBoxMetricsEntry.ConfidenceMetricsEntry = (function() { /** - * Properties of an ExportModelOutputInfo. - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata - * @interface IExportModelOutputInfo - * @property {string|null} [gcsOutputDirectory] ExportModelOutputInfo gcsOutputDirectory + * Properties of a ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @interface IConfidenceMetricsEntry + * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold + * @property {number|null} [recall] ConfidenceMetricsEntry recall + * @property {number|null} [precision] ConfidenceMetricsEntry precision + * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score */ /** - * Constructs a new ExportModelOutputInfo. - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata - * @classdesc Represents an ExportModelOutputInfo. - * @implements IExportModelOutputInfo + * Constructs a new ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @classdesc Represents a ConfidenceMetricsEntry. + * @implements IConfidenceMetricsEntry * @constructor - * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set + * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set */ - function ExportModelOutputInfo(properties) { + function ConfidenceMetricsEntry(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2667,75 +2524,114 @@ } /** - * ExportModelOutputInfo gcsOutputDirectory. - * @member {string} gcsOutputDirectory - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * ConfidenceMetricsEntry confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @instance */ - ExportModelOutputInfo.prototype.gcsOutputDirectory = ""; + ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; /** - * Creates a new ExportModelOutputInfo instance using the specified properties. + * ConfidenceMetricsEntry recall. + * @member {number} recall + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.recall = 0; + + /** + * ConfidenceMetricsEntry precision. + * @member {number} precision + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precision = 0; + + /** + * ConfidenceMetricsEntry f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1Score = 0; + + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo instance + * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance */ - ExportModelOutputInfo.create = function create(properties) { - return new ExportModelOutputInfo(properties); + ConfidenceMetricsEntry.create = function create(properties) { + return new ConfidenceMetricsEntry(properties); }; /** - * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode + * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelOutputInfo.encode = function encode(message, writer) { + ConfidenceMetricsEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); return writer; }; /** - * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode + * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { + ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelOutputInfo.decode = function decode(reader, length) { + ConfidenceMetricsEntry.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.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsOutputDirectory = reader.string(); + message.confidenceThreshold = reader.float(); + break; + case 2: + message.recall = reader.float(); + break; + case 3: + message.precision = reader.float(); + break; + case 4: + message.f1Score = reader.float(); break; default: reader.skipType(tag & 7); @@ -2746,123 +2642,138 @@ }; /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelOutputInfo.decodeDelimited = function decodeDelimited(reader) { + ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportModelOutputInfo message. + * Verifies a ConfidenceMetricsEntry message. * @function verify - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportModelOutputInfo.verify = function verify(message) { + ConfidenceMetricsEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - if (!$util.isString(message.gcsOutputDirectory)) - return "gcsOutputDirectory: string expected"; + return "object expected"; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; return null; }; /** - * Creates an ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry */ - ExportModelOutputInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo) + ConfidenceMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) return object; - var message = new $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo(); - if (object.gcsOutputDirectory != null) - message.gcsOutputDirectory = String(object.gcsOutputDirectory); + var message = new $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.recall != null) + message.recall = Number(object.recall); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); return message; }; /** - * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} message ExportModelOutputInfo + * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} message ConfidenceMetricsEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportModelOutputInfo.toObject = function toObject(message, options) { + ConfidenceMetricsEntry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.gcsOutputDirectory = ""; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - object.gcsOutputDirectory = message.gcsOutputDirectory; + if (options.defaults) { + object.confidenceThreshold = 0; + object.recall = 0; + object.precision = 0; + object.f1Score = 0; + } + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; return object; }; /** - * Converts this ExportModelOutputInfo to JSON. + * Converts this ConfidenceMetricsEntry to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry * @instance * @returns {Object.} JSON object */ - ExportModelOutputInfo.prototype.toJSON = function toJSON() { + ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportModelOutputInfo; + return ConfidenceMetricsEntry; })(); - return ExportModelOperationMetadata; + return BoundingBoxMetricsEntry; })(); - v1.Dataset = (function() { + v1.ImageObjectDetectionEvaluationMetrics = (function() { /** - * Properties of a Dataset. + * Properties of an ImageObjectDetectionEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @interface IDataset - * @property {google.cloud.automl.v1.ITranslationDatasetMetadata|null} [translationDatasetMetadata] Dataset translationDatasetMetadata - * @property {google.cloud.automl.v1.IImageClassificationDatasetMetadata|null} [imageClassificationDatasetMetadata] Dataset imageClassificationDatasetMetadata - * @property {google.cloud.automl.v1.ITextClassificationDatasetMetadata|null} [textClassificationDatasetMetadata] Dataset textClassificationDatasetMetadata - * @property {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null} [imageObjectDetectionDatasetMetadata] Dataset imageObjectDetectionDatasetMetadata - * @property {google.cloud.automl.v1.ITextExtractionDatasetMetadata|null} [textExtractionDatasetMetadata] Dataset textExtractionDatasetMetadata - * @property {google.cloud.automl.v1.ITextSentimentDatasetMetadata|null} [textSentimentDatasetMetadata] Dataset textSentimentDatasetMetadata - * @property {string|null} [name] Dataset name - * @property {string|null} [displayName] Dataset displayName - * @property {string|null} [description] Dataset description - * @property {number|null} [exampleCount] Dataset exampleCount - * @property {google.protobuf.ITimestamp|null} [createTime] Dataset createTime - * @property {string|null} [etag] Dataset etag - * @property {Object.|null} [labels] Dataset labels + * @interface IImageObjectDetectionEvaluationMetrics + * @property {number|null} [evaluatedBoundingBoxCount] ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount + * @property {Array.|null} [boundingBoxMetricsEntries] ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries + * @property {number|null} [boundingBoxMeanAveragePrecision] ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision */ /** - * Constructs a new Dataset. + * Constructs a new ImageObjectDetectionEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @classdesc Represents a Dataset. - * @implements IDataset + * @classdesc Represents an ImageObjectDetectionEvaluationMetrics. + * @implements IImageObjectDetectionEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1.IDataset=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set */ - function Dataset(properties) { - this.labels = {}; + function ImageObjectDetectionEvaluationMetrics(properties) { + this.boundingBoxMetricsEntries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2870,251 +2781,104 @@ } /** - * Dataset translationDatasetMetadata. - * @member {google.cloud.automl.v1.ITranslationDatasetMetadata|null|undefined} translationDatasetMetadata - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.translationDatasetMetadata = null; - - /** - * Dataset imageClassificationDatasetMetadata. - * @member {google.cloud.automl.v1.IImageClassificationDatasetMetadata|null|undefined} imageClassificationDatasetMetadata - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.imageClassificationDatasetMetadata = null; - - /** - * Dataset textClassificationDatasetMetadata. - * @member {google.cloud.automl.v1.ITextClassificationDatasetMetadata|null|undefined} textClassificationDatasetMetadata - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.textClassificationDatasetMetadata = null; - - /** - * Dataset imageObjectDetectionDatasetMetadata. - * @member {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null|undefined} imageObjectDetectionDatasetMetadata - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.imageObjectDetectionDatasetMetadata = null; - - /** - * Dataset textExtractionDatasetMetadata. - * @member {google.cloud.automl.v1.ITextExtractionDatasetMetadata|null|undefined} textExtractionDatasetMetadata - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.textExtractionDatasetMetadata = null; - - /** - * Dataset textSentimentDatasetMetadata. - * @member {google.cloud.automl.v1.ITextSentimentDatasetMetadata|null|undefined} textSentimentDatasetMetadata - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.textSentimentDatasetMetadata = null; - - /** - * Dataset name. - * @member {string} name - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.name = ""; - - /** - * Dataset displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.displayName = ""; - - /** - * Dataset description. - * @member {string} description - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.description = ""; - - /** - * Dataset exampleCount. - * @member {number} exampleCount - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.exampleCount = 0; - - /** - * Dataset createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.automl.v1.Dataset - * @instance - */ - Dataset.prototype.createTime = null; - - /** - * Dataset etag. - * @member {string} etag - * @memberof google.cloud.automl.v1.Dataset + * ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. + * @member {number} evaluatedBoundingBoxCount + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @instance */ - Dataset.prototype.etag = ""; + ImageObjectDetectionEvaluationMetrics.prototype.evaluatedBoundingBoxCount = 0; /** - * Dataset labels. - * @member {Object.} labels - * @memberof google.cloud.automl.v1.Dataset + * ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. + * @member {Array.} boundingBoxMetricsEntries + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @instance */ - Dataset.prototype.labels = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMetricsEntries = $util.emptyArray; /** - * Dataset datasetMetadata. - * @member {"translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"|undefined} datasetMetadata - * @memberof google.cloud.automl.v1.Dataset + * ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. + * @member {number} boundingBoxMeanAveragePrecision + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @instance */ - Object.defineProperty(Dataset.prototype, "datasetMetadata", { - get: $util.oneOfGetter($oneOfFields = ["translationDatasetMetadata", "imageClassificationDatasetMetadata", "textClassificationDatasetMetadata", "imageObjectDetectionDatasetMetadata", "textExtractionDatasetMetadata", "textSentimentDatasetMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMeanAveragePrecision = 0; /** - * Creates a new Dataset instance using the specified properties. + * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IDataset=} [properties] Properties to set - * @returns {google.cloud.automl.v1.Dataset} Dataset instance + * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics instance */ - Dataset.create = function create(properties) { - return new Dataset(properties); + ImageObjectDetectionEvaluationMetrics.create = function create(properties) { + return new ImageObjectDetectionEvaluationMetrics(properties); }; /** - * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. + * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IDataset} message Dataset message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dataset.encode = function encode(message, writer) { + ImageObjectDetectionEvaluationMetrics.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.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.etag != null && message.hasOwnProperty("etag")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.etag); - if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.exampleCount); - if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) - $root.google.cloud.automl.v1.TranslationDatasetMetadata.encode(message.translationDatasetMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) - $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.encode(message.imageClassificationDatasetMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) - $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.encode(message.textClassificationDatasetMetadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) - $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.encode(message.imageObjectDetectionDatasetMetadata, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) - $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.encode(message.textExtractionDatasetMetadata, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) - $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.encode(message.textSentimentDatasetMetadata, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 39, wireType 2 =*/314).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.evaluatedBoundingBoxCount); + if (message.boundingBoxMetricsEntries != null && message.boundingBoxMetricsEntries.length) + for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) + $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.encode(message.boundingBoxMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.boundingBoxMeanAveragePrecision); return writer; }; /** - * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. + * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IDataset} message Dataset message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dataset.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Dataset message from the specified reader or buffer. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.Dataset} Dataset + * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dataset.decode = function decode(reader, length) { + ImageObjectDetectionEvaluationMetrics.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.automl.v1.Dataset(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 23: - message.translationDatasetMetadata = $root.google.cloud.automl.v1.TranslationDatasetMetadata.decode(reader, reader.uint32()); - break; - case 24: - message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.decode(reader, reader.uint32()); - break; - case 25: - message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.decode(reader, reader.uint32()); - break; - case 26: - message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.decode(reader, reader.uint32()); - break; - case 28: - message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.decode(reader, reader.uint32()); - break; - case 30: - message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.decode(reader, reader.uint32()); - break; case 1: - message.name = reader.string(); + message.evaluatedBoundingBoxCount = reader.int32(); break; case 2: - message.displayName = reader.string(); + if (!(message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length)) + message.boundingBoxMetricsEntries = []; + message.boundingBoxMetricsEntries.push($root.google.cloud.automl.v1.BoundingBoxMetricsEntry.decode(reader, reader.uint32())); break; case 3: - message.description = reader.string(); - break; - case 21: - message.exampleCount = reader.int32(); - break; - case 14: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 17: - message.etag = reader.string(); - break; - case 39: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + message.boundingBoxMeanAveragePrecision = reader.float(); break; default: reader.skipType(tag & 7); @@ -3125,295 +2889,143 @@ }; /** - * Decodes a Dataset message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.Dataset} Dataset + * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dataset.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Dataset message. + * Verifies an ImageObjectDetectionEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Dataset.verify = function verify(message) { + ImageObjectDetectionEvaluationMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TranslationDatasetMetadata.verify(message.translationDatasetMetadata); - if (error) - return "translationDatasetMetadata." + error; - } - } - if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify(message.imageClassificationDatasetMetadata); - if (error) - return "imageClassificationDatasetMetadata." + error; - } - } - if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.verify(message.textClassificationDatasetMetadata); - if (error) - return "textClassificationDatasetMetadata." + error; - } - } - if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify(message.imageObjectDetectionDatasetMetadata); - if (error) - return "imageObjectDetectionDatasetMetadata." + error; - } - } - if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.verify(message.textExtractionDatasetMetadata); - if (error) - return "textExtractionDatasetMetadata." + error; - } - } - if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.verify(message.textSentimentDatasetMetadata); + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + if (!$util.isInteger(message.evaluatedBoundingBoxCount)) + return "evaluatedBoundingBoxCount: integer expected"; + if (message.boundingBoxMetricsEntries != null && message.hasOwnProperty("boundingBoxMetricsEntries")) { + if (!Array.isArray(message.boundingBoxMetricsEntries)) + return "boundingBoxMetricsEntries: array expected"; + for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) { + var error = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.verify(message.boundingBoxMetricsEntries[i]); if (error) - return "textSentimentDatasetMetadata." + error; + return "boundingBoxMetricsEntries." + error; } } - 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.exampleCount != null && message.hasOwnProperty("exampleCount")) - if (!$util.isInteger(message.exampleCount)) - return "exampleCount: integer expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + if (typeof message.boundingBoxMeanAveragePrecision !== "number") + return "boundingBoxMeanAveragePrecision: number expected"; return null; }; /** - * Creates a Dataset message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.Dataset} Dataset + * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics */ - Dataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.Dataset) + ImageObjectDetectionEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1.Dataset(); - if (object.translationDatasetMetadata != null) { - if (typeof object.translationDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.translationDatasetMetadata: object expected"); - message.translationDatasetMetadata = $root.google.cloud.automl.v1.TranslationDatasetMetadata.fromObject(object.translationDatasetMetadata); - } - if (object.imageClassificationDatasetMetadata != null) { - if (typeof object.imageClassificationDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.imageClassificationDatasetMetadata: object expected"); - message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.fromObject(object.imageClassificationDatasetMetadata); - } - if (object.textClassificationDatasetMetadata != null) { - if (typeof object.textClassificationDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.textClassificationDatasetMetadata: object expected"); - message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.fromObject(object.textClassificationDatasetMetadata); - } - if (object.imageObjectDetectionDatasetMetadata != null) { - if (typeof object.imageObjectDetectionDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.imageObjectDetectionDatasetMetadata: object expected"); - message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.fromObject(object.imageObjectDetectionDatasetMetadata); - } - if (object.textExtractionDatasetMetadata != null) { - if (typeof object.textExtractionDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.textExtractionDatasetMetadata: object expected"); - message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.fromObject(object.textExtractionDatasetMetadata); - } - if (object.textSentimentDatasetMetadata != null) { - if (typeof object.textSentimentDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.textSentimentDatasetMetadata: object expected"); - message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.fromObject(object.textSentimentDatasetMetadata); - } - 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.exampleCount != null) - message.exampleCount = object.exampleCount | 0; - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.automl.v1.Dataset.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics(); + if (object.evaluatedBoundingBoxCount != null) + message.evaluatedBoundingBoxCount = object.evaluatedBoundingBoxCount | 0; + if (object.boundingBoxMetricsEntries) { + if (!Array.isArray(object.boundingBoxMetricsEntries)) + throw TypeError(".google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: array expected"); + message.boundingBoxMetricsEntries = []; + for (var i = 0; i < object.boundingBoxMetricsEntries.length; ++i) { + if (typeof object.boundingBoxMetricsEntries[i] !== "object") + throw TypeError(".google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: object expected"); + message.boundingBoxMetricsEntries[i] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.fromObject(object.boundingBoxMetricsEntries[i]); + } } + if (object.boundingBoxMeanAveragePrecision != null) + message.boundingBoxMeanAveragePrecision = Number(object.boundingBoxMeanAveragePrecision); return message; }; /** - * Creates a plain object from a Dataset message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.Dataset} message Dataset + * @param {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Dataset.toObject = function toObject(message, options) { + ImageObjectDetectionEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; + if (options.arrays || options.defaults) + object.boundingBoxMetricsEntries = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.createTime = null; - object.etag = ""; - object.exampleCount = 0; - } - 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.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) - object.exampleCount = message.exampleCount; - if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { - object.translationDatasetMetadata = $root.google.cloud.automl.v1.TranslationDatasetMetadata.toObject(message.translationDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "translationDatasetMetadata"; - } - if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { - object.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.toObject(message.imageClassificationDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "imageClassificationDatasetMetadata"; - } - if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { - object.textClassificationDatasetMetadata = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.toObject(message.textClassificationDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "textClassificationDatasetMetadata"; - } - if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { - object.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.toObject(message.imageObjectDetectionDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "imageObjectDetectionDatasetMetadata"; - } - if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { - object.textExtractionDatasetMetadata = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.toObject(message.textExtractionDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "textExtractionDatasetMetadata"; - } - if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { - object.textSentimentDatasetMetadata = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.toObject(message.textSentimentDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "textSentimentDatasetMetadata"; + object.evaluatedBoundingBoxCount = 0; + object.boundingBoxMeanAveragePrecision = 0; } - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + object.evaluatedBoundingBoxCount = message.evaluatedBoundingBoxCount; + if (message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length) { + object.boundingBoxMetricsEntries = []; + for (var j = 0; j < message.boundingBoxMetricsEntries.length; ++j) + object.boundingBoxMetricsEntries[j] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.toObject(message.boundingBoxMetricsEntries[j], options); } + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + object.boundingBoxMeanAveragePrecision = options.json && !isFinite(message.boundingBoxMeanAveragePrecision) ? String(message.boundingBoxMeanAveragePrecision) : message.boundingBoxMeanAveragePrecision; return object; }; /** - * Converts this Dataset to JSON. + * Converts this ImageObjectDetectionEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.Dataset + * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics * @instance * @returns {Object.} JSON object */ - Dataset.prototype.toJSON = function toJSON() { + ImageObjectDetectionEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Dataset; + return ImageObjectDetectionEvaluationMetrics; })(); - v1.ImageClassificationDatasetMetadata = (function() { + v1.NormalizedVertex = (function() { /** - * Properties of an ImageClassificationDatasetMetadata. + * Properties of a NormalizedVertex. * @memberof google.cloud.automl.v1 - * @interface IImageClassificationDatasetMetadata - * @property {google.cloud.automl.v1.ClassificationType|null} [classificationType] ImageClassificationDatasetMetadata classificationType + * @interface INormalizedVertex + * @property {number|null} [x] NormalizedVertex x + * @property {number|null} [y] NormalizedVertex y */ /** - * Constructs a new ImageClassificationDatasetMetadata. + * Constructs a new NormalizedVertex. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageClassificationDatasetMetadata. - * @implements IImageClassificationDatasetMetadata + * @classdesc Represents a NormalizedVertex. + * @implements INormalizedVertex * @constructor - * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.INormalizedVertex=} [properties] Properties to set */ - function ImageClassificationDatasetMetadata(properties) { + function NormalizedVertex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3421,75 +3033,88 @@ } /** - * ImageClassificationDatasetMetadata classificationType. - * @member {google.cloud.automl.v1.ClassificationType} classificationType - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * NormalizedVertex x. + * @member {number} x + * @memberof google.cloud.automl.v1.NormalizedVertex * @instance */ - ImageClassificationDatasetMetadata.prototype.classificationType = 0; + NormalizedVertex.prototype.x = 0; /** - * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. + * NormalizedVertex y. + * @member {number} y + * @memberof google.cloud.automl.v1.NormalizedVertex + * @instance + */ + NormalizedVertex.prototype.y = 0; + + /** + * Creates a new NormalizedVertex instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static - * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata instance + * @param {google.cloud.automl.v1.INormalizedVertex=} [properties] Properties to set + * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex instance */ - ImageClassificationDatasetMetadata.create = function create(properties) { - return new ImageClassificationDatasetMetadata(properties); + NormalizedVertex.create = function create(properties) { + return new NormalizedVertex(properties); }; /** - * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static - * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.INormalizedVertex} message NormalizedVertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationDatasetMetadata.encode = function encode(message, writer) { + NormalizedVertex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); + if (message.x != null && message.hasOwnProperty("x")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); + if (message.y != null && message.hasOwnProperty("y")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); return writer; }; /** - * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static - * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.INormalizedVertex} message NormalizedVertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes a NormalizedVertex message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata + * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationDatasetMetadata.decode = function decode(reader, length) { + NormalizedVertex.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.automl.v1.ImageClassificationDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.NormalizedVertex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.classificationType = reader.int32(); + message.x = reader.float(); + break; + case 2: + message.y = reader.float(); break; default: reader.skipType(tag & 7); @@ -3500,124 +3125,117 @@ }; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata + * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + NormalizedVertex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageClassificationDatasetMetadata message. + * Verifies a NormalizedVertex message. * @function verify - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageClassificationDatasetMetadata.verify = function verify(message) { + NormalizedVertex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - switch (message.classificationType) { - default: - return "classificationType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.x != null && message.hasOwnProperty("x")) + if (typeof message.x !== "number") + return "x: number expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (typeof message.y !== "number") + return "y: number expected"; return null; }; /** - * Creates an ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata + * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex */ - ImageClassificationDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata) + NormalizedVertex.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.NormalizedVertex) return object; - var message = new $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata(); - switch (object.classificationType) { - case "CLASSIFICATION_TYPE_UNSPECIFIED": - case 0: - message.classificationType = 0; - break; - case "MULTICLASS": - case 1: - message.classificationType = 1; - break; - case "MULTILABEL": - case 2: - message.classificationType = 2; - break; - } + var message = new $root.google.cloud.automl.v1.NormalizedVertex(); + if (object.x != null) + message.x = Number(object.x); + if (object.y != null) + message.y = Number(object.y); return message; }; /** - * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @static - * @param {google.cloud.automl.v1.ImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata + * @param {google.cloud.automl.v1.NormalizedVertex} message NormalizedVertex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageClassificationDatasetMetadata.toObject = function toObject(message, options) { + NormalizedVertex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; + if (options.defaults) { + object.x = 0; + object.y = 0; + } + if (message.x != null && message.hasOwnProperty("x")) + object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; return object; }; /** - * Converts this ImageClassificationDatasetMetadata to JSON. + * Converts this NormalizedVertex to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.NormalizedVertex * @instance * @returns {Object.} JSON object */ - ImageClassificationDatasetMetadata.prototype.toJSON = function toJSON() { + NormalizedVertex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageClassificationDatasetMetadata; + return NormalizedVertex; })(); - v1.ImageObjectDetectionDatasetMetadata = (function() { + v1.BoundingPoly = (function() { /** - * Properties of an ImageObjectDetectionDatasetMetadata. + * Properties of a BoundingPoly. * @memberof google.cloud.automl.v1 - * @interface IImageObjectDetectionDatasetMetadata + * @interface IBoundingPoly + * @property {Array.|null} [normalizedVertices] BoundingPoly normalizedVertices */ /** - * Constructs a new ImageObjectDetectionDatasetMetadata. + * Constructs a new BoundingPoly. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageObjectDetectionDatasetMetadata. - * @implements IImageObjectDetectionDatasetMetadata + * @classdesc Represents a BoundingPoly. + * @implements IBoundingPoly * @constructor - * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IBoundingPoly=} [properties] Properties to set */ - function ImageObjectDetectionDatasetMetadata(properties) { + function BoundingPoly(properties) { + this.normalizedVertices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3625,63 +3243,79 @@ } /** - * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. + * BoundingPoly normalizedVertices. + * @member {Array.} normalizedVertices + * @memberof google.cloud.automl.v1.BoundingPoly + * @instance + */ + BoundingPoly.prototype.normalizedVertices = $util.emptyArray; + + /** + * Creates a new BoundingPoly instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata instance + * @param {google.cloud.automl.v1.IBoundingPoly=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly instance */ - ImageObjectDetectionDatasetMetadata.create = function create(properties) { - return new ImageObjectDetectionDatasetMetadata(properties); + BoundingPoly.create = function create(properties) { + return new BoundingPoly(properties); }; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IBoundingPoly} message BoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionDatasetMetadata.encode = function encode(message, writer) { + BoundingPoly.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.normalizedVertices != null && message.normalizedVertices.length) + for (var i = 0; i < message.normalizedVertices.length; ++i) + $root.google.cloud.automl.v1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IBoundingPoly} message BoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. + * Decodes a BoundingPoly message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata + * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionDatasetMetadata.decode = function decode(reader, length) { + BoundingPoly.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.automl.v1.ImageObjectDetectionDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.BoundingPoly(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: + if (!(message.normalizedVertices && message.normalizedVertices.length)) + message.normalizedVertices = []; + message.normalizedVertices.push($root.google.cloud.automl.v1.NormalizedVertex.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -3691,100 +3325,125 @@ }; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata + * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + BoundingPoly.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageObjectDetectionDatasetMetadata message. + * Verifies a BoundingPoly message. * @function verify - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageObjectDetectionDatasetMetadata.verify = function verify(message) { + BoundingPoly.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { + if (!Array.isArray(message.normalizedVertices)) + return "normalizedVertices: array expected"; + for (var i = 0; i < message.normalizedVertices.length; ++i) { + var error = $root.google.cloud.automl.v1.NormalizedVertex.verify(message.normalizedVertices[i]); + if (error) + return "normalizedVertices." + error; + } + } return null; }; /** - * Creates an ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata + * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly */ - ImageObjectDetectionDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata) + BoundingPoly.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BoundingPoly) return object; - return new $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata(); + var message = new $root.google.cloud.automl.v1.BoundingPoly(); + if (object.normalizedVertices) { + if (!Array.isArray(object.normalizedVertices)) + throw TypeError(".google.cloud.automl.v1.BoundingPoly.normalizedVertices: array expected"); + message.normalizedVertices = []; + for (var i = 0; i < object.normalizedVertices.length; ++i) { + if (typeof object.normalizedVertices[i] !== "object") + throw TypeError(".google.cloud.automl.v1.BoundingPoly.normalizedVertices: object expected"); + message.normalizedVertices[i] = $root.google.cloud.automl.v1.NormalizedVertex.fromObject(object.normalizedVertices[i]); + } + } + return message; }; /** - * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @static - * @param {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata + * @param {google.cloud.automl.v1.BoundingPoly} message BoundingPoly * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageObjectDetectionDatasetMetadata.toObject = function toObject() { - return {}; + BoundingPoly.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.normalizedVertices = []; + if (message.normalizedVertices && message.normalizedVertices.length) { + object.normalizedVertices = []; + for (var j = 0; j < message.normalizedVertices.length; ++j) + object.normalizedVertices[j] = $root.google.cloud.automl.v1.NormalizedVertex.toObject(message.normalizedVertices[j], options); + } + return object; }; /** - * Converts this ImageObjectDetectionDatasetMetadata to JSON. + * Converts this BoundingPoly to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.BoundingPoly * @instance * @returns {Object.} JSON object */ - ImageObjectDetectionDatasetMetadata.prototype.toJSON = function toJSON() { + BoundingPoly.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageObjectDetectionDatasetMetadata; + return BoundingPoly; })(); - v1.ImageClassificationModelMetadata = (function() { + v1.TextExtractionAnnotation = (function() { /** - * Properties of an ImageClassificationModelMetadata. + * Properties of a TextExtractionAnnotation. * @memberof google.cloud.automl.v1 - * @interface IImageClassificationModelMetadata - * @property {string|null} [baseModelId] ImageClassificationModelMetadata baseModelId - * @property {number|Long|null} [trainBudgetMilliNodeHours] ImageClassificationModelMetadata trainBudgetMilliNodeHours - * @property {number|Long|null} [trainCostMilliNodeHours] ImageClassificationModelMetadata trainCostMilliNodeHours - * @property {string|null} [stopReason] ImageClassificationModelMetadata stopReason - * @property {string|null} [modelType] ImageClassificationModelMetadata modelType - * @property {number|null} [nodeQps] ImageClassificationModelMetadata nodeQps - * @property {number|Long|null} [nodeCount] ImageClassificationModelMetadata nodeCount + * @interface ITextExtractionAnnotation + * @property {google.cloud.automl.v1.ITextSegment|null} [textSegment] TextExtractionAnnotation textSegment + * @property {number|null} [score] TextExtractionAnnotation score */ /** - * Constructs a new ImageClassificationModelMetadata. + * Constructs a new TextExtractionAnnotation. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageClassificationModelMetadata. - * @implements IImageClassificationModelMetadata + * @classdesc Represents a TextExtractionAnnotation. + * @implements ITextExtractionAnnotation * @constructor - * @param {google.cloud.automl.v1.IImageClassificationModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextExtractionAnnotation=} [properties] Properties to set */ - function ImageClassificationModelMetadata(properties) { + function TextExtractionAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3792,153 +3451,102 @@ } /** - * ImageClassificationModelMetadata baseModelId. - * @member {string} baseModelId - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata - * @instance - */ - ImageClassificationModelMetadata.prototype.baseModelId = ""; - - /** - * ImageClassificationModelMetadata trainBudgetMilliNodeHours. - * @member {number|Long} trainBudgetMilliNodeHours - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata - * @instance - */ - ImageClassificationModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImageClassificationModelMetadata trainCostMilliNodeHours. - * @member {number|Long} trainCostMilliNodeHours - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata - * @instance - */ - ImageClassificationModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImageClassificationModelMetadata stopReason. - * @member {string} stopReason - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * TextExtractionAnnotation textSegment. + * @member {google.cloud.automl.v1.ITextSegment|null|undefined} textSegment + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @instance */ - ImageClassificationModelMetadata.prototype.stopReason = ""; + TextExtractionAnnotation.prototype.textSegment = null; /** - * ImageClassificationModelMetadata modelType. - * @member {string} modelType - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * TextExtractionAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @instance */ - ImageClassificationModelMetadata.prototype.modelType = ""; + TextExtractionAnnotation.prototype.score = 0; - /** - * ImageClassificationModelMetadata nodeQps. - * @member {number} nodeQps - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata - * @instance - */ - ImageClassificationModelMetadata.prototype.nodeQps = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ImageClassificationModelMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * TextExtractionAnnotation annotation. + * @member {"textSegment"|undefined} annotation + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @instance */ - ImageClassificationModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(TextExtractionAnnotation.prototype, "annotation", { + get: $util.oneOfGetter($oneOfFields = ["textSegment"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ImageClassificationModelMetadata instance using the specified properties. + * Creates a new TextExtractionAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1.IImageClassificationModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata instance + * @param {google.cloud.automl.v1.ITextExtractionAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation instance */ - ImageClassificationModelMetadata.create = function create(properties) { - return new ImageClassificationModelMetadata(properties); + TextExtractionAnnotation.create = function create(properties) { + return new TextExtractionAnnotation(properties); }; /** - * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. + * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationModelMetadata.encode = function encode(message, writer) { + TextExtractionAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModelId); - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); - if (message.modelType != null && message.hasOwnProperty("modelType")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.modelType); - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - writer.uint32(/* id 13, wireType 1 =*/105).double(message.nodeQps); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 14, wireType 0 =*/112).int64(message.nodeCount); - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - writer.uint32(/* id 16, wireType 0 =*/128).int64(message.trainBudgetMilliNodeHours); - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - writer.uint32(/* id 17, wireType 0 =*/136).int64(message.trainCostMilliNodeHours); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.textSegment != null && message.hasOwnProperty("textSegment")) + $root.google.cloud.automl.v1.TextSegment.encode(message.textSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. + * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + TextExtractionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata + * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationModelMetadata.decode = function decode(reader, length) { + TextExtractionAnnotation.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.automl.v1.ImageClassificationModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextExtractionAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseModelId = reader.string(); - break; - case 16: - message.trainBudgetMilliNodeHours = reader.int64(); - break; - case 17: - message.trainCostMilliNodeHours = reader.int64(); - break; - case 5: - message.stopReason = reader.string(); - break; - case 7: - message.modelType = reader.string(); - break; - case 13: - message.nodeQps = reader.double(); + case 3: + message.textSegment = $root.google.cloud.automl.v1.TextSegment.decode(reader, reader.uint32()); break; - case 14: - message.nodeCount = reader.int64(); + case 1: + message.score = reader.float(); break; default: reader.skipType(tag & 7); @@ -3949,203 +3557,128 @@ }; /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata + * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { + TextExtractionAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageClassificationModelMetadata message. + * Verifies a TextExtractionAnnotation message. * @function verify - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageClassificationModelMetadata.verify = function verify(message) { + TextExtractionAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) - if (!$util.isString(message.baseModelId)) - return "baseModelId: string expected"; - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) - return "trainBudgetMilliNodeHours: integer|Long expected"; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) - return "trainCostMilliNodeHours: integer|Long expected"; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - if (!$util.isString(message.stopReason)) - return "stopReason: string expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - if (!$util.isString(message.modelType)) - return "modelType: string expected"; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - if (typeof message.nodeQps !== "number") - return "nodeQps: number expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; + var properties = {}; + if (message.textSegment != null && message.hasOwnProperty("textSegment")) { + properties.annotation = 1; + { + var error = $root.google.cloud.automl.v1.TextSegment.verify(message.textSegment); + if (error) + return "textSegment." + error; + } + } + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; return null; }; /** - * Creates an ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata + * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation */ - ImageClassificationModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageClassificationModelMetadata) + TextExtractionAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextExtractionAnnotation) return object; - var message = new $root.google.cloud.automl.v1.ImageClassificationModelMetadata(); - if (object.baseModelId != null) - message.baseModelId = String(object.baseModelId); - if (object.trainBudgetMilliNodeHours != null) - if ($util.Long) - (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; - else if (typeof object.trainBudgetMilliNodeHours === "string") - message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); - else if (typeof object.trainBudgetMilliNodeHours === "number") - message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; - else if (typeof object.trainBudgetMilliNodeHours === "object") - message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); - if (object.trainCostMilliNodeHours != null) - if ($util.Long) - (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; - else if (typeof object.trainCostMilliNodeHours === "string") - message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); - else if (typeof object.trainCostMilliNodeHours === "number") - message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; - else if (typeof object.trainCostMilliNodeHours === "object") - message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); - if (object.stopReason != null) - message.stopReason = String(object.stopReason); - if (object.modelType != null) - message.modelType = String(object.modelType); - if (object.nodeQps != null) - message.nodeQps = Number(object.nodeQps); - if (object.nodeCount != null) - if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); + var message = new $root.google.cloud.automl.v1.TextExtractionAnnotation(); + if (object.textSegment != null) { + if (typeof object.textSegment !== "object") + throw TypeError(".google.cloud.automl.v1.TextExtractionAnnotation.textSegment: object expected"); + message.textSegment = $root.google.cloud.automl.v1.TextSegment.fromObject(object.textSegment); + } + if (object.score != null) + message.score = Number(object.score); return message; }; /** - * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1.ImageClassificationModelMetadata} message ImageClassificationModelMetadata + * @param {google.cloud.automl.v1.TextExtractionAnnotation} message TextExtractionAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageClassificationModelMetadata.toObject = function toObject(message, options) { + TextExtractionAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.baseModelId = ""; - object.stopReason = ""; - object.modelType = ""; - object.nodeQps = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nodeCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; + if (options.defaults) + object.score = 0; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.textSegment != null && message.hasOwnProperty("textSegment")) { + object.textSegment = $root.google.cloud.automl.v1.TextSegment.toObject(message.textSegment, options); + if (options.oneofs) + object.annotation = "textSegment"; } - if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) - object.baseModelId = message.baseModelId; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - object.stopReason = message.stopReason; - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = message.modelType; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; - else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (typeof message.trainBudgetMilliNodeHours === "number") - object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; - else - object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (typeof message.trainCostMilliNodeHours === "number") - object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; - else - object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; return object; }; /** - * Converts this ImageClassificationModelMetadata to JSON. + * Converts this TextExtractionAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionAnnotation * @instance * @returns {Object.} JSON object */ - ImageClassificationModelMetadata.prototype.toJSON = function toJSON() { + TextExtractionAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageClassificationModelMetadata; + return TextExtractionAnnotation; })(); - v1.ImageObjectDetectionModelMetadata = (function() { + v1.TextExtractionEvaluationMetrics = (function() { /** - * Properties of an ImageObjectDetectionModelMetadata. + * Properties of a TextExtractionEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @interface IImageObjectDetectionModelMetadata - * @property {string|null} [modelType] ImageObjectDetectionModelMetadata modelType - * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelMetadata nodeCount - * @property {number|null} [nodeQps] ImageObjectDetectionModelMetadata nodeQps - * @property {string|null} [stopReason] ImageObjectDetectionModelMetadata stopReason - * @property {number|Long|null} [trainBudgetMilliNodeHours] ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours - * @property {number|Long|null} [trainCostMilliNodeHours] ImageObjectDetectionModelMetadata trainCostMilliNodeHours + * @interface ITextExtractionEvaluationMetrics + * @property {number|null} [auPrc] TextExtractionEvaluationMetrics auPrc + * @property {Array.|null} [confidenceMetricsEntries] TextExtractionEvaluationMetrics confidenceMetricsEntries */ /** - * Constructs a new ImageObjectDetectionModelMetadata. + * Constructs a new TextExtractionEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageObjectDetectionModelMetadata. - * @implements IImageObjectDetectionModelMetadata + * @classdesc Represents a TextExtractionEvaluationMetrics. + * @implements ITextExtractionEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics=} [properties] Properties to set */ - function ImageObjectDetectionModelMetadata(properties) { + function TextExtractionEvaluationMetrics(properties) { + this.confidenceMetricsEntries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4153,140 +3686,91 @@ } /** - * ImageObjectDetectionModelMetadata modelType. - * @member {string} modelType - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata - * @instance - */ - ImageObjectDetectionModelMetadata.prototype.modelType = ""; - - /** - * ImageObjectDetectionModelMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata - * @instance - */ - ImageObjectDetectionModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImageObjectDetectionModelMetadata nodeQps. - * @member {number} nodeQps - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata - * @instance - */ - ImageObjectDetectionModelMetadata.prototype.nodeQps = 0; - - /** - * ImageObjectDetectionModelMetadata stopReason. - * @member {string} stopReason - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata - * @instance - */ - ImageObjectDetectionModelMetadata.prototype.stopReason = ""; - - /** - * ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. - * @member {number|Long} trainBudgetMilliNodeHours - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * TextExtractionEvaluationMetrics auPrc. + * @member {number} auPrc + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @instance */ - ImageObjectDetectionModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TextExtractionEvaluationMetrics.prototype.auPrc = 0; /** - * ImageObjectDetectionModelMetadata trainCostMilliNodeHours. - * @member {number|Long} trainCostMilliNodeHours - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * TextExtractionEvaluationMetrics confidenceMetricsEntries. + * @member {Array.} confidenceMetricsEntries + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @instance */ - ImageObjectDetectionModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TextExtractionEvaluationMetrics.prototype.confidenceMetricsEntries = $util.emptyArray; /** - * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. + * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata instance + * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics instance */ - ImageObjectDetectionModelMetadata.create = function create(properties) { - return new ImageObjectDetectionModelMetadata(properties); + TextExtractionEvaluationMetrics.create = function create(properties) { + return new TextExtractionEvaluationMetrics(properties); }; /** - * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. + * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionModelMetadata.encode = function encode(message, writer) { + TextExtractionEvaluationMetrics.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.modelType != null && message.hasOwnProperty("modelType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.modelType); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.nodeCount); - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.nodeQps); - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.trainBudgetMilliNodeHours); - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.trainCostMilliNodeHours); + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); + if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) + $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. + * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + TextExtractionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionModelMetadata.decode = function decode(reader, length) { + TextExtractionEvaluationMetrics.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.automl.v1.ImageObjectDetectionModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.modelType = reader.string(); - break; - case 3: - message.nodeCount = reader.int64(); - break; - case 4: - message.nodeQps = reader.double(); - break; - case 5: - message.stopReason = reader.string(); - break; - case 6: - message.trainBudgetMilliNodeHours = reader.int64(); + message.auPrc = reader.float(); break; - case 7: - message.trainCostMilliNodeHours = reader.int64(); + case 2: + if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) + message.confidenceMetricsEntries = []; + message.confidenceMetricsEntries.push($root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4297,190 +3781,389 @@ }; /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionModelMetadata.decodeDelimited = function decodeDelimited(reader) { + TextExtractionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageObjectDetectionModelMetadata message. + * Verifies a TextExtractionEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageObjectDetectionModelMetadata.verify = function verify(message) { + TextExtractionEvaluationMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - if (!$util.isString(message.modelType)) - return "modelType: string expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - if (typeof message.nodeQps !== "number") - return "nodeQps: number expected"; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - if (!$util.isString(message.stopReason)) - return "stopReason: string expected"; - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) - return "trainBudgetMilliNodeHours: integer|Long expected"; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) - return "trainCostMilliNodeHours: integer|Long expected"; + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + if (typeof message.auPrc !== "number") + return "auPrc: number expected"; + if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { + if (!Array.isArray(message.confidenceMetricsEntries)) + return "confidenceMetricsEntries: array expected"; + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { + var error = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); + if (error) + return "confidenceMetricsEntries." + error; + } + } return null; }; /** - * Creates an ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics */ - ImageObjectDetectionModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata) + TextExtractionEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata(); - if (object.modelType != null) - message.modelType = String(object.modelType); - if (object.nodeCount != null) - if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); - if (object.nodeQps != null) - message.nodeQps = Number(object.nodeQps); - if (object.stopReason != null) - message.stopReason = String(object.stopReason); - if (object.trainBudgetMilliNodeHours != null) - if ($util.Long) - (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; - else if (typeof object.trainBudgetMilliNodeHours === "string") - message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); - else if (typeof object.trainBudgetMilliNodeHours === "number") - message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; - else if (typeof object.trainBudgetMilliNodeHours === "object") - message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); - if (object.trainCostMilliNodeHours != null) - if ($util.Long) - (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; - else if (typeof object.trainCostMilliNodeHours === "string") - message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); - else if (typeof object.trainCostMilliNodeHours === "number") - message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; - else if (typeof object.trainCostMilliNodeHours === "object") - message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); + var message = new $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics(); + if (object.auPrc != null) + message.auPrc = Number(object.auPrc); + if (object.confidenceMetricsEntries) { + if (!Array.isArray(object.confidenceMetricsEntries)) + throw TypeError(".google.cloud.automl.v1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: array expected"); + message.confidenceMetricsEntries = []; + for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { + if (typeof object.confidenceMetricsEntries[i] !== "object") + throw TypeError(".google.cloud.automl.v1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: object expected"); + message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); + } + } return message; }; /** - * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImageObjectDetectionModelMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.modelType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nodeCount = options.longs === String ? "0" : 0; - object.nodeQps = 0; - object.stopReason = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; + * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextExtractionEvaluationMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.confidenceMetricsEntries = []; + if (options.defaults) + object.auPrc = 0; + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; + if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { + object.confidenceMetricsEntries = []; + for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) + object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); } - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = message.modelType; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; - else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - object.stopReason = message.stopReason; - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (typeof message.trainBudgetMilliNodeHours === "number") - object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; - else - object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (typeof message.trainCostMilliNodeHours === "number") - object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; - else - object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; return object; }; /** - * Converts this ImageObjectDetectionModelMetadata to JSON. + * Converts this TextExtractionEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics * @instance * @returns {Object.} JSON object */ - ImageObjectDetectionModelMetadata.prototype.toJSON = function toJSON() { + TextExtractionEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageObjectDetectionModelMetadata; + TextExtractionEvaluationMetrics.ConfidenceMetricsEntry = (function() { + + /** + * Properties of a ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @interface IConfidenceMetricsEntry + * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold + * @property {number|null} [recall] ConfidenceMetricsEntry recall + * @property {number|null} [precision] ConfidenceMetricsEntry precision + * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score + */ + + /** + * Constructs a new ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @classdesc Represents a ConfidenceMetricsEntry. + * @implements IConfidenceMetricsEntry + * @constructor + * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + */ + function ConfidenceMetricsEntry(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]]; + } + + /** + * ConfidenceMetricsEntry confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; + + /** + * ConfidenceMetricsEntry recall. + * @member {number} recall + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.recall = 0; + + /** + * ConfidenceMetricsEntry precision. + * @member {number} precision + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precision = 0; + + /** + * ConfidenceMetricsEntry f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1Score = 0; + + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance + */ + ConfidenceMetricsEntry.create = function create(properties) { + return new ConfidenceMetricsEntry(properties); + }; + + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.recall); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.precision); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.f1Score); + return writer; + }; + + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.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.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.confidenceThreshold = reader.float(); + break; + case 3: + message.recall = reader.float(); + break; + case 4: + message.precision = reader.float(); + break; + case 5: + message.f1Score = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidenceMetricsEntry message. + * @function verify + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidenceMetricsEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; + return null; + }; + + /** + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + */ + ConfidenceMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) + return object; + var message = new $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.recall != null) + message.recall = Number(object.recall); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); + return message; + }; + + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidenceMetricsEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.confidenceThreshold = 0; + object.recall = 0; + object.precision = 0; + object.f1Score = 0; + } + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + return object; + }; + + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @instance + * @returns {Object.} JSON object + */ + ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfidenceMetricsEntry; + })(); + + return TextExtractionEvaluationMetrics; })(); - v1.ImageClassificationModelDeploymentMetadata = (function() { + v1.TextSegment = (function() { /** - * Properties of an ImageClassificationModelDeploymentMetadata. + * Properties of a TextSegment. * @memberof google.cloud.automl.v1 - * @interface IImageClassificationModelDeploymentMetadata - * @property {number|Long|null} [nodeCount] ImageClassificationModelDeploymentMetadata nodeCount + * @interface ITextSegment + * @property {string|null} [content] TextSegment content + * @property {number|Long|null} [startOffset] TextSegment startOffset + * @property {number|Long|null} [endOffset] TextSegment endOffset */ /** - * Constructs a new ImageClassificationModelDeploymentMetadata. + * Constructs a new TextSegment. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageClassificationModelDeploymentMetadata. - * @implements IImageClassificationModelDeploymentMetadata + * @classdesc Represents a TextSegment. + * @implements ITextSegment * @constructor - * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextSegment=} [properties] Properties to set */ - function ImageClassificationModelDeploymentMetadata(properties) { + function TextSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4488,75 +4171,101 @@ } /** - * ImageClassificationModelDeploymentMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * TextSegment content. + * @member {string} content + * @memberof google.cloud.automl.v1.TextSegment * @instance */ - ImageClassificationModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TextSegment.prototype.content = ""; /** - * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. + * TextSegment startOffset. + * @member {number|Long} startOffset + * @memberof google.cloud.automl.v1.TextSegment + * @instance + */ + TextSegment.prototype.startOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TextSegment endOffset. + * @member {number|Long} endOffset + * @memberof google.cloud.automl.v1.TextSegment + * @instance + */ + TextSegment.prototype.endOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new TextSegment instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static - * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata instance + * @param {google.cloud.automl.v1.ITextSegment=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextSegment} TextSegment instance */ - ImageClassificationModelDeploymentMetadata.create = function create(properties) { - return new ImageClassificationModelDeploymentMetadata(properties); + TextSegment.create = function create(properties) { + return new TextSegment(properties); }; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. + * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static - * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextSegment} message TextSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationModelDeploymentMetadata.encode = function encode(message, writer) { + TextSegment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.startOffset); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.endOffset); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.content); return writer; }; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. + * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static - * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextSegment} message TextSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + TextSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. + * Decodes a TextSegment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata + * @returns {google.cloud.automl.v1.TextSegment} TextSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationModelDeploymentMetadata.decode = function decode(reader, length) { + TextSegment.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.automl.v1.ImageClassificationModelDeploymentMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextSegment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.content = reader.string(); + break; case 1: - message.nodeCount = reader.int64(); + message.startOffset = reader.int64(); + break; + case 2: + message.endOffset = reader.int64(); break; default: reader.skipType(tag & 7); @@ -4567,121 +4276,152 @@ }; /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata + * @returns {google.cloud.automl.v1.TextSegment} TextSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { + TextSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageClassificationModelDeploymentMetadata message. + * Verifies a TextSegment message. * @function verify - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageClassificationModelDeploymentMetadata.verify = function verify(message) { + TextSegment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset) && !(message.startOffset && $util.isInteger(message.startOffset.low) && $util.isInteger(message.startOffset.high))) + return "startOffset: integer|Long expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset) && !(message.endOffset && $util.isInteger(message.endOffset.low) && $util.isInteger(message.endOffset.high))) + return "endOffset: integer|Long expected"; return null; }; /** - * Creates an ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata + * @returns {google.cloud.automl.v1.TextSegment} TextSegment */ - ImageClassificationModelDeploymentMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata) + TextSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextSegment) return object; - var message = new $root.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata(); - if (object.nodeCount != null) + var message = new $root.google.cloud.automl.v1.TextSegment(); + if (object.content != null) + message.content = String(object.content); + if (object.startOffset != null) if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); + (message.startOffset = $util.Long.fromValue(object.startOffset)).unsigned = false; + else if (typeof object.startOffset === "string") + message.startOffset = parseInt(object.startOffset, 10); + else if (typeof object.startOffset === "number") + message.startOffset = object.startOffset; + else if (typeof object.startOffset === "object") + message.startOffset = new $util.LongBits(object.startOffset.low >>> 0, object.startOffset.high >>> 0).toNumber(); + if (object.endOffset != null) + if ($util.Long) + (message.endOffset = $util.Long.fromValue(object.endOffset)).unsigned = false; + else if (typeof object.endOffset === "string") + message.endOffset = parseInt(object.endOffset, 10); + else if (typeof object.endOffset === "number") + message.endOffset = object.endOffset; + else if (typeof object.endOffset === "object") + message.endOffset = new $util.LongBits(object.endOffset.low >>> 0, object.endOffset.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. + * Creates a plain object from a TextSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @static - * @param {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata + * @param {google.cloud.automl.v1.TextSegment} message TextSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageClassificationModelDeploymentMetadata.toObject = function toObject(message, options) { + TextSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.startOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.nodeCount = options.longs === String ? "0" : 0; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + object.startOffset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endOffset = options.longs === String ? "0" : 0; + object.content = ""; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (typeof message.startOffset === "number") + object.startOffset = options.longs === String ? String(message.startOffset) : message.startOffset; else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; + object.startOffset = options.longs === String ? $util.Long.prototype.toString.call(message.startOffset) : options.longs === Number ? new $util.LongBits(message.startOffset.low >>> 0, message.startOffset.high >>> 0).toNumber() : message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (typeof message.endOffset === "number") + object.endOffset = options.longs === String ? String(message.endOffset) : message.endOffset; + else + object.endOffset = options.longs === String ? $util.Long.prototype.toString.call(message.endOffset) : options.longs === Number ? new $util.LongBits(message.endOffset.low >>> 0, message.endOffset.high >>> 0).toNumber() : message.endOffset; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; return object; }; /** - * Converts this ImageClassificationModelDeploymentMetadata to JSON. + * Converts this TextSegment to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSegment * @instance * @returns {Object.} JSON object */ - ImageClassificationModelDeploymentMetadata.prototype.toJSON = function toJSON() { + TextSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageClassificationModelDeploymentMetadata; + return TextSegment; })(); - v1.ImageObjectDetectionModelDeploymentMetadata = (function() { + v1.TextSentimentAnnotation = (function() { /** - * Properties of an ImageObjectDetectionModelDeploymentMetadata. + * Properties of a TextSentimentAnnotation. * @memberof google.cloud.automl.v1 - * @interface IImageObjectDetectionModelDeploymentMetadata - * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelDeploymentMetadata nodeCount + * @interface ITextSentimentAnnotation + * @property {number|null} [sentiment] TextSentimentAnnotation sentiment */ /** - * Constructs a new ImageObjectDetectionModelDeploymentMetadata. + * Constructs a new TextSentimentAnnotation. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageObjectDetectionModelDeploymentMetadata. - * @implements IImageObjectDetectionModelDeploymentMetadata + * @classdesc Represents a TextSentimentAnnotation. + * @implements ITextSentimentAnnotation * @constructor - * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextSentimentAnnotation=} [properties] Properties to set */ - function ImageObjectDetectionModelDeploymentMetadata(properties) { + function TextSentimentAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4689,75 +4429,75 @@ } /** - * ImageObjectDetectionModelDeploymentMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * TextSentimentAnnotation sentiment. + * @member {number} sentiment + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @instance */ - ImageObjectDetectionModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TextSentimentAnnotation.prototype.sentiment = 0; /** - * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. + * Creates a new TextSentimentAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata instance + * @param {google.cloud.automl.v1.ITextSentimentAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation instance */ - ImageObjectDetectionModelDeploymentMetadata.create = function create(properties) { - return new ImageObjectDetectionModelDeploymentMetadata(properties); + TextSentimentAnnotation.create = function create(properties) { + return new TextSentimentAnnotation(properties); }; /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. + * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionModelDeploymentMetadata.encode = function encode(message, writer) { + TextSentimentAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentiment); return writer; }; /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. + * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + TextSentimentAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. + * Decodes a TextSentimentAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata + * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionModelDeploymentMetadata.decode = function decode(reader, length) { + TextSentimentAnnotation.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.automl.v1.ImageObjectDetectionModelDeploymentMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextSentimentAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.nodeCount = reader.int64(); + message.sentiment = reader.int32(); break; default: reader.skipType(tag & 7); @@ -4768,123 +4508,114 @@ }; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata + * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { + TextSentimentAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageObjectDetectionModelDeploymentMetadata message. + * Verifies a TextSentimentAnnotation message. * @function verify - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageObjectDetectionModelDeploymentMetadata.verify = function verify(message) { + TextSentimentAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (!$util.isInteger(message.sentiment)) + return "sentiment: integer expected"; return null; }; /** - * Creates an ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata + * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation */ - ImageObjectDetectionModelDeploymentMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata) + TextSentimentAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextSentimentAnnotation) return object; - var message = new $root.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata(); - if (object.nodeCount != null) - if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); + var message = new $root.google.cloud.automl.v1.TextSentimentAnnotation(); + if (object.sentiment != null) + message.sentiment = object.sentiment | 0; return message; }; /** - * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. + * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @static - * @param {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata + * @param {google.cloud.automl.v1.TextSentimentAnnotation} message TextSentimentAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageObjectDetectionModelDeploymentMetadata.toObject = function toObject(message, options) { + TextSentimentAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nodeCount = options.longs === String ? "0" : 0; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; - else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; + object.sentiment = 0; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = message.sentiment; return object; }; /** - * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. + * Converts this TextSentimentAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1.TextSentimentAnnotation * @instance * @returns {Object.} JSON object */ - ImageObjectDetectionModelDeploymentMetadata.prototype.toJSON = function toJSON() { + TextSentimentAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageObjectDetectionModelDeploymentMetadata; + return TextSentimentAnnotation; })(); - v1.AnnotationSpec = (function() { + v1.TextSentimentEvaluationMetrics = (function() { /** - * Properties of an AnnotationSpec. + * Properties of a TextSentimentEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @interface IAnnotationSpec - * @property {string|null} [name] AnnotationSpec name - * @property {string|null} [displayName] AnnotationSpec displayName - * @property {number|null} [exampleCount] AnnotationSpec exampleCount + * @interface ITextSentimentEvaluationMetrics + * @property {number|null} [precision] TextSentimentEvaluationMetrics precision + * @property {number|null} [recall] TextSentimentEvaluationMetrics recall + * @property {number|null} [f1Score] TextSentimentEvaluationMetrics f1Score + * @property {number|null} [meanAbsoluteError] TextSentimentEvaluationMetrics meanAbsoluteError + * @property {number|null} [meanSquaredError] TextSentimentEvaluationMetrics meanSquaredError + * @property {number|null} [linearKappa] TextSentimentEvaluationMetrics linearKappa + * @property {number|null} [quadraticKappa] TextSentimentEvaluationMetrics quadraticKappa + * @property {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] TextSentimentEvaluationMetrics confusionMatrix */ /** - * Constructs a new AnnotationSpec. + * Constructs a new TextSentimentEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @classdesc Represents an AnnotationSpec. - * @implements IAnnotationSpec + * @classdesc Represents a TextSentimentEvaluationMetrics. + * @implements ITextSentimentEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1.IAnnotationSpec=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics=} [properties] Properties to set */ - function AnnotationSpec(properties) { + function TextSentimentEvaluationMetrics(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4892,101 +4623,166 @@ } /** - * AnnotationSpec name. - * @member {string} name - * @memberof google.cloud.automl.v1.AnnotationSpec + * TextSentimentEvaluationMetrics precision. + * @member {number} precision + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @instance */ - AnnotationSpec.prototype.name = ""; + TextSentimentEvaluationMetrics.prototype.precision = 0; /** - * AnnotationSpec displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1.AnnotationSpec + * TextSentimentEvaluationMetrics recall. + * @member {number} recall + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @instance */ - AnnotationSpec.prototype.displayName = ""; + TextSentimentEvaluationMetrics.prototype.recall = 0; /** - * AnnotationSpec exampleCount. - * @member {number} exampleCount - * @memberof google.cloud.automl.v1.AnnotationSpec + * TextSentimentEvaluationMetrics f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @instance */ - AnnotationSpec.prototype.exampleCount = 0; + TextSentimentEvaluationMetrics.prototype.f1Score = 0; /** - * Creates a new AnnotationSpec instance using the specified properties. + * TextSentimentEvaluationMetrics meanAbsoluteError. + * @member {number} meanAbsoluteError + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @instance + */ + TextSentimentEvaluationMetrics.prototype.meanAbsoluteError = 0; + + /** + * TextSentimentEvaluationMetrics meanSquaredError. + * @member {number} meanSquaredError + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @instance + */ + TextSentimentEvaluationMetrics.prototype.meanSquaredError = 0; + + /** + * TextSentimentEvaluationMetrics linearKappa. + * @member {number} linearKappa + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @instance + */ + TextSentimentEvaluationMetrics.prototype.linearKappa = 0; + + /** + * TextSentimentEvaluationMetrics quadraticKappa. + * @member {number} quadraticKappa + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @instance + */ + TextSentimentEvaluationMetrics.prototype.quadraticKappa = 0; + + /** + * TextSentimentEvaluationMetrics confusionMatrix. + * @member {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @instance + */ + TextSentimentEvaluationMetrics.prototype.confusionMatrix = null; + + /** + * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IAnnotationSpec=} [properties] Properties to set - * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec instance + * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics instance */ - AnnotationSpec.create = function create(properties) { - return new AnnotationSpec(properties); + TextSentimentEvaluationMetrics.create = function create(properties) { + return new TextSentimentEvaluationMetrics(properties); }; /** - * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. + * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IAnnotationSpec} message AnnotationSpec message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpec.encode = function encode(message, writer) { + TextSentimentEvaluationMetrics.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.exampleCount != null && message.hasOwnProperty("exampleCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.exampleCount); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.precision); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.f1Score); + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.meanAbsoluteError); + if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.meanSquaredError); + if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.linearKappa); + if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.quadraticKappa); + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. + * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IAnnotationSpec} message AnnotationSpec message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpec.encodeDelimited = function encodeDelimited(message, writer) { + TextSentimentEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationSpec message from the specified reader or buffer. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpec.decode = function decode(reader, length) { + TextSentimentEvaluationMetrics.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.automl.v1.AnnotationSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.precision = reader.float(); break; case 2: - message.displayName = reader.string(); + message.recall = reader.float(); break; - case 9: - message.exampleCount = reader.int32(); + case 3: + message.f1Score = reader.float(); + break; + case 4: + message.meanAbsoluteError = reader.float(); + break; + case 5: + message.meanSquaredError = reader.float(); + break; + case 6: + message.linearKappa = reader.float(); + break; + case 7: + message.quadraticKappa = reader.float(); + break; + case 8: + message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4997,140 +4793,170 @@ }; /** - * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpec.decodeDelimited = function decodeDelimited(reader) { + TextSentimentEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationSpec message. + * Verifies a TextSentimentEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationSpec.verify = function verify(message) { + TextSentimentEvaluationMetrics.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.exampleCount != null && message.hasOwnProperty("exampleCount")) - if (!$util.isInteger(message.exampleCount)) - return "exampleCount: integer expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + if (typeof message.meanAbsoluteError !== "number") + return "meanAbsoluteError: number expected"; + if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) + if (typeof message.meanSquaredError !== "number") + return "meanSquaredError: number expected"; + if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) + if (typeof message.linearKappa !== "number") + return "linearKappa: number expected"; + if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) + if (typeof message.quadraticKappa !== "number") + return "quadraticKappa: number expected"; + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { + var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); + if (error) + return "confusionMatrix." + error; + } return null; }; /** - * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics */ - AnnotationSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.AnnotationSpec) + TextSentimentEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1.AnnotationSpec(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.exampleCount != null) - message.exampleCount = object.exampleCount | 0; + var message = new $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics(); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.recall != null) + message.recall = Number(object.recall); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); + if (object.meanAbsoluteError != null) + message.meanAbsoluteError = Number(object.meanAbsoluteError); + if (object.meanSquaredError != null) + message.meanSquaredError = Number(object.meanSquaredError); + if (object.linearKappa != null) + message.linearKappa = Number(object.linearKappa); + if (object.quadraticKappa != null) + message.quadraticKappa = Number(object.quadraticKappa); + if (object.confusionMatrix != null) { + if (typeof object.confusionMatrix !== "object") + throw TypeError(".google.cloud.automl.v1.TextSentimentEvaluationMetrics.confusionMatrix: object expected"); + message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); + } return message; }; /** - * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. + * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1.AnnotationSpec} message AnnotationSpec + * @param {google.cloud.automl.v1.TextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationSpec.toObject = function toObject(message, options) { + TextSentimentEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.exampleCount = 0; + object.precision = 0; + object.recall = 0; + object.f1Score = 0; + object.meanAbsoluteError = 0; + object.meanSquaredError = 0; + object.linearKappa = 0; + object.quadraticKappa = 0; + object.confusionMatrix = 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.exampleCount != null && message.hasOwnProperty("exampleCount")) - object.exampleCount = message.exampleCount; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + object.meanAbsoluteError = options.json && !isFinite(message.meanAbsoluteError) ? String(message.meanAbsoluteError) : message.meanAbsoluteError; + if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) + object.meanSquaredError = options.json && !isFinite(message.meanSquaredError) ? String(message.meanSquaredError) : message.meanSquaredError; + if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) + object.linearKappa = options.json && !isFinite(message.linearKappa) ? String(message.linearKappa) : message.linearKappa; + if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) + object.quadraticKappa = options.json && !isFinite(message.quadraticKappa) ? String(message.quadraticKappa) : message.quadraticKappa; + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + object.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); return object; }; /** - * Converts this AnnotationSpec to JSON. + * Converts this TextSentimentEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.AnnotationSpec + * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics * @instance * @returns {Object.} JSON object */ - AnnotationSpec.prototype.toJSON = function toJSON() { + TextSentimentEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnnotationSpec; - })(); - - /** - * ClassificationType enum. - * @name google.cloud.automl.v1.ClassificationType - * @enum {string} - * @property {number} CLASSIFICATION_TYPE_UNSPECIFIED=0 CLASSIFICATION_TYPE_UNSPECIFIED value - * @property {number} MULTICLASS=1 MULTICLASS value - * @property {number} MULTILABEL=2 MULTILABEL value - */ - v1.ClassificationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLASSIFICATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MULTICLASS"] = 1; - values[valuesById[2] = "MULTILABEL"] = 2; - return values; + return TextSentimentEvaluationMetrics; })(); - v1.ClassificationAnnotation = (function() { + v1.TranslationDatasetMetadata = (function() { /** - * Properties of a ClassificationAnnotation. + * Properties of a TranslationDatasetMetadata. * @memberof google.cloud.automl.v1 - * @interface IClassificationAnnotation - * @property {number|null} [score] ClassificationAnnotation score + * @interface ITranslationDatasetMetadata + * @property {string|null} [sourceLanguageCode] TranslationDatasetMetadata sourceLanguageCode + * @property {string|null} [targetLanguageCode] TranslationDatasetMetadata targetLanguageCode */ /** - * Constructs a new ClassificationAnnotation. + * Constructs a new TranslationDatasetMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a ClassificationAnnotation. - * @implements IClassificationAnnotation + * @classdesc Represents a TranslationDatasetMetadata. + * @implements ITranslationDatasetMetadata * @constructor - * @param {google.cloud.automl.v1.IClassificationAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITranslationDatasetMetadata=} [properties] Properties to set */ - function ClassificationAnnotation(properties) { + function TranslationDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5138,75 +4964,88 @@ } /** - * ClassificationAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * TranslationDatasetMetadata sourceLanguageCode. + * @member {string} sourceLanguageCode + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @instance */ - ClassificationAnnotation.prototype.score = 0; + TranslationDatasetMetadata.prototype.sourceLanguageCode = ""; /** - * Creates a new ClassificationAnnotation instance using the specified properties. + * TranslationDatasetMetadata targetLanguageCode. + * @member {string} targetLanguageCode + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @instance + */ + TranslationDatasetMetadata.prototype.targetLanguageCode = ""; + + /** + * Creates a new TranslationDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1.IClassificationAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation instance + * @param {google.cloud.automl.v1.ITranslationDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata instance */ - ClassificationAnnotation.create = function create(properties) { - return new ClassificationAnnotation(properties); + TranslationDatasetMetadata.create = function create(properties) { + return new TranslationDatasetMetadata(properties); }; /** - * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. + * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationAnnotation.encode = function encode(message, writer) { + TranslationDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceLanguageCode); + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetLanguageCode); return writer; }; /** - * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationAnnotation.verify|verify} messages. + * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + TranslationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation + * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationAnnotation.decode = function decode(reader, length) { + TranslationDatasetMetadata.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.automl.v1.ClassificationAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TranslationDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.score = reader.float(); + message.sourceLanguageCode = reader.string(); + break; + case 2: + message.targetLanguageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -5217,114 +5056,117 @@ }; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation + * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + TranslationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClassificationAnnotation message. + * Verifies a TranslationDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClassificationAnnotation.verify = function verify(message) { + TranslationDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + if (!$util.isString(message.sourceLanguageCode)) + return "sourceLanguageCode: string expected"; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + if (!$util.isString(message.targetLanguageCode)) + return "targetLanguageCode: string expected"; return null; }; /** - * Creates a ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ClassificationAnnotation} ClassificationAnnotation + * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata */ - ClassificationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ClassificationAnnotation) + TranslationDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TranslationDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1.ClassificationAnnotation(); - if (object.score != null) - message.score = Number(object.score); + var message = new $root.google.cloud.automl.v1.TranslationDatasetMetadata(); + if (object.sourceLanguageCode != null) + message.sourceLanguageCode = String(object.sourceLanguageCode); + if (object.targetLanguageCode != null) + message.targetLanguageCode = String(object.targetLanguageCode); return message; }; /** - * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1.ClassificationAnnotation} message ClassificationAnnotation + * @param {google.cloud.automl.v1.TranslationDatasetMetadata} message TranslationDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassificationAnnotation.toObject = function toObject(message, options) { + TranslationDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.score = 0; - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.defaults) { + object.sourceLanguageCode = ""; + object.targetLanguageCode = ""; + } + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + object.sourceLanguageCode = message.sourceLanguageCode; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + object.targetLanguageCode = message.targetLanguageCode; return object; }; /** - * Converts this ClassificationAnnotation to JSON. + * Converts this TranslationDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ClassificationAnnotation + * @memberof google.cloud.automl.v1.TranslationDatasetMetadata * @instance * @returns {Object.} JSON object */ - ClassificationAnnotation.prototype.toJSON = function toJSON() { + TranslationDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ClassificationAnnotation; + return TranslationDatasetMetadata; })(); - v1.ClassificationEvaluationMetrics = (function() { + v1.TranslationEvaluationMetrics = (function() { /** - * Properties of a ClassificationEvaluationMetrics. + * Properties of a TranslationEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @interface IClassificationEvaluationMetrics - * @property {number|null} [auPrc] ClassificationEvaluationMetrics auPrc - * @property {number|null} [auRoc] ClassificationEvaluationMetrics auRoc - * @property {number|null} [logLoss] ClassificationEvaluationMetrics logLoss - * @property {Array.|null} [confidenceMetricsEntry] ClassificationEvaluationMetrics confidenceMetricsEntry - * @property {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] ClassificationEvaluationMetrics confusionMatrix - * @property {Array.|null} [annotationSpecId] ClassificationEvaluationMetrics annotationSpecId + * @interface ITranslationEvaluationMetrics + * @property {number|null} [bleuScore] TranslationEvaluationMetrics bleuScore + * @property {number|null} [baseBleuScore] TranslationEvaluationMetrics baseBleuScore */ /** - * Constructs a new ClassificationEvaluationMetrics. + * Constructs a new TranslationEvaluationMetrics. * @memberof google.cloud.automl.v1 - * @classdesc Represents a ClassificationEvaluationMetrics. - * @implements IClassificationEvaluationMetrics + * @classdesc Represents a TranslationEvaluationMetrics. + * @implements ITranslationEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics=} [properties] Properties to set */ - function ClassificationEvaluationMetrics(properties) { - this.confidenceMetricsEntry = []; - this.annotationSpecId = []; + function TranslationEvaluationMetrics(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5332,146 +5174,88 @@ } /** - * ClassificationEvaluationMetrics auPrc. - * @member {number} auPrc - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @instance - */ - ClassificationEvaluationMetrics.prototype.auPrc = 0; - - /** - * ClassificationEvaluationMetrics auRoc. - * @member {number} auRoc - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @instance - */ - ClassificationEvaluationMetrics.prototype.auRoc = 0; - - /** - * ClassificationEvaluationMetrics logLoss. - * @member {number} logLoss - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @instance - */ - ClassificationEvaluationMetrics.prototype.logLoss = 0; - - /** - * ClassificationEvaluationMetrics confidenceMetricsEntry. - * @member {Array.} confidenceMetricsEntry - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @instance - */ - ClassificationEvaluationMetrics.prototype.confidenceMetricsEntry = $util.emptyArray; - - /** - * ClassificationEvaluationMetrics confusionMatrix. - * @member {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * TranslationEvaluationMetrics bleuScore. + * @member {number} bleuScore + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @instance */ - ClassificationEvaluationMetrics.prototype.confusionMatrix = null; + TranslationEvaluationMetrics.prototype.bleuScore = 0; /** - * ClassificationEvaluationMetrics annotationSpecId. - * @member {Array.} annotationSpecId - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * TranslationEvaluationMetrics baseBleuScore. + * @member {number} baseBleuScore + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @instance */ - ClassificationEvaluationMetrics.prototype.annotationSpecId = $util.emptyArray; + TranslationEvaluationMetrics.prototype.baseBleuScore = 0; /** - * Creates a new ClassificationEvaluationMetrics instance using the specified properties. + * Creates a new TranslationEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics instance + * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics instance */ - ClassificationEvaluationMetrics.create = function create(properties) { - return new ClassificationEvaluationMetrics(properties); + TranslationEvaluationMetrics.create = function create(properties) { + return new TranslationEvaluationMetrics(properties); }; /** - * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. + * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationEvaluationMetrics.encode = function encode(message, writer) { + TranslationEvaluationMetrics.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); - if (message.confidenceMetricsEntry != null && message.confidenceMetricsEntry.length) - for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) - $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntry[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.annotationSpecId != null && message.annotationSpecId.length) - for (var i = 0; i < message.annotationSpecId.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.annotationSpecId[i]); - if (message.auRoc != null && message.hasOwnProperty("auRoc")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.auRoc); - if (message.logLoss != null && message.hasOwnProperty("logLoss")) - writer.uint32(/* id 7, wireType 5 =*/61).float(message.logLoss); + if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.bleuScore); + if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.baseBleuScore); return writer; }; /** - * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.verify|verify} messages. + * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @static - * @param {google.cloud.automl.v1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + TranslationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics + * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationEvaluationMetrics.decode = function decode(reader, length) { + TranslationEvaluationMetrics.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.automl.v1.ClassificationEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TranslationEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.auPrc = reader.float(); - break; - case 6: - message.auRoc = reader.float(); - break; - case 7: - message.logLoss = reader.float(); - break; - case 3: - if (!(message.confidenceMetricsEntry && message.confidenceMetricsEntry.length)) - message.confidenceMetricsEntry = []; - message.confidenceMetricsEntry.push($root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); - break; - case 4: - message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); + message.bleuScore = reader.double(); break; - case 5: - if (!(message.annotationSpecId && message.annotationSpecId.length)) - message.annotationSpecId = []; - message.annotationSpecId.push(reader.string()); + case 2: + message.baseBleuScore = reader.double(); break; default: reader.skipType(tag & 7); @@ -5482,1210 +5266,1005 @@ }; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics + * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + TranslationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClassificationEvaluationMetrics message. + * Verifies a TranslationEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClassificationEvaluationMetrics.verify = function verify(message) { + TranslationEvaluationMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - if (typeof message.auPrc !== "number") - return "auPrc: number expected"; - if (message.auRoc != null && message.hasOwnProperty("auRoc")) - if (typeof message.auRoc !== "number") - return "auRoc: number expected"; - if (message.logLoss != null && message.hasOwnProperty("logLoss")) - if (typeof message.logLoss !== "number") - return "logLoss: number expected"; - if (message.confidenceMetricsEntry != null && message.hasOwnProperty("confidenceMetricsEntry")) { - if (!Array.isArray(message.confidenceMetricsEntry)) - return "confidenceMetricsEntry: array expected"; - for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) { - var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntry[i]); - if (error) - return "confidenceMetricsEntry." + error; - } - } - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { - var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); - if (error) - return "confusionMatrix." + error; - } - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { - if (!Array.isArray(message.annotationSpecId)) - return "annotationSpecId: array expected"; - for (var i = 0; i < message.annotationSpecId.length; ++i) - if (!$util.isString(message.annotationSpecId[i])) - return "annotationSpecId: string[] expected"; - } + if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) + if (typeof message.bleuScore !== "number") + return "bleuScore: number expected"; + if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) + if (typeof message.baseBleuScore !== "number") + return "baseBleuScore: number expected"; return null; }; /** - * Creates a ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics - */ - ClassificationEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics) - return object; - var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics(); - if (object.auPrc != null) - message.auPrc = Number(object.auPrc); - if (object.auRoc != null) - message.auRoc = Number(object.auRoc); - if (object.logLoss != null) - message.logLoss = Number(object.logLoss); - if (object.confidenceMetricsEntry) { - if (!Array.isArray(object.confidenceMetricsEntry)) - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.confidenceMetricsEntry: array expected"); - message.confidenceMetricsEntry = []; - for (var i = 0; i < object.confidenceMetricsEntry.length; ++i) { - if (typeof object.confidenceMetricsEntry[i] !== "object") - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.confidenceMetricsEntry: object expected"); - message.confidenceMetricsEntry[i] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntry[i]); - } - } - if (object.confusionMatrix != null) { - if (typeof object.confusionMatrix !== "object") - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.confusionMatrix: object expected"); - message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); - } - if (object.annotationSpecId) { - if (!Array.isArray(object.annotationSpecId)) - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.annotationSpecId: array expected"); - message.annotationSpecId = []; - for (var i = 0; i < object.annotationSpecId.length; ++i) - message.annotationSpecId[i] = String(object.annotationSpecId[i]); - } - return message; - }; - - /** - * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics} message ClassificationEvaluationMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClassificationEvaluationMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.confidenceMetricsEntry = []; - object.annotationSpecId = []; - } - if (options.defaults) { - object.auPrc = 0; - object.confusionMatrix = null; - object.auRoc = 0; - object.logLoss = 0; - } - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; - if (message.confidenceMetricsEntry && message.confidenceMetricsEntry.length) { - object.confidenceMetricsEntry = []; - for (var j = 0; j < message.confidenceMetricsEntry.length; ++j) - object.confidenceMetricsEntry[j] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntry[j], options); - } - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - object.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); - if (message.annotationSpecId && message.annotationSpecId.length) { - object.annotationSpecId = []; - for (var j = 0; j < message.annotationSpecId.length; ++j) - object.annotationSpecId[j] = message.annotationSpecId[j]; - } - if (message.auRoc != null && message.hasOwnProperty("auRoc")) - object.auRoc = options.json && !isFinite(message.auRoc) ? String(message.auRoc) : message.auRoc; - if (message.logLoss != null && message.hasOwnProperty("logLoss")) - object.logLoss = options.json && !isFinite(message.logLoss) ? String(message.logLoss) : message.logLoss; - return object; - }; - - /** - * Converts this ClassificationEvaluationMetrics to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @instance - * @returns {Object.} JSON object - */ - ClassificationEvaluationMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - ClassificationEvaluationMetrics.ConfidenceMetricsEntry = (function() { - - /** - * Properties of a ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @interface IConfidenceMetricsEntry - * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold - * @property {number|null} [positionThreshold] ConfidenceMetricsEntry positionThreshold - * @property {number|null} [recall] ConfidenceMetricsEntry recall - * @property {number|null} [precision] ConfidenceMetricsEntry precision - * @property {number|null} [falsePositiveRate] ConfidenceMetricsEntry falsePositiveRate - * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score - * @property {number|null} [recallAt1] ConfidenceMetricsEntry recallAt1 - * @property {number|null} [precisionAt1] ConfidenceMetricsEntry precisionAt1 - * @property {number|null} [falsePositiveRateAt1] ConfidenceMetricsEntry falsePositiveRateAt1 - * @property {number|null} [f1ScoreAt1] ConfidenceMetricsEntry f1ScoreAt1 - * @property {number|Long|null} [truePositiveCount] ConfidenceMetricsEntry truePositiveCount - * @property {number|Long|null} [falsePositiveCount] ConfidenceMetricsEntry falsePositiveCount - * @property {number|Long|null} [falseNegativeCount] ConfidenceMetricsEntry falseNegativeCount - * @property {number|Long|null} [trueNegativeCount] ConfidenceMetricsEntry trueNegativeCount - */ - - /** - * Constructs a new ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @classdesc Represents a ConfidenceMetricsEntry. - * @implements IConfidenceMetricsEntry - * @constructor - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set - */ - function ConfidenceMetricsEntry(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]]; - } - - /** - * ConfidenceMetricsEntry confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; - - /** - * ConfidenceMetricsEntry positionThreshold. - * @member {number} positionThreshold - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.positionThreshold = 0; - - /** - * ConfidenceMetricsEntry recall. - * @member {number} recall - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.recall = 0; - - /** - * ConfidenceMetricsEntry precision. - * @member {number} precision - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precision = 0; - - /** - * ConfidenceMetricsEntry falsePositiveRate. - * @member {number} falsePositiveRate - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falsePositiveRate = 0; - - /** - * ConfidenceMetricsEntry f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.f1Score = 0; - - /** - * ConfidenceMetricsEntry recallAt1. - * @member {number} recallAt1 - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.recallAt1 = 0; - - /** - * ConfidenceMetricsEntry precisionAt1. - * @member {number} precisionAt1 - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precisionAt1 = 0; - - /** - * ConfidenceMetricsEntry falsePositiveRateAt1. - * @member {number} falsePositiveRateAt1 - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falsePositiveRateAt1 = 0; + * Creates a TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics + */ + TranslationEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TranslationEvaluationMetrics) + return object; + var message = new $root.google.cloud.automl.v1.TranslationEvaluationMetrics(); + if (object.bleuScore != null) + message.bleuScore = Number(object.bleuScore); + if (object.baseBleuScore != null) + message.baseBleuScore = Number(object.baseBleuScore); + return message; + }; - /** - * ConfidenceMetricsEntry f1ScoreAt1. - * @member {number} f1ScoreAt1 - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.f1ScoreAt1 = 0; + /** + * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @static + * @param {google.cloud.automl.v1.TranslationEvaluationMetrics} message TranslationEvaluationMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationEvaluationMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bleuScore = 0; + object.baseBleuScore = 0; + } + if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) + object.bleuScore = options.json && !isFinite(message.bleuScore) ? String(message.bleuScore) : message.bleuScore; + if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) + object.baseBleuScore = options.json && !isFinite(message.baseBleuScore) ? String(message.baseBleuScore) : message.baseBleuScore; + return object; + }; - /** - * ConfidenceMetricsEntry truePositiveCount. - * @member {number|Long} truePositiveCount - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.truePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Converts this TranslationEvaluationMetrics to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @instance + * @returns {Object.} JSON object + */ + TranslationEvaluationMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ConfidenceMetricsEntry falsePositiveCount. - * @member {number|Long} falsePositiveCount - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falsePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return TranslationEvaluationMetrics; + })(); - /** - * ConfidenceMetricsEntry falseNegativeCount. - * @member {number|Long} falseNegativeCount - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falseNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v1.TranslationModelMetadata = (function() { - /** - * ConfidenceMetricsEntry trueNegativeCount. - * @member {number|Long} trueNegativeCount - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.trueNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Properties of a TranslationModelMetadata. + * @memberof google.cloud.automl.v1 + * @interface ITranslationModelMetadata + * @property {string|null} [baseModel] TranslationModelMetadata baseModel + * @property {string|null} [sourceLanguageCode] TranslationModelMetadata sourceLanguageCode + * @property {string|null} [targetLanguageCode] TranslationModelMetadata targetLanguageCode + */ - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance - */ - ConfidenceMetricsEntry.create = function create(properties) { - return new ConfidenceMetricsEntry(properties); - }; + /** + * Constructs a new TranslationModelMetadata. + * @memberof google.cloud.automl.v1 + * @classdesc Represents a TranslationModelMetadata. + * @implements ITranslationModelMetadata + * @constructor + * @param {google.cloud.automl.v1.ITranslationModelMetadata=} [properties] Properties to set + */ + function TranslationModelMetadata(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]]; + } - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); - if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.recallAt1); - if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.precisionAt1); - if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) - writer.uint32(/* id 7, wireType 5 =*/61).float(message.f1ScoreAt1); - if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) - writer.uint32(/* id 8, wireType 5 =*/69).float(message.falsePositiveRate); - if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) - writer.uint32(/* id 9, wireType 5 =*/77).float(message.falsePositiveRateAt1); - if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.truePositiveCount); - if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.falsePositiveCount); - if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.falseNegativeCount); - if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int64(message.trueNegativeCount); - if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.positionThreshold); - return writer; - }; + /** + * TranslationModelMetadata baseModel. + * @member {string} baseModel + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @instance + */ + TranslationModelMetadata.prototype.baseModel = ""; - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * TranslationModelMetadata sourceLanguageCode. + * @member {string} sourceLanguageCode + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @instance + */ + TranslationModelMetadata.prototype.sourceLanguageCode = ""; - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.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.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.confidenceThreshold = reader.float(); - break; - case 14: - message.positionThreshold = reader.int32(); - break; - case 2: - message.recall = reader.float(); - break; - case 3: - message.precision = reader.float(); - break; - case 8: - message.falsePositiveRate = reader.float(); - break; - case 4: - message.f1Score = reader.float(); - break; - case 5: - message.recallAt1 = reader.float(); - break; - case 6: - message.precisionAt1 = reader.float(); - break; - case 9: - message.falsePositiveRateAt1 = reader.float(); - break; - case 7: - message.f1ScoreAt1 = reader.float(); - break; - case 10: - message.truePositiveCount = reader.int64(); - break; - case 11: - message.falsePositiveCount = reader.int64(); - break; - case 12: - message.falseNegativeCount = reader.int64(); - break; - case 13: - message.trueNegativeCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * TranslationModelMetadata targetLanguageCode. + * @member {string} targetLanguageCode + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @instance + */ + TranslationModelMetadata.prototype.targetLanguageCode = ""; - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new TranslationModelMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {google.cloud.automl.v1.ITranslationModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata instance + */ + TranslationModelMetadata.create = function create(properties) { + return new TranslationModelMetadata(properties); + }; - /** - * Verifies a ConfidenceMetricsEntry message. - * @function verify - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidenceMetricsEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) - if (!$util.isInteger(message.positionThreshold)) - return "positionThreshold: integer expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) - if (typeof message.falsePositiveRate !== "number") - return "falsePositiveRate: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; - if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) - if (typeof message.recallAt1 !== "number") - return "recallAt1: number expected"; - if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) - if (typeof message.precisionAt1 !== "number") - return "precisionAt1: number expected"; - if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) - if (typeof message.falsePositiveRateAt1 !== "number") - return "falsePositiveRateAt1: number expected"; - if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) - if (typeof message.f1ScoreAt1 !== "number") - return "f1ScoreAt1: number expected"; - if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) - if (!$util.isInteger(message.truePositiveCount) && !(message.truePositiveCount && $util.isInteger(message.truePositiveCount.low) && $util.isInteger(message.truePositiveCount.high))) - return "truePositiveCount: integer|Long expected"; - if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) - if (!$util.isInteger(message.falsePositiveCount) && !(message.falsePositiveCount && $util.isInteger(message.falsePositiveCount.low) && $util.isInteger(message.falsePositiveCount.high))) - return "falsePositiveCount: integer|Long expected"; - if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) - if (!$util.isInteger(message.falseNegativeCount) && !(message.falseNegativeCount && $util.isInteger(message.falseNegativeCount.low) && $util.isInteger(message.falseNegativeCount.high))) - return "falseNegativeCount: integer|Long expected"; - if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) - if (!$util.isInteger(message.trueNegativeCount) && !(message.trueNegativeCount && $util.isInteger(message.trueNegativeCount.low) && $util.isInteger(message.trueNegativeCount.high))) - return "trueNegativeCount: integer|Long expected"; - return null; - }; + /** + * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {google.cloud.automl.v1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationModelMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModel); + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceLanguageCode); + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetLanguageCode); + return writer; + }; - /** - * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry - */ - ConfidenceMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) - return object; - var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.positionThreshold != null) - message.positionThreshold = object.positionThreshold | 0; - if (object.recall != null) - message.recall = Number(object.recall); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.falsePositiveRate != null) - message.falsePositiveRate = Number(object.falsePositiveRate); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); - if (object.recallAt1 != null) - message.recallAt1 = Number(object.recallAt1); - if (object.precisionAt1 != null) - message.precisionAt1 = Number(object.precisionAt1); - if (object.falsePositiveRateAt1 != null) - message.falsePositiveRateAt1 = Number(object.falsePositiveRateAt1); - if (object.f1ScoreAt1 != null) - message.f1ScoreAt1 = Number(object.f1ScoreAt1); - if (object.truePositiveCount != null) - if ($util.Long) - (message.truePositiveCount = $util.Long.fromValue(object.truePositiveCount)).unsigned = false; - else if (typeof object.truePositiveCount === "string") - message.truePositiveCount = parseInt(object.truePositiveCount, 10); - else if (typeof object.truePositiveCount === "number") - message.truePositiveCount = object.truePositiveCount; - else if (typeof object.truePositiveCount === "object") - message.truePositiveCount = new $util.LongBits(object.truePositiveCount.low >>> 0, object.truePositiveCount.high >>> 0).toNumber(); - if (object.falsePositiveCount != null) - if ($util.Long) - (message.falsePositiveCount = $util.Long.fromValue(object.falsePositiveCount)).unsigned = false; - else if (typeof object.falsePositiveCount === "string") - message.falsePositiveCount = parseInt(object.falsePositiveCount, 10); - else if (typeof object.falsePositiveCount === "number") - message.falsePositiveCount = object.falsePositiveCount; - else if (typeof object.falsePositiveCount === "object") - message.falsePositiveCount = new $util.LongBits(object.falsePositiveCount.low >>> 0, object.falsePositiveCount.high >>> 0).toNumber(); - if (object.falseNegativeCount != null) - if ($util.Long) - (message.falseNegativeCount = $util.Long.fromValue(object.falseNegativeCount)).unsigned = false; - else if (typeof object.falseNegativeCount === "string") - message.falseNegativeCount = parseInt(object.falseNegativeCount, 10); - else if (typeof object.falseNegativeCount === "number") - message.falseNegativeCount = object.falseNegativeCount; - else if (typeof object.falseNegativeCount === "object") - message.falseNegativeCount = new $util.LongBits(object.falseNegativeCount.low >>> 0, object.falseNegativeCount.high >>> 0).toNumber(); - if (object.trueNegativeCount != null) - if ($util.Long) - (message.trueNegativeCount = $util.Long.fromValue(object.trueNegativeCount)).unsigned = false; - else if (typeof object.trueNegativeCount === "string") - message.trueNegativeCount = parseInt(object.trueNegativeCount, 10); - else if (typeof object.trueNegativeCount === "number") - message.trueNegativeCount = object.trueNegativeCount; - else if (typeof object.trueNegativeCount === "object") - message.trueNegativeCount = new $util.LongBits(object.trueNegativeCount.low >>> 0, object.trueNegativeCount.high >>> 0).toNumber(); - return message; - }; + /** + * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {google.cloud.automl.v1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidenceMetricsEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.confidenceThreshold = 0; - object.recall = 0; - object.precision = 0; - object.f1Score = 0; - object.recallAt1 = 0; - object.precisionAt1 = 0; - object.f1ScoreAt1 = 0; - object.falsePositiveRate = 0; - object.falsePositiveRateAt1 = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.truePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.truePositiveCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.falsePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.falsePositiveCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.falseNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.falseNegativeCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trueNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trueNegativeCount = options.longs === String ? "0" : 0; - object.positionThreshold = 0; + /** + * Decodes a TranslationModelMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationModelMetadata.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.automl.v1.TranslationModelMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseModel = reader.string(); + break; + case 2: + message.sourceLanguageCode = reader.string(); + break; + case 3: + message.targetLanguageCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; - if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) - object.recallAt1 = options.json && !isFinite(message.recallAt1) ? String(message.recallAt1) : message.recallAt1; - if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) - object.precisionAt1 = options.json && !isFinite(message.precisionAt1) ? String(message.precisionAt1) : message.precisionAt1; - if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) - object.f1ScoreAt1 = options.json && !isFinite(message.f1ScoreAt1) ? String(message.f1ScoreAt1) : message.f1ScoreAt1; - if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) - object.falsePositiveRate = options.json && !isFinite(message.falsePositiveRate) ? String(message.falsePositiveRate) : message.falsePositiveRate; - if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) - object.falsePositiveRateAt1 = options.json && !isFinite(message.falsePositiveRateAt1) ? String(message.falsePositiveRateAt1) : message.falsePositiveRateAt1; - if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) - if (typeof message.truePositiveCount === "number") - object.truePositiveCount = options.longs === String ? String(message.truePositiveCount) : message.truePositiveCount; - else - object.truePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.truePositiveCount) : options.longs === Number ? new $util.LongBits(message.truePositiveCount.low >>> 0, message.truePositiveCount.high >>> 0).toNumber() : message.truePositiveCount; - if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) - if (typeof message.falsePositiveCount === "number") - object.falsePositiveCount = options.longs === String ? String(message.falsePositiveCount) : message.falsePositiveCount; - else - object.falsePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.falsePositiveCount) : options.longs === Number ? new $util.LongBits(message.falsePositiveCount.low >>> 0, message.falsePositiveCount.high >>> 0).toNumber() : message.falsePositiveCount; - if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) - if (typeof message.falseNegativeCount === "number") - object.falseNegativeCount = options.longs === String ? String(message.falseNegativeCount) : message.falseNegativeCount; - else - object.falseNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.falseNegativeCount) : options.longs === Number ? new $util.LongBits(message.falseNegativeCount.low >>> 0, message.falseNegativeCount.high >>> 0).toNumber() : message.falseNegativeCount; - if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) - if (typeof message.trueNegativeCount === "number") - object.trueNegativeCount = options.longs === String ? String(message.trueNegativeCount) : message.trueNegativeCount; - else - object.trueNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.trueNegativeCount) : options.longs === Number ? new $util.LongBits(message.trueNegativeCount.low >>> 0, message.trueNegativeCount.high >>> 0).toNumber() : message.trueNegativeCount; - if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) - object.positionThreshold = message.positionThreshold; + } + return message; + }; + + /** + * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationModelMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslationModelMetadata message. + * @function verify + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslationModelMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + if (!$util.isString(message.baseModel)) + return "baseModel: string expected"; + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + if (!$util.isString(message.sourceLanguageCode)) + return "sourceLanguageCode: string expected"; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + if (!$util.isString(message.targetLanguageCode)) + return "targetLanguageCode: string expected"; + return null; + }; + + /** + * Creates a TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata + */ + TranslationModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TranslationModelMetadata) return object; - }; + var message = new $root.google.cloud.automl.v1.TranslationModelMetadata(); + if (object.baseModel != null) + message.baseModel = String(object.baseModel); + if (object.sourceLanguageCode != null) + message.sourceLanguageCode = String(object.sourceLanguageCode); + if (object.targetLanguageCode != null) + message.targetLanguageCode = String(object.targetLanguageCode); + return message; + }; - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - * @returns {Object.} JSON object - */ - ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @static + * @param {google.cloud.automl.v1.TranslationModelMetadata} message TranslationModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationModelMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.baseModel = ""; + object.sourceLanguageCode = ""; + object.targetLanguageCode = ""; + } + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + object.baseModel = message.baseModel; + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + object.sourceLanguageCode = message.sourceLanguageCode; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + object.targetLanguageCode = message.targetLanguageCode; + return object; + }; - return ConfidenceMetricsEntry; - })(); + /** + * Converts this TranslationModelMetadata to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @instance + * @returns {Object.} JSON object + */ + TranslationModelMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - ClassificationEvaluationMetrics.ConfusionMatrix = (function() { + return TranslationModelMetadata; + })(); - /** - * Properties of a ConfusionMatrix. - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @interface IConfusionMatrix - * @property {Array.|null} [annotationSpecId] ConfusionMatrix annotationSpecId - * @property {Array.|null} [displayName] ConfusionMatrix displayName - * @property {Array.|null} [row] ConfusionMatrix row - */ + v1.TranslationAnnotation = (function() { - /** - * Constructs a new ConfusionMatrix. - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics - * @classdesc Represents a ConfusionMatrix. - * @implements IConfusionMatrix - * @constructor - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set - */ - function ConfusionMatrix(properties) { - this.annotationSpecId = []; - this.displayName = []; - this.row = []; - 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 TranslationAnnotation. + * @memberof google.cloud.automl.v1 + * @interface ITranslationAnnotation + * @property {google.cloud.automl.v1.ITextSnippet|null} [translatedContent] TranslationAnnotation translatedContent + */ + + /** + * Constructs a new TranslationAnnotation. + * @memberof google.cloud.automl.v1 + * @classdesc Represents a TranslationAnnotation. + * @implements ITranslationAnnotation + * @constructor + * @param {google.cloud.automl.v1.ITranslationAnnotation=} [properties] Properties to set + */ + function TranslationAnnotation(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]]; + } + + /** + * TranslationAnnotation translatedContent. + * @member {google.cloud.automl.v1.ITextSnippet|null|undefined} translatedContent + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @instance + */ + TranslationAnnotation.prototype.translatedContent = null; + + /** + * Creates a new TranslationAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {google.cloud.automl.v1.ITranslationAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation instance + */ + TranslationAnnotation.create = function create(properties) { + return new TranslationAnnotation(properties); + }; + + /** + * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {google.cloud.automl.v1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) + $root.google.cloud.automl.v1.TextSnippet.encode(message.translatedContent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {google.cloud.automl.v1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslationAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationAnnotation.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.automl.v1.TranslationAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.translatedContent = $root.google.cloud.automl.v1.TextSnippet.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * ConfusionMatrix annotationSpecId. - * @member {Array.} annotationSpecId - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - */ - ConfusionMatrix.prototype.annotationSpecId = $util.emptyArray; + /** + * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ConfusionMatrix displayName. - * @member {Array.} displayName - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - */ - ConfusionMatrix.prototype.displayName = $util.emptyArray; + /** + * Verifies a TranslationAnnotation message. + * @function verify + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslationAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) { + var error = $root.google.cloud.automl.v1.TextSnippet.verify(message.translatedContent); + if (error) + return "translatedContent." + error; + } + return null; + }; - /** - * ConfusionMatrix row. - * @member {Array.} row - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - */ - ConfusionMatrix.prototype.row = $util.emptyArray; + /** + * Creates a TranslationAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation + */ + TranslationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TranslationAnnotation) + return object; + var message = new $root.google.cloud.automl.v1.TranslationAnnotation(); + if (object.translatedContent != null) { + if (typeof object.translatedContent !== "object") + throw TypeError(".google.cloud.automl.v1.TranslationAnnotation.translatedContent: object expected"); + message.translatedContent = $root.google.cloud.automl.v1.TextSnippet.fromObject(object.translatedContent); + } + return message; + }; - /** - * Creates a new ConfusionMatrix instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix instance - */ - ConfusionMatrix.create = function create(properties) { - return new ConfusionMatrix(properties); - }; + /** + * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @static + * @param {google.cloud.automl.v1.TranslationAnnotation} message TranslationAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.translatedContent = null; + if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) + object.translatedContent = $root.google.cloud.automl.v1.TextSnippet.toObject(message.translatedContent, options); + return object; + }; - /** - * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfusionMatrix.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotationSpecId != null && message.annotationSpecId.length) - for (var i = 0; i < message.annotationSpecId.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId[i]); - if (message.row != null && message.row.length) - for (var i = 0; i < message.row.length; ++i) - $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.encode(message.row[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.displayName != null && message.displayName.length) - for (var i = 0; i < message.displayName.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName[i]); - return writer; - }; + /** + * Converts this TranslationAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.TranslationAnnotation + * @instance + * @returns {Object.} JSON object + */ + TranslationAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfusionMatrix.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return TranslationAnnotation; + })(); - /** - * Decodes a ConfusionMatrix message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfusionMatrix.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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.annotationSpecId && message.annotationSpecId.length)) - message.annotationSpecId = []; - message.annotationSpecId.push(reader.string()); - break; - case 3: - if (!(message.displayName && message.displayName.length)) - message.displayName = []; - message.displayName.push(reader.string()); - break; - case 2: - if (!(message.row && message.row.length)) - message.row = []; - message.row.push($root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.Image = (function() { + + /** + * Properties of an Image. + * @memberof google.cloud.automl.v1 + * @interface IImage + * @property {Uint8Array|null} [imageBytes] Image imageBytes + * @property {string|null} [thumbnailUri] Image thumbnailUri + */ + + /** + * Constructs a new Image. + * @memberof google.cloud.automl.v1 + * @classdesc Represents an Image. + * @implements IImage + * @constructor + * @param {google.cloud.automl.v1.IImage=} [properties] Properties to set + */ + function Image(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]]; + } + + /** + * Image imageBytes. + * @member {Uint8Array} imageBytes + * @memberof google.cloud.automl.v1.Image + * @instance + */ + Image.prototype.imageBytes = $util.newBuffer([]); + + /** + * Image thumbnailUri. + * @member {string} thumbnailUri + * @memberof google.cloud.automl.v1.Image + * @instance + */ + Image.prototype.thumbnailUri = ""; - /** - * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfusionMatrix.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Verifies a ConfusionMatrix message. - * @function verify - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfusionMatrix.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { - if (!Array.isArray(message.annotationSpecId)) - return "annotationSpecId: array expected"; - for (var i = 0; i < message.annotationSpecId.length; ++i) - if (!$util.isString(message.annotationSpecId[i])) - return "annotationSpecId: string[] expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - if (!Array.isArray(message.displayName)) - return "displayName: array expected"; - for (var i = 0; i < message.displayName.length; ++i) - if (!$util.isString(message.displayName[i])) - return "displayName: string[] expected"; - } - if (message.row != null && message.hasOwnProperty("row")) { - if (!Array.isArray(message.row)) - return "row: array expected"; - for (var i = 0; i < message.row.length; ++i) { - var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify(message.row[i]); - if (error) - return "row." + error; - } - } - return null; - }; + /** + * Image data. + * @member {"imageBytes"|undefined} data + * @memberof google.cloud.automl.v1.Image + * @instance + */ + Object.defineProperty(Image.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["imageBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a ConfusionMatrix message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix - */ - ConfusionMatrix.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix) - return object; - var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix(); - if (object.annotationSpecId) { - if (!Array.isArray(object.annotationSpecId)) - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.annotationSpecId: array expected"); - message.annotationSpecId = []; - for (var i = 0; i < object.annotationSpecId.length; ++i) - message.annotationSpecId[i] = String(object.annotationSpecId[i]); - } - if (object.displayName) { - if (!Array.isArray(object.displayName)) - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.displayName: array expected"); - message.displayName = []; - for (var i = 0; i < object.displayName.length; ++i) - message.displayName[i] = String(object.displayName[i]); - } - if (object.row) { - if (!Array.isArray(object.row)) - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.row: array expected"); - message.row = []; - for (var i = 0; i < object.row.length; ++i) { - if (typeof object.row[i] !== "object") - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.row: object expected"); - message.row[i] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.fromObject(object.row[i]); - } - } - return message; - }; + /** + * Creates a new Image instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.Image + * @static + * @param {google.cloud.automl.v1.IImage=} [properties] Properties to set + * @returns {google.cloud.automl.v1.Image} Image instance + */ + Image.create = function create(properties) { + return new Image(properties); + }; - /** - * Creates a plain object from a ConfusionMatrix message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix} message ConfusionMatrix - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfusionMatrix.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.annotationSpecId = []; - object.row = []; - object.displayName = []; - } - if (message.annotationSpecId && message.annotationSpecId.length) { - object.annotationSpecId = []; - for (var j = 0; j < message.annotationSpecId.length; ++j) - object.annotationSpecId[j] = message.annotationSpecId[j]; - } - if (message.row && message.row.length) { - object.row = []; - for (var j = 0; j < message.row.length; ++j) - object.row[j] = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.toObject(message.row[j], options); - } - if (message.displayName && message.displayName.length) { - object.displayName = []; - for (var j = 0; j < message.displayName.length; ++j) - object.displayName[j] = message.displayName[j]; + /** + * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.Image + * @static + * @param {google.cloud.automl.v1.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.imageBytes); + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUri); + return writer; + }; + + /** + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.Image + * @static + * @param {google.cloud.automl.v1.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Image message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.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.automl.v1.Image(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.imageBytes = reader.bytes(); + break; + case 4: + message.thumbnailUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes an Image message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Image message. + * @function verify + * @memberof google.cloud.automl.v1.Image + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Image.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) { + properties.data = 1; + if (!(message.imageBytes && typeof message.imageBytes.length === "number" || $util.isString(message.imageBytes))) + return "imageBytes: buffer expected"; + } + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + if (!$util.isString(message.thumbnailUri)) + return "thumbnailUri: string expected"; + return null; + }; + + /** + * Creates an Image message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.Image + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.Image} Image + */ + Image.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.Image) return object; - }; + var message = new $root.google.cloud.automl.v1.Image(); + if (object.imageBytes != null) + if (typeof object.imageBytes === "string") + $util.base64.decode(object.imageBytes, message.imageBytes = $util.newBuffer($util.base64.length(object.imageBytes)), 0); + else if (object.imageBytes.length) + message.imageBytes = object.imageBytes; + if (object.thumbnailUri != null) + message.thumbnailUri = String(object.thumbnailUri); + return message; + }; - /** - * Converts this ConfusionMatrix to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - * @returns {Object.} JSON object - */ - ConfusionMatrix.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.Image + * @static + * @param {google.cloud.automl.v1.Image} message Image + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Image.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.thumbnailUri = ""; + if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) { + object.imageBytes = options.bytes === String ? $util.base64.encode(message.imageBytes, 0, message.imageBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageBytes) : message.imageBytes; + if (options.oneofs) + object.data = "imageBytes"; + } + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + object.thumbnailUri = message.thumbnailUri; + return object; + }; - ConfusionMatrix.Row = (function() { + /** + * Converts this Image to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.Image + * @instance + * @returns {Object.} JSON object + */ + Image.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Row. - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @interface IRow - * @property {Array.|null} [exampleCount] Row exampleCount - */ + return Image; + })(); - /** - * Constructs a new Row. - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.exampleCount = []; - 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]]; - } + v1.TextSnippet = (function() { - /** - * Row exampleCount. - * @member {Array.} exampleCount - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @instance - */ - Row.prototype.exampleCount = $util.emptyArray; + /** + * Properties of a TextSnippet. + * @memberof google.cloud.automl.v1 + * @interface ITextSnippet + * @property {string|null} [content] TextSnippet content + * @property {string|null} [mimeType] TextSnippet mimeType + * @property {string|null} [contentUri] TextSnippet contentUri + */ - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; + /** + * Constructs a new TextSnippet. + * @memberof google.cloud.automl.v1 + * @classdesc Represents a TextSnippet. + * @implements ITextSnippet + * @constructor + * @param {google.cloud.automl.v1.ITextSnippet=} [properties] Properties to set + */ + function TextSnippet(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]]; + } - /** - * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exampleCount != null && message.exampleCount.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.exampleCount.length; ++i) - writer.int32(message.exampleCount[i]); - writer.ldelim(); - } - return writer; - }; + /** + * TextSnippet content. + * @member {string} content + * @memberof google.cloud.automl.v1.TextSnippet + * @instance + */ + TextSnippet.prototype.content = ""; - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * TextSnippet mimeType. + * @member {string} mimeType + * @memberof google.cloud.automl.v1.TextSnippet + * @instance + */ + TextSnippet.prototype.mimeType = ""; - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.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.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.exampleCount && message.exampleCount.length)) - message.exampleCount = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.exampleCount.push(reader.int32()); - } else - message.exampleCount.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * TextSnippet contentUri. + * @member {string} contentUri + * @memberof google.cloud.automl.v1.TextSnippet + * @instance + */ + TextSnippet.prototype.contentUri = ""; - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new TextSnippet instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {google.cloud.automl.v1.ITextSnippet=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet instance + */ + TextSnippet.create = function create(properties) { + return new TextSnippet(properties); + }; + + /** + * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {google.cloud.automl.v1.ITextSnippet} message TextSnippet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSnippet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); + if (message.contentUri != null && message.hasOwnProperty("contentUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.contentUri); + return writer; + }; - /** - * Verifies a Row message. - * @function verify - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) { - if (!Array.isArray(message.exampleCount)) - return "exampleCount: array expected"; - for (var i = 0; i < message.exampleCount.length; ++i) - if (!$util.isInteger(message.exampleCount[i])) - return "exampleCount: integer[] expected"; - } - return null; - }; + /** + * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {google.cloud.automl.v1.ITextSnippet} message TextSnippet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSnippet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) - return object; - var message = new $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); - if (object.exampleCount) { - if (!Array.isArray(object.exampleCount)) - throw TypeError(".google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.exampleCount: array expected"); - message.exampleCount = []; - for (var i = 0; i < object.exampleCount.length; ++i) - message.exampleCount[i] = object.exampleCount[i] | 0; - } - return message; - }; + /** + * Decodes a TextSnippet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSnippet.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.automl.v1.TextSnippet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.mimeType = reader.string(); + break; + case 4: + message.contentUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exampleCount = []; - if (message.exampleCount && message.exampleCount.length) { - object.exampleCount = []; - for (var j = 0; j < message.exampleCount.length; ++j) - object.exampleCount[j] = message.exampleCount[j]; - } - return object; - }; + /** + * Decodes a TextSnippet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSnippet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a TextSnippet message. + * @function verify + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextSnippet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.contentUri != null && message.hasOwnProperty("contentUri")) + if (!$util.isString(message.contentUri)) + return "contentUri: string expected"; + return null; + }; - return Row; - })(); + /** + * Creates a TextSnippet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet + */ + TextSnippet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextSnippet) + return object; + var message = new $root.google.cloud.automl.v1.TextSnippet(); + if (object.content != null) + message.content = String(object.content); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.contentUri != null) + message.contentUri = String(object.contentUri); + return message; + }; - return ConfusionMatrix; - })(); + /** + * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.TextSnippet + * @static + * @param {google.cloud.automl.v1.TextSnippet} message TextSnippet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextSnippet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.mimeType = ""; + object.contentUri = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.contentUri != null && message.hasOwnProperty("contentUri")) + object.contentUri = message.contentUri; + return object; + }; - return ClassificationEvaluationMetrics; + /** + * Converts this TextSnippet to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.TextSnippet + * @instance + * @returns {Object.} JSON object + */ + TextSnippet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextSnippet; })(); - v1.TextClassificationDatasetMetadata = (function() { + v1.DocumentDimensions = (function() { /** - * Properties of a TextClassificationDatasetMetadata. + * Properties of a DocumentDimensions. * @memberof google.cloud.automl.v1 - * @interface ITextClassificationDatasetMetadata - * @property {google.cloud.automl.v1.ClassificationType|null} [classificationType] TextClassificationDatasetMetadata classificationType + * @interface IDocumentDimensions + * @property {google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|null} [unit] DocumentDimensions unit + * @property {number|null} [width] DocumentDimensions width + * @property {number|null} [height] DocumentDimensions height */ /** - * Constructs a new TextClassificationDatasetMetadata. + * Constructs a new DocumentDimensions. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextClassificationDatasetMetadata. - * @implements ITextClassificationDatasetMetadata + * @classdesc Represents a DocumentDimensions. + * @implements IDocumentDimensions * @constructor - * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IDocumentDimensions=} [properties] Properties to set */ - function TextClassificationDatasetMetadata(properties) { + function DocumentDimensions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6693,75 +6272,101 @@ } /** - * TextClassificationDatasetMetadata classificationType. - * @member {google.cloud.automl.v1.ClassificationType} classificationType - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * DocumentDimensions unit. + * @member {google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit} unit + * @memberof google.cloud.automl.v1.DocumentDimensions * @instance */ - TextClassificationDatasetMetadata.prototype.classificationType = 0; + DocumentDimensions.prototype.unit = 0; /** - * Creates a new TextClassificationDatasetMetadata instance using the specified properties. + * DocumentDimensions width. + * @member {number} width + * @memberof google.cloud.automl.v1.DocumentDimensions + * @instance + */ + DocumentDimensions.prototype.width = 0; + + /** + * DocumentDimensions height. + * @member {number} height + * @memberof google.cloud.automl.v1.DocumentDimensions + * @instance + */ + DocumentDimensions.prototype.height = 0; + + /** + * Creates a new DocumentDimensions instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static - * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata instance + * @param {google.cloud.automl.v1.IDocumentDimensions=} [properties] Properties to set + * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions instance */ - TextClassificationDatasetMetadata.create = function create(properties) { - return new TextClassificationDatasetMetadata(properties); + DocumentDimensions.create = function create(properties) { + return new DocumentDimensions(properties); }; /** - * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static - * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IDocumentDimensions} message DocumentDimensions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationDatasetMetadata.encode = function encode(message, writer) { + DocumentDimensions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); + if (message.unit != null && message.hasOwnProperty("unit")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.unit); + if (message.width != null && message.hasOwnProperty("width")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.width); + if (message.height != null && message.hasOwnProperty("height")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.height); return writer; }; /** - * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static - * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IDocumentDimensions} message DocumentDimensions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DocumentDimensions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes a DocumentDimensions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata + * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationDatasetMetadata.decode = function decode(reader, length) { + DocumentDimensions.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.automl.v1.TextClassificationDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.DocumentDimensions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.classificationType = reader.int32(); + message.unit = reader.int32(); + break; + case 2: + message.width = reader.float(); + break; + case 3: + message.height = reader.float(); break; default: reader.skipType(tag & 7); @@ -6772,125 +6377,170 @@ }; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata + * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + DocumentDimensions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextClassificationDatasetMetadata message. + * Verifies a DocumentDimensions message. * @function verify - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextClassificationDatasetMetadata.verify = function verify(message) { + DocumentDimensions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - switch (message.classificationType) { + if (message.unit != null && message.hasOwnProperty("unit")) + switch (message.unit) { default: - return "classificationType: enum value expected"; + return "unit: enum value expected"; case 0: case 1: case 2: + case 3: break; } + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height !== "number") + return "height: number expected"; return null; }; /** - * Creates a TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentDimensions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata + * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions */ - TextClassificationDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextClassificationDatasetMetadata) + DocumentDimensions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.DocumentDimensions) return object; - var message = new $root.google.cloud.automl.v1.TextClassificationDatasetMetadata(); - switch (object.classificationType) { - case "CLASSIFICATION_TYPE_UNSPECIFIED": + var message = new $root.google.cloud.automl.v1.DocumentDimensions(); + switch (object.unit) { + case "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": case 0: - message.classificationType = 0; + message.unit = 0; break; - case "MULTICLASS": + case "INCH": case 1: - message.classificationType = 1; + message.unit = 1; break; - case "MULTILABEL": + case "CENTIMETER": case 2: - message.classificationType = 2; + message.unit = 2; + break; + case "POINT": + case 3: + message.unit = 3; break; } + if (object.width != null) + message.width = Number(object.width); + if (object.height != null) + message.height = Number(object.height); return message; }; /** - * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @static - * @param {google.cloud.automl.v1.TextClassificationDatasetMetadata} message TextClassificationDatasetMetadata + * @param {google.cloud.automl.v1.DocumentDimensions} message DocumentDimensions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextClassificationDatasetMetadata.toObject = function toObject(message, options) { + DocumentDimensions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; + if (options.defaults) { + object.unit = options.enums === String ? "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED" : 0; + object.width = 0; + object.height = 0; + } + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = options.enums === String ? $root.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height; return object; }; /** - * Converts this TextClassificationDatasetMetadata to JSON. + * Converts this DocumentDimensions to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.DocumentDimensions * @instance * @returns {Object.} JSON object */ - TextClassificationDatasetMetadata.prototype.toJSON = function toJSON() { + DocumentDimensions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextClassificationDatasetMetadata; + /** + * DocumentDimensionUnit enum. + * @name google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit + * @enum {string} + * @property {number} DOCUMENT_DIMENSION_UNIT_UNSPECIFIED=0 DOCUMENT_DIMENSION_UNIT_UNSPECIFIED value + * @property {number} INCH=1 INCH value + * @property {number} CENTIMETER=2 CENTIMETER value + * @property {number} POINT=3 POINT value + */ + DocumentDimensions.DocumentDimensionUnit = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCH"] = 1; + values[valuesById[2] = "CENTIMETER"] = 2; + values[valuesById[3] = "POINT"] = 3; + return values; + })(); + + return DocumentDimensions; })(); - v1.TextClassificationModelMetadata = (function() { + v1.Document = (function() { /** - * Properties of a TextClassificationModelMetadata. + * Properties of a Document. * @memberof google.cloud.automl.v1 - * @interface ITextClassificationModelMetadata - * @property {google.cloud.automl.v1.ClassificationType|null} [classificationType] TextClassificationModelMetadata classificationType + * @interface IDocument + * @property {google.cloud.automl.v1.IDocumentInputConfig|null} [inputConfig] Document inputConfig + * @property {google.cloud.automl.v1.ITextSnippet|null} [documentText] Document documentText + * @property {Array.|null} [layout] Document layout + * @property {google.cloud.automl.v1.IDocumentDimensions|null} [documentDimensions] Document documentDimensions + * @property {number|null} [pageCount] Document pageCount */ /** - * Constructs a new TextClassificationModelMetadata. + * Constructs a new Document. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextClassificationModelMetadata. - * @implements ITextClassificationModelMetadata + * @classdesc Represents a Document. + * @implements IDocument * @constructor - * @param {google.cloud.automl.v1.ITextClassificationModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IDocument=} [properties] Properties to set */ - function TextClassificationModelMetadata(properties) { + function Document(properties) { + this.layout = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6898,75 +6548,130 @@ } /** - * TextClassificationModelMetadata classificationType. - * @member {google.cloud.automl.v1.ClassificationType} classificationType - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * Document inputConfig. + * @member {google.cloud.automl.v1.IDocumentInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1.Document * @instance */ - TextClassificationModelMetadata.prototype.classificationType = 0; + Document.prototype.inputConfig = null; /** - * Creates a new TextClassificationModelMetadata instance using the specified properties. + * Document documentText. + * @member {google.cloud.automl.v1.ITextSnippet|null|undefined} documentText + * @memberof google.cloud.automl.v1.Document + * @instance + */ + Document.prototype.documentText = null; + + /** + * Document layout. + * @member {Array.} layout + * @memberof google.cloud.automl.v1.Document + * @instance + */ + Document.prototype.layout = $util.emptyArray; + + /** + * Document documentDimensions. + * @member {google.cloud.automl.v1.IDocumentDimensions|null|undefined} documentDimensions + * @memberof google.cloud.automl.v1.Document + * @instance + */ + Document.prototype.documentDimensions = null; + + /** + * Document pageCount. + * @member {number} pageCount + * @memberof google.cloud.automl.v1.Document + * @instance + */ + Document.prototype.pageCount = 0; + + /** + * Creates a new Document instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static - * @param {google.cloud.automl.v1.ITextClassificationModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata instance + * @param {google.cloud.automl.v1.IDocument=} [properties] Properties to set + * @returns {google.cloud.automl.v1.Document} Document instance */ - TextClassificationModelMetadata.create = function create(properties) { - return new TextClassificationModelMetadata(properties); + Document.create = function create(properties) { + return new Document(properties); }; /** - * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. + * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static - * @param {google.cloud.automl.v1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationModelMetadata.encode = function encode(message, writer) { + Document.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.classificationType); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1.DocumentInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.documentText != null && message.hasOwnProperty("documentText")) + $root.google.cloud.automl.v1.TextSnippet.encode(message.documentText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.layout != null && message.layout.length) + for (var i = 0; i < message.layout.length; ++i) + $root.google.cloud.automl.v1.Document.Layout.encode(message.layout[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) + $root.google.cloud.automl.v1.DocumentDimensions.encode(message.documentDimensions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageCount); return writer; }; /** - * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static - * @param {google.cloud.automl.v1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + Document.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata + * @returns {google.cloud.automl.v1.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationModelMetadata.decode = function decode(reader, length) { + Document.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.automl.v1.TextClassificationModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.Document(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.inputConfig = $root.google.cloud.automl.v1.DocumentInputConfig.decode(reader, reader.uint32()); + break; + case 2: + message.documentText = $root.google.cloud.automl.v1.TextSnippet.decode(reader, reader.uint32()); + break; case 3: - message.classificationType = reader.int32(); + if (!(message.layout && message.layout.length)) + message.layout = []; + message.layout.push($root.google.cloud.automl.v1.Document.Layout.decode(reader, reader.uint32())); + break; + case 4: + message.documentDimensions = $root.google.cloud.automl.v1.DocumentDimensions.decode(reader, reader.uint32()); + break; + case 5: + message.pageCount = reader.int32(); break; default: reader.skipType(tag & 7); @@ -6977,284 +6682,522 @@ }; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata + * @returns {google.cloud.automl.v1.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { + Document.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextClassificationModelMetadata message. + * Verifies a Document message. * @function verify - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextClassificationModelMetadata.verify = function verify(message) { + Document.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - switch (message.classificationType) { - default: - return "classificationType: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.automl.v1.DocumentInputConfig.verify(message.inputConfig); + if (error) + return "inputConfig." + error; + } + if (message.documentText != null && message.hasOwnProperty("documentText")) { + var error = $root.google.cloud.automl.v1.TextSnippet.verify(message.documentText); + if (error) + return "documentText." + error; + } + if (message.layout != null && message.hasOwnProperty("layout")) { + if (!Array.isArray(message.layout)) + return "layout: array expected"; + for (var i = 0; i < message.layout.length; ++i) { + var error = $root.google.cloud.automl.v1.Document.Layout.verify(message.layout[i]); + if (error) + return "layout." + error; } + } + if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) { + var error = $root.google.cloud.automl.v1.DocumentDimensions.verify(message.documentDimensions); + if (error) + return "documentDimensions." + error; + } + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + if (!$util.isInteger(message.pageCount)) + return "pageCount: integer expected"; return null; }; /** - * Creates a TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata + * @returns {google.cloud.automl.v1.Document} Document */ - TextClassificationModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextClassificationModelMetadata) + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.Document) return object; - var message = new $root.google.cloud.automl.v1.TextClassificationModelMetadata(); - switch (object.classificationType) { - case "CLASSIFICATION_TYPE_UNSPECIFIED": - case 0: - message.classificationType = 0; - break; - case "MULTICLASS": - case 1: - message.classificationType = 1; - break; - case "MULTILABEL": - case 2: - message.classificationType = 2; - break; + var message = new $root.google.cloud.automl.v1.Document(); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1.Document.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1.DocumentInputConfig.fromObject(object.inputConfig); + } + if (object.documentText != null) { + if (typeof object.documentText !== "object") + throw TypeError(".google.cloud.automl.v1.Document.documentText: object expected"); + message.documentText = $root.google.cloud.automl.v1.TextSnippet.fromObject(object.documentText); + } + if (object.layout) { + if (!Array.isArray(object.layout)) + throw TypeError(".google.cloud.automl.v1.Document.layout: array expected"); + message.layout = []; + for (var i = 0; i < object.layout.length; ++i) { + if (typeof object.layout[i] !== "object") + throw TypeError(".google.cloud.automl.v1.Document.layout: object expected"); + message.layout[i] = $root.google.cloud.automl.v1.Document.Layout.fromObject(object.layout[i]); + } + } + if (object.documentDimensions != null) { + if (typeof object.documentDimensions !== "object") + throw TypeError(".google.cloud.automl.v1.Document.documentDimensions: object expected"); + message.documentDimensions = $root.google.cloud.automl.v1.DocumentDimensions.fromObject(object.documentDimensions); } + if (object.pageCount != null) + message.pageCount = object.pageCount | 0; return message; }; /** - * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a Document message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @static - * @param {google.cloud.automl.v1.TextClassificationModelMetadata} message TextClassificationModelMetadata + * @param {google.cloud.automl.v1.Document} message Document * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextClassificationModelMetadata.toObject = function toObject(message, options) { + Document.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; + if (options.arrays || options.defaults) + object.layout = []; + if (options.defaults) { + object.inputConfig = null; + object.documentText = null; + object.documentDimensions = null; + object.pageCount = 0; + } + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.automl.v1.DocumentInputConfig.toObject(message.inputConfig, options); + if (message.documentText != null && message.hasOwnProperty("documentText")) + object.documentText = $root.google.cloud.automl.v1.TextSnippet.toObject(message.documentText, options); + if (message.layout && message.layout.length) { + object.layout = []; + for (var j = 0; j < message.layout.length; ++j) + object.layout[j] = $root.google.cloud.automl.v1.Document.Layout.toObject(message.layout[j], options); + } + if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) + object.documentDimensions = $root.google.cloud.automl.v1.DocumentDimensions.toObject(message.documentDimensions, options); + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + object.pageCount = message.pageCount; return object; }; /** - * Converts this TextClassificationModelMetadata to JSON. + * Converts this Document to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1.Document * @instance * @returns {Object.} JSON object */ - TextClassificationModelMetadata.prototype.toJSON = function toJSON() { + Document.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextClassificationModelMetadata; - })(); + Document.Layout = (function() { - v1.TextExtractionDatasetMetadata = (function() { + /** + * Properties of a Layout. + * @memberof google.cloud.automl.v1.Document + * @interface ILayout + * @property {google.cloud.automl.v1.ITextSegment|null} [textSegment] Layout textSegment + * @property {number|null} [pageNumber] Layout pageNumber + * @property {google.cloud.automl.v1.IBoundingPoly|null} [boundingPoly] Layout boundingPoly + * @property {google.cloud.automl.v1.Document.Layout.TextSegmentType|null} [textSegmentType] Layout textSegmentType + */ - /** - * Properties of a TextExtractionDatasetMetadata. - * @memberof google.cloud.automl.v1 - * @interface ITextExtractionDatasetMetadata - */ + /** + * Constructs a new Layout. + * @memberof google.cloud.automl.v1.Document + * @classdesc Represents a Layout. + * @implements ILayout + * @constructor + * @param {google.cloud.automl.v1.Document.ILayout=} [properties] Properties to set + */ + function Layout(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]]; + } - /** - * Constructs a new TextExtractionDatasetMetadata. - * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextExtractionDatasetMetadata. - * @implements ITextExtractionDatasetMetadata - * @constructor - * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata=} [properties] Properties to set - */ - function TextExtractionDatasetMetadata(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]]; - } + /** + * Layout textSegment. + * @member {google.cloud.automl.v1.ITextSegment|null|undefined} textSegment + * @memberof google.cloud.automl.v1.Document.Layout + * @instance + */ + Layout.prototype.textSegment = null; - /** - * Creates a new TextExtractionDatasetMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata instance - */ - TextExtractionDatasetMetadata.create = function create(properties) { - return new TextExtractionDatasetMetadata(properties); - }; + /** + * Layout pageNumber. + * @member {number} pageNumber + * @memberof google.cloud.automl.v1.Document.Layout + * @instance + */ + Layout.prototype.pageNumber = 0; - /** - * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextExtractionDatasetMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Layout boundingPoly. + * @member {google.cloud.automl.v1.IBoundingPoly|null|undefined} boundingPoly + * @memberof google.cloud.automl.v1.Document.Layout + * @instance + */ + Layout.prototype.boundingPoly = null; - /** - * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextExtractionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Layout textSegmentType. + * @member {google.cloud.automl.v1.Document.Layout.TextSegmentType} textSegmentType + * @memberof google.cloud.automl.v1.Document.Layout + * @instance + */ + Layout.prototype.textSegmentType = 0; - /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextExtractionDatasetMetadata.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.automl.v1.TextExtractionDatasetMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + /** + * Creates a new Layout instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {google.cloud.automl.v1.Document.ILayout=} [properties] Properties to set + * @returns {google.cloud.automl.v1.Document.Layout} Layout instance + */ + Layout.create = function create(properties) { + return new Layout(properties); + }; + + /** + * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {google.cloud.automl.v1.Document.ILayout} message Layout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Layout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.textSegment != null && message.hasOwnProperty("textSegment")) + $root.google.cloud.automl.v1.TextSegment.encode(message.textSegment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber); + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) + $root.google.cloud.automl.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.textSegmentType); + return writer; + }; + + /** + * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {google.cloud.automl.v1.Document.ILayout} message Layout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Layout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Layout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.Document.Layout} Layout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Layout.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.automl.v1.Document.Layout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.textSegment = $root.google.cloud.automl.v1.TextSegment.decode(reader, reader.uint32()); + break; + case 2: + message.pageNumber = reader.int32(); + break; + case 3: + message.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.decode(reader, reader.uint32()); + break; + case 4: + message.textSegmentType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Layout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.Document.Layout} Layout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Layout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Layout message. + * @function verify + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Layout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.textSegment != null && message.hasOwnProperty("textSegment")) { + var error = $root.google.cloud.automl.v1.TextSegment.verify(message.textSegment); + if (error) + return "textSegment." + error; + } + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + if (!$util.isInteger(message.pageNumber)) + return "pageNumber: integer expected"; + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { + var error = $root.google.cloud.automl.v1.BoundingPoly.verify(message.boundingPoly); + if (error) + return "boundingPoly." + error; + } + if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) + switch (message.textSegmentType) { + default: + return "textSegmentType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + return null; + }; + + /** + * Creates a Layout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.Document.Layout} Layout + */ + Layout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.Document.Layout) + return object; + var message = new $root.google.cloud.automl.v1.Document.Layout(); + if (object.textSegment != null) { + if (typeof object.textSegment !== "object") + throw TypeError(".google.cloud.automl.v1.Document.Layout.textSegment: object expected"); + message.textSegment = $root.google.cloud.automl.v1.TextSegment.fromObject(object.textSegment); + } + if (object.pageNumber != null) + message.pageNumber = object.pageNumber | 0; + if (object.boundingPoly != null) { + if (typeof object.boundingPoly !== "object") + throw TypeError(".google.cloud.automl.v1.Document.Layout.boundingPoly: object expected"); + message.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.fromObject(object.boundingPoly); + } + switch (object.textSegmentType) { + case "TEXT_SEGMENT_TYPE_UNSPECIFIED": + case 0: + message.textSegmentType = 0; + break; + case "TOKEN": + case 1: + message.textSegmentType = 1; + break; + case "PARAGRAPH": + case 2: + message.textSegmentType = 2; + break; + case "FORM_FIELD": + case 3: + message.textSegmentType = 3; + break; + case "FORM_FIELD_NAME": + case 4: + message.textSegmentType = 4; + break; + case "FORM_FIELD_CONTENTS": + case 5: + message.textSegmentType = 5; + break; + case "TABLE": + case 6: + message.textSegmentType = 6; + break; + case "TABLE_HEADER": + case 7: + message.textSegmentType = 7; + break; + case "TABLE_ROW": + case 8: + message.textSegmentType = 8; + break; + case "TABLE_CELL": + case 9: + message.textSegmentType = 9; break; } - } - return message; - }; - - /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextExtractionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextExtractionDatasetMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextExtractionDatasetMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + return message; + }; - /** - * Creates a TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata - */ - TextExtractionDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextExtractionDatasetMetadata) + /** + * Creates a plain object from a Layout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.Document.Layout + * @static + * @param {google.cloud.automl.v1.Document.Layout} message Layout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Layout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.textSegment = null; + object.pageNumber = 0; + object.boundingPoly = null; + object.textSegmentType = options.enums === String ? "TEXT_SEGMENT_TYPE_UNSPECIFIED" : 0; + } + if (message.textSegment != null && message.hasOwnProperty("textSegment")) + object.textSegment = $root.google.cloud.automl.v1.TextSegment.toObject(message.textSegment, options); + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + object.pageNumber = message.pageNumber; + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) + object.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.toObject(message.boundingPoly, options); + if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) + object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; return object; - return new $root.google.cloud.automl.v1.TextExtractionDatasetMetadata(); - }; + }; - /** - * Creates a plain object from a TextExtractionDatasetMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @static - * @param {google.cloud.automl.v1.TextExtractionDatasetMetadata} message TextExtractionDatasetMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextExtractionDatasetMetadata.toObject = function toObject() { - return {}; - }; + /** + * Converts this Layout to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.Document.Layout + * @instance + * @returns {Object.} JSON object + */ + Layout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this TextExtractionDatasetMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata - * @instance - * @returns {Object.} JSON object - */ - TextExtractionDatasetMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * TextSegmentType enum. + * @name google.cloud.automl.v1.Document.Layout.TextSegmentType + * @enum {string} + * @property {number} TEXT_SEGMENT_TYPE_UNSPECIFIED=0 TEXT_SEGMENT_TYPE_UNSPECIFIED value + * @property {number} TOKEN=1 TOKEN value + * @property {number} PARAGRAPH=2 PARAGRAPH value + * @property {number} FORM_FIELD=3 FORM_FIELD value + * @property {number} FORM_FIELD_NAME=4 FORM_FIELD_NAME value + * @property {number} FORM_FIELD_CONTENTS=5 FORM_FIELD_CONTENTS value + * @property {number} TABLE=6 TABLE value + * @property {number} TABLE_HEADER=7 TABLE_HEADER value + * @property {number} TABLE_ROW=8 TABLE_ROW value + * @property {number} TABLE_CELL=9 TABLE_CELL value + */ + Layout.TextSegmentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEXT_SEGMENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOKEN"] = 1; + values[valuesById[2] = "PARAGRAPH"] = 2; + values[valuesById[3] = "FORM_FIELD"] = 3; + values[valuesById[4] = "FORM_FIELD_NAME"] = 4; + values[valuesById[5] = "FORM_FIELD_CONTENTS"] = 5; + values[valuesById[6] = "TABLE"] = 6; + values[valuesById[7] = "TABLE_HEADER"] = 7; + values[valuesById[8] = "TABLE_ROW"] = 8; + values[valuesById[9] = "TABLE_CELL"] = 9; + return values; + })(); - return TextExtractionDatasetMetadata; + return Layout; + })(); + + return Document; })(); - v1.TextExtractionModelMetadata = (function() { + v1.ExamplePayload = (function() { /** - * Properties of a TextExtractionModelMetadata. + * Properties of an ExamplePayload. * @memberof google.cloud.automl.v1 - * @interface ITextExtractionModelMetadata + * @interface IExamplePayload + * @property {google.cloud.automl.v1.IImage|null} [image] ExamplePayload image + * @property {google.cloud.automl.v1.ITextSnippet|null} [textSnippet] ExamplePayload textSnippet + * @property {google.cloud.automl.v1.IDocument|null} [document] ExamplePayload document */ /** - * Constructs a new TextExtractionModelMetadata. + * Constructs a new ExamplePayload. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextExtractionModelMetadata. - * @implements ITextExtractionModelMetadata + * @classdesc Represents an ExamplePayload. + * @implements IExamplePayload * @constructor - * @param {google.cloud.automl.v1.ITextExtractionModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IExamplePayload=} [properties] Properties to set */ - function TextExtractionModelMetadata(properties) { + function ExamplePayload(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7262,236 +7205,115 @@ } /** - * Creates a new TextExtractionModelMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {google.cloud.automl.v1.ITextExtractionModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata instance - */ - TextExtractionModelMetadata.create = function create(properties) { - return new TextExtractionModelMetadata(properties); - }; - - /** - * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {google.cloud.automl.v1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextExtractionModelMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {google.cloud.automl.v1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextExtractionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextExtractionModelMetadata.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.automl.v1.TextExtractionModelMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextExtractionModelMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextExtractionModelMetadata message. - * @function verify - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextExtractionModelMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata - */ - TextExtractionModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextExtractionModelMetadata) - return object; - return new $root.google.cloud.automl.v1.TextExtractionModelMetadata(); - }; - - /** - * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata - * @static - * @param {google.cloud.automl.v1.TextExtractionModelMetadata} message TextExtractionModelMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ExamplePayload image. + * @member {google.cloud.automl.v1.IImage|null|undefined} image + * @memberof google.cloud.automl.v1.ExamplePayload + * @instance */ - TextExtractionModelMetadata.toObject = function toObject() { - return {}; - }; + ExamplePayload.prototype.image = null; /** - * Converts this TextExtractionModelMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.TextExtractionModelMetadata + * ExamplePayload textSnippet. + * @member {google.cloud.automl.v1.ITextSnippet|null|undefined} textSnippet + * @memberof google.cloud.automl.v1.ExamplePayload * @instance - * @returns {Object.} JSON object */ - TextExtractionModelMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TextExtractionModelMetadata; - })(); - - v1.TextSentimentDatasetMetadata = (function() { + ExamplePayload.prototype.textSnippet = null; /** - * Properties of a TextSentimentDatasetMetadata. - * @memberof google.cloud.automl.v1 - * @interface ITextSentimentDatasetMetadata - * @property {number|null} [sentimentMax] TextSentimentDatasetMetadata sentimentMax + * ExamplePayload document. + * @member {google.cloud.automl.v1.IDocument|null|undefined} document + * @memberof google.cloud.automl.v1.ExamplePayload + * @instance */ + ExamplePayload.prototype.document = null; - /** - * Constructs a new TextSentimentDatasetMetadata. - * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextSentimentDatasetMetadata. - * @implements ITextSentimentDatasetMetadata - * @constructor - * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata=} [properties] Properties to set - */ - function TextSentimentDatasetMetadata(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]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TextSentimentDatasetMetadata sentimentMax. - * @member {number} sentimentMax - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * ExamplePayload payload. + * @member {"image"|"textSnippet"|"document"|undefined} payload + * @memberof google.cloud.automl.v1.ExamplePayload * @instance */ - TextSentimentDatasetMetadata.prototype.sentimentMax = 0; + Object.defineProperty(ExamplePayload.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["image", "textSnippet", "document"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TextSentimentDatasetMetadata instance using the specified properties. + * Creates a new ExamplePayload instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static - * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata instance + * @param {google.cloud.automl.v1.IExamplePayload=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload instance */ - TextSentimentDatasetMetadata.create = function create(properties) { - return new TextSentimentDatasetMetadata(properties); + ExamplePayload.create = function create(properties) { + return new ExamplePayload(properties); }; /** - * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. + * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static - * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IExamplePayload} message ExamplePayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentDatasetMetadata.encode = function encode(message, writer) { + ExamplePayload.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentimentMax); + if (message.image != null && message.hasOwnProperty("image")) + $root.google.cloud.automl.v1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) + $root.google.cloud.automl.v1.TextSnippet.encode(message.textSnippet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.automl.v1.Document.encode(message.document, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. + * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static - * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IExamplePayload} message ExamplePayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ExamplePayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. + * Decodes an ExamplePayload message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata + * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentDatasetMetadata.decode = function decode(reader, length) { + ExamplePayload.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.automl.v1.TextSentimentDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ExamplePayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sentimentMax = reader.int32(); + message.image = $root.google.cloud.automl.v1.Image.decode(reader, reader.uint32()); + break; + case 2: + message.textSnippet = $root.google.cloud.automl.v1.TextSnippet.decode(reader, reader.uint32()); + break; + case 4: + message.document = $root.google.cloud.automl.v1.Document.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7502,106 +7324,159 @@ }; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata + * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + ExamplePayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSentimentDatasetMetadata message. + * Verifies an ExamplePayload message. * @function verify - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSentimentDatasetMetadata.verify = function verify(message) { + ExamplePayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) - if (!$util.isInteger(message.sentimentMax)) - return "sentimentMax: integer expected"; + var properties = {}; + if (message.image != null && message.hasOwnProperty("image")) { + properties.payload = 1; + { + var error = $root.google.cloud.automl.v1.Image.verify(message.image); + if (error) + return "image." + error; + } + } + if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.cloud.automl.v1.TextSnippet.verify(message.textSnippet); + if (error) + return "textSnippet." + error; + } + } + if (message.document != null && message.hasOwnProperty("document")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.cloud.automl.v1.Document.verify(message.document); + if (error) + return "document." + error; + } + } return null; }; /** - * Creates a TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExamplePayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata + * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload */ - TextSentimentDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextSentimentDatasetMetadata) + ExamplePayload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ExamplePayload) return object; - var message = new $root.google.cloud.automl.v1.TextSentimentDatasetMetadata(); - if (object.sentimentMax != null) - message.sentimentMax = object.sentimentMax | 0; + var message = new $root.google.cloud.automl.v1.ExamplePayload(); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.automl.v1.ExamplePayload.image: object expected"); + message.image = $root.google.cloud.automl.v1.Image.fromObject(object.image); + } + if (object.textSnippet != null) { + if (typeof object.textSnippet !== "object") + throw TypeError(".google.cloud.automl.v1.ExamplePayload.textSnippet: object expected"); + message.textSnippet = $root.google.cloud.automl.v1.TextSnippet.fromObject(object.textSnippet); + } + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.automl.v1.ExamplePayload.document: object expected"); + message.document = $root.google.cloud.automl.v1.Document.fromObject(object.document); + } return message; }; /** - * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @static - * @param {google.cloud.automl.v1.TextSentimentDatasetMetadata} message TextSentimentDatasetMetadata + * @param {google.cloud.automl.v1.ExamplePayload} message ExamplePayload * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSentimentDatasetMetadata.toObject = function toObject(message, options) { + ExamplePayload.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sentimentMax = 0; - if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) - object.sentimentMax = message.sentimentMax; + if (message.image != null && message.hasOwnProperty("image")) { + object.image = $root.google.cloud.automl.v1.Image.toObject(message.image, options); + if (options.oneofs) + object.payload = "image"; + } + if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { + object.textSnippet = $root.google.cloud.automl.v1.TextSnippet.toObject(message.textSnippet, options); + if (options.oneofs) + object.payload = "textSnippet"; + } + if (message.document != null && message.hasOwnProperty("document")) { + object.document = $root.google.cloud.automl.v1.Document.toObject(message.document, options); + if (options.oneofs) + object.payload = "document"; + } return object; }; /** - * Converts this TextSentimentDatasetMetadata to JSON. + * Converts this ExamplePayload to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.ExamplePayload * @instance * @returns {Object.} JSON object */ - TextSentimentDatasetMetadata.prototype.toJSON = function toJSON() { + ExamplePayload.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSentimentDatasetMetadata; + return ExamplePayload; })(); - v1.TextSentimentModelMetadata = (function() { + v1.InputConfig = (function() { /** - * Properties of a TextSentimentModelMetadata. + * Properties of an InputConfig. * @memberof google.cloud.automl.v1 - * @interface ITextSentimentModelMetadata + * @interface IInputConfig + * @property {google.cloud.automl.v1.IGcsSource|null} [gcsSource] InputConfig gcsSource + * @property {Object.|null} [params] InputConfig params */ /** - * Constructs a new TextSentimentModelMetadata. + * Constructs a new InputConfig. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextSentimentModelMetadata. - * @implements ITextSentimentModelMetadata + * @classdesc Represents an InputConfig. + * @implements IInputConfig * @constructor - * @param {google.cloud.automl.v1.ITextSentimentModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IInputConfig=} [properties] Properties to set */ - function TextSentimentModelMetadata(properties) { + function InputConfig(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7609,63 +7484,109 @@ } /** - * Creates a new TextSentimentModelMetadata instance using the specified properties. + * InputConfig gcsSource. + * @member {google.cloud.automl.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.automl.v1.InputConfig + * @instance + */ + InputConfig.prototype.gcsSource = null; + + /** + * InputConfig params. + * @member {Object.} params + * @memberof google.cloud.automl.v1.InputConfig + * @instance + */ + InputConfig.prototype.params = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InputConfig source. + * @member {"gcsSource"|undefined} source + * @memberof google.cloud.automl.v1.InputConfig + * @instance + */ + Object.defineProperty(InputConfig.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static - * @param {google.cloud.automl.v1.ITextSentimentModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata instance + * @param {google.cloud.automl.v1.IInputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1.InputConfig} InputConfig instance */ - TextSentimentModelMetadata.create = function create(properties) { - return new TextSentimentModelMetadata(properties); + InputConfig.create = function create(properties) { + return new InputConfig(properties); }; /** - * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. + * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static - * @param {google.cloud.automl.v1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IInputConfig} message InputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentModelMetadata.encode = function encode(message, writer) { + InputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + $root.google.cloud.automl.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. + * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static - * @param {google.cloud.automl.v1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IInputConfig} message InputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + InputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. + * Decodes an InputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata + * @returns {google.cloud.automl.v1.InputConfig} InputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentModelMetadata.decode = function decode(reader, length) { + InputConfig.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.automl.v1.TextSentimentModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.InputConfig(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.gcsSource = $root.google.cloud.automl.v1.GcsSource.decode(reader, reader.uint32()); + break; + case 2: + reader.skip().pos++; + if (message.params === $util.emptyObject) + message.params = {}; + key = reader.string(); + reader.pos++; + message.params[key] = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -7675,95 +7596,140 @@ }; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an InputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata + * @returns {google.cloud.automl.v1.InputConfig} InputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentModelMetadata.decodeDelimited = function decodeDelimited(reader) { + InputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSentimentModelMetadata message. + * Verifies an InputConfig message. * @function verify - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSentimentModelMetadata.verify = function verify(message) { + InputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.automl.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; + } return null; }; /** - * Creates a TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata + * @returns {google.cloud.automl.v1.InputConfig} InputConfig */ - TextSentimentModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextSentimentModelMetadata) + InputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.InputConfig) return object; - return new $root.google.cloud.automl.v1.TextSentimentModelMetadata(); + var message = new $root.google.cloud.automl.v1.InputConfig(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.automl.v1.InputConfig.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.automl.v1.GcsSource.fromObject(object.gcsSource); + } + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.automl.v1.InputConfig.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); + } + return message; }; /** - * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from an InputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @static - * @param {google.cloud.automl.v1.TextSentimentModelMetadata} message TextSentimentModelMetadata + * @param {google.cloud.automl.v1.InputConfig} message InputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSentimentModelMetadata.toObject = function toObject() { - return {}; + InputConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.params = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.automl.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; + } + return object; }; /** - * Converts this TextSentimentModelMetadata to JSON. + * Converts this InputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1.InputConfig * @instance * @returns {Object.} JSON object */ - TextSentimentModelMetadata.prototype.toJSON = function toJSON() { + InputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSentimentModelMetadata; + return InputConfig; })(); - v1.TranslationDatasetMetadata = (function() { + v1.BatchPredictInputConfig = (function() { /** - * Properties of a TranslationDatasetMetadata. + * Properties of a BatchPredictInputConfig. * @memberof google.cloud.automl.v1 - * @interface ITranslationDatasetMetadata - * @property {string|null} [sourceLanguageCode] TranslationDatasetMetadata sourceLanguageCode - * @property {string|null} [targetLanguageCode] TranslationDatasetMetadata targetLanguageCode + * @interface IBatchPredictInputConfig + * @property {google.cloud.automl.v1.IGcsSource|null} [gcsSource] BatchPredictInputConfig gcsSource */ /** - * Constructs a new TranslationDatasetMetadata. + * Constructs a new BatchPredictInputConfig. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TranslationDatasetMetadata. - * @implements ITranslationDatasetMetadata + * @classdesc Represents a BatchPredictInputConfig. + * @implements IBatchPredictInputConfig * @constructor - * @param {google.cloud.automl.v1.ITranslationDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IBatchPredictInputConfig=} [properties] Properties to set */ - function TranslationDatasetMetadata(properties) { + function BatchPredictInputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7771,88 +7737,89 @@ } /** - * TranslationDatasetMetadata sourceLanguageCode. - * @member {string} sourceLanguageCode - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * BatchPredictInputConfig gcsSource. + * @member {google.cloud.automl.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @instance */ - TranslationDatasetMetadata.prototype.sourceLanguageCode = ""; + BatchPredictInputConfig.prototype.gcsSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TranslationDatasetMetadata targetLanguageCode. - * @member {string} targetLanguageCode - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * BatchPredictInputConfig source. + * @member {"gcsSource"|undefined} source + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @instance */ - TranslationDatasetMetadata.prototype.targetLanguageCode = ""; + Object.defineProperty(BatchPredictInputConfig.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TranslationDatasetMetadata instance using the specified properties. + * Creates a new BatchPredictInputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static - * @param {google.cloud.automl.v1.ITranslationDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata instance + * @param {google.cloud.automl.v1.IBatchPredictInputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig instance */ - TranslationDatasetMetadata.create = function create(properties) { - return new TranslationDatasetMetadata(properties); + BatchPredictInputConfig.create = function create(properties) { + return new BatchPredictInputConfig(properties); }; /** - * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. + * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static - * @param {google.cloud.automl.v1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDatasetMetadata.encode = function encode(message, writer) { + BatchPredictInputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceLanguageCode); - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetLanguageCode); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + $root.google.cloud.automl.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationDatasetMetadata.verify|verify} messages. + * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static - * @param {google.cloud.automl.v1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictInputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. + * Decodes a BatchPredictInputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata + * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDatasetMetadata.decode = function decode(reader, length) { + BatchPredictInputConfig.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.automl.v1.TranslationDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.BatchPredictInputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sourceLanguageCode = reader.string(); - break; - case 2: - message.targetLanguageCode = reader.string(); + message.gcsSource = $root.google.cloud.automl.v1.GcsSource.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7863,117 +7830,117 @@ }; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata + * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + BatchPredictInputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationDatasetMetadata message. + * Verifies a BatchPredictInputConfig message. * @function verify - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationDatasetMetadata.verify = function verify(message) { + BatchPredictInputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - if (!$util.isString(message.sourceLanguageCode)) - return "sourceLanguageCode: string expected"; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - if (!$util.isString(message.targetLanguageCode)) - return "targetLanguageCode: string expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.automl.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } return null; }; /** - * Creates a TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TranslationDatasetMetadata} TranslationDatasetMetadata + * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig */ - TranslationDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TranslationDatasetMetadata) + BatchPredictInputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BatchPredictInputConfig) return object; - var message = new $root.google.cloud.automl.v1.TranslationDatasetMetadata(); - if (object.sourceLanguageCode != null) - message.sourceLanguageCode = String(object.sourceLanguageCode); - if (object.targetLanguageCode != null) - message.targetLanguageCode = String(object.targetLanguageCode); + var message = new $root.google.cloud.automl.v1.BatchPredictInputConfig(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictInputConfig.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.automl.v1.GcsSource.fromObject(object.gcsSource); + } return message; }; /** - * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a BatchPredictInputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @static - * @param {google.cloud.automl.v1.TranslationDatasetMetadata} message TranslationDatasetMetadata + * @param {google.cloud.automl.v1.BatchPredictInputConfig} message BatchPredictInputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationDatasetMetadata.toObject = function toObject(message, options) { + BatchPredictInputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sourceLanguageCode = ""; - object.targetLanguageCode = ""; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.automl.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; } - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - object.sourceLanguageCode = message.sourceLanguageCode; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - object.targetLanguageCode = message.targetLanguageCode; return object; }; /** - * Converts this TranslationDatasetMetadata to JSON. + * Converts this BatchPredictInputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1.BatchPredictInputConfig * @instance * @returns {Object.} JSON object */ - TranslationDatasetMetadata.prototype.toJSON = function toJSON() { + BatchPredictInputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TranslationDatasetMetadata; + return BatchPredictInputConfig; })(); - v1.TranslationEvaluationMetrics = (function() { + v1.DocumentInputConfig = (function() { /** - * Properties of a TranslationEvaluationMetrics. + * Properties of a DocumentInputConfig. * @memberof google.cloud.automl.v1 - * @interface ITranslationEvaluationMetrics - * @property {number|null} [bleuScore] TranslationEvaluationMetrics bleuScore - * @property {number|null} [baseBleuScore] TranslationEvaluationMetrics baseBleuScore + * @interface IDocumentInputConfig + * @property {google.cloud.automl.v1.IGcsSource|null} [gcsSource] DocumentInputConfig gcsSource */ /** - * Constructs a new TranslationEvaluationMetrics. + * Constructs a new DocumentInputConfig. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TranslationEvaluationMetrics. - * @implements ITranslationEvaluationMetrics + * @classdesc Represents a DocumentInputConfig. + * @implements IDocumentInputConfig * @constructor - * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1.IDocumentInputConfig=} [properties] Properties to set */ - function TranslationEvaluationMetrics(properties) { + function DocumentInputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7981,88 +7948,75 @@ } /** - * TranslationEvaluationMetrics bleuScore. - * @member {number} bleuScore - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics - * @instance - */ - TranslationEvaluationMetrics.prototype.bleuScore = 0; - - /** - * TranslationEvaluationMetrics baseBleuScore. - * @member {number} baseBleuScore - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * DocumentInputConfig gcsSource. + * @member {google.cloud.automl.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.automl.v1.DocumentInputConfig * @instance */ - TranslationEvaluationMetrics.prototype.baseBleuScore = 0; + DocumentInputConfig.prototype.gcsSource = null; /** - * Creates a new TranslationEvaluationMetrics instance using the specified properties. + * Creates a new DocumentInputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static - * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics instance + * @param {google.cloud.automl.v1.IDocumentInputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig instance */ - TranslationEvaluationMetrics.create = function create(properties) { - return new TranslationEvaluationMetrics(properties); + DocumentInputConfig.create = function create(properties) { + return new DocumentInputConfig(properties); }; /** - * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. + * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static - * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationEvaluationMetrics.encode = function encode(message, writer) { + DocumentInputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.bleuScore); - if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.baseBleuScore); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + $root.google.cloud.automl.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationEvaluationMetrics.verify|verify} messages. + * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static - * @param {google.cloud.automl.v1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + DocumentInputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. + * Decodes a DocumentInputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics + * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationEvaluationMetrics.decode = function decode(reader, length) { + DocumentInputConfig.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.automl.v1.TranslationEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.DocumentInputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.bleuScore = reader.double(); - break; - case 2: - message.baseBleuScore = reader.double(); + message.gcsSource = $root.google.cloud.automl.v1.GcsSource.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8073,118 +8027,112 @@ }; /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics + * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + DocumentInputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationEvaluationMetrics message. + * Verifies a DocumentInputConfig message. * @function verify - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationEvaluationMetrics.verify = function verify(message) { + DocumentInputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) - if (typeof message.bleuScore !== "number") - return "bleuScore: number expected"; - if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) - if (typeof message.baseBleuScore !== "number") - return "baseBleuScore: number expected"; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + var error = $root.google.cloud.automl.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } return null; }; /** - * Creates a TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TranslationEvaluationMetrics} TranslationEvaluationMetrics + * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig */ - TranslationEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TranslationEvaluationMetrics) + DocumentInputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.DocumentInputConfig) return object; - var message = new $root.google.cloud.automl.v1.TranslationEvaluationMetrics(); - if (object.bleuScore != null) - message.bleuScore = Number(object.bleuScore); - if (object.baseBleuScore != null) - message.baseBleuScore = Number(object.baseBleuScore); + var message = new $root.google.cloud.automl.v1.DocumentInputConfig(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.automl.v1.DocumentInputConfig.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.automl.v1.GcsSource.fromObject(object.gcsSource); + } return message; }; /** - * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @static - * @param {google.cloud.automl.v1.TranslationEvaluationMetrics} message TranslationEvaluationMetrics + * @param {google.cloud.automl.v1.DocumentInputConfig} message DocumentInputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationEvaluationMetrics.toObject = function toObject(message, options) { + DocumentInputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.bleuScore = 0; - object.baseBleuScore = 0; - } - if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) - object.bleuScore = options.json && !isFinite(message.bleuScore) ? String(message.bleuScore) : message.bleuScore; - if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) - object.baseBleuScore = options.json && !isFinite(message.baseBleuScore) ? String(message.baseBleuScore) : message.baseBleuScore; + if (options.defaults) + object.gcsSource = null; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + object.gcsSource = $root.google.cloud.automl.v1.GcsSource.toObject(message.gcsSource, options); return object; }; /** - * Converts this TranslationEvaluationMetrics to JSON. + * Converts this DocumentInputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TranslationEvaluationMetrics + * @memberof google.cloud.automl.v1.DocumentInputConfig * @instance * @returns {Object.} JSON object */ - TranslationEvaluationMetrics.prototype.toJSON = function toJSON() { + DocumentInputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TranslationEvaluationMetrics; + return DocumentInputConfig; })(); - v1.TranslationModelMetadata = (function() { + v1.OutputConfig = (function() { /** - * Properties of a TranslationModelMetadata. + * Properties of an OutputConfig. * @memberof google.cloud.automl.v1 - * @interface ITranslationModelMetadata - * @property {string|null} [baseModel] TranslationModelMetadata baseModel - * @property {string|null} [sourceLanguageCode] TranslationModelMetadata sourceLanguageCode - * @property {string|null} [targetLanguageCode] TranslationModelMetadata targetLanguageCode + * @interface IOutputConfig + * @property {google.cloud.automl.v1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination */ /** - * Constructs a new TranslationModelMetadata. + * Constructs a new OutputConfig. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TranslationModelMetadata. - * @implements ITranslationModelMetadata + * @classdesc Represents an OutputConfig. + * @implements IOutputConfig * @constructor - * @param {google.cloud.automl.v1.ITranslationModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1.IOutputConfig=} [properties] Properties to set */ - function TranslationModelMetadata(properties) { + function OutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8192,101 +8140,89 @@ } /** - * TranslationModelMetadata baseModel. - * @member {string} baseModel - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * OutputConfig gcsDestination. + * @member {google.cloud.automl.v1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.automl.v1.OutputConfig * @instance */ - TranslationModelMetadata.prototype.baseModel = ""; + OutputConfig.prototype.gcsDestination = null; - /** - * TranslationModelMetadata sourceLanguageCode. - * @member {string} sourceLanguageCode - * @memberof google.cloud.automl.v1.TranslationModelMetadata - * @instance - */ - TranslationModelMetadata.prototype.sourceLanguageCode = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TranslationModelMetadata targetLanguageCode. - * @member {string} targetLanguageCode - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * OutputConfig destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.automl.v1.OutputConfig * @instance */ - TranslationModelMetadata.prototype.targetLanguageCode = ""; + Object.defineProperty(OutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TranslationModelMetadata instance using the specified properties. + * Creates a new OutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static - * @param {google.cloud.automl.v1.ITranslationModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata instance + * @param {google.cloud.automl.v1.IOutputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig instance */ - TranslationModelMetadata.create = function create(properties) { - return new TranslationModelMetadata(properties); + OutputConfig.create = function create(properties) { + return new OutputConfig(properties); }; /** - * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static - * @param {google.cloud.automl.v1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationModelMetadata.encode = function encode(message, writer) { + OutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseModel != null && message.hasOwnProperty("baseModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModel); - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceLanguageCode); - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetLanguageCode); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.automl.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationModelMetadata.verify|verify} messages. + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static - * @param {google.cloud.automl.v1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata + * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationModelMetadata.decode = function decode(reader, length) { + OutputConfig.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.automl.v1.TranslationModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.OutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.baseModel = reader.string(); - break; - case 2: - message.sourceLanguageCode = reader.string(); - break; - case 3: - message.targetLanguageCode = reader.string(); + message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8297,124 +8233,117 @@ }; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata + * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationModelMetadata.decodeDelimited = function decodeDelimited(reader) { + OutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationModelMetadata message. + * Verifies an OutputConfig message. * @function verify - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationModelMetadata.verify = function verify(message) { + OutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.baseModel != null && message.hasOwnProperty("baseModel")) - if (!$util.isString(message.baseModel)) - return "baseModel: string expected"; - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - if (!$util.isString(message.sourceLanguageCode)) - return "sourceLanguageCode: string expected"; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - if (!$util.isString(message.targetLanguageCode)) - return "targetLanguageCode: string expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } return null; }; /** - * Creates a TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TranslationModelMetadata} TranslationModelMetadata + * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig */ - TranslationModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TranslationModelMetadata) + OutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.OutputConfig) return object; - var message = new $root.google.cloud.automl.v1.TranslationModelMetadata(); - if (object.baseModel != null) - message.baseModel = String(object.baseModel); - if (object.sourceLanguageCode != null) - message.sourceLanguageCode = String(object.sourceLanguageCode); - if (object.targetLanguageCode != null) - message.targetLanguageCode = String(object.targetLanguageCode); + var message = new $root.google.cloud.automl.v1.OutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.automl.v1.OutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.fromObject(object.gcsDestination); + } return message; }; /** - * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @static - * @param {google.cloud.automl.v1.TranslationModelMetadata} message TranslationModelMetadata + * @param {google.cloud.automl.v1.OutputConfig} message OutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationModelMetadata.toObject = function toObject(message, options) { + OutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.baseModel = ""; - object.sourceLanguageCode = ""; - object.targetLanguageCode = ""; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; } - if (message.baseModel != null && message.hasOwnProperty("baseModel")) - object.baseModel = message.baseModel; - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - object.sourceLanguageCode = message.sourceLanguageCode; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - object.targetLanguageCode = message.targetLanguageCode; return object; }; /** - * Converts this TranslationModelMetadata to JSON. + * Converts this OutputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TranslationModelMetadata + * @memberof google.cloud.automl.v1.OutputConfig * @instance * @returns {Object.} JSON object */ - TranslationModelMetadata.prototype.toJSON = function toJSON() { + OutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TranslationModelMetadata; + return OutputConfig; })(); - v1.TranslationAnnotation = (function() { + v1.BatchPredictOutputConfig = (function() { /** - * Properties of a TranslationAnnotation. + * Properties of a BatchPredictOutputConfig. * @memberof google.cloud.automl.v1 - * @interface ITranslationAnnotation - * @property {google.cloud.automl.v1.ITextSnippet|null} [translatedContent] TranslationAnnotation translatedContent + * @interface IBatchPredictOutputConfig + * @property {google.cloud.automl.v1.IGcsDestination|null} [gcsDestination] BatchPredictOutputConfig gcsDestination */ /** - * Constructs a new TranslationAnnotation. + * Constructs a new BatchPredictOutputConfig. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TranslationAnnotation. - * @implements ITranslationAnnotation + * @classdesc Represents a BatchPredictOutputConfig. + * @implements IBatchPredictOutputConfig * @constructor - * @param {google.cloud.automl.v1.ITranslationAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1.IBatchPredictOutputConfig=} [properties] Properties to set */ - function TranslationAnnotation(properties) { + function BatchPredictOutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8422,75 +8351,89 @@ } /** - * TranslationAnnotation translatedContent. - * @member {google.cloud.automl.v1.ITextSnippet|null|undefined} translatedContent - * @memberof google.cloud.automl.v1.TranslationAnnotation + * BatchPredictOutputConfig gcsDestination. + * @member {google.cloud.automl.v1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @instance */ - TranslationAnnotation.prototype.translatedContent = null; + BatchPredictOutputConfig.prototype.gcsDestination = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new TranslationAnnotation instance using the specified properties. + * BatchPredictOutputConfig destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @instance + */ + Object.defineProperty(BatchPredictOutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BatchPredictOutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1.ITranslationAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation instance + * @param {google.cloud.automl.v1.IBatchPredictOutputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig instance */ - TranslationAnnotation.create = function create(properties) { - return new TranslationAnnotation(properties); + BatchPredictOutputConfig.create = function create(properties) { + return new BatchPredictOutputConfig(properties); }; /** - * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. + * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationAnnotation.encode = function encode(message, writer) { + BatchPredictOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) - $root.google.cloud.automl.v1.TextSnippet.encode(message.translatedContent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.automl.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TranslationAnnotation.verify|verify} messages. + * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationAnnotation message from the specified reader or buffer. + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation + * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationAnnotation.decode = function decode(reader, length) { + BatchPredictOutputConfig.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.automl.v1.TranslationAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.BatchPredictOutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.translatedContent = $root.google.cloud.automl.v1.TextSnippet.decode(reader, reader.uint32()); + message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8501,113 +8444,120 @@ }; /** - * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation + * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationAnnotation.decodeDelimited = function decodeDelimited(reader) { + BatchPredictOutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationAnnotation message. + * Verifies a BatchPredictOutputConfig message. * @function verify - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationAnnotation.verify = function verify(message) { + BatchPredictOutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) { - var error = $root.google.cloud.automl.v1.TextSnippet.verify(message.translatedContent); - if (error) - return "translatedContent." + error; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } } return null; }; /** - * Creates a TranslationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TranslationAnnotation} TranslationAnnotation + * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig */ - TranslationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TranslationAnnotation) + BatchPredictOutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BatchPredictOutputConfig) return object; - var message = new $root.google.cloud.automl.v1.TranslationAnnotation(); - if (object.translatedContent != null) { - if (typeof object.translatedContent !== "object") - throw TypeError(".google.cloud.automl.v1.TranslationAnnotation.translatedContent: object expected"); - message.translatedContent = $root.google.cloud.automl.v1.TextSnippet.fromObject(object.translatedContent); + var message = new $root.google.cloud.automl.v1.BatchPredictOutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictOutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.fromObject(object.gcsDestination); } return message; }; /** - * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1.TranslationAnnotation} message TranslationAnnotation + * @param {google.cloud.automl.v1.BatchPredictOutputConfig} message BatchPredictOutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationAnnotation.toObject = function toObject(message, options) { + BatchPredictOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.translatedContent = null; - if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) - object.translatedContent = $root.google.cloud.automl.v1.TextSnippet.toObject(message.translatedContent, options); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } return object; }; /** - * Converts this TranslationAnnotation to JSON. + * Converts this BatchPredictOutputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TranslationAnnotation + * @memberof google.cloud.automl.v1.BatchPredictOutputConfig * @instance * @returns {Object.} JSON object */ - TranslationAnnotation.prototype.toJSON = function toJSON() { + BatchPredictOutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TranslationAnnotation; + return BatchPredictOutputConfig; })(); - v1.Image = (function() { + v1.ModelExportOutputConfig = (function() { /** - * Properties of an Image. + * Properties of a ModelExportOutputConfig. * @memberof google.cloud.automl.v1 - * @interface IImage - * @property {Uint8Array|null} [imageBytes] Image imageBytes - * @property {string|null} [thumbnailUri] Image thumbnailUri + * @interface IModelExportOutputConfig + * @property {google.cloud.automl.v1.IGcsDestination|null} [gcsDestination] ModelExportOutputConfig gcsDestination + * @property {string|null} [modelFormat] ModelExportOutputConfig modelFormat + * @property {Object.|null} [params] ModelExportOutputConfig params */ /** - * Constructs a new Image. + * Constructs a new ModelExportOutputConfig. * @memberof google.cloud.automl.v1 - * @classdesc Represents an Image. - * @implements IImage + * @classdesc Represents a ModelExportOutputConfig. + * @implements IModelExportOutputConfig * @constructor - * @param {google.cloud.automl.v1.IImage=} [properties] Properties to set + * @param {google.cloud.automl.v1.IModelExportOutputConfig=} [properties] Properties to set */ - function Image(properties) { + function ModelExportOutputConfig(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8615,102 +8565,121 @@ } /** - * Image imageBytes. - * @member {Uint8Array} imageBytes - * @memberof google.cloud.automl.v1.Image + * ModelExportOutputConfig gcsDestination. + * @member {google.cloud.automl.v1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @instance */ - Image.prototype.imageBytes = $util.newBuffer([]); + ModelExportOutputConfig.prototype.gcsDestination = null; /** - * Image thumbnailUri. - * @member {string} thumbnailUri - * @memberof google.cloud.automl.v1.Image + * ModelExportOutputConfig modelFormat. + * @member {string} modelFormat + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @instance */ - Image.prototype.thumbnailUri = ""; + ModelExportOutputConfig.prototype.modelFormat = ""; + + /** + * ModelExportOutputConfig params. + * @member {Object.} params + * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @instance + */ + ModelExportOutputConfig.prototype.params = $util.emptyObject; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Image data. - * @member {"imageBytes"|undefined} data - * @memberof google.cloud.automl.v1.Image + * ModelExportOutputConfig destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @instance */ - Object.defineProperty(Image.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["imageBytes"]), + Object.defineProperty(ModelExportOutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Image instance using the specified properties. + * Creates a new ModelExportOutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1.IImage=} [properties] Properties to set - * @returns {google.cloud.automl.v1.Image} Image instance + * @param {google.cloud.automl.v1.IModelExportOutputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig instance */ - Image.create = function create(properties) { - return new Image(properties); + ModelExportOutputConfig.create = function create(properties) { + return new ModelExportOutputConfig(properties); }; /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. + * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1.IImage} message Image message or plain object to encode + * @param {google.cloud.automl.v1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Image.encode = function encode(message, writer) { + ModelExportOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.imageBytes); - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUri); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.automl.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.modelFormat); return writer; }; /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Image.verify|verify} messages. + * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1.IImage} message Image message or plain object to encode + * @param {google.cloud.automl.v1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Image.encodeDelimited = function encodeDelimited(message, writer) { + ModelExportOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Image message from the specified reader or buffer. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.Image} Image + * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Image.decode = function decode(reader, length) { + ModelExportOutputConfig.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.automl.v1.Image(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ModelExportOutputConfig(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.imageBytes = reader.bytes(); + message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.decode(reader, reader.uint32()); break; case 4: - message.thumbnailUri = reader.string(); + message.modelFormat = reader.string(); + break; + case 2: + reader.skip().pos++; + if (message.params === $util.emptyObject) + message.params = {}; + key = reader.string(); + reader.pos++; + message.params[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -8721,125 +8690,150 @@ }; /** - * Decodes an Image message from the specified reader or buffer, length delimited. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.Image} Image + * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Image.decodeDelimited = function decodeDelimited(reader) { + ModelExportOutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Image message. + * Verifies a ModelExportOutputConfig message. * @function verify - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Image.verify = function verify(message) { + ModelExportOutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) { - properties.data = 1; - if (!(message.imageBytes && typeof message.imageBytes.length === "number" || $util.isString(message.imageBytes))) - return "imageBytes: buffer expected"; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) + if (!$util.isString(message.modelFormat)) + return "modelFormat: string expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; } - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - if (!$util.isString(message.thumbnailUri)) - return "thumbnailUri: string expected"; return null; }; /** - * Creates an Image message from a plain object. Also converts values to their respective internal types. + * Creates a ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.Image} Image + * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig */ - Image.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.Image) + ModelExportOutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ModelExportOutputConfig) return object; - var message = new $root.google.cloud.automl.v1.Image(); - if (object.imageBytes != null) - if (typeof object.imageBytes === "string") - $util.base64.decode(object.imageBytes, message.imageBytes = $util.newBuffer($util.base64.length(object.imageBytes)), 0); - else if (object.imageBytes.length) - message.imageBytes = object.imageBytes; - if (object.thumbnailUri != null) - message.thumbnailUri = String(object.thumbnailUri); + var message = new $root.google.cloud.automl.v1.ModelExportOutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.automl.v1.ModelExportOutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.fromObject(object.gcsDestination); + } + if (object.modelFormat != null) + message.modelFormat = String(object.modelFormat); + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.automl.v1.ModelExportOutputConfig.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); + } return message; }; /** - * Creates a plain object from an Image message. Also converts values to other types if specified. + * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1.Image} message Image + * @param {google.cloud.automl.v1.ModelExportOutputConfig} message ModelExportOutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Image.toObject = function toObject(message, options) { + ModelExportOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.params = {}; if (options.defaults) - object.thumbnailUri = ""; - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) { - object.imageBytes = options.bytes === String ? $util.base64.encode(message.imageBytes, 0, message.imageBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageBytes) : message.imageBytes; + object.modelFormat = ""; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.toObject(message.gcsDestination, options); if (options.oneofs) - object.data = "imageBytes"; + object.destination = "gcsDestination"; } - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - object.thumbnailUri = message.thumbnailUri; + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; + } + if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) + object.modelFormat = message.modelFormat; return object; }; /** - * Converts this Image to JSON. + * Converts this ModelExportOutputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.Image + * @memberof google.cloud.automl.v1.ModelExportOutputConfig * @instance * @returns {Object.} JSON object */ - Image.prototype.toJSON = function toJSON() { + ModelExportOutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Image; + return ModelExportOutputConfig; })(); - v1.TextSnippet = (function() { + v1.GcsSource = (function() { /** - * Properties of a TextSnippet. + * Properties of a GcsSource. * @memberof google.cloud.automl.v1 - * @interface ITextSnippet - * @property {string|null} [content] TextSnippet content - * @property {string|null} [mimeType] TextSnippet mimeType - * @property {string|null} [contentUri] TextSnippet contentUri + * @interface IGcsSource + * @property {Array.|null} [inputUris] GcsSource inputUris */ /** - * Constructs a new TextSnippet. + * Constructs a new GcsSource. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextSnippet. - * @implements ITextSnippet + * @classdesc Represents a GcsSource. + * @implements IGcsSource * @constructor - * @param {google.cloud.automl.v1.ITextSnippet=} [properties] Properties to set + * @param {google.cloud.automl.v1.IGcsSource=} [properties] Properties to set */ - function TextSnippet(properties) { + function GcsSource(properties) { + this.inputUris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8847,101 +8841,78 @@ } /** - * TextSnippet content. - * @member {string} content - * @memberof google.cloud.automl.v1.TextSnippet - * @instance - */ - TextSnippet.prototype.content = ""; - - /** - * TextSnippet mimeType. - * @member {string} mimeType - * @memberof google.cloud.automl.v1.TextSnippet - * @instance - */ - TextSnippet.prototype.mimeType = ""; - - /** - * TextSnippet contentUri. - * @member {string} contentUri - * @memberof google.cloud.automl.v1.TextSnippet + * GcsSource inputUris. + * @member {Array.} inputUris + * @memberof google.cloud.automl.v1.GcsSource * @instance */ - TextSnippet.prototype.contentUri = ""; + GcsSource.prototype.inputUris = $util.emptyArray; /** - * Creates a new TextSnippet instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static - * @param {google.cloud.automl.v1.ITextSnippet=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet instance + * @param {google.cloud.automl.v1.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.automl.v1.GcsSource} GcsSource instance */ - TextSnippet.create = function create(properties) { - return new TextSnippet(properties); + GcsSource.create = function create(properties) { + return new GcsSource(properties); }; /** - * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static - * @param {google.cloud.automl.v1.ITextSnippet} message TextSnippet message or plain object to encode + * @param {google.cloud.automl.v1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSnippet.encode = function encode(message, writer) { + GcsSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); - if (message.contentUri != null && message.hasOwnProperty("contentUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.contentUri); + if (message.inputUris != null && message.inputUris.length) + for (var i = 0; i < message.inputUris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); return writer; }; /** - * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSnippet.verify|verify} messages. + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static - * @param {google.cloud.automl.v1.ITextSnippet} message TextSnippet message or plain object to encode + * @param {google.cloud.automl.v1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSnippet.encodeDelimited = function encodeDelimited(message, writer) { + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSnippet message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet + * @returns {google.cloud.automl.v1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSnippet.decode = function decode(reader, length) { + GcsSource.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.automl.v1.TextSnippet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.GcsSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.content = reader.string(); - break; - case 2: - message.mimeType = reader.string(); - break; - case 4: - message.contentUri = reader.string(); + if (!(message.inputUris && message.inputUris.length)) + message.inputUris = []; + message.inputUris.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -8952,126 +8923,119 @@ }; /** - * Decodes a TextSnippet message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet + * @returns {google.cloud.automl.v1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSnippet.decodeDelimited = function decodeDelimited(reader) { + GcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSnippet message. + * Verifies a GcsSource message. * @function verify - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSnippet.verify = function verify(message) { + GcsSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.contentUri != null && message.hasOwnProperty("contentUri")) - if (!$util.isString(message.contentUri)) - return "contentUri: string expected"; + if (message.inputUris != null && message.hasOwnProperty("inputUris")) { + if (!Array.isArray(message.inputUris)) + return "inputUris: array expected"; + for (var i = 0; i < message.inputUris.length; ++i) + if (!$util.isString(message.inputUris[i])) + return "inputUris: string[] expected"; + } return null; }; /** - * Creates a TextSnippet message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextSnippet} TextSnippet + * @returns {google.cloud.automl.v1.GcsSource} GcsSource */ - TextSnippet.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextSnippet) + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.GcsSource) return object; - var message = new $root.google.cloud.automl.v1.TextSnippet(); - if (object.content != null) - message.content = String(object.content); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.contentUri != null) - message.contentUri = String(object.contentUri); + var message = new $root.google.cloud.automl.v1.GcsSource(); + if (object.inputUris) { + if (!Array.isArray(object.inputUris)) + throw TypeError(".google.cloud.automl.v1.GcsSource.inputUris: array expected"); + message.inputUris = []; + for (var i = 0; i < object.inputUris.length; ++i) + message.inputUris[i] = String(object.inputUris[i]); + } return message; }; /** - * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @static - * @param {google.cloud.automl.v1.TextSnippet} message TextSnippet + * @param {google.cloud.automl.v1.GcsSource} message GcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSnippet.toObject = function toObject(message, options) { + GcsSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.content = ""; - object.mimeType = ""; - object.contentUri = ""; + if (options.arrays || options.defaults) + object.inputUris = []; + if (message.inputUris && message.inputUris.length) { + object.inputUris = []; + for (var j = 0; j < message.inputUris.length; ++j) + object.inputUris[j] = message.inputUris[j]; } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.contentUri != null && message.hasOwnProperty("contentUri")) - object.contentUri = message.contentUri; return object; }; /** - * Converts this TextSnippet to JSON. + * Converts this GcsSource to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextSnippet + * @memberof google.cloud.automl.v1.GcsSource * @instance * @returns {Object.} JSON object */ - TextSnippet.prototype.toJSON = function toJSON() { + GcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSnippet; + return GcsSource; })(); - v1.DocumentDimensions = (function() { + v1.GcsDestination = (function() { /** - * Properties of a DocumentDimensions. + * Properties of a GcsDestination. * @memberof google.cloud.automl.v1 - * @interface IDocumentDimensions - * @property {google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit|null} [unit] DocumentDimensions unit - * @property {number|null} [width] DocumentDimensions width - * @property {number|null} [height] DocumentDimensions height + * @interface IGcsDestination + * @property {string|null} [outputUriPrefix] GcsDestination outputUriPrefix */ /** - * Constructs a new DocumentDimensions. + * Constructs a new GcsDestination. * @memberof google.cloud.automl.v1 - * @classdesc Represents a DocumentDimensions. - * @implements IDocumentDimensions + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination * @constructor - * @param {google.cloud.automl.v1.IDocumentDimensions=} [properties] Properties to set + * @param {google.cloud.automl.v1.IGcsDestination=} [properties] Properties to set */ - function DocumentDimensions(properties) { + function GcsDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9079,101 +9043,75 @@ } /** - * DocumentDimensions unit. - * @member {google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit} unit - * @memberof google.cloud.automl.v1.DocumentDimensions - * @instance - */ - DocumentDimensions.prototype.unit = 0; - - /** - * DocumentDimensions width. - * @member {number} width - * @memberof google.cloud.automl.v1.DocumentDimensions - * @instance - */ - DocumentDimensions.prototype.width = 0; - - /** - * DocumentDimensions height. - * @member {number} height - * @memberof google.cloud.automl.v1.DocumentDimensions + * GcsDestination outputUriPrefix. + * @member {string} outputUriPrefix + * @memberof google.cloud.automl.v1.GcsDestination * @instance */ - DocumentDimensions.prototype.height = 0; + GcsDestination.prototype.outputUriPrefix = ""; /** - * Creates a new DocumentDimensions instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static - * @param {google.cloud.automl.v1.IDocumentDimensions=} [properties] Properties to set - * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions instance + * @param {google.cloud.automl.v1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination instance */ - DocumentDimensions.create = function create(properties) { - return new DocumentDimensions(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static - * @param {google.cloud.automl.v1.IDocumentDimensions} message DocumentDimensions message or plain object to encode + * @param {google.cloud.automl.v1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentDimensions.encode = function encode(message, writer) { + GcsDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.unit != null && message.hasOwnProperty("unit")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.unit); - if (message.width != null && message.hasOwnProperty("width")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.width); - if (message.height != null && message.hasOwnProperty("height")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.height); + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUriPrefix); return writer; }; /** - * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentDimensions.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static - * @param {google.cloud.automl.v1.IDocumentDimensions} message DocumentDimensions message or plain object to encode + * @param {google.cloud.automl.v1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentDimensions.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentDimensions message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions + * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentDimensions.decode = function decode(reader, length) { + GcsDestination.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.automl.v1.DocumentDimensions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.unit = reader.int32(); - break; - case 2: - message.width = reader.float(); - break; - case 3: - message.height = reader.float(); + message.outputUriPrefix = reader.string(); break; default: reader.skipType(tag & 7); @@ -9184,301 +9122,211 @@ }; /** - * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions + * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentDimensions.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentDimensions message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentDimensions.verify = function verify(message) { + GcsDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.unit != null && message.hasOwnProperty("unit")) - switch (message.unit) { - default: - return "unit: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height !== "number") - return "height: number expected"; + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + if (!$util.isString(message.outputUriPrefix)) + return "outputUriPrefix: string expected"; return null; }; /** - * Creates a DocumentDimensions message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.DocumentDimensions} DocumentDimensions + * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination */ - DocumentDimensions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.DocumentDimensions) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.GcsDestination) return object; - var message = new $root.google.cloud.automl.v1.DocumentDimensions(); - switch (object.unit) { - case "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": - case 0: - message.unit = 0; - break; - case "INCH": - case 1: - message.unit = 1; - break; - case "CENTIMETER": - case 2: - message.unit = 2; - break; - case "POINT": - case 3: - message.unit = 3; - break; - } - if (object.width != null) - message.width = Number(object.width); - if (object.height != null) - message.height = Number(object.height); + var message = new $root.google.cloud.automl.v1.GcsDestination(); + if (object.outputUriPrefix != null) + message.outputUriPrefix = String(object.outputUriPrefix); return message; }; /** - * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @static - * @param {google.cloud.automl.v1.DocumentDimensions} message DocumentDimensions + * @param {google.cloud.automl.v1.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentDimensions.toObject = function toObject(message, options) { + GcsDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.unit = options.enums === String ? "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED" : 0; - object.width = 0; - object.height = 0; - } - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = options.enums === String ? $root.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.height != null && message.hasOwnProperty("height")) - object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height; + if (options.defaults) + object.outputUriPrefix = ""; + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + object.outputUriPrefix = message.outputUriPrefix; return object; }; /** - * Converts this DocumentDimensions to JSON. + * Converts this GcsDestination to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.DocumentDimensions + * @memberof google.cloud.automl.v1.GcsDestination * @instance * @returns {Object.} JSON object */ - DocumentDimensions.prototype.toJSON = function toJSON() { + GcsDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * DocumentDimensionUnit enum. - * @name google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit - * @enum {string} - * @property {number} DOCUMENT_DIMENSION_UNIT_UNSPECIFIED=0 DOCUMENT_DIMENSION_UNIT_UNSPECIFIED value - * @property {number} INCH=1 INCH value - * @property {number} CENTIMETER=2 CENTIMETER value - * @property {number} POINT=3 POINT value - */ - DocumentDimensions.DocumentDimensionUnit = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCH"] = 1; - values[valuesById[2] = "CENTIMETER"] = 2; - values[valuesById[3] = "POINT"] = 3; - return values; - })(); - - return DocumentDimensions; + return GcsDestination; })(); - v1.Document = (function() { + v1.AnnotationSpec = (function() { /** - * Properties of a Document. + * Properties of an AnnotationSpec. * @memberof google.cloud.automl.v1 - * @interface IDocument - * @property {google.cloud.automl.v1.IDocumentInputConfig|null} [inputConfig] Document inputConfig - * @property {google.cloud.automl.v1.ITextSnippet|null} [documentText] Document documentText - * @property {Array.|null} [layout] Document layout - * @property {google.cloud.automl.v1.IDocumentDimensions|null} [documentDimensions] Document documentDimensions - * @property {number|null} [pageCount] Document pageCount + * @interface IAnnotationSpec + * @property {string|null} [name] AnnotationSpec name + * @property {string|null} [displayName] AnnotationSpec displayName + * @property {number|null} [exampleCount] AnnotationSpec exampleCount */ /** - * Constructs a new Document. + * Constructs a new AnnotationSpec. * @memberof google.cloud.automl.v1 - * @classdesc Represents a Document. - * @implements IDocument + * @classdesc Represents an AnnotationSpec. + * @implements IAnnotationSpec * @constructor - * @param {google.cloud.automl.v1.IDocument=} [properties] Properties to set - */ - function Document(properties) { - this.layout = []; - 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]]; - } - - /** - * Document inputConfig. - * @member {google.cloud.automl.v1.IDocumentInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1.Document - * @instance - */ - Document.prototype.inputConfig = null; - - /** - * Document documentText. - * @member {google.cloud.automl.v1.ITextSnippet|null|undefined} documentText - * @memberof google.cloud.automl.v1.Document - * @instance + * @param {google.cloud.automl.v1.IAnnotationSpec=} [properties] Properties to set */ - Document.prototype.documentText = null; + function AnnotationSpec(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]]; + } /** - * Document layout. - * @member {Array.} layout - * @memberof google.cloud.automl.v1.Document + * AnnotationSpec name. + * @member {string} name + * @memberof google.cloud.automl.v1.AnnotationSpec * @instance */ - Document.prototype.layout = $util.emptyArray; + AnnotationSpec.prototype.name = ""; /** - * Document documentDimensions. - * @member {google.cloud.automl.v1.IDocumentDimensions|null|undefined} documentDimensions - * @memberof google.cloud.automl.v1.Document + * AnnotationSpec displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1.AnnotationSpec * @instance */ - Document.prototype.documentDimensions = null; + AnnotationSpec.prototype.displayName = ""; /** - * Document pageCount. - * @member {number} pageCount - * @memberof google.cloud.automl.v1.Document + * AnnotationSpec exampleCount. + * @member {number} exampleCount + * @memberof google.cloud.automl.v1.AnnotationSpec * @instance */ - Document.prototype.pageCount = 0; + AnnotationSpec.prototype.exampleCount = 0; /** - * Creates a new Document instance using the specified properties. + * Creates a new AnnotationSpec instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.Document + * @memberof google.cloud.automl.v1.AnnotationSpec * @static - * @param {google.cloud.automl.v1.IDocument=} [properties] Properties to set - * @returns {google.cloud.automl.v1.Document} Document instance + * @param {google.cloud.automl.v1.IAnnotationSpec=} [properties] Properties to set + * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec instance */ - Document.create = function create(properties) { - return new Document(properties); + AnnotationSpec.create = function create(properties) { + return new AnnotationSpec(properties); }; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. + * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.Document + * @memberof google.cloud.automl.v1.AnnotationSpec * @static - * @param {google.cloud.automl.v1.IDocument} message Document message or plain object to encode + * @param {google.cloud.automl.v1.IAnnotationSpec} message AnnotationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encode = function encode(message, writer) { + AnnotationSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1.DocumentInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.documentText != null && message.hasOwnProperty("documentText")) - $root.google.cloud.automl.v1.TextSnippet.encode(message.documentText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.layout != null && message.layout.length) - for (var i = 0; i < message.layout.length; ++i) - $root.google.cloud.automl.v1.Document.Layout.encode(message.layout[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) - $root.google.cloud.automl.v1.DocumentDimensions.encode(message.documentDimensions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageCount); + 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.exampleCount != null && message.hasOwnProperty("exampleCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.exampleCount); return writer; }; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.verify|verify} messages. + * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.Document + * @memberof google.cloud.automl.v1.AnnotationSpec * @static - * @param {google.cloud.automl.v1.IDocument} message Document message or plain object to encode + * @param {google.cloud.automl.v1.IAnnotationSpec} message AnnotationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes an AnnotationSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.Document + * @memberof google.cloud.automl.v1.AnnotationSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.Document} Document + * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decode = function decode(reader, length) { + AnnotationSpec.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.automl.v1.Document(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.AnnotationSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.inputConfig = $root.google.cloud.automl.v1.DocumentInputConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.documentText = $root.google.cloud.automl.v1.TextSnippet.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.layout && message.layout.length)) - message.layout = []; - message.layout.push($root.google.cloud.automl.v1.Document.Layout.decode(reader, reader.uint32())); - break; - case 4: - message.documentDimensions = $root.google.cloud.automl.v1.DocumentDimensions.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; - case 5: - message.pageCount = reader.int32(); + case 9: + message.exampleCount = reader.int32(); break; default: reader.skipType(tag & 7); @@ -9489,522 +9337,137 @@ }; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.Document + * @memberof google.cloud.automl.v1.AnnotationSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.Document} Document + * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decodeDelimited = function decodeDelimited(reader) { + AnnotationSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Document message. - * @function verify - * @memberof google.cloud.automl.v1.Document - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Document.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.automl.v1.DocumentInputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } - if (message.documentText != null && message.hasOwnProperty("documentText")) { - var error = $root.google.cloud.automl.v1.TextSnippet.verify(message.documentText); - if (error) - return "documentText." + error; - } - if (message.layout != null && message.hasOwnProperty("layout")) { - if (!Array.isArray(message.layout)) - return "layout: array expected"; - for (var i = 0; i < message.layout.length; ++i) { - var error = $root.google.cloud.automl.v1.Document.Layout.verify(message.layout[i]); - if (error) - return "layout." + error; - } - } - if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) { - var error = $root.google.cloud.automl.v1.DocumentDimensions.verify(message.documentDimensions); - if (error) - return "documentDimensions." + error; - } - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - if (!$util.isInteger(message.pageCount)) - return "pageCount: integer expected"; - return null; - }; - - /** - * Creates a Document message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.Document - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.Document} Document - */ - Document.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.Document) - return object; - var message = new $root.google.cloud.automl.v1.Document(); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1.Document.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1.DocumentInputConfig.fromObject(object.inputConfig); - } - if (object.documentText != null) { - if (typeof object.documentText !== "object") - throw TypeError(".google.cloud.automl.v1.Document.documentText: object expected"); - message.documentText = $root.google.cloud.automl.v1.TextSnippet.fromObject(object.documentText); - } - if (object.layout) { - if (!Array.isArray(object.layout)) - throw TypeError(".google.cloud.automl.v1.Document.layout: array expected"); - message.layout = []; - for (var i = 0; i < object.layout.length; ++i) { - if (typeof object.layout[i] !== "object") - throw TypeError(".google.cloud.automl.v1.Document.layout: object expected"); - message.layout[i] = $root.google.cloud.automl.v1.Document.Layout.fromObject(object.layout[i]); - } - } - if (object.documentDimensions != null) { - if (typeof object.documentDimensions !== "object") - throw TypeError(".google.cloud.automl.v1.Document.documentDimensions: object expected"); - message.documentDimensions = $root.google.cloud.automl.v1.DocumentDimensions.fromObject(object.documentDimensions); - } - if (object.pageCount != null) - message.pageCount = object.pageCount | 0; - return message; - }; - - /** - * Creates a plain object from a Document message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.Document - * @static - * @param {google.cloud.automl.v1.Document} message Document - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Document.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.layout = []; - if (options.defaults) { - object.inputConfig = null; - object.documentText = null; - object.documentDimensions = null; - object.pageCount = 0; - } - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.automl.v1.DocumentInputConfig.toObject(message.inputConfig, options); - if (message.documentText != null && message.hasOwnProperty("documentText")) - object.documentText = $root.google.cloud.automl.v1.TextSnippet.toObject(message.documentText, options); - if (message.layout && message.layout.length) { - object.layout = []; - for (var j = 0; j < message.layout.length; ++j) - object.layout[j] = $root.google.cloud.automl.v1.Document.Layout.toObject(message.layout[j], options); - } - if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) - object.documentDimensions = $root.google.cloud.automl.v1.DocumentDimensions.toObject(message.documentDimensions, options); - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - object.pageCount = message.pageCount; - return object; - }; - - /** - * Converts this Document to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.Document - * @instance - * @returns {Object.} JSON object - */ - Document.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Document.Layout = (function() { - - /** - * Properties of a Layout. - * @memberof google.cloud.automl.v1.Document - * @interface ILayout - * @property {google.cloud.automl.v1.ITextSegment|null} [textSegment] Layout textSegment - * @property {number|null} [pageNumber] Layout pageNumber - * @property {google.cloud.automl.v1.IBoundingPoly|null} [boundingPoly] Layout boundingPoly - * @property {google.cloud.automl.v1.Document.Layout.TextSegmentType|null} [textSegmentType] Layout textSegmentType - */ - - /** - * Constructs a new Layout. - * @memberof google.cloud.automl.v1.Document - * @classdesc Represents a Layout. - * @implements ILayout - * @constructor - * @param {google.cloud.automl.v1.Document.ILayout=} [properties] Properties to set - */ - function Layout(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]]; - } - - /** - * Layout textSegment. - * @member {google.cloud.automl.v1.ITextSegment|null|undefined} textSegment - * @memberof google.cloud.automl.v1.Document.Layout - * @instance - */ - Layout.prototype.textSegment = null; - - /** - * Layout pageNumber. - * @member {number} pageNumber - * @memberof google.cloud.automl.v1.Document.Layout - * @instance - */ - Layout.prototype.pageNumber = 0; - - /** - * Layout boundingPoly. - * @member {google.cloud.automl.v1.IBoundingPoly|null|undefined} boundingPoly - * @memberof google.cloud.automl.v1.Document.Layout - * @instance - */ - Layout.prototype.boundingPoly = null; - - /** - * Layout textSegmentType. - * @member {google.cloud.automl.v1.Document.Layout.TextSegmentType} textSegmentType - * @memberof google.cloud.automl.v1.Document.Layout - * @instance - */ - Layout.prototype.textSegmentType = 0; - - /** - * Creates a new Layout instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {google.cloud.automl.v1.Document.ILayout=} [properties] Properties to set - * @returns {google.cloud.automl.v1.Document.Layout} Layout instance - */ - Layout.create = function create(properties) { - return new Layout(properties); - }; - - /** - * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {google.cloud.automl.v1.Document.ILayout} message Layout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Layout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.textSegment != null && message.hasOwnProperty("textSegment")) - $root.google.cloud.automl.v1.TextSegment.encode(message.textSegment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber); - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) - $root.google.cloud.automl.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.textSegmentType); - return writer; - }; - - /** - * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Document.Layout.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {google.cloud.automl.v1.Document.ILayout} message Layout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Layout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Layout message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.Document.Layout} Layout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Layout.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.automl.v1.Document.Layout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.textSegment = $root.google.cloud.automl.v1.TextSegment.decode(reader, reader.uint32()); - break; - case 2: - message.pageNumber = reader.int32(); - break; - case 3: - message.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.decode(reader, reader.uint32()); - break; - case 4: - message.textSegmentType = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Layout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.Document.Layout} Layout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Layout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Layout message. - * @function verify - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Layout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.textSegment != null && message.hasOwnProperty("textSegment")) { - var error = $root.google.cloud.automl.v1.TextSegment.verify(message.textSegment); - if (error) - return "textSegment." + error; - } - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - if (!$util.isInteger(message.pageNumber)) - return "pageNumber: integer expected"; - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { - var error = $root.google.cloud.automl.v1.BoundingPoly.verify(message.boundingPoly); - if (error) - return "boundingPoly." + error; - } - if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - switch (message.textSegmentType) { - default: - return "textSegmentType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - return null; - }; - - /** - * Creates a Layout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.Document.Layout} Layout - */ - Layout.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.Document.Layout) - return object; - var message = new $root.google.cloud.automl.v1.Document.Layout(); - if (object.textSegment != null) { - if (typeof object.textSegment !== "object") - throw TypeError(".google.cloud.automl.v1.Document.Layout.textSegment: object expected"); - message.textSegment = $root.google.cloud.automl.v1.TextSegment.fromObject(object.textSegment); - } - if (object.pageNumber != null) - message.pageNumber = object.pageNumber | 0; - if (object.boundingPoly != null) { - if (typeof object.boundingPoly !== "object") - throw TypeError(".google.cloud.automl.v1.Document.Layout.boundingPoly: object expected"); - message.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.fromObject(object.boundingPoly); - } - switch (object.textSegmentType) { - case "TEXT_SEGMENT_TYPE_UNSPECIFIED": - case 0: - message.textSegmentType = 0; - break; - case "TOKEN": - case 1: - message.textSegmentType = 1; - break; - case "PARAGRAPH": - case 2: - message.textSegmentType = 2; - break; - case "FORM_FIELD": - case 3: - message.textSegmentType = 3; - break; - case "FORM_FIELD_NAME": - case 4: - message.textSegmentType = 4; - break; - case "FORM_FIELD_CONTENTS": - case 5: - message.textSegmentType = 5; - break; - case "TABLE": - case 6: - message.textSegmentType = 6; - break; - case "TABLE_HEADER": - case 7: - message.textSegmentType = 7; - break; - case "TABLE_ROW": - case 8: - message.textSegmentType = 8; - break; - case "TABLE_CELL": - case 9: - message.textSegmentType = 9; - break; - } - return message; - }; + * Verifies an AnnotationSpec message. + * @function verify + * @memberof google.cloud.automl.v1.AnnotationSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotationSpec.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.exampleCount != null && message.hasOwnProperty("exampleCount")) + if (!$util.isInteger(message.exampleCount)) + return "exampleCount: integer expected"; + return null; + }; - /** - * Creates a plain object from a Layout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.Document.Layout - * @static - * @param {google.cloud.automl.v1.Document.Layout} message Layout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Layout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.textSegment = null; - object.pageNumber = 0; - object.boundingPoly = null; - object.textSegmentType = options.enums === String ? "TEXT_SEGMENT_TYPE_UNSPECIFIED" : 0; - } - if (message.textSegment != null && message.hasOwnProperty("textSegment")) - object.textSegment = $root.google.cloud.automl.v1.TextSegment.toObject(message.textSegment, options); - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - object.pageNumber = message.pageNumber; - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) - object.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.toObject(message.boundingPoly, options); - if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; + /** + * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.AnnotationSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.AnnotationSpec} AnnotationSpec + */ + AnnotationSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.AnnotationSpec) return object; - }; - - /** - * Converts this Layout to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.Document.Layout - * @instance - * @returns {Object.} JSON object - */ - Layout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.cloud.automl.v1.AnnotationSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.exampleCount != null) + message.exampleCount = object.exampleCount | 0; + return message; + }; - /** - * TextSegmentType enum. - * @name google.cloud.automl.v1.Document.Layout.TextSegmentType - * @enum {string} - * @property {number} TEXT_SEGMENT_TYPE_UNSPECIFIED=0 TEXT_SEGMENT_TYPE_UNSPECIFIED value - * @property {number} TOKEN=1 TOKEN value - * @property {number} PARAGRAPH=2 PARAGRAPH value - * @property {number} FORM_FIELD=3 FORM_FIELD value - * @property {number} FORM_FIELD_NAME=4 FORM_FIELD_NAME value - * @property {number} FORM_FIELD_CONTENTS=5 FORM_FIELD_CONTENTS value - * @property {number} TABLE=6 TABLE value - * @property {number} TABLE_HEADER=7 TABLE_HEADER value - * @property {number} TABLE_ROW=8 TABLE_ROW value - * @property {number} TABLE_CELL=9 TABLE_CELL value - */ - Layout.TextSegmentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TEXT_SEGMENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOKEN"] = 1; - values[valuesById[2] = "PARAGRAPH"] = 2; - values[valuesById[3] = "FORM_FIELD"] = 3; - values[valuesById[4] = "FORM_FIELD_NAME"] = 4; - values[valuesById[5] = "FORM_FIELD_CONTENTS"] = 5; - values[valuesById[6] = "TABLE"] = 6; - values[valuesById[7] = "TABLE_HEADER"] = 7; - values[valuesById[8] = "TABLE_ROW"] = 8; - values[valuesById[9] = "TABLE_CELL"] = 9; - return values; - })(); + /** + * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.AnnotationSpec + * @static + * @param {google.cloud.automl.v1.AnnotationSpec} message AnnotationSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotationSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.exampleCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) + object.exampleCount = message.exampleCount; + return object; + }; - return Layout; - })(); + /** + * Converts this AnnotationSpec to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.AnnotationSpec + * @instance + * @returns {Object.} JSON object + */ + AnnotationSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Document; + return AnnotationSpec; })(); - v1.ExamplePayload = (function() { + v1.Dataset = (function() { /** - * Properties of an ExamplePayload. + * Properties of a Dataset. * @memberof google.cloud.automl.v1 - * @interface IExamplePayload - * @property {google.cloud.automl.v1.IImage|null} [image] ExamplePayload image - * @property {google.cloud.automl.v1.ITextSnippet|null} [textSnippet] ExamplePayload textSnippet - * @property {google.cloud.automl.v1.IDocument|null} [document] ExamplePayload document + * @interface IDataset + * @property {google.cloud.automl.v1.ITranslationDatasetMetadata|null} [translationDatasetMetadata] Dataset translationDatasetMetadata + * @property {google.cloud.automl.v1.IImageClassificationDatasetMetadata|null} [imageClassificationDatasetMetadata] Dataset imageClassificationDatasetMetadata + * @property {google.cloud.automl.v1.ITextClassificationDatasetMetadata|null} [textClassificationDatasetMetadata] Dataset textClassificationDatasetMetadata + * @property {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null} [imageObjectDetectionDatasetMetadata] Dataset imageObjectDetectionDatasetMetadata + * @property {google.cloud.automl.v1.ITextExtractionDatasetMetadata|null} [textExtractionDatasetMetadata] Dataset textExtractionDatasetMetadata + * @property {google.cloud.automl.v1.ITextSentimentDatasetMetadata|null} [textSentimentDatasetMetadata] Dataset textSentimentDatasetMetadata + * @property {string|null} [name] Dataset name + * @property {string|null} [displayName] Dataset displayName + * @property {string|null} [description] Dataset description + * @property {number|null} [exampleCount] Dataset exampleCount + * @property {google.protobuf.ITimestamp|null} [createTime] Dataset createTime + * @property {string|null} [etag] Dataset etag + * @property {Object.|null} [labels] Dataset labels */ /** - * Constructs a new ExamplePayload. + * Constructs a new Dataset. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ExamplePayload. - * @implements IExamplePayload + * @classdesc Represents a Dataset. + * @implements IDataset * @constructor - * @param {google.cloud.automl.v1.IExamplePayload=} [properties] Properties to set + * @param {google.cloud.automl.v1.IDataset=} [properties] Properties to set */ - function ExamplePayload(properties) { + function Dataset(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10012,115 +9475,251 @@ } /** - * ExamplePayload image. - * @member {google.cloud.automl.v1.IImage|null|undefined} image - * @memberof google.cloud.automl.v1.ExamplePayload + * Dataset translationDatasetMetadata. + * @member {google.cloud.automl.v1.ITranslationDatasetMetadata|null|undefined} translationDatasetMetadata + * @memberof google.cloud.automl.v1.Dataset * @instance */ - ExamplePayload.prototype.image = null; + Dataset.prototype.translationDatasetMetadata = null; /** - * ExamplePayload textSnippet. - * @member {google.cloud.automl.v1.ITextSnippet|null|undefined} textSnippet - * @memberof google.cloud.automl.v1.ExamplePayload + * Dataset imageClassificationDatasetMetadata. + * @member {google.cloud.automl.v1.IImageClassificationDatasetMetadata|null|undefined} imageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.Dataset * @instance */ - ExamplePayload.prototype.textSnippet = null; + Dataset.prototype.imageClassificationDatasetMetadata = null; /** - * ExamplePayload document. - * @member {google.cloud.automl.v1.IDocument|null|undefined} document - * @memberof google.cloud.automl.v1.ExamplePayload + * Dataset textClassificationDatasetMetadata. + * @member {google.cloud.automl.v1.ITextClassificationDatasetMetadata|null|undefined} textClassificationDatasetMetadata + * @memberof google.cloud.automl.v1.Dataset * @instance */ - ExamplePayload.prototype.document = null; + Dataset.prototype.textClassificationDatasetMetadata = null; + + /** + * Dataset imageObjectDetectionDatasetMetadata. + * @member {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata|null|undefined} imageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.imageObjectDetectionDatasetMetadata = null; + + /** + * Dataset textExtractionDatasetMetadata. + * @member {google.cloud.automl.v1.ITextExtractionDatasetMetadata|null|undefined} textExtractionDatasetMetadata + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.textExtractionDatasetMetadata = null; + + /** + * Dataset textSentimentDatasetMetadata. + * @member {google.cloud.automl.v1.ITextSentimentDatasetMetadata|null|undefined} textSentimentDatasetMetadata + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.textSentimentDatasetMetadata = null; + + /** + * Dataset name. + * @member {string} name + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.name = ""; + + /** + * Dataset displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.displayName = ""; + + /** + * Dataset description. + * @member {string} description + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.description = ""; + + /** + * Dataset exampleCount. + * @member {number} exampleCount + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.exampleCount = 0; + + /** + * Dataset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.createTime = null; + + /** + * Dataset etag. + * @member {string} etag + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.etag = ""; + + /** + * Dataset labels. + * @member {Object.} labels + * @memberof google.cloud.automl.v1.Dataset + * @instance + */ + Dataset.prototype.labels = $util.emptyObject; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ExamplePayload payload. - * @member {"image"|"textSnippet"|"document"|undefined} payload - * @memberof google.cloud.automl.v1.ExamplePayload + * Dataset datasetMetadata. + * @member {"translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"|undefined} datasetMetadata + * @memberof google.cloud.automl.v1.Dataset * @instance */ - Object.defineProperty(ExamplePayload.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["image", "textSnippet", "document"]), + Object.defineProperty(Dataset.prototype, "datasetMetadata", { + get: $util.oneOfGetter($oneOfFields = ["translationDatasetMetadata", "imageClassificationDatasetMetadata", "textClassificationDatasetMetadata", "imageObjectDetectionDatasetMetadata", "textExtractionDatasetMetadata", "textSentimentDatasetMetadata"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ExamplePayload instance using the specified properties. + * Creates a new Dataset instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static - * @param {google.cloud.automl.v1.IExamplePayload=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload instance + * @param {google.cloud.automl.v1.IDataset=} [properties] Properties to set + * @returns {google.cloud.automl.v1.Dataset} Dataset instance */ - ExamplePayload.create = function create(properties) { - return new ExamplePayload(properties); + Dataset.create = function create(properties) { + return new Dataset(properties); }; /** - * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. + * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static - * @param {google.cloud.automl.v1.IExamplePayload} message ExamplePayload message or plain object to encode + * @param {google.cloud.automl.v1.IDataset} message Dataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExamplePayload.encode = function encode(message, writer) { + Dataset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.image != null && message.hasOwnProperty("image")) - $root.google.cloud.automl.v1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) - $root.google.cloud.automl.v1.TextSnippet.encode(message.textSnippet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.document != null && message.hasOwnProperty("document")) - $root.google.cloud.automl.v1.Document.encode(message.document, writer.uint32(/* id 4, wireType 2 =*/34).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.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.etag); + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.exampleCount); + if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) + $root.google.cloud.automl.v1.TranslationDatasetMetadata.encode(message.translationDatasetMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) + $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.encode(message.imageClassificationDatasetMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) + $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.encode(message.textClassificationDatasetMetadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) + $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.encode(message.imageObjectDetectionDatasetMetadata, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) + $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.encode(message.textExtractionDatasetMetadata, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) + $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.encode(message.textSentimentDatasetMetadata, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 39, wireType 2 =*/314).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExamplePayload.verify|verify} messages. + * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Dataset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static - * @param {google.cloud.automl.v1.IExamplePayload} message ExamplePayload message or plain object to encode + * @param {google.cloud.automl.v1.IDataset} message Dataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExamplePayload.encodeDelimited = function encodeDelimited(message, writer) { + Dataset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExamplePayload message from the specified reader or buffer. + * Decodes a Dataset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload + * @returns {google.cloud.automl.v1.Dataset} Dataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExamplePayload.decode = function decode(reader, length) { + Dataset.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.automl.v1.ExamplePayload(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.Dataset(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 23: + message.translationDatasetMetadata = $root.google.cloud.automl.v1.TranslationDatasetMetadata.decode(reader, reader.uint32()); + break; + case 24: + message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.decode(reader, reader.uint32()); + break; + case 25: + message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.decode(reader, reader.uint32()); + break; + case 26: + message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.decode(reader, reader.uint32()); + break; + case 28: + message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.decode(reader, reader.uint32()); + break; + case 30: + message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.decode(reader, reader.uint32()); + break; case 1: - message.image = $root.google.cloud.automl.v1.Image.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.textSnippet = $root.google.cloud.automl.v1.TextSnippet.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; - case 4: - message.document = $root.google.cloud.automl.v1.Document.decode(reader, reader.uint32()); + case 3: + message.description = reader.string(); + break; + case 21: + message.exampleCount = reader.int32(); + break; + case 14: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 17: + message.etag = reader.string(); + break; + case 39: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -10131,158 +9730,295 @@ }; /** - * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. + * Decodes a Dataset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload + * @returns {google.cloud.automl.v1.Dataset} Dataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExamplePayload.decodeDelimited = function decodeDelimited(reader) { + Dataset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExamplePayload message. + * Verifies a Dataset message. * @function verify - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExamplePayload.verify = function verify(message) { + Dataset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.image != null && message.hasOwnProperty("image")) { - properties.payload = 1; + if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { + properties.datasetMetadata = 1; { - var error = $root.google.cloud.automl.v1.Image.verify(message.image); + var error = $root.google.cloud.automl.v1.TranslationDatasetMetadata.verify(message.translationDatasetMetadata); if (error) - return "image." + error; + return "translationDatasetMetadata." + error; } } - if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; + if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; { - var error = $root.google.cloud.automl.v1.TextSnippet.verify(message.textSnippet); + var error = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify(message.imageClassificationDatasetMetadata); if (error) - return "textSnippet." + error; + return "imageClassificationDatasetMetadata." + error; } } - if (message.document != null && message.hasOwnProperty("document")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; + if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; { - var error = $root.google.cloud.automl.v1.Document.verify(message.document); + var error = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.verify(message.textClassificationDatasetMetadata); if (error) - return "document." + error; + return "textClassificationDatasetMetadata." + error; + } + } + if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify(message.imageObjectDetectionDatasetMetadata); + if (error) + return "imageObjectDetectionDatasetMetadata." + error; + } + } + if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.verify(message.textExtractionDatasetMetadata); + if (error) + return "textExtractionDatasetMetadata." + error; + } + } + if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.verify(message.textSentimentDatasetMetadata); + if (error) + return "textSentimentDatasetMetadata." + error; } } + 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.exampleCount != null && message.hasOwnProperty("exampleCount")) + if (!$util.isInteger(message.exampleCount)) + return "exampleCount: integer expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; /** - * Creates an ExamplePayload message from a plain object. Also converts values to their respective internal types. + * Creates a Dataset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ExamplePayload} ExamplePayload + * @returns {google.cloud.automl.v1.Dataset} Dataset */ - ExamplePayload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ExamplePayload) + Dataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.Dataset) return object; - var message = new $root.google.cloud.automl.v1.ExamplePayload(); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.automl.v1.ExamplePayload.image: object expected"); - message.image = $root.google.cloud.automl.v1.Image.fromObject(object.image); + var message = new $root.google.cloud.automl.v1.Dataset(); + if (object.translationDatasetMetadata != null) { + if (typeof object.translationDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.translationDatasetMetadata: object expected"); + message.translationDatasetMetadata = $root.google.cloud.automl.v1.TranslationDatasetMetadata.fromObject(object.translationDatasetMetadata); } - if (object.textSnippet != null) { - if (typeof object.textSnippet !== "object") - throw TypeError(".google.cloud.automl.v1.ExamplePayload.textSnippet: object expected"); - message.textSnippet = $root.google.cloud.automl.v1.TextSnippet.fromObject(object.textSnippet); + if (object.imageClassificationDatasetMetadata != null) { + if (typeof object.imageClassificationDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.imageClassificationDatasetMetadata: object expected"); + message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.fromObject(object.imageClassificationDatasetMetadata); } - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.automl.v1.ExamplePayload.document: object expected"); - message.document = $root.google.cloud.automl.v1.Document.fromObject(object.document); + if (object.textClassificationDatasetMetadata != null) { + if (typeof object.textClassificationDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.textClassificationDatasetMetadata: object expected"); + message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.fromObject(object.textClassificationDatasetMetadata); + } + if (object.imageObjectDetectionDatasetMetadata != null) { + if (typeof object.imageObjectDetectionDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.imageObjectDetectionDatasetMetadata: object expected"); + message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.fromObject(object.imageObjectDetectionDatasetMetadata); + } + if (object.textExtractionDatasetMetadata != null) { + if (typeof object.textExtractionDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.textExtractionDatasetMetadata: object expected"); + message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.fromObject(object.textExtractionDatasetMetadata); + } + if (object.textSentimentDatasetMetadata != null) { + if (typeof object.textSentimentDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.textSentimentDatasetMetadata: object expected"); + message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.fromObject(object.textSentimentDatasetMetadata); + } + 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.exampleCount != null) + message.exampleCount = object.exampleCount | 0; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.automl.v1.Dataset.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. + * Creates a plain object from a Dataset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @static - * @param {google.cloud.automl.v1.ExamplePayload} message ExamplePayload + * @param {google.cloud.automl.v1.Dataset} message Dataset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExamplePayload.toObject = function toObject(message, options) { + Dataset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.image != null && message.hasOwnProperty("image")) { - object.image = $root.google.cloud.automl.v1.Image.toObject(message.image, options); + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.etag = ""; + object.exampleCount = 0; + } + 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.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) + object.exampleCount = message.exampleCount; + if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { + object.translationDatasetMetadata = $root.google.cloud.automl.v1.TranslationDatasetMetadata.toObject(message.translationDatasetMetadata, options); if (options.oneofs) - object.payload = "image"; + object.datasetMetadata = "translationDatasetMetadata"; } - if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { - object.textSnippet = $root.google.cloud.automl.v1.TextSnippet.toObject(message.textSnippet, options); + if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { + object.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata.toObject(message.imageClassificationDatasetMetadata, options); if (options.oneofs) - object.payload = "textSnippet"; + object.datasetMetadata = "imageClassificationDatasetMetadata"; } - if (message.document != null && message.hasOwnProperty("document")) { - object.document = $root.google.cloud.automl.v1.Document.toObject(message.document, options); + if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { + object.textClassificationDatasetMetadata = $root.google.cloud.automl.v1.TextClassificationDatasetMetadata.toObject(message.textClassificationDatasetMetadata, options); if (options.oneofs) - object.payload = "document"; + object.datasetMetadata = "textClassificationDatasetMetadata"; + } + if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { + object.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.toObject(message.imageObjectDetectionDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "imageObjectDetectionDatasetMetadata"; + } + if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { + object.textExtractionDatasetMetadata = $root.google.cloud.automl.v1.TextExtractionDatasetMetadata.toObject(message.textExtractionDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "textExtractionDatasetMetadata"; + } + if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { + object.textSentimentDatasetMetadata = $root.google.cloud.automl.v1.TextSentimentDatasetMetadata.toObject(message.textSentimentDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "textSentimentDatasetMetadata"; + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } return object; }; /** - * Converts this ExamplePayload to JSON. + * Converts this Dataset to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ExamplePayload + * @memberof google.cloud.automl.v1.Dataset * @instance * @returns {Object.} JSON object */ - ExamplePayload.prototype.toJSON = function toJSON() { + Dataset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExamplePayload; + return Dataset; })(); - v1.NormalizedVertex = (function() { + v1.ImageClassificationDatasetMetadata = (function() { /** - * Properties of a NormalizedVertex. + * Properties of an ImageClassificationDatasetMetadata. * @memberof google.cloud.automl.v1 - * @interface INormalizedVertex - * @property {number|null} [x] NormalizedVertex x - * @property {number|null} [y] NormalizedVertex y + * @interface IImageClassificationDatasetMetadata + * @property {google.cloud.automl.v1.ClassificationType|null} [classificationType] ImageClassificationDatasetMetadata classificationType */ /** - * Constructs a new NormalizedVertex. + * Constructs a new ImageClassificationDatasetMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a NormalizedVertex. - * @implements INormalizedVertex + * @classdesc Represents an ImageClassificationDatasetMetadata. + * @implements IImageClassificationDatasetMetadata * @constructor - * @param {google.cloud.automl.v1.INormalizedVertex=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata=} [properties] Properties to set */ - function NormalizedVertex(properties) { + function ImageClassificationDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10290,88 +10026,75 @@ } /** - * NormalizedVertex x. - * @member {number} x - * @memberof google.cloud.automl.v1.NormalizedVertex - * @instance - */ - NormalizedVertex.prototype.x = 0; - - /** - * NormalizedVertex y. - * @member {number} y - * @memberof google.cloud.automl.v1.NormalizedVertex + * ImageClassificationDatasetMetadata classificationType. + * @member {google.cloud.automl.v1.ClassificationType} classificationType + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @instance */ - NormalizedVertex.prototype.y = 0; + ImageClassificationDatasetMetadata.prototype.classificationType = 0; /** - * Creates a new NormalizedVertex instance using the specified properties. + * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.INormalizedVertex=} [properties] Properties to set - * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex instance + * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata instance */ - NormalizedVertex.create = function create(properties) { - return new NormalizedVertex(properties); + ImageClassificationDatasetMetadata.create = function create(properties) { + return new ImageClassificationDatasetMetadata(properties); }; /** - * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. + * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.INormalizedVertex} message NormalizedVertex message or plain object to encode + * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedVertex.encode = function encode(message, writer) { + ImageClassificationDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.x != null && message.hasOwnProperty("x")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); - if (message.y != null && message.hasOwnProperty("y")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); return writer; }; /** - * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1.NormalizedVertex.verify|verify} messages. + * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.INormalizedVertex} message NormalizedVertex message or plain object to encode + * @param {google.cloud.automl.v1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) { + ImageClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NormalizedVertex message from the specified reader or buffer. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedVertex.decode = function decode(reader, length) { + ImageClassificationDatasetMetadata.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.automl.v1.NormalizedVertex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.x = reader.float(); - break; - case 2: - message.y = reader.float(); + message.classificationType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -10382,117 +10105,124 @@ }; /** - * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedVertex.decodeDelimited = function decodeDelimited(reader) { + ImageClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NormalizedVertex message. + * Verifies an ImageClassificationDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NormalizedVertex.verify = function verify(message) { + ImageClassificationDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.x != null && message.hasOwnProperty("x")) - if (typeof message.x !== "number") - return "x: number expected"; - if (message.y != null && message.hasOwnProperty("y")) - if (typeof message.y !== "number") - return "y: number expected"; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + switch (message.classificationType) { + default: + return "classificationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.automl.v1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata */ - NormalizedVertex.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.NormalizedVertex) + ImageClassificationDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1.NormalizedVertex(); - if (object.x != null) - message.x = Number(object.x); - if (object.y != null) - message.y = Number(object.y); + var message = new $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata(); + switch (object.classificationType) { + case "CLASSIFICATION_TYPE_UNSPECIFIED": + case 0: + message.classificationType = 0; + break; + case "MULTICLASS": + case 1: + message.classificationType = 1; + break; + case "MULTILABEL": + case 2: + message.classificationType = 2; + break; + } return message; }; /** - * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. + * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.NormalizedVertex} message NormalizedVertex + * @param {google.cloud.automl.v1.ImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NormalizedVertex.toObject = function toObject(message, options) { + ImageClassificationDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.x = 0; - object.y = 0; - } - if (message.x != null && message.hasOwnProperty("x")) - object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; - if (message.y != null && message.hasOwnProperty("y")) - object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; + if (options.defaults) + object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; return object; }; /** - * Converts this NormalizedVertex to JSON. + * Converts this ImageClassificationDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.NormalizedVertex + * @memberof google.cloud.automl.v1.ImageClassificationDatasetMetadata * @instance * @returns {Object.} JSON object */ - NormalizedVertex.prototype.toJSON = function toJSON() { + ImageClassificationDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NormalizedVertex; + return ImageClassificationDatasetMetadata; })(); - v1.BoundingPoly = (function() { + v1.ImageObjectDetectionDatasetMetadata = (function() { /** - * Properties of a BoundingPoly. + * Properties of an ImageObjectDetectionDatasetMetadata. * @memberof google.cloud.automl.v1 - * @interface IBoundingPoly - * @property {Array.|null} [normalizedVertices] BoundingPoly normalizedVertices + * @interface IImageObjectDetectionDatasetMetadata */ /** - * Constructs a new BoundingPoly. + * Constructs a new ImageObjectDetectionDatasetMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a BoundingPoly. - * @implements IBoundingPoly + * @classdesc Represents an ImageObjectDetectionDatasetMetadata. + * @implements IImageObjectDetectionDatasetMetadata * @constructor - * @param {google.cloud.automl.v1.IBoundingPoly=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set */ - function BoundingPoly(properties) { - this.normalizedVertices = []; + function ImageObjectDetectionDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10500,79 +10230,63 @@ } /** - * BoundingPoly normalizedVertices. - * @member {Array.} normalizedVertices - * @memberof google.cloud.automl.v1.BoundingPoly - * @instance - */ - BoundingPoly.prototype.normalizedVertices = $util.emptyArray; - - /** - * Creates a new BoundingPoly instance using the specified properties. + * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1.IBoundingPoly=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly instance + * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata instance */ - BoundingPoly.create = function create(properties) { - return new BoundingPoly(properties); + ImageObjectDetectionDatasetMetadata.create = function create(properties) { + return new ImageObjectDetectionDatasetMetadata(properties); }; /** - * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. + * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1.IBoundingPoly} message BoundingPoly message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingPoly.encode = function encode(message, writer) { + ImageObjectDetectionDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.normalizedVertices != null && message.normalizedVertices.length) - for (var i = 0; i < message.normalizedVertices.length; ++i) - $root.google.cloud.automl.v1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingPoly.verify|verify} messages. + * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1.IBoundingPoly} message BoundingPoly message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoundingPoly message from the specified reader or buffer. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly + * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingPoly.decode = function decode(reader, length) { + ImageObjectDetectionDatasetMetadata.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.automl.v1.BoundingPoly(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.normalizedVertices && message.normalizedVertices.length)) - message.normalizedVertices = []; - message.normalizedVertices.push($root.google.cloud.automl.v1.NormalizedVertex.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -10582,126 +10296,100 @@ }; /** - * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly + * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingPoly.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoundingPoly message. + * Verifies an ImageObjectDetectionDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoundingPoly.verify = function verify(message) { + ImageObjectDetectionDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { - if (!Array.isArray(message.normalizedVertices)) - return "normalizedVertices: array expected"; - for (var i = 0; i < message.normalizedVertices.length; ++i) { - var error = $root.google.cloud.automl.v1.NormalizedVertex.verify(message.normalizedVertices[i]); - if (error) - return "normalizedVertices." + error; - } - } return null; }; /** - * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BoundingPoly} BoundingPoly + * @returns {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata */ - BoundingPoly.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BoundingPoly) + ImageObjectDetectionDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1.BoundingPoly(); - if (object.normalizedVertices) { - if (!Array.isArray(object.normalizedVertices)) - throw TypeError(".google.cloud.automl.v1.BoundingPoly.normalizedVertices: array expected"); - message.normalizedVertices = []; - for (var i = 0; i < object.normalizedVertices.length; ++i) { - if (typeof object.normalizedVertices[i] !== "object") - throw TypeError(".google.cloud.automl.v1.BoundingPoly.normalizedVertices: object expected"); - message.normalizedVertices[i] = $root.google.cloud.automl.v1.NormalizedVertex.fromObject(object.normalizedVertices[i]); - } - } - return message; + return new $root.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata(); }; /** - * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1.BoundingPoly} message BoundingPoly + * @param {google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoundingPoly.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.normalizedVertices = []; - if (message.normalizedVertices && message.normalizedVertices.length) { - object.normalizedVertices = []; - for (var j = 0; j < message.normalizedVertices.length; ++j) - object.normalizedVertices[j] = $root.google.cloud.automl.v1.NormalizedVertex.toObject(message.normalizedVertices[j], options); - } - return object; + ImageObjectDetectionDatasetMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this BoundingPoly to JSON. + * Converts this ImageObjectDetectionDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.BoundingPoly + * @memberof google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata * @instance * @returns {Object.} JSON object */ - BoundingPoly.prototype.toJSON = function toJSON() { + ImageObjectDetectionDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BoundingPoly; + return ImageObjectDetectionDatasetMetadata; })(); - v1.InputConfig = (function() { + v1.ImageClassificationModelMetadata = (function() { /** - * Properties of an InputConfig. + * Properties of an ImageClassificationModelMetadata. * @memberof google.cloud.automl.v1 - * @interface IInputConfig - * @property {google.cloud.automl.v1.IGcsSource|null} [gcsSource] InputConfig gcsSource - * @property {Object.|null} [params] InputConfig params + * @interface IImageClassificationModelMetadata + * @property {string|null} [baseModelId] ImageClassificationModelMetadata baseModelId + * @property {number|Long|null} [trainBudgetMilliNodeHours] ImageClassificationModelMetadata trainBudgetMilliNodeHours + * @property {number|Long|null} [trainCostMilliNodeHours] ImageClassificationModelMetadata trainCostMilliNodeHours + * @property {string|null} [stopReason] ImageClassificationModelMetadata stopReason + * @property {string|null} [modelType] ImageClassificationModelMetadata modelType + * @property {number|null} [nodeQps] ImageClassificationModelMetadata nodeQps + * @property {number|Long|null} [nodeCount] ImageClassificationModelMetadata nodeCount */ /** - * Constructs a new InputConfig. + * Constructs a new ImageClassificationModelMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents an InputConfig. - * @implements IInputConfig + * @classdesc Represents an ImageClassificationModelMetadata. + * @implements IImageClassificationModelMetadata * @constructor - * @param {google.cloud.automl.v1.IInputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageClassificationModelMetadata=} [properties] Properties to set */ - function InputConfig(properties) { - this.params = {}; + function ImageClassificationModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10709,108 +10397,153 @@ } /** - * InputConfig gcsSource. - * @member {google.cloud.automl.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.automl.v1.InputConfig + * ImageClassificationModelMetadata baseModelId. + * @member {string} baseModelId + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.baseModelId = ""; + + /** + * ImageClassificationModelMetadata trainBudgetMilliNodeHours. + * @member {number|Long} trainBudgetMilliNodeHours + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImageClassificationModelMetadata trainCostMilliNodeHours. + * @member {number|Long} trainCostMilliNodeHours + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImageClassificationModelMetadata stopReason. + * @member {string} stopReason + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @instance */ - InputConfig.prototype.gcsSource = null; + ImageClassificationModelMetadata.prototype.stopReason = ""; /** - * InputConfig params. - * @member {Object.} params - * @memberof google.cloud.automl.v1.InputConfig + * ImageClassificationModelMetadata modelType. + * @member {string} modelType + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @instance */ - InputConfig.prototype.params = $util.emptyObject; + ImageClassificationModelMetadata.prototype.modelType = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ImageClassificationModelMetadata nodeQps. + * @member {number} nodeQps + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.nodeQps = 0; /** - * InputConfig source. - * @member {"gcsSource"|undefined} source - * @memberof google.cloud.automl.v1.InputConfig + * ImageClassificationModelMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @instance */ - Object.defineProperty(InputConfig.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImageClassificationModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new InputConfig instance using the specified properties. + * Creates a new ImageClassificationModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.IInputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1.InputConfig} InputConfig instance + * @param {google.cloud.automl.v1.IImageClassificationModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata instance */ - InputConfig.create = function create(properties) { - return new InputConfig(properties); + ImageClassificationModelMetadata.create = function create(properties) { + return new ImageClassificationModelMetadata(properties); }; /** - * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. + * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.IInputConfig} message InputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputConfig.encode = function encode(message, writer) { + ImageClassificationModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - $root.google.cloud.automl.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.params != null && message.hasOwnProperty("params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModelId); + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); + if (message.modelType != null && message.hasOwnProperty("modelType")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.modelType); + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + writer.uint32(/* id 13, wireType 1 =*/105).double(message.nodeQps); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 14, wireType 0 =*/112).int64(message.nodeCount); + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.trainBudgetMilliNodeHours); + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + writer.uint32(/* id 17, wireType 0 =*/136).int64(message.trainCostMilliNodeHours); return writer; }; /** - * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.InputConfig.verify|verify} messages. + * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.IInputConfig} message InputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputConfig.encodeDelimited = function encodeDelimited(message, writer) { + ImageClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputConfig message from the specified reader or buffer. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.InputConfig} InputConfig + * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputConfig.decode = function decode(reader, length) { + ImageClassificationModelMetadata.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.automl.v1.InputConfig(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageClassificationModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsSource = $root.google.cloud.automl.v1.GcsSource.decode(reader, reader.uint32()); + message.baseModelId = reader.string(); break; - case 2: - reader.skip().pos++; - if (message.params === $util.emptyObject) - message.params = {}; - key = reader.string(); - reader.pos++; - message.params[key] = reader.string(); + case 16: + message.trainBudgetMilliNodeHours = reader.int64(); + break; + case 17: + message.trainCostMilliNodeHours = reader.int64(); + break; + case 5: + message.stopReason = reader.string(); + break; + case 7: + message.modelType = reader.string(); + break; + case 13: + message.nodeQps = reader.double(); + break; + case 14: + message.nodeCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -10821,140 +10554,203 @@ }; /** - * Decodes an InputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.InputConfig} InputConfig + * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputConfig.decodeDelimited = function decodeDelimited(reader) { + ImageClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputConfig message. + * Verifies an ImageClassificationModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputConfig.verify = function verify(message) { + ImageClassificationModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.automl.v1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; - } + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + if (!$util.isString(message.baseModelId)) + return "baseModelId: string expected"; + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) + return "trainBudgetMilliNodeHours: integer|Long expected"; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) + return "trainCostMilliNodeHours: integer|Long expected"; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + if (!$util.isString(message.stopReason)) + return "stopReason: string expected"; + if (message.modelType != null && message.hasOwnProperty("modelType")) + if (!$util.isString(message.modelType)) + return "modelType: string expected"; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + if (typeof message.nodeQps !== "number") + return "nodeQps: number expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; return null; }; /** - * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.InputConfig} InputConfig + * @returns {google.cloud.automl.v1.ImageClassificationModelMetadata} ImageClassificationModelMetadata */ - InputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.InputConfig) + ImageClassificationModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageClassificationModelMetadata) return object; - var message = new $root.google.cloud.automl.v1.InputConfig(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.automl.v1.InputConfig.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.automl.v1.GcsSource.fromObject(object.gcsSource); - } - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1.InputConfig.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); - } + var message = new $root.google.cloud.automl.v1.ImageClassificationModelMetadata(); + if (object.baseModelId != null) + message.baseModelId = String(object.baseModelId); + if (object.trainBudgetMilliNodeHours != null) + if ($util.Long) + (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; + else if (typeof object.trainBudgetMilliNodeHours === "string") + message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); + else if (typeof object.trainBudgetMilliNodeHours === "number") + message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; + else if (typeof object.trainBudgetMilliNodeHours === "object") + message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); + if (object.trainCostMilliNodeHours != null) + if ($util.Long) + (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; + else if (typeof object.trainCostMilliNodeHours === "string") + message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); + else if (typeof object.trainCostMilliNodeHours === "number") + message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; + else if (typeof object.trainCostMilliNodeHours === "object") + message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); + if (object.stopReason != null) + message.stopReason = String(object.stopReason); + if (object.modelType != null) + message.modelType = String(object.modelType); + if (object.nodeQps != null) + message.nodeQps = Number(object.nodeQps); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an InputConfig message. Also converts values to other types if specified. + * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.InputConfig} message InputConfig + * @param {google.cloud.automl.v1.ImageClassificationModelMetadata} message ImageClassificationModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputConfig.toObject = function toObject(message, options) { + ImageClassificationModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.params = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.automl.v1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; + if (options.defaults) { + object.baseModelId = ""; + object.stopReason = ""; + object.modelType = ""; + object.nodeQps = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; } + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + object.baseModelId = message.baseModelId; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + object.stopReason = message.stopReason; + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = message.modelType; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (typeof message.trainBudgetMilliNodeHours === "number") + object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; + else + object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (typeof message.trainCostMilliNodeHours === "number") + object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; + else + object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; return object; }; /** - * Converts this InputConfig to JSON. + * Converts this ImageClassificationModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.InputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelMetadata * @instance * @returns {Object.} JSON object */ - InputConfig.prototype.toJSON = function toJSON() { + ImageClassificationModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InputConfig; + return ImageClassificationModelMetadata; })(); - v1.BatchPredictInputConfig = (function() { + v1.ImageObjectDetectionModelMetadata = (function() { /** - * Properties of a BatchPredictInputConfig. + * Properties of an ImageObjectDetectionModelMetadata. * @memberof google.cloud.automl.v1 - * @interface IBatchPredictInputConfig - * @property {google.cloud.automl.v1.IGcsSource|null} [gcsSource] BatchPredictInputConfig gcsSource + * @interface IImageObjectDetectionModelMetadata + * @property {string|null} [modelType] ImageObjectDetectionModelMetadata modelType + * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelMetadata nodeCount + * @property {number|null} [nodeQps] ImageObjectDetectionModelMetadata nodeQps + * @property {string|null} [stopReason] ImageObjectDetectionModelMetadata stopReason + * @property {number|Long|null} [trainBudgetMilliNodeHours] ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours + * @property {number|Long|null} [trainCostMilliNodeHours] ImageObjectDetectionModelMetadata trainCostMilliNodeHours */ /** - * Constructs a new BatchPredictInputConfig. + * Constructs a new ImageObjectDetectionModelMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a BatchPredictInputConfig. - * @implements IBatchPredictInputConfig + * @classdesc Represents an ImageObjectDetectionModelMetadata. + * @implements IImageObjectDetectionModelMetadata * @constructor - * @param {google.cloud.automl.v1.IBatchPredictInputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata=} [properties] Properties to set */ - function BatchPredictInputConfig(properties) { + function ImageObjectDetectionModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10962,89 +10758,140 @@ } /** - * BatchPredictInputConfig gcsSource. - * @member {google.cloud.automl.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * ImageObjectDetectionModelMetadata modelType. + * @member {string} modelType + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @instance */ - BatchPredictInputConfig.prototype.gcsSource = null; + ImageObjectDetectionModelMetadata.prototype.modelType = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ImageObjectDetectionModelMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @instance + */ + ImageObjectDetectionModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * BatchPredictInputConfig source. - * @member {"gcsSource"|undefined} source - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * ImageObjectDetectionModelMetadata nodeQps. + * @member {number} nodeQps + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @instance */ - Object.defineProperty(BatchPredictInputConfig.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImageObjectDetectionModelMetadata.prototype.nodeQps = 0; /** - * Creates a new BatchPredictInputConfig instance using the specified properties. + * ImageObjectDetectionModelMetadata stopReason. + * @member {string} stopReason + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @instance + */ + ImageObjectDetectionModelMetadata.prototype.stopReason = ""; + + /** + * ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. + * @member {number|Long} trainBudgetMilliNodeHours + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @instance + */ + ImageObjectDetectionModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImageObjectDetectionModelMetadata trainCostMilliNodeHours. + * @member {number|Long} trainCostMilliNodeHours + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata + * @instance + */ + ImageObjectDetectionModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1.IBatchPredictInputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig instance + * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata instance */ - BatchPredictInputConfig.create = function create(properties) { - return new BatchPredictInputConfig(properties); + ImageObjectDetectionModelMetadata.create = function create(properties) { + return new ImageObjectDetectionModelMetadata(properties); }; /** - * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictInputConfig.encode = function encode(message, writer) { + ImageObjectDetectionModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - $root.google.cloud.automl.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modelType != null && message.hasOwnProperty("modelType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.modelType); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.nodeCount); + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.nodeQps); + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.trainBudgetMilliNodeHours); + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.trainCostMilliNodeHours); return writer; }; /** - * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictInputConfig.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictInputConfig.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictInputConfig.decode = function decode(reader, length) { + ImageObjectDetectionModelMetadata.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.automl.v1.BatchPredictInputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsSource = $root.google.cloud.automl.v1.GcsSource.decode(reader, reader.uint32()); + message.modelType = reader.string(); + break; + case 3: + message.nodeCount = reader.int64(); + break; + case 4: + message.nodeQps = reader.double(); + break; + case 5: + message.stopReason = reader.string(); + break; + case 6: + message.trainBudgetMilliNodeHours = reader.int64(); + break; + case 7: + message.trainCostMilliNodeHours = reader.int64(); break; default: reader.skipType(tag & 7); @@ -11055,117 +10902,190 @@ }; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictInputConfig.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictInputConfig message. + * Verifies an ImageObjectDetectionModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchPredictInputConfig.verify = function verify(message) { + ImageObjectDetectionModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.automl.v1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } + if (message.modelType != null && message.hasOwnProperty("modelType")) + if (!$util.isString(message.modelType)) + return "modelType: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + if (typeof message.nodeQps !== "number") + return "nodeQps: number expected"; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + if (!$util.isString(message.stopReason)) + return "stopReason: string expected"; + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) + return "trainBudgetMilliNodeHours: integer|Long expected"; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) + return "trainCostMilliNodeHours: integer|Long expected"; return null; }; /** - * Creates a BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BatchPredictInputConfig} BatchPredictInputConfig + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata */ - BatchPredictInputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BatchPredictInputConfig) + ImageObjectDetectionModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata) return object; - var message = new $root.google.cloud.automl.v1.BatchPredictInputConfig(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictInputConfig.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.automl.v1.GcsSource.fromObject(object.gcsSource); - } + var message = new $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata(); + if (object.modelType != null) + message.modelType = String(object.modelType); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); + if (object.nodeQps != null) + message.nodeQps = Number(object.nodeQps); + if (object.stopReason != null) + message.stopReason = String(object.stopReason); + if (object.trainBudgetMilliNodeHours != null) + if ($util.Long) + (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; + else if (typeof object.trainBudgetMilliNodeHours === "string") + message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); + else if (typeof object.trainBudgetMilliNodeHours === "number") + message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; + else if (typeof object.trainBudgetMilliNodeHours === "object") + message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); + if (object.trainCostMilliNodeHours != null) + if ($util.Long) + (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; + else if (typeof object.trainCostMilliNodeHours === "string") + message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); + else if (typeof object.trainCostMilliNodeHours === "number") + message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; + else if (typeof object.trainCostMilliNodeHours === "object") + message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a BatchPredictInputConfig message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1.BatchPredictInputConfig} message BatchPredictInputConfig + * @param {google.cloud.automl.v1.ImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchPredictInputConfig.toObject = function toObject(message, options) { + ImageObjectDetectionModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.automl.v1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; + if (options.defaults) { + object.modelType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + object.nodeQps = 0; + object.stopReason = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; } + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = message.modelType; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + object.stopReason = message.stopReason; + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (typeof message.trainBudgetMilliNodeHours === "number") + object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; + else + object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (typeof message.trainCostMilliNodeHours === "number") + object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; + else + object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; return object; }; /** - * Converts this BatchPredictInputConfig to JSON. + * Converts this ImageObjectDetectionModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelMetadata * @instance * @returns {Object.} JSON object */ - BatchPredictInputConfig.prototype.toJSON = function toJSON() { + ImageObjectDetectionModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchPredictInputConfig; + return ImageObjectDetectionModelMetadata; })(); - v1.DocumentInputConfig = (function() { + v1.ImageClassificationModelDeploymentMetadata = (function() { /** - * Properties of a DocumentInputConfig. + * Properties of an ImageClassificationModelDeploymentMetadata. * @memberof google.cloud.automl.v1 - * @interface IDocumentInputConfig - * @property {google.cloud.automl.v1.IGcsSource|null} [gcsSource] DocumentInputConfig gcsSource + * @interface IImageClassificationModelDeploymentMetadata + * @property {number|Long|null} [nodeCount] ImageClassificationModelDeploymentMetadata nodeCount */ /** - * Constructs a new DocumentInputConfig. + * Constructs a new ImageClassificationModelDeploymentMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a DocumentInputConfig. - * @implements IDocumentInputConfig + * @classdesc Represents an ImageClassificationModelDeploymentMetadata. + * @implements IImageClassificationModelDeploymentMetadata * @constructor - * @param {google.cloud.automl.v1.IDocumentInputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set */ - function DocumentInputConfig(properties) { + function ImageClassificationModelDeploymentMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11173,75 +11093,75 @@ } /** - * DocumentInputConfig gcsSource. - * @member {google.cloud.automl.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.automl.v1.DocumentInputConfig + * ImageClassificationModelDeploymentMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @instance */ - DocumentInputConfig.prototype.gcsSource = null; + ImageClassificationModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new DocumentInputConfig instance using the specified properties. + * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.IDocumentInputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig instance + * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata instance */ - DocumentInputConfig.create = function create(properties) { - return new DocumentInputConfig(properties); + ImageClassificationModelDeploymentMetadata.create = function create(properties) { + return new ImageClassificationModelDeploymentMetadata(properties); }; /** - * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. + * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInputConfig.encode = function encode(message, writer) { + ImageClassificationModelDeploymentMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - $root.google.cloud.automl.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); return writer; }; /** - * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DocumentInputConfig.verify|verify} messages. + * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInputConfig.encodeDelimited = function encodeDelimited(message, writer) { + ImageClassificationModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig + * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInputConfig.decode = function decode(reader, length) { + ImageClassificationModelDeploymentMetadata.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.automl.v1.DocumentInputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsSource = $root.google.cloud.automl.v1.GcsSource.decode(reader, reader.uint32()); + message.nodeCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -11252,112 +11172,121 @@ }; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig + * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInputConfig.decodeDelimited = function decodeDelimited(reader) { + ImageClassificationModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentInputConfig message. + * Verifies an ImageClassificationModelDeploymentMetadata message. * @function verify - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentInputConfig.verify = function verify(message) { + ImageClassificationModelDeploymentMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - var error = $root.google.cloud.automl.v1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; return null; }; /** - * Creates a DocumentInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.DocumentInputConfig} DocumentInputConfig + * @returns {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata */ - DocumentInputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.DocumentInputConfig) + ImageClassificationModelDeploymentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata) return object; - var message = new $root.google.cloud.automl.v1.DocumentInputConfig(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.automl.v1.DocumentInputConfig.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.automl.v1.GcsSource.fromObject(object.gcsSource); - } + var message = new $root.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata(); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. + * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.DocumentInputConfig} message DocumentInputConfig + * @param {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentInputConfig.toObject = function toObject(message, options) { + ImageClassificationModelDeploymentMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.gcsSource = null; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - object.gcsSource = $root.google.cloud.automl.v1.GcsSource.toObject(message.gcsSource, options); + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; return object; }; /** - * Converts this DocumentInputConfig to JSON. + * Converts this ImageClassificationModelDeploymentMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.DocumentInputConfig + * @memberof google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata * @instance * @returns {Object.} JSON object */ - DocumentInputConfig.prototype.toJSON = function toJSON() { + ImageClassificationModelDeploymentMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DocumentInputConfig; + return ImageClassificationModelDeploymentMetadata; })(); - v1.OutputConfig = (function() { + v1.ImageObjectDetectionModelDeploymentMetadata = (function() { /** - * Properties of an OutputConfig. + * Properties of an ImageObjectDetectionModelDeploymentMetadata. * @memberof google.cloud.automl.v1 - * @interface IOutputConfig - * @property {google.cloud.automl.v1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination + * @interface IImageObjectDetectionModelDeploymentMetadata + * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelDeploymentMetadata nodeCount */ /** - * Constructs a new OutputConfig. + * Constructs a new ImageObjectDetectionModelDeploymentMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents an OutputConfig. - * @implements IOutputConfig + * @classdesc Represents an ImageObjectDetectionModelDeploymentMetadata. + * @implements IImageObjectDetectionModelDeploymentMetadata * @constructor - * @param {google.cloud.automl.v1.IOutputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set */ - function OutputConfig(properties) { + function ImageObjectDetectionModelDeploymentMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11365,89 +11294,75 @@ } /** - * OutputConfig gcsDestination. - * @member {google.cloud.automl.v1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.automl.v1.OutputConfig - * @instance - */ - OutputConfig.prototype.gcsDestination = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OutputConfig destination. - * @member {"gcsDestination"|undefined} destination - * @memberof google.cloud.automl.v1.OutputConfig + * ImageObjectDetectionModelDeploymentMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @instance */ - Object.defineProperty(OutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImageObjectDetectionModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new OutputConfig instance using the specified properties. + * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.IOutputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig instance + * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata instance */ - OutputConfig.create = function create(properties) { - return new OutputConfig(properties); + ImageObjectDetectionModelDeploymentMetadata.create = function create(properties) { + return new ImageObjectDetectionModelDeploymentMetadata(properties); }; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encode = function encode(message, writer) { + ImageObjectDetectionModelDeploymentMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.automl.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); return writer; }; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OutputConfig.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.automl.v1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decode = function decode(reader, length) { + ImageObjectDetectionModelDeploymentMetadata.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.automl.v1.OutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.decode(reader, reader.uint32()); + message.nodeCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -11458,117 +11373,121 @@ }; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputConfig message. + * Verifies an ImageObjectDetectionModelDeploymentMetadata message. * @function verify - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputConfig.verify = function verify(message) { + ImageObjectDetectionModelDeploymentMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; - } - } + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; return null; }; /** - * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.OutputConfig} OutputConfig + * @returns {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata */ - OutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.OutputConfig) + ImageObjectDetectionModelDeploymentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata) return object; - var message = new $root.google.cloud.automl.v1.OutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.automl.v1.OutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.fromObject(object.gcsDestination); - } + var message = new $root.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata(); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1.OutputConfig} message OutputConfig + * @param {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputConfig.toObject = function toObject(message, options) { + ImageObjectDetectionModelDeploymentMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; - } + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; return object; }; /** - * Converts this OutputConfig to JSON. + * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.OutputConfig + * @memberof google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata * @instance * @returns {Object.} JSON object */ - OutputConfig.prototype.toJSON = function toJSON() { + ImageObjectDetectionModelDeploymentMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputConfig; + return ImageObjectDetectionModelDeploymentMetadata; })(); - v1.BatchPredictOutputConfig = (function() { + v1.TextClassificationDatasetMetadata = (function() { /** - * Properties of a BatchPredictOutputConfig. + * Properties of a TextClassificationDatasetMetadata. * @memberof google.cloud.automl.v1 - * @interface IBatchPredictOutputConfig - * @property {google.cloud.automl.v1.IGcsDestination|null} [gcsDestination] BatchPredictOutputConfig gcsDestination + * @interface ITextClassificationDatasetMetadata + * @property {google.cloud.automl.v1.ClassificationType|null} [classificationType] TextClassificationDatasetMetadata classificationType */ /** - * Constructs a new BatchPredictOutputConfig. + * Constructs a new TextClassificationDatasetMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a BatchPredictOutputConfig. - * @implements IBatchPredictOutputConfig + * @classdesc Represents a TextClassificationDatasetMetadata. + * @implements ITextClassificationDatasetMetadata * @constructor - * @param {google.cloud.automl.v1.IBatchPredictOutputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata=} [properties] Properties to set */ - function BatchPredictOutputConfig(properties) { + function TextClassificationDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11576,89 +11495,75 @@ } /** - * BatchPredictOutputConfig gcsDestination. - * @member {google.cloud.automl.v1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig - * @instance - */ - BatchPredictOutputConfig.prototype.gcsDestination = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BatchPredictOutputConfig destination. - * @member {"gcsDestination"|undefined} destination - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * TextClassificationDatasetMetadata classificationType. + * @member {google.cloud.automl.v1.ClassificationType} classificationType + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @instance */ - Object.defineProperty(BatchPredictOutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + TextClassificationDatasetMetadata.prototype.classificationType = 0; /** - * Creates a new BatchPredictOutputConfig instance using the specified properties. + * Creates a new TextClassificationDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.IBatchPredictOutputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig instance + * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata instance */ - BatchPredictOutputConfig.create = function create(properties) { - return new BatchPredictOutputConfig(properties); + TextClassificationDatasetMetadata.create = function create(properties) { + return new TextClassificationDatasetMetadata(properties); }; /** - * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. + * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOutputConfig.encode = function encode(message, writer) { + TextClassificationDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.automl.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); return writer; }; /** - * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOutputConfig.verify|verify} messages. + * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + TextClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig + * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictOutputConfig.decode = function decode(reader, length) { + TextClassificationDatasetMetadata.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.automl.v1.BatchPredictOutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextClassificationDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.decode(reader, reader.uint32()); + message.classificationType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -11669,120 +11574,125 @@ }; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig + * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictOutputConfig.decodeDelimited = function decodeDelimited(reader) { + TextClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictOutputConfig message. + * Verifies a TextClassificationDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchPredictOutputConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; + */ + TextClassificationDatasetMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + switch (message.classificationType) { + default: + return "classificationType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BatchPredictOutputConfig} BatchPredictOutputConfig + * @returns {google.cloud.automl.v1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata */ - BatchPredictOutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BatchPredictOutputConfig) + TextClassificationDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextClassificationDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1.BatchPredictOutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictOutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.fromObject(object.gcsDestination); + var message = new $root.google.cloud.automl.v1.TextClassificationDatasetMetadata(); + switch (object.classificationType) { + case "CLASSIFICATION_TYPE_UNSPECIFIED": + case 0: + message.classificationType = 0; + break; + case "MULTICLASS": + case 1: + message.classificationType = 1; + break; + case "MULTILABEL": + case 2: + message.classificationType = 2; + break; } return message; }; /** - * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1.BatchPredictOutputConfig} message BatchPredictOutputConfig + * @param {google.cloud.automl.v1.TextClassificationDatasetMetadata} message TextClassificationDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchPredictOutputConfig.toObject = function toObject(message, options) { + TextClassificationDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; - } + if (options.defaults) + object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; return object; }; /** - * Converts this BatchPredictOutputConfig to JSON. + * Converts this TextClassificationDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationDatasetMetadata * @instance * @returns {Object.} JSON object */ - BatchPredictOutputConfig.prototype.toJSON = function toJSON() { + TextClassificationDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchPredictOutputConfig; + return TextClassificationDatasetMetadata; })(); - v1.ModelExportOutputConfig = (function() { + v1.TextClassificationModelMetadata = (function() { /** - * Properties of a ModelExportOutputConfig. + * Properties of a TextClassificationModelMetadata. * @memberof google.cloud.automl.v1 - * @interface IModelExportOutputConfig - * @property {google.cloud.automl.v1.IGcsDestination|null} [gcsDestination] ModelExportOutputConfig gcsDestination - * @property {string|null} [modelFormat] ModelExportOutputConfig modelFormat - * @property {Object.|null} [params] ModelExportOutputConfig params + * @interface ITextClassificationModelMetadata + * @property {google.cloud.automl.v1.ClassificationType|null} [classificationType] TextClassificationModelMetadata classificationType */ /** - * Constructs a new ModelExportOutputConfig. + * Constructs a new TextClassificationModelMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a ModelExportOutputConfig. - * @implements IModelExportOutputConfig + * @classdesc Represents a TextClassificationModelMetadata. + * @implements ITextClassificationModelMetadata * @constructor - * @param {google.cloud.automl.v1.IModelExportOutputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextClassificationModelMetadata=} [properties] Properties to set */ - function ModelExportOutputConfig(properties) { - this.params = {}; + function TextClassificationModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11790,121 +11700,75 @@ } /** - * ModelExportOutputConfig gcsDestination. - * @member {google.cloud.automl.v1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.automl.v1.ModelExportOutputConfig - * @instance - */ - ModelExportOutputConfig.prototype.gcsDestination = null; - - /** - * ModelExportOutputConfig modelFormat. - * @member {string} modelFormat - * @memberof google.cloud.automl.v1.ModelExportOutputConfig - * @instance - */ - ModelExportOutputConfig.prototype.modelFormat = ""; - - /** - * ModelExportOutputConfig params. - * @member {Object.} params - * @memberof google.cloud.automl.v1.ModelExportOutputConfig - * @instance - */ - ModelExportOutputConfig.prototype.params = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ModelExportOutputConfig destination. - * @member {"gcsDestination"|undefined} destination - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * TextClassificationModelMetadata classificationType. + * @member {google.cloud.automl.v1.ClassificationType} classificationType + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @instance */ - Object.defineProperty(ModelExportOutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + TextClassificationModelMetadata.prototype.classificationType = 0; /** - * Creates a new ModelExportOutputConfig instance using the specified properties. + * Creates a new TextClassificationModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.IModelExportOutputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig instance + * @param {google.cloud.automl.v1.ITextClassificationModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata instance */ - ModelExportOutputConfig.create = function create(properties) { - return new ModelExportOutputConfig(properties); + TextClassificationModelMetadata.create = function create(properties) { + return new TextClassificationModelMetadata(properties); }; /** - * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. + * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelExportOutputConfig.encode = function encode(message, writer) { + TextClassificationModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.automl.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.params != null && message.hasOwnProperty("params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); - if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.modelFormat); + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.classificationType); return writer; }; /** - * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ModelExportOutputConfig.verify|verify} messages. + * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextClassificationModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelExportOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + TextClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig + * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelExportOutputConfig.decode = function decode(reader, length) { + TextClassificationModelMetadata.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.automl.v1.ModelExportOutputConfig(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextClassificationModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.decode(reader, reader.uint32()); - break; - case 4: - message.modelFormat = reader.string(); - break; - case 2: - reader.skip().pos++; - if (message.params === $util.emptyObject) - message.params = {}; - key = reader.string(); - reader.pos++; - message.params[key] = reader.string(); + case 3: + message.classificationType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -11915,150 +11779,124 @@ }; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig + * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelExportOutputConfig.decodeDelimited = function decodeDelimited(reader) { + TextClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModelExportOutputConfig message. + * Verifies a TextClassificationModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelExportOutputConfig.verify = function verify(message) { + TextClassificationModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + switch (message.classificationType) { + default: + return "classificationType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) - if (!$util.isString(message.modelFormat)) - return "modelFormat: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; - } return null; }; /** - * Creates a ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ModelExportOutputConfig} ModelExportOutputConfig + * @returns {google.cloud.automl.v1.TextClassificationModelMetadata} TextClassificationModelMetadata */ - ModelExportOutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ModelExportOutputConfig) + TextClassificationModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextClassificationModelMetadata) return object; - var message = new $root.google.cloud.automl.v1.ModelExportOutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.automl.v1.ModelExportOutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.fromObject(object.gcsDestination); - } - if (object.modelFormat != null) - message.modelFormat = String(object.modelFormat); - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1.ModelExportOutputConfig.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); + var message = new $root.google.cloud.automl.v1.TextClassificationModelMetadata(); + switch (object.classificationType) { + case "CLASSIFICATION_TYPE_UNSPECIFIED": + case 0: + message.classificationType = 0; + break; + case "MULTICLASS": + case 1: + message.classificationType = 1; + break; + case "MULTILABEL": + case 2: + message.classificationType = 2; + break; } return message; }; /** - * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1.ModelExportOutputConfig} message ModelExportOutputConfig + * @param {google.cloud.automl.v1.TextClassificationModelMetadata} message TextClassificationModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelExportOutputConfig.toObject = function toObject(message, options) { + TextClassificationModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.params = {}; if (options.defaults) - object.modelFormat = ""; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.automl.v1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; - } - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; - } - if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) - object.modelFormat = message.modelFormat; + object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; return object; }; /** - * Converts this ModelExportOutputConfig to JSON. + * Converts this TextClassificationModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1.TextClassificationModelMetadata * @instance * @returns {Object.} JSON object */ - ModelExportOutputConfig.prototype.toJSON = function toJSON() { + TextClassificationModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ModelExportOutputConfig; + return TextClassificationModelMetadata; })(); - v1.GcsSource = (function() { + v1.TextExtractionDatasetMetadata = (function() { /** - * Properties of a GcsSource. + * Properties of a TextExtractionDatasetMetadata. * @memberof google.cloud.automl.v1 - * @interface IGcsSource - * @property {Array.|null} [inputUris] GcsSource inputUris + * @interface ITextExtractionDatasetMetadata */ /** - * Constructs a new GcsSource. + * Constructs a new TextExtractionDatasetMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a GcsSource. - * @implements IGcsSource + * @classdesc Represents a TextExtractionDatasetMetadata. + * @implements ITextExtractionDatasetMetadata * @constructor - * @param {google.cloud.automl.v1.IGcsSource=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata=} [properties] Properties to set */ - function GcsSource(properties) { - this.inputUris = []; + function TextExtractionDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12066,79 +11904,63 @@ } /** - * GcsSource inputUris. - * @member {Array.} inputUris - * @memberof google.cloud.automl.v1.GcsSource - * @instance - */ - GcsSource.prototype.inputUris = $util.emptyArray; - - /** - * Creates a new GcsSource instance using the specified properties. + * Creates a new TextExtractionDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static - * @param {google.cloud.automl.v1.IGcsSource=} [properties] Properties to set - * @returns {google.cloud.automl.v1.GcsSource} GcsSource instance + * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata instance */ - GcsSource.create = function create(properties) { - return new GcsSource(properties); + TextExtractionDatasetMetadata.create = function create(properties) { + return new TextExtractionDatasetMetadata(properties); }; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. + * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static - * @param {google.cloud.automl.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encode = function encode(message, writer) { + TextExtractionDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputUris != null && message.inputUris.length) - for (var i = 0; i < message.inputUris.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); return writer; }; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsSource.verify|verify} messages. + * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static - * @param {google.cloud.automl.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + TextExtractionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.GcsSource} GcsSource + * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decode = function decode(reader, length) { + TextExtractionDatasetMetadata.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.automl.v1.GcsSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextExtractionDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.inputUris && message.inputUris.length)) - message.inputUris = []; - message.inputUris.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -12148,119 +11970,93 @@ }; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.GcsSource} GcsSource + * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decodeDelimited = function decodeDelimited(reader) { + TextExtractionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsSource message. + * Verifies a TextExtractionDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsSource.verify = function verify(message) { + TextExtractionDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputUris != null && message.hasOwnProperty("inputUris")) { - if (!Array.isArray(message.inputUris)) - return "inputUris: array expected"; - for (var i = 0; i < message.inputUris.length; ++i) - if (!$util.isString(message.inputUris[i])) - return "inputUris: string[] expected"; - } return null; }; /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.GcsSource} GcsSource + * @returns {google.cloud.automl.v1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata */ - GcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.GcsSource) + TextExtractionDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextExtractionDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1.GcsSource(); - if (object.inputUris) { - if (!Array.isArray(object.inputUris)) - throw TypeError(".google.cloud.automl.v1.GcsSource.inputUris: array expected"); - message.inputUris = []; - for (var i = 0; i < object.inputUris.length; ++i) - message.inputUris[i] = String(object.inputUris[i]); - } - return message; + return new $root.google.cloud.automl.v1.TextExtractionDatasetMetadata(); }; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * Creates a plain object from a TextExtractionDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @static - * @param {google.cloud.automl.v1.GcsSource} message GcsSource + * @param {google.cloud.automl.v1.TextExtractionDatasetMetadata} message TextExtractionDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputUris = []; - if (message.inputUris && message.inputUris.length) { - object.inputUris = []; - for (var j = 0; j < message.inputUris.length; ++j) - object.inputUris[j] = message.inputUris[j]; - } - return object; + TextExtractionDatasetMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this GcsSource to JSON. + * Converts this TextExtractionDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.GcsSource + * @memberof google.cloud.automl.v1.TextExtractionDatasetMetadata * @instance * @returns {Object.} JSON object */ - GcsSource.prototype.toJSON = function toJSON() { + TextExtractionDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsSource; + return TextExtractionDatasetMetadata; })(); - v1.GcsDestination = (function() { + v1.TextExtractionModelMetadata = (function() { /** - * Properties of a GcsDestination. + * Properties of a TextExtractionModelMetadata. * @memberof google.cloud.automl.v1 - * @interface IGcsDestination - * @property {string|null} [outputUriPrefix] GcsDestination outputUriPrefix + * @interface ITextExtractionModelMetadata */ /** - * Constructs a new GcsDestination. + * Constructs a new TextExtractionModelMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a GcsDestination. - * @implements IGcsDestination + * @classdesc Represents a TextExtractionModelMetadata. + * @implements ITextExtractionModelMetadata * @constructor - * @param {google.cloud.automl.v1.IGcsDestination=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextExtractionModelMetadata=} [properties] Properties to set */ - function GcsDestination(properties) { + function TextExtractionModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12268,76 +12064,63 @@ } /** - * GcsDestination outputUriPrefix. - * @member {string} outputUriPrefix - * @memberof google.cloud.automl.v1.GcsDestination - * @instance - */ - GcsDestination.prototype.outputUriPrefix = ""; - - /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new TextExtractionModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static - * @param {google.cloud.automl.v1.IGcsDestination=} [properties] Properties to set - * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination instance + * @param {google.cloud.automl.v1.ITextExtractionModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata instance */ - GcsDestination.create = function create(properties) { - return new GcsDestination(properties); + TextExtractionModelMetadata.create = function create(properties) { + return new TextExtractionModelMetadata(properties); }; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. + * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static - * @param {google.cloud.automl.v1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encode = function encode(message, writer) { + TextExtractionModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUriPrefix); return writer; }; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1.GcsDestination.verify|verify} messages. + * Encodes the specified TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static - * @param {google.cloud.automl.v1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.automl.v1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + TextExtractionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination + * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decode = function decode(reader, length) { + TextExtractionModelMetadata.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.automl.v1.GcsDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextExtractionModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.outputUriPrefix = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -12347,109 +12130,94 @@ }; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination + * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decodeDelimited = function decodeDelimited(reader) { + TextExtractionModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsDestination message. + * Verifies a TextExtractionModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsDestination.verify = function verify(message) { + TextExtractionModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - if (!$util.isString(message.outputUriPrefix)) - return "outputUriPrefix: string expected"; return null; }; /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.GcsDestination} GcsDestination + * @returns {google.cloud.automl.v1.TextExtractionModelMetadata} TextExtractionModelMetadata */ - GcsDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.GcsDestination) + TextExtractionModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextExtractionModelMetadata) return object; - var message = new $root.google.cloud.automl.v1.GcsDestination(); - if (object.outputUriPrefix != null) - message.outputUriPrefix = String(object.outputUriPrefix); - return message; + return new $root.google.cloud.automl.v1.TextExtractionModelMetadata(); }; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @static - * @param {google.cloud.automl.v1.GcsDestination} message GcsDestination + * @param {google.cloud.automl.v1.TextExtractionModelMetadata} message TextExtractionModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.outputUriPrefix = ""; - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - object.outputUriPrefix = message.outputUriPrefix; - return object; + TextExtractionModelMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this GcsDestination to JSON. + * Converts this TextExtractionModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.GcsDestination + * @memberof google.cloud.automl.v1.TextExtractionModelMetadata * @instance * @returns {Object.} JSON object */ - GcsDestination.prototype.toJSON = function toJSON() { + TextExtractionModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsDestination; + return TextExtractionModelMetadata; })(); - v1.TextSegment = (function() { + v1.TextSentimentDatasetMetadata = (function() { /** - * Properties of a TextSegment. + * Properties of a TextSentimentDatasetMetadata. * @memberof google.cloud.automl.v1 - * @interface ITextSegment - * @property {string|null} [content] TextSegment content - * @property {number|Long|null} [startOffset] TextSegment startOffset - * @property {number|Long|null} [endOffset] TextSegment endOffset + * @interface ITextSentimentDatasetMetadata + * @property {number|null} [sentimentMax] TextSentimentDatasetMetadata sentimentMax */ /** - * Constructs a new TextSegment. + * Constructs a new TextSentimentDatasetMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextSegment. - * @implements ITextSegment + * @classdesc Represents a TextSentimentDatasetMetadata. + * @implements ITextSentimentDatasetMetadata * @constructor - * @param {google.cloud.automl.v1.ITextSegment=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata=} [properties] Properties to set */ - function TextSegment(properties) { + function TextSentimentDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12457,101 +12225,75 @@ } /** - * TextSegment content. - * @member {string} content - * @memberof google.cloud.automl.v1.TextSegment - * @instance - */ - TextSegment.prototype.content = ""; - - /** - * TextSegment startOffset. - * @member {number|Long} startOffset - * @memberof google.cloud.automl.v1.TextSegment - * @instance - */ - TextSegment.prototype.startOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TextSegment endOffset. - * @member {number|Long} endOffset - * @memberof google.cloud.automl.v1.TextSegment + * TextSentimentDatasetMetadata sentimentMax. + * @member {number} sentimentMax + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @instance */ - TextSegment.prototype.endOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TextSentimentDatasetMetadata.prototype.sentimentMax = 0; /** - * Creates a new TextSegment instance using the specified properties. + * Creates a new TextSentimentDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1.ITextSegment=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextSegment} TextSegment instance + * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata instance */ - TextSegment.create = function create(properties) { - return new TextSegment(properties); + TextSentimentDatasetMetadata.create = function create(properties) { + return new TextSentimentDatasetMetadata(properties); }; /** - * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. + * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1.ITextSegment} message TextSegment message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSegment.encode = function encode(message, writer) { + TextSentimentDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.startOffset); - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.endOffset); - if (message.content != null && message.hasOwnProperty("content")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.content); + if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentimentMax); return writer; }; /** - * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSegment.verify|verify} messages. + * Encodes the specified TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1.ITextSegment} message TextSegment message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSegment.encodeDelimited = function encodeDelimited(message, writer) { + TextSentimentDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSegment message from the specified reader or buffer. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextSegment} TextSegment + * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSegment.decode = function decode(reader, length) { + TextSentimentDatasetMetadata.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.automl.v1.TextSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextSentimentDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.content = reader.string(); - break; case 1: - message.startOffset = reader.int64(); - break; - case 2: - message.endOffset = reader.int64(); + message.sentimentMax = reader.int32(); break; default: reader.skipType(tag & 7); @@ -12562,152 +12304,106 @@ }; /** - * Decodes a TextSegment message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextSegment} TextSegment + * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSegment.decodeDelimited = function decodeDelimited(reader) { + TextSentimentDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSegment message. + * Verifies a TextSentimentDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSegment.verify = function verify(message) { + TextSentimentDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (!$util.isInteger(message.startOffset) && !(message.startOffset && $util.isInteger(message.startOffset.low) && $util.isInteger(message.startOffset.high))) - return "startOffset: integer|Long expected"; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (!$util.isInteger(message.endOffset) && !(message.endOffset && $util.isInteger(message.endOffset.low) && $util.isInteger(message.endOffset.high))) - return "endOffset: integer|Long expected"; + if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) + if (!$util.isInteger(message.sentimentMax)) + return "sentimentMax: integer expected"; return null; }; /** - * Creates a TextSegment message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextSegment} TextSegment + * @returns {google.cloud.automl.v1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata */ - TextSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextSegment) + TextSentimentDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextSentimentDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1.TextSegment(); - if (object.content != null) - message.content = String(object.content); - if (object.startOffset != null) - if ($util.Long) - (message.startOffset = $util.Long.fromValue(object.startOffset)).unsigned = false; - else if (typeof object.startOffset === "string") - message.startOffset = parseInt(object.startOffset, 10); - else if (typeof object.startOffset === "number") - message.startOffset = object.startOffset; - else if (typeof object.startOffset === "object") - message.startOffset = new $util.LongBits(object.startOffset.low >>> 0, object.startOffset.high >>> 0).toNumber(); - if (object.endOffset != null) - if ($util.Long) - (message.endOffset = $util.Long.fromValue(object.endOffset)).unsigned = false; - else if (typeof object.endOffset === "string") - message.endOffset = parseInt(object.endOffset, 10); - else if (typeof object.endOffset === "number") - message.endOffset = object.endOffset; - else if (typeof object.endOffset === "object") - message.endOffset = new $util.LongBits(object.endOffset.low >>> 0, object.endOffset.high >>> 0).toNumber(); + var message = new $root.google.cloud.automl.v1.TextSentimentDatasetMetadata(); + if (object.sentimentMax != null) + message.sentimentMax = object.sentimentMax | 0; return message; }; /** - * Creates a plain object from a TextSegment message. Also converts values to other types if specified. + * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1.TextSegment} message TextSegment + * @param {google.cloud.automl.v1.TextSentimentDatasetMetadata} message TextSentimentDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSegment.toObject = function toObject(message, options) { + TextSentimentDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startOffset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.endOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.endOffset = options.longs === String ? "0" : 0; - object.content = ""; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (typeof message.startOffset === "number") - object.startOffset = options.longs === String ? String(message.startOffset) : message.startOffset; - else - object.startOffset = options.longs === String ? $util.Long.prototype.toString.call(message.startOffset) : options.longs === Number ? new $util.LongBits(message.startOffset.low >>> 0, message.startOffset.high >>> 0).toNumber() : message.startOffset; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (typeof message.endOffset === "number") - object.endOffset = options.longs === String ? String(message.endOffset) : message.endOffset; - else - object.endOffset = options.longs === String ? $util.Long.prototype.toString.call(message.endOffset) : options.longs === Number ? new $util.LongBits(message.endOffset.low >>> 0, message.endOffset.high >>> 0).toNumber() : message.endOffset; - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; + if (options.defaults) + object.sentimentMax = 0; + if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) + object.sentimentMax = message.sentimentMax; return object; }; /** - * Converts this TextSegment to JSON. + * Converts this TextSentimentDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextSegment + * @memberof google.cloud.automl.v1.TextSentimentDatasetMetadata * @instance * @returns {Object.} JSON object */ - TextSegment.prototype.toJSON = function toJSON() { + TextSentimentDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSegment; + return TextSentimentDatasetMetadata; })(); - v1.TextSentimentAnnotation = (function() { + v1.TextSentimentModelMetadata = (function() { /** - * Properties of a TextSentimentAnnotation. + * Properties of a TextSentimentModelMetadata. * @memberof google.cloud.automl.v1 - * @interface ITextSentimentAnnotation - * @property {number|null} [sentiment] TextSentimentAnnotation sentiment + * @interface ITextSentimentModelMetadata */ /** - * Constructs a new TextSentimentAnnotation. + * Constructs a new TextSentimentModelMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextSentimentAnnotation. - * @implements ITextSentimentAnnotation + * @classdesc Represents a TextSentimentModelMetadata. + * @implements ITextSentimentModelMetadata * @constructor - * @param {google.cloud.automl.v1.ITextSentimentAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1.ITextSentimentModelMetadata=} [properties] Properties to set */ - function TextSentimentAnnotation(properties) { + function TextSentimentModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12715,76 +12411,63 @@ } /** - * TextSentimentAnnotation sentiment. - * @member {number} sentiment - * @memberof google.cloud.automl.v1.TextSentimentAnnotation - * @instance - */ - TextSentimentAnnotation.prototype.sentiment = 0; - - /** - * Creates a new TextSentimentAnnotation instance using the specified properties. + * Creates a new TextSentimentModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static - * @param {google.cloud.automl.v1.ITextSentimentAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation instance + * @param {google.cloud.automl.v1.ITextSentimentModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata instance */ - TextSentimentAnnotation.create = function create(properties) { - return new TextSentimentAnnotation(properties); + TextSentimentModelMetadata.create = function create(properties) { + return new TextSentimentModelMetadata(properties); }; /** - * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. + * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static - * @param {google.cloud.automl.v1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentAnnotation.encode = function encode(message, writer) { + TextSentimentModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentiment); return writer; }; /** - * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentAnnotation.verify|verify} messages. + * Encodes the specified TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static - * @param {google.cloud.automl.v1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + TextSentimentModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation + * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentAnnotation.decode = function decode(reader, length) { + TextSentimentModelMetadata.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.automl.v1.TextSentimentAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.TextSentimentModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sentiment = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -12794,114 +12477,108 @@ }; /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation + * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentAnnotation.decodeDelimited = function decodeDelimited(reader) { + TextSentimentModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSentimentAnnotation message. + * Verifies a TextSentimentModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSentimentAnnotation.verify = function verify(message) { + TextSentimentModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - if (!$util.isInteger(message.sentiment)) - return "sentiment: integer expected"; return null; }; /** - * Creates a TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextSentimentAnnotation} TextSentimentAnnotation + * @returns {google.cloud.automl.v1.TextSentimentModelMetadata} TextSentimentModelMetadata */ - TextSentimentAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextSentimentAnnotation) + TextSentimentModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.TextSentimentModelMetadata) return object; - var message = new $root.google.cloud.automl.v1.TextSentimentAnnotation(); - if (object.sentiment != null) - message.sentiment = object.sentiment | 0; - return message; + return new $root.google.cloud.automl.v1.TextSentimentModelMetadata(); }; /** - * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @static - * @param {google.cloud.automl.v1.TextSentimentAnnotation} message TextSentimentAnnotation + * @param {google.cloud.automl.v1.TextSentimentModelMetadata} message TextSentimentModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSentimentAnnotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sentiment = 0; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = message.sentiment; - return object; + TextSentimentModelMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this TextSentimentAnnotation to JSON. + * Converts this TextSentimentModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextSentimentAnnotation + * @memberof google.cloud.automl.v1.TextSentimentModelMetadata * @instance * @returns {Object.} JSON object */ - TextSentimentAnnotation.prototype.toJSON = function toJSON() { + TextSentimentModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSentimentAnnotation; + return TextSentimentModelMetadata; })(); - v1.TextSentimentEvaluationMetrics = (function() { + v1.Model = (function() { /** - * Properties of a TextSentimentEvaluationMetrics. + * Properties of a Model. * @memberof google.cloud.automl.v1 - * @interface ITextSentimentEvaluationMetrics - * @property {number|null} [precision] TextSentimentEvaluationMetrics precision - * @property {number|null} [recall] TextSentimentEvaluationMetrics recall - * @property {number|null} [f1Score] TextSentimentEvaluationMetrics f1Score - * @property {number|null} [meanAbsoluteError] TextSentimentEvaluationMetrics meanAbsoluteError - * @property {number|null} [meanSquaredError] TextSentimentEvaluationMetrics meanSquaredError - * @property {number|null} [linearKappa] TextSentimentEvaluationMetrics linearKappa - * @property {number|null} [quadraticKappa] TextSentimentEvaluationMetrics quadraticKappa - * @property {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] TextSentimentEvaluationMetrics confusionMatrix + * @interface IModel + * @property {google.cloud.automl.v1.ITranslationModelMetadata|null} [translationModelMetadata] Model translationModelMetadata + * @property {google.cloud.automl.v1.IImageClassificationModelMetadata|null} [imageClassificationModelMetadata] Model imageClassificationModelMetadata + * @property {google.cloud.automl.v1.ITextClassificationModelMetadata|null} [textClassificationModelMetadata] Model textClassificationModelMetadata + * @property {google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null} [imageObjectDetectionModelMetadata] Model imageObjectDetectionModelMetadata + * @property {google.cloud.automl.v1.ITextExtractionModelMetadata|null} [textExtractionModelMetadata] Model textExtractionModelMetadata + * @property {google.cloud.automl.v1.ITextSentimentModelMetadata|null} [textSentimentModelMetadata] Model textSentimentModelMetadata + * @property {string|null} [name] Model name + * @property {string|null} [displayName] Model displayName + * @property {string|null} [datasetId] Model datasetId + * @property {google.protobuf.ITimestamp|null} [createTime] Model createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Model updateTime + * @property {google.cloud.automl.v1.Model.DeploymentState|null} [deploymentState] Model deploymentState + * @property {string|null} [etag] Model etag + * @property {Object.|null} [labels] Model labels */ /** - * Constructs a new TextSentimentEvaluationMetrics. + * Constructs a new Model. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextSentimentEvaluationMetrics. - * @implements ITextSentimentEvaluationMetrics + * @classdesc Represents a Model. + * @implements IModel * @constructor - * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1.IModel=} [properties] Properties to set */ - function TextSentimentEvaluationMetrics(properties) { + function Model(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12909,166 +12586,264 @@ } /** - * TextSentimentEvaluationMetrics precision. - * @member {number} precision - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model translationModelMetadata. + * @member {google.cloud.automl.v1.ITranslationModelMetadata|null|undefined} translationModelMetadata + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.precision = 0; + Model.prototype.translationModelMetadata = null; /** - * TextSentimentEvaluationMetrics recall. - * @member {number} recall - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model imageClassificationModelMetadata. + * @member {google.cloud.automl.v1.IImageClassificationModelMetadata|null|undefined} imageClassificationModelMetadata + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.recall = 0; + Model.prototype.imageClassificationModelMetadata = null; /** - * TextSentimentEvaluationMetrics f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model textClassificationModelMetadata. + * @member {google.cloud.automl.v1.ITextClassificationModelMetadata|null|undefined} textClassificationModelMetadata + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.f1Score = 0; + Model.prototype.textClassificationModelMetadata = null; /** - * TextSentimentEvaluationMetrics meanAbsoluteError. - * @member {number} meanAbsoluteError - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model imageObjectDetectionModelMetadata. + * @member {google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null|undefined} imageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.meanAbsoluteError = 0; + Model.prototype.imageObjectDetectionModelMetadata = null; /** - * TextSentimentEvaluationMetrics meanSquaredError. - * @member {number} meanSquaredError - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model textExtractionModelMetadata. + * @member {google.cloud.automl.v1.ITextExtractionModelMetadata|null|undefined} textExtractionModelMetadata + * @memberof google.cloud.automl.v1.Model + * @instance + */ + Model.prototype.textExtractionModelMetadata = null; + + /** + * Model textSentimentModelMetadata. + * @member {google.cloud.automl.v1.ITextSentimentModelMetadata|null|undefined} textSentimentModelMetadata + * @memberof google.cloud.automl.v1.Model + * @instance + */ + Model.prototype.textSentimentModelMetadata = null; + + /** + * Model name. + * @member {string} name + * @memberof google.cloud.automl.v1.Model + * @instance + */ + Model.prototype.name = ""; + + /** + * Model displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1.Model + * @instance + */ + Model.prototype.displayName = ""; + + /** + * Model datasetId. + * @member {string} datasetId + * @memberof google.cloud.automl.v1.Model + * @instance + */ + Model.prototype.datasetId = ""; + + /** + * Model createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.automl.v1.Model + * @instance + */ + Model.prototype.createTime = null; + + /** + * Model updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.automl.v1.Model + * @instance + */ + Model.prototype.updateTime = null; + + /** + * Model deploymentState. + * @member {google.cloud.automl.v1.Model.DeploymentState} deploymentState + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.meanSquaredError = 0; + Model.prototype.deploymentState = 0; /** - * TextSentimentEvaluationMetrics linearKappa. - * @member {number} linearKappa - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model etag. + * @member {string} etag + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.linearKappa = 0; + Model.prototype.etag = ""; /** - * TextSentimentEvaluationMetrics quadraticKappa. - * @member {number} quadraticKappa - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model labels. + * @member {Object.} labels + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.quadraticKappa = 0; + Model.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TextSentimentEvaluationMetrics confusionMatrix. - * @member {google.cloud.automl.v1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * Model modelMetadata. + * @member {"translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"textExtractionModelMetadata"|"textSentimentModelMetadata"|undefined} modelMetadata + * @memberof google.cloud.automl.v1.Model * @instance */ - TextSentimentEvaluationMetrics.prototype.confusionMatrix = null; + Object.defineProperty(Model.prototype, "modelMetadata", { + get: $util.oneOfGetter($oneOfFields = ["translationModelMetadata", "imageClassificationModelMetadata", "textClassificationModelMetadata", "imageObjectDetectionModelMetadata", "textExtractionModelMetadata", "textSentimentModelMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. + * Creates a new Model instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static - * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics instance + * @param {google.cloud.automl.v1.IModel=} [properties] Properties to set + * @returns {google.cloud.automl.v1.Model} Model instance */ - TextSentimentEvaluationMetrics.create = function create(properties) { - return new TextSentimentEvaluationMetrics(properties); + Model.create = function create(properties) { + return new Model(properties); }; /** - * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. + * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static - * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.IModel} message Model message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentEvaluationMetrics.encode = function encode(message, writer) { + Model.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.precision); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.f1Score); - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.meanAbsoluteError); - if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.meanSquaredError); - if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.linearKappa); - if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) - writer.uint32(/* id 7, wireType 5 =*/61).float(message.quadraticKappa); - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 8, wireType 2 =*/66).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.datasetId != null && message.hasOwnProperty("datasetId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.datasetId); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.deploymentState); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) + $root.google.cloud.automl.v1.ImageClassificationModelMetadata.encode(message.imageClassificationModelMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) + $root.google.cloud.automl.v1.TextClassificationModelMetadata.encode(message.textClassificationModelMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) + $root.google.cloud.automl.v1.TranslationModelMetadata.encode(message.translationModelMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) + $root.google.cloud.automl.v1.TextExtractionModelMetadata.encode(message.textExtractionModelMetadata, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) + $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.encode(message.imageObjectDetectionModelMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) + $root.google.cloud.automl.v1.TextSentimentModelMetadata.encode(message.textSentimentModelMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 34, wireType 2 =*/274).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify|verify} messages. + * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static - * @param {google.cloud.automl.v1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.IModel} message Model message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + Model.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. + * Decodes a Model message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics + * @returns {google.cloud.automl.v1.Model} Model * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentEvaluationMetrics.decode = function decode(reader, length) { + Model.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.automl.v1.TextSentimentEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.Model(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 15: + message.translationModelMetadata = $root.google.cloud.automl.v1.TranslationModelMetadata.decode(reader, reader.uint32()); + break; + case 13: + message.imageClassificationModelMetadata = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.decode(reader, reader.uint32()); + break; + case 14: + message.textClassificationModelMetadata = $root.google.cloud.automl.v1.TextClassificationModelMetadata.decode(reader, reader.uint32()); + break; + case 20: + message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.decode(reader, reader.uint32()); + break; + case 19: + message.textExtractionModelMetadata = $root.google.cloud.automl.v1.TextExtractionModelMetadata.decode(reader, reader.uint32()); + break; + case 22: + message.textSentimentModelMetadata = $root.google.cloud.automl.v1.TextSentimentModelMetadata.decode(reader, reader.uint32()); + break; case 1: - message.precision = reader.float(); + message.name = reader.string(); break; case 2: - message.recall = reader.float(); + message.displayName = reader.string(); break; case 3: - message.f1Score = reader.float(); + message.datasetId = reader.string(); break; - case 4: - message.meanAbsoluteError = reader.float(); + case 7: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 5: - message.meanSquaredError = reader.float(); + case 11: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 6: - message.linearKappa = reader.float(); + case 8: + message.deploymentState = reader.int32(); break; - case 7: - message.quadraticKappa = reader.float(); + case 10: + message.etag = reader.string(); break; - case 8: - message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); + case 34: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -13079,149 +12854,322 @@ }; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a Model message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics + * @returns {google.cloud.automl.v1.Model} Model * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + Model.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSentimentEvaluationMetrics message. + * Verifies a Model message. * @function verify - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSentimentEvaluationMetrics.verify = function verify(message) { + Model.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - if (typeof message.meanAbsoluteError !== "number") - return "meanAbsoluteError: number expected"; - if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) - if (typeof message.meanSquaredError !== "number") - return "meanSquaredError: number expected"; - if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) - if (typeof message.linearKappa !== "number") - return "linearKappa: number expected"; - if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) - if (typeof message.quadraticKappa !== "number") - return "quadraticKappa: number expected"; - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { - var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); + var properties = {}; + if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1.TranslationModelMetadata.verify(message.translationModelMetadata); + if (error) + return "translationModelMetadata." + error; + } + } + if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.verify(message.imageClassificationModelMetadata); + if (error) + return "imageClassificationModelMetadata." + error; + } + } + if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1.TextClassificationModelMetadata.verify(message.textClassificationModelMetadata); + if (error) + return "textClassificationModelMetadata." + error; + } + } + if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify(message.imageObjectDetectionModelMetadata); + if (error) + return "imageObjectDetectionModelMetadata." + error; + } + } + if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1.TextExtractionModelMetadata.verify(message.textExtractionModelMetadata); + if (error) + return "textExtractionModelMetadata." + error; + } + } + if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1.TextSentimentModelMetadata.verify(message.textSentimentModelMetadata); + if (error) + return "textSentimentModelMetadata." + error; + } + } + 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.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "confusionMatrix." + 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.deploymentState != null && message.hasOwnProperty("deploymentState")) + switch (message.deploymentState) { + default: + return "deploymentState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a Model message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics + * @returns {google.cloud.automl.v1.Model} Model */ - TextSentimentEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics) + Model.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.Model) return object; - var message = new $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics(); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.recall != null) - message.recall = Number(object.recall); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); - if (object.meanAbsoluteError != null) - message.meanAbsoluteError = Number(object.meanAbsoluteError); - if (object.meanSquaredError != null) - message.meanSquaredError = Number(object.meanSquaredError); - if (object.linearKappa != null) - message.linearKappa = Number(object.linearKappa); - if (object.quadraticKappa != null) - message.quadraticKappa = Number(object.quadraticKappa); - if (object.confusionMatrix != null) { - if (typeof object.confusionMatrix !== "object") - throw TypeError(".google.cloud.automl.v1.TextSentimentEvaluationMetrics.confusionMatrix: object expected"); - message.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); + var message = new $root.google.cloud.automl.v1.Model(); + if (object.translationModelMetadata != null) { + if (typeof object.translationModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Model.translationModelMetadata: object expected"); + message.translationModelMetadata = $root.google.cloud.automl.v1.TranslationModelMetadata.fromObject(object.translationModelMetadata); + } + if (object.imageClassificationModelMetadata != null) { + if (typeof object.imageClassificationModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Model.imageClassificationModelMetadata: object expected"); + message.imageClassificationModelMetadata = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.fromObject(object.imageClassificationModelMetadata); + } + if (object.textClassificationModelMetadata != null) { + if (typeof object.textClassificationModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Model.textClassificationModelMetadata: object expected"); + message.textClassificationModelMetadata = $root.google.cloud.automl.v1.TextClassificationModelMetadata.fromObject(object.textClassificationModelMetadata); + } + if (object.imageObjectDetectionModelMetadata != null) { + if (typeof object.imageObjectDetectionModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Model.imageObjectDetectionModelMetadata: object expected"); + message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.fromObject(object.imageObjectDetectionModelMetadata); + } + if (object.textExtractionModelMetadata != null) { + if (typeof object.textExtractionModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Model.textExtractionModelMetadata: object expected"); + message.textExtractionModelMetadata = $root.google.cloud.automl.v1.TextExtractionModelMetadata.fromObject(object.textExtractionModelMetadata); + } + if (object.textSentimentModelMetadata != null) { + if (typeof object.textSentimentModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1.Model.textSentimentModelMetadata: object expected"); + message.textSentimentModelMetadata = $root.google.cloud.automl.v1.TextSentimentModelMetadata.fromObject(object.textSentimentModelMetadata); + } + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.automl.v1.Model.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.automl.v1.Model.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.deploymentState) { + case "DEPLOYMENT_STATE_UNSPECIFIED": + case 0: + message.deploymentState = 0; + break; + case "DEPLOYED": + case 1: + message.deploymentState = 1; + break; + case "UNDEPLOYED": + case 2: + message.deploymentState = 2; + break; + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.automl.v1.Model.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from a Model message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @static - * @param {google.cloud.automl.v1.TextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics + * @param {google.cloud.automl.v1.Model} message Model * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSentimentEvaluationMetrics.toObject = function toObject(message, options) { + Model.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.precision = 0; - object.recall = 0; - object.f1Score = 0; - object.meanAbsoluteError = 0; - object.meanSquaredError = 0; - object.linearKappa = 0; - object.quadraticKappa = 0; - object.confusionMatrix = null; + object.name = ""; + object.displayName = ""; + object.datasetId = ""; + object.createTime = null; + object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; + object.etag = ""; + object.updateTime = 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.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1.Model.DeploymentState[message.deploymentState] : message.deploymentState; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { + object.imageClassificationModelMetadata = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.toObject(message.imageClassificationModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "imageClassificationModelMetadata"; + } + if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { + object.textClassificationModelMetadata = $root.google.cloud.automl.v1.TextClassificationModelMetadata.toObject(message.textClassificationModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "textClassificationModelMetadata"; + } + if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { + object.translationModelMetadata = $root.google.cloud.automl.v1.TranslationModelMetadata.toObject(message.translationModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "translationModelMetadata"; + } + if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { + object.textExtractionModelMetadata = $root.google.cloud.automl.v1.TextExtractionModelMetadata.toObject(message.textExtractionModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "textExtractionModelMetadata"; + } + if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { + object.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.toObject(message.imageObjectDetectionModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "imageObjectDetectionModelMetadata"; + } + if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { + object.textSentimentModelMetadata = $root.google.cloud.automl.v1.TextSentimentModelMetadata.toObject(message.textSentimentModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "textSentimentModelMetadata"; + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - object.meanAbsoluteError = options.json && !isFinite(message.meanAbsoluteError) ? String(message.meanAbsoluteError) : message.meanAbsoluteError; - if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) - object.meanSquaredError = options.json && !isFinite(message.meanSquaredError) ? String(message.meanSquaredError) : message.meanSquaredError; - if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) - object.linearKappa = options.json && !isFinite(message.linearKappa) ? String(message.linearKappa) : message.linearKappa; - if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) - object.quadraticKappa = options.json && !isFinite(message.quadraticKappa) ? String(message.quadraticKappa) : message.quadraticKappa; - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - object.confusionMatrix = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); return object; }; /** - * Converts this TextSentimentEvaluationMetrics to JSON. + * Converts this Model to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1.Model * @instance * @returns {Object.} JSON object */ - TextSentimentEvaluationMetrics.prototype.toJSON = function toJSON() { + Model.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSentimentEvaluationMetrics; + /** + * DeploymentState enum. + * @name google.cloud.automl.v1.Model.DeploymentState + * @enum {string} + * @property {number} DEPLOYMENT_STATE_UNSPECIFIED=0 DEPLOYMENT_STATE_UNSPECIFIED value + * @property {number} DEPLOYED=1 DEPLOYED value + * @property {number} UNDEPLOYED=2 UNDEPLOYED value + */ + Model.DeploymentState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEPLOYMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEPLOYED"] = 1; + values[valuesById[2] = "UNDEPLOYED"] = 2; + return values; + })(); + + return Model; })(); v1.ModelEvaluation = (function() { @@ -13432,32 +13380,542 @@ case 8: message.classificationEvaluationMetrics = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.decode(reader, reader.uint32()); break; - case 9: - message.translationEvaluationMetrics = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.decode(reader, reader.uint32()); + case 9: + message.translationEvaluationMetrics = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 12: + message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 11: + message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 13: + message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 1: + message.name = reader.string(); + break; + case 2: + message.annotationSpecId = reader.string(); + break; + case 15: + message.displayName = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.evaluatedExampleCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.ModelEvaluation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.ModelEvaluation} ModelEvaluation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelEvaluation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModelEvaluation message. + * @function verify + * @memberof google.cloud.automl.v1.ModelEvaluation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModelEvaluation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.verify(message.classificationEvaluationMetrics); + if (error) + return "classificationEvaluationMetrics." + error; + } + } + if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.verify(message.translationEvaluationMetrics); + if (error) + return "translationEvaluationMetrics." + error; + } + } + if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify(message.imageObjectDetectionEvaluationMetrics); + if (error) + return "imageObjectDetectionEvaluationMetrics." + error; + } + } + if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify(message.textSentimentEvaluationMetrics); + if (error) + return "textSentimentEvaluationMetrics." + error; + } + } + if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify(message.textExtractionEvaluationMetrics); + if (error) + return "textExtractionEvaluationMetrics." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + if (!$util.isString(message.annotationSpecId)) + return "annotationSpecId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) + if (!$util.isInteger(message.evaluatedExampleCount)) + return "evaluatedExampleCount: integer expected"; + return null; + }; + + /** + * Creates a ModelEvaluation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ModelEvaluation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ModelEvaluation} ModelEvaluation + */ + ModelEvaluation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ModelEvaluation) + return object; + var message = new $root.google.cloud.automl.v1.ModelEvaluation(); + if (object.classificationEvaluationMetrics != null) { + if (typeof object.classificationEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1.ModelEvaluation.classificationEvaluationMetrics: object expected"); + message.classificationEvaluationMetrics = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.fromObject(object.classificationEvaluationMetrics); + } + if (object.translationEvaluationMetrics != null) { + if (typeof object.translationEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1.ModelEvaluation.translationEvaluationMetrics: object expected"); + message.translationEvaluationMetrics = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.fromObject(object.translationEvaluationMetrics); + } + if (object.imageObjectDetectionEvaluationMetrics != null) { + if (typeof object.imageObjectDetectionEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1.ModelEvaluation.imageObjectDetectionEvaluationMetrics: object expected"); + message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.fromObject(object.imageObjectDetectionEvaluationMetrics); + } + if (object.textSentimentEvaluationMetrics != null) { + if (typeof object.textSentimentEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1.ModelEvaluation.textSentimentEvaluationMetrics: object expected"); + message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.fromObject(object.textSentimentEvaluationMetrics); + } + if (object.textExtractionEvaluationMetrics != null) { + if (typeof object.textExtractionEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1.ModelEvaluation.textExtractionEvaluationMetrics: object expected"); + message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.fromObject(object.textExtractionEvaluationMetrics); + } + if (object.name != null) + message.name = String(object.name); + if (object.annotationSpecId != null) + message.annotationSpecId = String(object.annotationSpecId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.automl.v1.ModelEvaluation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.evaluatedExampleCount != null) + message.evaluatedExampleCount = object.evaluatedExampleCount | 0; + return message; + }; + + /** + * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ModelEvaluation + * @static + * @param {google.cloud.automl.v1.ModelEvaluation} message ModelEvaluation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModelEvaluation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.annotationSpecId = ""; + object.createTime = null; + object.evaluatedExampleCount = 0; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + object.annotationSpecId = message.annotationSpecId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) + object.evaluatedExampleCount = message.evaluatedExampleCount; + if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { + object.classificationEvaluationMetrics = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.toObject(message.classificationEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "classificationEvaluationMetrics"; + } + if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { + object.translationEvaluationMetrics = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.toObject(message.translationEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "translationEvaluationMetrics"; + } + if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { + object.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.toObject(message.textSentimentEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "textSentimentEvaluationMetrics"; + } + if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { + object.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.toObject(message.imageObjectDetectionEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "imageObjectDetectionEvaluationMetrics"; + } + if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { + object.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.toObject(message.textExtractionEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "textExtractionEvaluationMetrics"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ModelEvaluation to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ModelEvaluation + * @instance + * @returns {Object.} JSON object + */ + ModelEvaluation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ModelEvaluation; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.automl.v1 + * @interface IOperationMetadata + * @property {google.cloud.automl.v1.IDeleteOperationMetadata|null} [deleteDetails] OperationMetadata deleteDetails + * @property {google.cloud.automl.v1.IDeployModelOperationMetadata|null} [deployModelDetails] OperationMetadata deployModelDetails + * @property {google.cloud.automl.v1.IUndeployModelOperationMetadata|null} [undeployModelDetails] OperationMetadata undeployModelDetails + * @property {google.cloud.automl.v1.ICreateModelOperationMetadata|null} [createModelDetails] OperationMetadata createModelDetails + * @property {google.cloud.automl.v1.ICreateDatasetOperationMetadata|null} [createDatasetDetails] OperationMetadata createDatasetDetails + * @property {google.cloud.automl.v1.IImportDataOperationMetadata|null} [importDataDetails] OperationMetadata importDataDetails + * @property {google.cloud.automl.v1.IBatchPredictOperationMetadata|null} [batchPredictDetails] OperationMetadata batchPredictDetails + * @property {google.cloud.automl.v1.IExportDataOperationMetadata|null} [exportDataDetails] OperationMetadata exportDataDetails + * @property {google.cloud.automl.v1.IExportModelOperationMetadata|null} [exportModelDetails] OperationMetadata exportModelDetails + * @property {number|null} [progressPercent] OperationMetadata progressPercent + * @property {Array.|null} [partialFailures] OperationMetadata partialFailures + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.automl.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.automl.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + this.partialFailures = []; + 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]]; + } + + /** + * OperationMetadata deleteDetails. + * @member {google.cloud.automl.v1.IDeleteOperationMetadata|null|undefined} deleteDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.deleteDetails = null; + + /** + * OperationMetadata deployModelDetails. + * @member {google.cloud.automl.v1.IDeployModelOperationMetadata|null|undefined} deployModelDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.deployModelDetails = null; + + /** + * OperationMetadata undeployModelDetails. + * @member {google.cloud.automl.v1.IUndeployModelOperationMetadata|null|undefined} undeployModelDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.undeployModelDetails = null; + + /** + * OperationMetadata createModelDetails. + * @member {google.cloud.automl.v1.ICreateModelOperationMetadata|null|undefined} createModelDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createModelDetails = null; + + /** + * OperationMetadata createDatasetDetails. + * @member {google.cloud.automl.v1.ICreateDatasetOperationMetadata|null|undefined} createDatasetDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createDatasetDetails = null; + + /** + * OperationMetadata importDataDetails. + * @member {google.cloud.automl.v1.IImportDataOperationMetadata|null|undefined} importDataDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.importDataDetails = null; + + /** + * OperationMetadata batchPredictDetails. + * @member {google.cloud.automl.v1.IBatchPredictOperationMetadata|null|undefined} batchPredictDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.batchPredictDetails = null; + + /** + * OperationMetadata exportDataDetails. + * @member {google.cloud.automl.v1.IExportDataOperationMetadata|null|undefined} exportDataDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.exportDataDetails = null; + + /** + * OperationMetadata exportModelDetails. + * @member {google.cloud.automl.v1.IExportModelOperationMetadata|null|undefined} exportModelDetails + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.exportModelDetails = null; + + /** + * OperationMetadata progressPercent. + * @member {number} progressPercent + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.progressPercent = 0; + + /** + * OperationMetadata partialFailures. + * @member {Array.} partialFailures + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.partialFailures = $util.emptyArray; + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OperationMetadata details. + * @member {"deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"createDatasetDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"|undefined} details + * @memberof google.cloud.automl.v1.OperationMetadata + * @instance + */ + Object.defineProperty(OperationMetadata.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["deleteDetails", "deployModelDetails", "undeployModelDetails", "createModelDetails", "createDatasetDetails", "importDataDetails", "batchPredictDetails", "exportDataDetails", "exportModelDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.OperationMetadata + * @static + * @param {google.cloud.automl.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.OperationMetadata + * @static + * @param {google.cloud.automl.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partialFailures != null && message.partialFailures.length) + for (var i = 0; i < message.partialFailures.length; ++i) + $root.google.rpc.Status.encode(message.partialFailures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) + $root.google.cloud.automl.v1.DeleteOperationMetadata.encode(message.deleteDetails, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) + $root.google.cloud.automl.v1.CreateModelOperationMetadata.encode(message.createModelDetails, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.progressPercent); + if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) + $root.google.cloud.automl.v1.ImportDataOperationMetadata.encode(message.importDataDetails, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) + $root.google.cloud.automl.v1.BatchPredictOperationMetadata.encode(message.batchPredictDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) + $root.google.cloud.automl.v1.ExportDataOperationMetadata.encode(message.exportDataDetails, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) + $root.google.cloud.automl.v1.ExportModelOperationMetadata.encode(message.exportModelDetails, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) + $root.google.cloud.automl.v1.DeployModelOperationMetadata.encode(message.deployModelDetails, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) + $root.google.cloud.automl.v1.UndeployModelOperationMetadata.encode(message.undeployModelDetails, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.createDatasetDetails != null && message.hasOwnProperty("createDatasetDetails")) + $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.encode(message.createDatasetDetails, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.OperationMetadata + * @static + * @param {google.cloud.automl.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.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.automl.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: + message.deleteDetails = $root.google.cloud.automl.v1.DeleteOperationMetadata.decode(reader, reader.uint32()); + break; + case 24: + message.deployModelDetails = $root.google.cloud.automl.v1.DeployModelOperationMetadata.decode(reader, reader.uint32()); + break; + case 25: + message.undeployModelDetails = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.decode(reader, reader.uint32()); + break; + case 10: + message.createModelDetails = $root.google.cloud.automl.v1.CreateModelOperationMetadata.decode(reader, reader.uint32()); + break; + case 30: + message.createDatasetDetails = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.decode(reader, reader.uint32()); break; - case 12: - message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.decode(reader, reader.uint32()); + case 15: + message.importDataDetails = $root.google.cloud.automl.v1.ImportDataOperationMetadata.decode(reader, reader.uint32()); break; - case 11: - message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.decode(reader, reader.uint32()); + case 16: + message.batchPredictDetails = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.decode(reader, reader.uint32()); break; - case 13: - message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.decode(reader, reader.uint32()); + case 21: + message.exportDataDetails = $root.google.cloud.automl.v1.ExportDataOperationMetadata.decode(reader, reader.uint32()); break; - case 1: - message.name = reader.string(); + case 22: + message.exportModelDetails = $root.google.cloud.automl.v1.ExportModelOperationMetadata.decode(reader, reader.uint32()); break; - case 2: - message.annotationSpecId = reader.string(); + case 13: + message.progressPercent = reader.int32(); break; - case 15: - message.displayName = reader.string(); + case 2: + if (!(message.partialFailures && message.partialFailures.length)) + message.partialFailures = []; + message.partialFailures.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; - case 5: + case 3: message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 6: - message.evaluatedExampleCount = reader.int32(); + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13468,245 +13926,338 @@ }; /** - * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ModelEvaluation + * @memberof google.cloud.automl.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluation.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModelEvaluation message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.ModelEvaluation + * @memberof google.cloud.automl.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelEvaluation.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { - properties.metrics = 1; + if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { + properties.details = 1; { - var error = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.verify(message.classificationEvaluationMetrics); + var error = $root.google.cloud.automl.v1.DeleteOperationMetadata.verify(message.deleteDetails); if (error) - return "classificationEvaluationMetrics." + error; + return "deleteDetails." + error; } } - if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; + if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; { - var error = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.verify(message.translationEvaluationMetrics); + var error = $root.google.cloud.automl.v1.DeployModelOperationMetadata.verify(message.deployModelDetails); if (error) - return "translationEvaluationMetrics." + error; + return "deployModelDetails." + error; } } - if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; + if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; { - var error = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify(message.imageObjectDetectionEvaluationMetrics); + var error = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.verify(message.undeployModelDetails); if (error) - return "imageObjectDetectionEvaluationMetrics." + error; + return "undeployModelDetails." + error; } } - if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; + if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; { - var error = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.verify(message.textSentimentEvaluationMetrics); + var error = $root.google.cloud.automl.v1.CreateModelOperationMetadata.verify(message.createModelDetails); if (error) - return "textSentimentEvaluationMetrics." + error; + return "createModelDetails." + error; } } - if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; + if (message.createDatasetDetails != null && message.hasOwnProperty("createDatasetDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; { - var error = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify(message.textExtractionEvaluationMetrics); + var error = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.verify(message.createDatasetDetails); if (error) - return "textExtractionEvaluationMetrics." + error; + return "createDatasetDetails." + error; + } + } + if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1.ImportDataOperationMetadata.verify(message.importDataDetails); + if (error) + return "importDataDetails." + error; + } + } + if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.verify(message.batchPredictDetails); + if (error) + return "batchPredictDetails." + error; + } + } + if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1.ExportDataOperationMetadata.verify(message.exportDataDetails); + if (error) + return "exportDataDetails." + error; + } + } + if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1.ExportModelOperationMetadata.verify(message.exportModelDetails); + if (error) + return "exportModelDetails." + error; + } + } + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (!$util.isInteger(message.progressPercent)) + return "progressPercent: integer expected"; + if (message.partialFailures != null && message.hasOwnProperty("partialFailures")) { + if (!Array.isArray(message.partialFailures)) + return "partialFailures: array expected"; + for (var i = 0; i < message.partialFailures.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialFailures[i]); + if (error) + return "partialFailures." + error; } } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - if (!$util.isString(message.annotationSpecId)) - return "annotationSpecId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) return "createTime." + error; } - if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) - if (!$util.isInteger(message.evaluatedExampleCount)) - return "evaluatedExampleCount: integer expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a ModelEvaluation message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ModelEvaluation + * @memberof google.cloud.automl.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.automl.v1.OperationMetadata} OperationMetadata */ - ModelEvaluation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ModelEvaluation) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.OperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.ModelEvaluation(); - if (object.classificationEvaluationMetrics != null) { - if (typeof object.classificationEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1.ModelEvaluation.classificationEvaluationMetrics: object expected"); - message.classificationEvaluationMetrics = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.fromObject(object.classificationEvaluationMetrics); + var message = new $root.google.cloud.automl.v1.OperationMetadata(); + if (object.deleteDetails != null) { + if (typeof object.deleteDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.deleteDetails: object expected"); + message.deleteDetails = $root.google.cloud.automl.v1.DeleteOperationMetadata.fromObject(object.deleteDetails); } - if (object.translationEvaluationMetrics != null) { - if (typeof object.translationEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1.ModelEvaluation.translationEvaluationMetrics: object expected"); - message.translationEvaluationMetrics = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.fromObject(object.translationEvaluationMetrics); + if (object.deployModelDetails != null) { + if (typeof object.deployModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.deployModelDetails: object expected"); + message.deployModelDetails = $root.google.cloud.automl.v1.DeployModelOperationMetadata.fromObject(object.deployModelDetails); } - if (object.imageObjectDetectionEvaluationMetrics != null) { - if (typeof object.imageObjectDetectionEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1.ModelEvaluation.imageObjectDetectionEvaluationMetrics: object expected"); - message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.fromObject(object.imageObjectDetectionEvaluationMetrics); + if (object.undeployModelDetails != null) { + if (typeof object.undeployModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.undeployModelDetails: object expected"); + message.undeployModelDetails = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.fromObject(object.undeployModelDetails); } - if (object.textSentimentEvaluationMetrics != null) { - if (typeof object.textSentimentEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1.ModelEvaluation.textSentimentEvaluationMetrics: object expected"); - message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.fromObject(object.textSentimentEvaluationMetrics); + if (object.createModelDetails != null) { + if (typeof object.createModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.createModelDetails: object expected"); + message.createModelDetails = $root.google.cloud.automl.v1.CreateModelOperationMetadata.fromObject(object.createModelDetails); } - if (object.textExtractionEvaluationMetrics != null) { - if (typeof object.textExtractionEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1.ModelEvaluation.textExtractionEvaluationMetrics: object expected"); - message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.fromObject(object.textExtractionEvaluationMetrics); + if (object.createDatasetDetails != null) { + if (typeof object.createDatasetDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.createDatasetDetails: object expected"); + message.createDatasetDetails = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.fromObject(object.createDatasetDetails); + } + if (object.importDataDetails != null) { + if (typeof object.importDataDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.importDataDetails: object expected"); + message.importDataDetails = $root.google.cloud.automl.v1.ImportDataOperationMetadata.fromObject(object.importDataDetails); + } + if (object.batchPredictDetails != null) { + if (typeof object.batchPredictDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.batchPredictDetails: object expected"); + message.batchPredictDetails = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.fromObject(object.batchPredictDetails); + } + if (object.exportDataDetails != null) { + if (typeof object.exportDataDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.exportDataDetails: object expected"); + message.exportDataDetails = $root.google.cloud.automl.v1.ExportDataOperationMetadata.fromObject(object.exportDataDetails); + } + if (object.exportModelDetails != null) { + if (typeof object.exportModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.exportModelDetails: object expected"); + message.exportModelDetails = $root.google.cloud.automl.v1.ExportModelOperationMetadata.fromObject(object.exportModelDetails); + } + if (object.progressPercent != null) + message.progressPercent = object.progressPercent | 0; + if (object.partialFailures) { + if (!Array.isArray(object.partialFailures)) + throw TypeError(".google.cloud.automl.v1.OperationMetadata.partialFailures: array expected"); + message.partialFailures = []; + for (var i = 0; i < object.partialFailures.length; ++i) { + if (typeof object.partialFailures[i] !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.partialFailures: object expected"); + message.partialFailures[i] = $root.google.rpc.Status.fromObject(object.partialFailures[i]); + } } - if (object.name != null) - message.name = String(object.name); - if (object.annotationSpecId != null) - message.annotationSpecId = String(object.annotationSpecId); - if (object.displayName != null) - message.displayName = String(object.displayName); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1.ModelEvaluation.createTime: object expected"); + throw TypeError(".google.cloud.automl.v1.OperationMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.evaluatedExampleCount != null) - message.evaluatedExampleCount = object.evaluatedExampleCount | 0; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.automl.v1.OperationMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ModelEvaluation + * @memberof google.cloud.automl.v1.OperationMetadata * @static - * @param {google.cloud.automl.v1.ModelEvaluation} message ModelEvaluation + * @param {google.cloud.automl.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelEvaluation.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.partialFailures = []; if (options.defaults) { - object.name = ""; - object.annotationSpecId = ""; object.createTime = null; - object.evaluatedExampleCount = 0; - object.displayName = ""; + object.updateTime = null; + object.progressPercent = 0; + } + if (message.partialFailures && message.partialFailures.length) { + object.partialFailures = []; + for (var j = 0; j < message.partialFailures.length; ++j) + object.partialFailures[j] = $root.google.rpc.Status.toObject(message.partialFailures[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - object.annotationSpecId = message.annotationSpecId; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) - object.evaluatedExampleCount = message.evaluatedExampleCount; - if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { - object.classificationEvaluationMetrics = $root.google.cloud.automl.v1.ClassificationEvaluationMetrics.toObject(message.classificationEvaluationMetrics, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { + object.deleteDetails = $root.google.cloud.automl.v1.DeleteOperationMetadata.toObject(message.deleteDetails, options); if (options.oneofs) - object.metrics = "classificationEvaluationMetrics"; + object.details = "deleteDetails"; } - if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { - object.translationEvaluationMetrics = $root.google.cloud.automl.v1.TranslationEvaluationMetrics.toObject(message.translationEvaluationMetrics, options); + if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { + object.createModelDetails = $root.google.cloud.automl.v1.CreateModelOperationMetadata.toObject(message.createModelDetails, options); if (options.oneofs) - object.metrics = "translationEvaluationMetrics"; + object.details = "createModelDetails"; } - if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { - object.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1.TextSentimentEvaluationMetrics.toObject(message.textSentimentEvaluationMetrics, options); + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + object.progressPercent = message.progressPercent; + if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { + object.importDataDetails = $root.google.cloud.automl.v1.ImportDataOperationMetadata.toObject(message.importDataDetails, options); if (options.oneofs) - object.metrics = "textSentimentEvaluationMetrics"; + object.details = "importDataDetails"; } - if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { - object.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.toObject(message.imageObjectDetectionEvaluationMetrics, options); + if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { + object.batchPredictDetails = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.toObject(message.batchPredictDetails, options); if (options.oneofs) - object.metrics = "imageObjectDetectionEvaluationMetrics"; + object.details = "batchPredictDetails"; } - if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { - object.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.toObject(message.textExtractionEvaluationMetrics, options); + if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { + object.exportDataDetails = $root.google.cloud.automl.v1.ExportDataOperationMetadata.toObject(message.exportDataDetails, options); if (options.oneofs) - object.metrics = "textExtractionEvaluationMetrics"; + object.details = "exportDataDetails"; + } + if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { + object.exportModelDetails = $root.google.cloud.automl.v1.ExportModelOperationMetadata.toObject(message.exportModelDetails, options); + if (options.oneofs) + object.details = "exportModelDetails"; + } + if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { + object.deployModelDetails = $root.google.cloud.automl.v1.DeployModelOperationMetadata.toObject(message.deployModelDetails, options); + if (options.oneofs) + object.details = "deployModelDetails"; + } + if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { + object.undeployModelDetails = $root.google.cloud.automl.v1.UndeployModelOperationMetadata.toObject(message.undeployModelDetails, options); + if (options.oneofs) + object.details = "undeployModelDetails"; + } + if (message.createDatasetDetails != null && message.hasOwnProperty("createDatasetDetails")) { + object.createDatasetDetails = $root.google.cloud.automl.v1.CreateDatasetOperationMetadata.toObject(message.createDatasetDetails, options); + if (options.oneofs) + object.details = "createDatasetDetails"; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this ModelEvaluation to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ModelEvaluation + * @memberof google.cloud.automl.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - ModelEvaluation.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ModelEvaluation; + return OperationMetadata; })(); - v1.ImageObjectDetectionAnnotation = (function() { + v1.DeleteOperationMetadata = (function() { /** - * Properties of an ImageObjectDetectionAnnotation. + * Properties of a DeleteOperationMetadata. * @memberof google.cloud.automl.v1 - * @interface IImageObjectDetectionAnnotation - * @property {google.cloud.automl.v1.IBoundingPoly|null} [boundingBox] ImageObjectDetectionAnnotation boundingBox - * @property {number|null} [score] ImageObjectDetectionAnnotation score + * @interface IDeleteOperationMetadata */ /** - * Constructs a new ImageObjectDetectionAnnotation. + * Constructs a new DeleteOperationMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageObjectDetectionAnnotation. - * @implements IImageObjectDetectionAnnotation + * @classdesc Represents a DeleteOperationMetadata. + * @implements IDeleteOperationMetadata * @constructor - * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1.IDeleteOperationMetadata=} [properties] Properties to set */ - function ImageObjectDetectionAnnotation(properties) { + function DeleteOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13714,89 +14265,63 @@ } /** - * ImageObjectDetectionAnnotation boundingBox. - * @member {google.cloud.automl.v1.IBoundingPoly|null|undefined} boundingBox - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation - * @instance - */ - ImageObjectDetectionAnnotation.prototype.boundingBox = null; - - /** - * ImageObjectDetectionAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation - * @instance - */ - ImageObjectDetectionAnnotation.prototype.score = 0; - - /** - * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. + * Creates a new DeleteOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation instance + * @param {google.cloud.automl.v1.IDeleteOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata instance */ - ImageObjectDetectionAnnotation.create = function create(properties) { - return new ImageObjectDetectionAnnotation(properties); + DeleteOperationMetadata.create = function create(properties) { + return new DeleteOperationMetadata(properties); }; /** - * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. + * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionAnnotation.encode = function encode(message, writer) { + DeleteOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) - $root.google.cloud.automl.v1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); return writer; }; /** - * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify|verify} messages. + * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeleteOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + DeleteOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionAnnotation.decode = function decode(reader, length) { + DeleteOperationMetadata.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.automl.v1.ImageObjectDetectionAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.DeleteOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.boundingBox = $root.google.cloud.automl.v1.BoundingPoly.decode(reader, reader.uint32()); - break; - case 2: - message.score = reader.float(); - break; default: reader.skipType(tag & 7); break; @@ -13806,124 +14331,93 @@ }; /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionAnnotation.decodeDelimited = function decodeDelimited(reader) { + DeleteOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageObjectDetectionAnnotation message. + * Verifies a DeleteOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageObjectDetectionAnnotation.verify = function verify(message) { + DeleteOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) { - var error = $root.google.cloud.automl.v1.BoundingPoly.verify(message.boundingBox); - if (error) - return "boundingBox." + error; - } - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; return null; }; /** - * Creates an ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + * @returns {google.cloud.automl.v1.DeleteOperationMetadata} DeleteOperationMetadata */ - ImageObjectDetectionAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation) + DeleteOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.DeleteOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation(); - if (object.boundingBox != null) { - if (typeof object.boundingBox !== "object") - throw TypeError(".google.cloud.automl.v1.ImageObjectDetectionAnnotation.boundingBox: object expected"); - message.boundingBox = $root.google.cloud.automl.v1.BoundingPoly.fromObject(object.boundingBox); - } - if (object.score != null) - message.score = Number(object.score); - return message; + return new $root.google.cloud.automl.v1.DeleteOperationMetadata(); }; /** - * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a DeleteOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1.ImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation + * @param {google.cloud.automl.v1.DeleteOperationMetadata} message DeleteOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageObjectDetectionAnnotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.boundingBox = null; - object.score = 0; - } - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) - object.boundingBox = $root.google.cloud.automl.v1.BoundingPoly.toObject(message.boundingBox, options); - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - return object; + DeleteOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this ImageObjectDetectionAnnotation to JSON. + * Converts this DeleteOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1.DeleteOperationMetadata * @instance * @returns {Object.} JSON object */ - ImageObjectDetectionAnnotation.prototype.toJSON = function toJSON() { + DeleteOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageObjectDetectionAnnotation; + return DeleteOperationMetadata; })(); - v1.BoundingBoxMetricsEntry = (function() { + v1.DeployModelOperationMetadata = (function() { /** - * Properties of a BoundingBoxMetricsEntry. + * Properties of a DeployModelOperationMetadata. * @memberof google.cloud.automl.v1 - * @interface IBoundingBoxMetricsEntry - * @property {number|null} [iouThreshold] BoundingBoxMetricsEntry iouThreshold - * @property {number|null} [meanAveragePrecision] BoundingBoxMetricsEntry meanAveragePrecision - * @property {Array.|null} [confidenceMetricsEntries] BoundingBoxMetricsEntry confidenceMetricsEntries + * @interface IDeployModelOperationMetadata */ /** - * Constructs a new BoundingBoxMetricsEntry. + * Constructs a new DeployModelOperationMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a BoundingBoxMetricsEntry. - * @implements IBoundingBoxMetricsEntry + * @classdesc Represents a DeployModelOperationMetadata. + * @implements IDeployModelOperationMetadata * @constructor - * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry=} [properties] Properties to set + * @param {google.cloud.automl.v1.IDeployModelOperationMetadata=} [properties] Properties to set */ - function BoundingBoxMetricsEntry(properties) { - this.confidenceMetricsEntries = []; + function DeployModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13931,105 +14425,63 @@ } /** - * BoundingBoxMetricsEntry iouThreshold. - * @member {number} iouThreshold - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry - * @instance - */ - BoundingBoxMetricsEntry.prototype.iouThreshold = 0; - - /** - * BoundingBoxMetricsEntry meanAveragePrecision. - * @member {number} meanAveragePrecision - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry - * @instance - */ - BoundingBoxMetricsEntry.prototype.meanAveragePrecision = 0; - - /** - * BoundingBoxMetricsEntry confidenceMetricsEntries. - * @member {Array.} confidenceMetricsEntries - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry - * @instance - */ - BoundingBoxMetricsEntry.prototype.confidenceMetricsEntries = $util.emptyArray; - - /** - * Creates a new BoundingBoxMetricsEntry instance using the specified properties. + * Creates a new DeployModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry instance + * @param {google.cloud.automl.v1.IDeployModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata instance */ - BoundingBoxMetricsEntry.create = function create(properties) { - return new BoundingBoxMetricsEntry(properties); + DeployModelOperationMetadata.create = function create(properties) { + return new DeployModelOperationMetadata(properties); }; /** - * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. + * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingBoxMetricsEntry.encode = function encode(message, writer) { + DeployModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.iouThreshold); - if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.meanAveragePrecision); - if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) - $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.verify|verify} messages. + * Encodes the specified DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.DeployModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingBoxMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + DeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry + * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingBoxMetricsEntry.decode = function decode(reader, length) { + DeployModelOperationMetadata.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.automl.v1.BoundingBoxMetricsEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.DeployModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.iouThreshold = reader.float(); - break; - case 2: - message.meanAveragePrecision = reader.float(); - break; - case 3: - if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) - message.confidenceMetricsEntries = []; - message.confidenceMetricsEntries.push($root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -14039,399 +14491,253 @@ }; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry + * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingBoxMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + DeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoundingBoxMetricsEntry message. + * Verifies a DeployModelOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoundingBoxMetricsEntry.verify = function verify(message) { + DeployModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) - if (typeof message.iouThreshold !== "number") - return "iouThreshold: number expected"; - if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) - if (typeof message.meanAveragePrecision !== "number") - return "meanAveragePrecision: number expected"; - if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { - if (!Array.isArray(message.confidenceMetricsEntries)) - return "confidenceMetricsEntries: array expected"; - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { - var error = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); - if (error) - return "confidenceMetricsEntries." + error; - } - } return null; }; /** - * Creates a BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. + * Creates a DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry + * @returns {google.cloud.automl.v1.DeployModelOperationMetadata} DeployModelOperationMetadata */ - BoundingBoxMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BoundingBoxMetricsEntry) + DeployModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.DeployModelOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.BoundingBoxMetricsEntry(); - if (object.iouThreshold != null) - message.iouThreshold = Number(object.iouThreshold); - if (object.meanAveragePrecision != null) - message.meanAveragePrecision = Number(object.meanAveragePrecision); - if (object.confidenceMetricsEntries) { - if (!Array.isArray(object.confidenceMetricsEntries)) - throw TypeError(".google.cloud.automl.v1.BoundingBoxMetricsEntry.confidenceMetricsEntries: array expected"); - message.confidenceMetricsEntries = []; - for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { - if (typeof object.confidenceMetricsEntries[i] !== "object") - throw TypeError(".google.cloud.automl.v1.BoundingBoxMetricsEntry.confidenceMetricsEntries: object expected"); - message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); - } - } - return message; + return new $root.google.cloud.automl.v1.DeployModelOperationMetadata(); }; /** - * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. + * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry} message BoundingBoxMetricsEntry + * @param {google.cloud.automl.v1.DeployModelOperationMetadata} message DeployModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoundingBoxMetricsEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.confidenceMetricsEntries = []; - if (options.defaults) { - object.iouThreshold = 0; - object.meanAveragePrecision = 0; - } - if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) - object.iouThreshold = options.json && !isFinite(message.iouThreshold) ? String(message.iouThreshold) : message.iouThreshold; - if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) - object.meanAveragePrecision = options.json && !isFinite(message.meanAveragePrecision) ? String(message.meanAveragePrecision) : message.meanAveragePrecision; - if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { - object.confidenceMetricsEntries = []; - for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) - object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); - } - return object; + DeployModelOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this BoundingBoxMetricsEntry to JSON. + * Converts this DeployModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1.DeployModelOperationMetadata * @instance * @returns {Object.} JSON object */ - BoundingBoxMetricsEntry.prototype.toJSON = function toJSON() { + DeployModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BoundingBoxMetricsEntry.ConfidenceMetricsEntry = (function() { - - /** - * Properties of a ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry - * @interface IConfidenceMetricsEntry - * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold - * @property {number|null} [recall] ConfidenceMetricsEntry recall - * @property {number|null} [precision] ConfidenceMetricsEntry precision - * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score - */ - - /** - * Constructs a new ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry - * @classdesc Represents a ConfidenceMetricsEntry. - * @implements IConfidenceMetricsEntry - * @constructor - * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set - */ - function ConfidenceMetricsEntry(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]]; - } - - /** - * ConfidenceMetricsEntry confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; + return DeployModelOperationMetadata; + })(); - /** - * ConfidenceMetricsEntry recall. - * @member {number} recall - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.recall = 0; + v1.UndeployModelOperationMetadata = (function() { - /** - * ConfidenceMetricsEntry precision. - * @member {number} precision - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precision = 0; + /** + * Properties of an UndeployModelOperationMetadata. + * @memberof google.cloud.automl.v1 + * @interface IUndeployModelOperationMetadata + */ - /** - * ConfidenceMetricsEntry f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.f1Score = 0; + /** + * Constructs a new UndeployModelOperationMetadata. + * @memberof google.cloud.automl.v1 + * @classdesc Represents an UndeployModelOperationMetadata. + * @implements IUndeployModelOperationMetadata + * @constructor + * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata=} [properties] Properties to set + */ + function UndeployModelOperationMetadata(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 new ConfidenceMetricsEntry instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance - */ - ConfidenceMetricsEntry.create = function create(properties) { - return new ConfidenceMetricsEntry(properties); - }; + /** + * Creates a new UndeployModelOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata instance + */ + UndeployModelOperationMetadata.create = function create(properties) { + return new UndeployModelOperationMetadata(properties); + }; - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); - return writer; - }; + /** + * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployModelOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.UndeployModelOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.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.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.confidenceThreshold = reader.float(); - break; - case 2: - message.recall = reader.float(); - break; - case 3: - message.precision = reader.float(); - break; - case 4: - message.f1Score = reader.float(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployModelOperationMetadata.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.automl.v1.UndeployModelOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfidenceMetricsEntry message. - * @function verify - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidenceMetricsEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; - return null; - }; - - /** - * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry - */ - ConfidenceMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - return object; - var message = new $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.recall != null) - message.recall = Number(object.recall); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} message ConfidenceMetricsEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidenceMetricsEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.confidenceThreshold = 0; - object.recall = 0; - object.precision = 0; - object.f1Score = 0; - } - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + /** + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeployModelOperationMetadata message. + * @function verify + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeployModelOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.UndeployModelOperationMetadata} UndeployModelOperationMetadata + */ + UndeployModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.UndeployModelOperationMetadata) return object; - }; + return new $root.google.cloud.automl.v1.UndeployModelOperationMetadata(); + }; - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - * @returns {Object.} JSON object - */ - ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.UndeployModelOperationMetadata} message UndeployModelOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeployModelOperationMetadata.toObject = function toObject() { + return {}; + }; - return ConfidenceMetricsEntry; - })(); + /** + * Converts this UndeployModelOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.UndeployModelOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + UndeployModelOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return BoundingBoxMetricsEntry; + return UndeployModelOperationMetadata; })(); - v1.ImageObjectDetectionEvaluationMetrics = (function() { + v1.CreateDatasetOperationMetadata = (function() { /** - * Properties of an ImageObjectDetectionEvaluationMetrics. + * Properties of a CreateDatasetOperationMetadata. * @memberof google.cloud.automl.v1 - * @interface IImageObjectDetectionEvaluationMetrics - * @property {number|null} [evaluatedBoundingBoxCount] ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount - * @property {Array.|null} [boundingBoxMetricsEntries] ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries - * @property {number|null} [boundingBoxMeanAveragePrecision] ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision + * @interface ICreateDatasetOperationMetadata */ /** - * Constructs a new ImageObjectDetectionEvaluationMetrics. + * Constructs a new CreateDatasetOperationMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents an ImageObjectDetectionEvaluationMetrics. - * @implements IImageObjectDetectionEvaluationMetrics + * @classdesc Represents a CreateDatasetOperationMetadata. + * @implements ICreateDatasetOperationMetadata * @constructor - * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata=} [properties] Properties to set */ - function ImageObjectDetectionEvaluationMetrics(properties) { - this.boundingBoxMetricsEntries = []; + function CreateDatasetOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14439,105 +14745,63 @@ } /** - * ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. - * @member {number} evaluatedBoundingBoxCount - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics - * @instance - */ - ImageObjectDetectionEvaluationMetrics.prototype.evaluatedBoundingBoxCount = 0; - - /** - * ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. - * @member {Array.} boundingBoxMetricsEntries - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics - * @instance - */ - ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMetricsEntries = $util.emptyArray; - - /** - * ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. - * @member {number} boundingBoxMeanAveragePrecision - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics - * @instance - */ - ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMeanAveragePrecision = 0; - - /** - * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. + * Creates a new CreateDatasetOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics instance + * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata instance */ - ImageObjectDetectionEvaluationMetrics.create = function create(properties) { - return new ImageObjectDetectionEvaluationMetrics(properties); + CreateDatasetOperationMetadata.create = function create(properties) { + return new CreateDatasetOperationMetadata(properties); }; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * Encodes the specified CreateDatasetOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata} message CreateDatasetOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionEvaluationMetrics.encode = function encode(message, writer) { + CreateDatasetOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.evaluatedBoundingBoxCount); - if (message.boundingBoxMetricsEntries != null && message.boundingBoxMetricsEntries.length) - for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) - $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.encode(message.boundingBoxMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.boundingBoxMeanAveragePrecision); return writer; }; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * Encodes the specified CreateDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateDatasetOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static - * @param {google.cloud.automl.v1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.ICreateDatasetOperationMetadata} message CreateDatasetOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + CreateDatasetOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. + * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics + * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionEvaluationMetrics.decode = function decode(reader, length) { + CreateDatasetOperationMetadata.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.automl.v1.ImageObjectDetectionEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.CreateDatasetOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.evaluatedBoundingBoxCount = reader.int32(); - break; - case 2: - if (!(message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length)) - message.boundingBoxMetricsEntries = []; - message.boundingBoxMetricsEntries.push($root.google.cloud.automl.v1.BoundingBoxMetricsEntry.decode(reader, reader.uint32())); - break; - case 3: - message.boundingBoxMeanAveragePrecision = reader.float(); - break; default: reader.skipType(tag & 7); break; @@ -14547,143 +14811,93 @@ }; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a CreateDatasetOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics + * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + CreateDatasetOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageObjectDetectionEvaluationMetrics message. + * Verifies a CreateDatasetOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageObjectDetectionEvaluationMetrics.verify = function verify(message) { + CreateDatasetOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - if (!$util.isInteger(message.evaluatedBoundingBoxCount)) - return "evaluatedBoundingBoxCount: integer expected"; - if (message.boundingBoxMetricsEntries != null && message.hasOwnProperty("boundingBoxMetricsEntries")) { - if (!Array.isArray(message.boundingBoxMetricsEntries)) - return "boundingBoxMetricsEntries: array expected"; - for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) { - var error = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.verify(message.boundingBoxMetricsEntries[i]); - if (error) - return "boundingBoxMetricsEntries." + error; - } - } - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - if (typeof message.boundingBoxMeanAveragePrecision !== "number") - return "boundingBoxMeanAveragePrecision: number expected"; return null; }; /** - * Creates an ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics + * @returns {google.cloud.automl.v1.CreateDatasetOperationMetadata} CreateDatasetOperationMetadata */ - ImageObjectDetectionEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) + CreateDatasetOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.CreateDatasetOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics(); - if (object.evaluatedBoundingBoxCount != null) - message.evaluatedBoundingBoxCount = object.evaluatedBoundingBoxCount | 0; - if (object.boundingBoxMetricsEntries) { - if (!Array.isArray(object.boundingBoxMetricsEntries)) - throw TypeError(".google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: array expected"); - message.boundingBoxMetricsEntries = []; - for (var i = 0; i < object.boundingBoxMetricsEntries.length; ++i) { - if (typeof object.boundingBoxMetricsEntries[i] !== "object") - throw TypeError(".google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: object expected"); - message.boundingBoxMetricsEntries[i] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.fromObject(object.boundingBoxMetricsEntries[i]); - } - } - if (object.boundingBoxMeanAveragePrecision != null) - message.boundingBoxMeanAveragePrecision = Number(object.boundingBoxMeanAveragePrecision); - return message; + return new $root.google.cloud.automl.v1.CreateDatasetOperationMetadata(); }; /** - * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from a CreateDatasetOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @static - * @param {google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics + * @param {google.cloud.automl.v1.CreateDatasetOperationMetadata} message CreateDatasetOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageObjectDetectionEvaluationMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.boundingBoxMetricsEntries = []; - if (options.defaults) { - object.evaluatedBoundingBoxCount = 0; - object.boundingBoxMeanAveragePrecision = 0; - } - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - object.evaluatedBoundingBoxCount = message.evaluatedBoundingBoxCount; - if (message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length) { - object.boundingBoxMetricsEntries = []; - for (var j = 0; j < message.boundingBoxMetricsEntries.length; ++j) - object.boundingBoxMetricsEntries[j] = $root.google.cloud.automl.v1.BoundingBoxMetricsEntry.toObject(message.boundingBoxMetricsEntries[j], options); - } - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - object.boundingBoxMeanAveragePrecision = options.json && !isFinite(message.boundingBoxMeanAveragePrecision) ? String(message.boundingBoxMeanAveragePrecision) : message.boundingBoxMeanAveragePrecision; - return object; + CreateDatasetOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this ImageObjectDetectionEvaluationMetrics to JSON. + * Converts this CreateDatasetOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1.CreateDatasetOperationMetadata * @instance * @returns {Object.} JSON object */ - ImageObjectDetectionEvaluationMetrics.prototype.toJSON = function toJSON() { + CreateDatasetOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageObjectDetectionEvaluationMetrics; + return CreateDatasetOperationMetadata; })(); - v1.TextExtractionAnnotation = (function() { + v1.CreateModelOperationMetadata = (function() { /** - * Properties of a TextExtractionAnnotation. + * Properties of a CreateModelOperationMetadata. * @memberof google.cloud.automl.v1 - * @interface ITextExtractionAnnotation - * @property {google.cloud.automl.v1.ITextSegment|null} [textSegment] TextExtractionAnnotation textSegment - * @property {number|null} [score] TextExtractionAnnotation score + * @interface ICreateModelOperationMetadata */ /** - * Constructs a new TextExtractionAnnotation. + * Constructs a new CreateModelOperationMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextExtractionAnnotation. - * @implements ITextExtractionAnnotation + * @classdesc Represents a CreateModelOperationMetadata. + * @implements ICreateModelOperationMetadata * @constructor - * @param {google.cloud.automl.v1.ITextExtractionAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1.ICreateModelOperationMetadata=} [properties] Properties to set */ - function TextExtractionAnnotation(properties) { + function CreateModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14691,103 +14905,223 @@ } /** - * TextExtractionAnnotation textSegment. - * @member {google.cloud.automl.v1.ITextSegment|null|undefined} textSegment - * @memberof google.cloud.automl.v1.TextExtractionAnnotation - * @instance + * Creates a new CreateModelOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.ICreateModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata instance */ - TextExtractionAnnotation.prototype.textSegment = null; + CreateModelOperationMetadata.create = function create(properties) { + return new CreateModelOperationMetadata(properties); + }; /** - * TextExtractionAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1.TextExtractionAnnotation - * @instance + * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - TextExtractionAnnotation.prototype.score = 0; + CreateModelOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.CreateModelOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * TextExtractionAnnotation annotation. - * @member {"textSegment"|undefined} annotation - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateModelOperationMetadata.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.automl.v1.CreateModelOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateModelOperationMetadata message. + * @function verify + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateModelOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.CreateModelOperationMetadata} CreateModelOperationMetadata + */ + CreateModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.CreateModelOperationMetadata) + return object; + return new $root.google.cloud.automl.v1.CreateModelOperationMetadata(); + }; + + /** + * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata + * @static + * @param {google.cloud.automl.v1.CreateModelOperationMetadata} message CreateModelOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateModelOperationMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreateModelOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.CreateModelOperationMetadata * @instance + * @returns {Object.} JSON object */ - Object.defineProperty(TextExtractionAnnotation.prototype, "annotation", { - get: $util.oneOfGetter($oneOfFields = ["textSegment"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateModelOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateModelOperationMetadata; + })(); + + v1.ImportDataOperationMetadata = (function() { /** - * Creates a new TextExtractionAnnotation instance using the specified properties. + * Properties of an ImportDataOperationMetadata. + * @memberof google.cloud.automl.v1 + * @interface IImportDataOperationMetadata + */ + + /** + * Constructs a new ImportDataOperationMetadata. + * @memberof google.cloud.automl.v1 + * @classdesc Represents an ImportDataOperationMetadata. + * @implements IImportDataOperationMetadata + * @constructor + * @param {google.cloud.automl.v1.IImportDataOperationMetadata=} [properties] Properties to set + */ + function ImportDataOperationMetadata(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 new ImportDataOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.ITextExtractionAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation instance + * @param {google.cloud.automl.v1.IImportDataOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata instance */ - TextExtractionAnnotation.create = function create(properties) { - return new TextExtractionAnnotation(properties); + ImportDataOperationMetadata.create = function create(properties) { + return new ImportDataOperationMetadata(properties); }; /** - * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. + * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionAnnotation.encode = function encode(message, writer) { + ImportDataOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); - if (message.textSegment != null && message.hasOwnProperty("textSegment")) - $root.google.cloud.automl.v1.TextSegment.encode(message.textSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionAnnotation.verify|verify} messages. + * Encodes the specified ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ImportDataOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + ImportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation + * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionAnnotation.decode = function decode(reader, length) { + ImportDataOperationMetadata.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.automl.v1.TextExtractionAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ImportDataOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.textSegment = $root.google.cloud.automl.v1.TextSegment.decode(reader, reader.uint32()); - break; - case 1: - message.score = reader.float(); - break; default: reader.skipType(tag & 7); break; @@ -14797,128 +15131,94 @@ }; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation + * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionAnnotation.decodeDelimited = function decodeDelimited(reader) { + ImportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextExtractionAnnotation message. + * Verifies an ImportDataOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextExtractionAnnotation.verify = function verify(message) { + ImportDataOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.textSegment != null && message.hasOwnProperty("textSegment")) { - properties.annotation = 1; - { - var error = $root.google.cloud.automl.v1.TextSegment.verify(message.textSegment); - if (error) - return "textSegment." + error; - } - } - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; return null; }; /** - * Creates a TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextExtractionAnnotation} TextExtractionAnnotation + * @returns {google.cloud.automl.v1.ImportDataOperationMetadata} ImportDataOperationMetadata */ - TextExtractionAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextExtractionAnnotation) + ImportDataOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ImportDataOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.TextExtractionAnnotation(); - if (object.textSegment != null) { - if (typeof object.textSegment !== "object") - throw TypeError(".google.cloud.automl.v1.TextExtractionAnnotation.textSegment: object expected"); - message.textSegment = $root.google.cloud.automl.v1.TextSegment.fromObject(object.textSegment); - } - if (object.score != null) - message.score = Number(object.score); - return message; + return new $root.google.cloud.automl.v1.ImportDataOperationMetadata(); }; /** - * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. + * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.TextExtractionAnnotation} message TextExtractionAnnotation + * @param {google.cloud.automl.v1.ImportDataOperationMetadata} message ImportDataOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextExtractionAnnotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.score = 0; - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (message.textSegment != null && message.hasOwnProperty("textSegment")) { - object.textSegment = $root.google.cloud.automl.v1.TextSegment.toObject(message.textSegment, options); - if (options.oneofs) - object.annotation = "textSegment"; - } - return object; + ImportDataOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this TextExtractionAnnotation to JSON. + * Converts this ImportDataOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1.ImportDataOperationMetadata * @instance * @returns {Object.} JSON object */ - TextExtractionAnnotation.prototype.toJSON = function toJSON() { + ImportDataOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextExtractionAnnotation; + return ImportDataOperationMetadata; })(); - v1.TextExtractionEvaluationMetrics = (function() { + v1.ExportDataOperationMetadata = (function() { /** - * Properties of a TextExtractionEvaluationMetrics. + * Properties of an ExportDataOperationMetadata. * @memberof google.cloud.automl.v1 - * @interface ITextExtractionEvaluationMetrics - * @property {number|null} [auPrc] TextExtractionEvaluationMetrics auPrc - * @property {Array.|null} [confidenceMetricsEntries] TextExtractionEvaluationMetrics confidenceMetricsEntries + * @interface IExportDataOperationMetadata + * @property {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null} [outputInfo] ExportDataOperationMetadata outputInfo */ /** - * Constructs a new TextExtractionEvaluationMetrics. + * Constructs a new ExportDataOperationMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a TextExtractionEvaluationMetrics. - * @implements ITextExtractionEvaluationMetrics + * @classdesc Represents an ExportDataOperationMetadata. + * @implements IExportDataOperationMetadata * @constructor - * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1.IExportDataOperationMetadata=} [properties] Properties to set */ - function TextExtractionEvaluationMetrics(properties) { - this.confidenceMetricsEntries = []; + function ExportDataOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14926,91 +15226,75 @@ } /** - * TextExtractionEvaluationMetrics auPrc. - * @member {number} auPrc - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics - * @instance - */ - TextExtractionEvaluationMetrics.prototype.auPrc = 0; - - /** - * TextExtractionEvaluationMetrics confidenceMetricsEntries. - * @member {Array.} confidenceMetricsEntries - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * ExportDataOperationMetadata outputInfo. + * @member {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo|null|undefined} outputInfo + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @instance */ - TextExtractionEvaluationMetrics.prototype.confidenceMetricsEntries = $util.emptyArray; + ExportDataOperationMetadata.prototype.outputInfo = null; /** - * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. + * Creates a new ExportDataOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics instance + * @param {google.cloud.automl.v1.IExportDataOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata instance */ - TextExtractionEvaluationMetrics.create = function create(properties) { - return new TextExtractionEvaluationMetrics(properties); + ExportDataOperationMetadata.create = function create(properties) { + return new ExportDataOperationMetadata(properties); }; /** - * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. + * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionEvaluationMetrics.encode = function encode(message, writer) { + ExportDataOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); - if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) - $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.encode(message.outputInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.verify|verify} messages. + * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + ExportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionEvaluationMetrics.decode = function decode(reader, length) { + ExportDataOperationMetadata.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.automl.v1.TextExtractionEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ExportDataOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.auPrc = reader.float(); - break; - case 2: - if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) - message.confidenceMetricsEntries = []; - message.confidenceMetricsEntries.push($root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); + message.outputInfo = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15021,133 +15305,109 @@ }; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + ExportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextExtractionEvaluationMetrics message. + * Verifies an ExportDataOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextExtractionEvaluationMetrics.verify = function verify(message) { + ExportDataOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - if (typeof message.auPrc !== "number") - return "auPrc: number expected"; - if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { - if (!Array.isArray(message.confidenceMetricsEntries)) - return "confidenceMetricsEntries: array expected"; - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { - var error = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); - if (error) - return "confidenceMetricsEntries." + error; - } + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { + var error = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify(message.outputInfo); + if (error) + return "outputInfo." + error; } return null; }; /** - * Creates a TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata} ExportDataOperationMetadata */ - TextExtractionEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics) + ExportDataOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ExportDataOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics(); - if (object.auPrc != null) - message.auPrc = Number(object.auPrc); - if (object.confidenceMetricsEntries) { - if (!Array.isArray(object.confidenceMetricsEntries)) - throw TypeError(".google.cloud.automl.v1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: array expected"); - message.confidenceMetricsEntries = []; - for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { - if (typeof object.confidenceMetricsEntries[i] !== "object") - throw TypeError(".google.cloud.automl.v1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: object expected"); - message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); - } + var message = new $root.google.cloud.automl.v1.ExportDataOperationMetadata(); + if (object.outputInfo != null) { + if (typeof object.outputInfo !== "object") + throw TypeError(".google.cloud.automl.v1.ExportDataOperationMetadata.outputInfo: object expected"); + message.outputInfo = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.fromObject(object.outputInfo); } return message; }; /** - * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from an ExportDataOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics + * @param {google.cloud.automl.v1.ExportDataOperationMetadata} message ExportDataOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextExtractionEvaluationMetrics.toObject = function toObject(message, options) { + ExportDataOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.confidenceMetricsEntries = []; if (options.defaults) - object.auPrc = 0; - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; - if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { - object.confidenceMetricsEntries = []; - for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) - object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); - } + object.outputInfo = null; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + object.outputInfo = $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.toObject(message.outputInfo, options); return object; }; /** - * Converts this TextExtractionEvaluationMetrics to JSON. + * Converts this ExportDataOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata * @instance * @returns {Object.} JSON object */ - TextExtractionEvaluationMetrics.prototype.toJSON = function toJSON() { + ExportDataOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TextExtractionEvaluationMetrics.ConfidenceMetricsEntry = (function() { + ExportDataOperationMetadata.ExportDataOutputInfo = (function() { /** - * Properties of a ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics - * @interface IConfidenceMetricsEntry - * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold - * @property {number|null} [recall] ConfidenceMetricsEntry recall - * @property {number|null} [precision] ConfidenceMetricsEntry precision - * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score + * Properties of an ExportDataOutputInfo. + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata + * @interface IExportDataOutputInfo + * @property {string|null} [gcsOutputDirectory] ExportDataOutputInfo gcsOutputDirectory */ /** - * Constructs a new ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics - * @classdesc Represents a ConfidenceMetricsEntry. - * @implements IConfidenceMetricsEntry + * Constructs a new ExportDataOutputInfo. + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata + * @classdesc Represents an ExportDataOutputInfo. + * @implements IExportDataOutputInfo * @constructor - * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set */ - function ConfidenceMetricsEntry(properties) { + function ExportDataOutputInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15155,114 +15415,89 @@ } /** - * ConfidenceMetricsEntry confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; - - /** - * ConfidenceMetricsEntry recall. - * @member {number} recall - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * ExportDataOutputInfo gcsOutputDirectory. + * @member {string} gcsOutputDirectory + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @instance */ - ConfidenceMetricsEntry.prototype.recall = 0; + ExportDataOutputInfo.prototype.gcsOutputDirectory = ""; - /** - * ConfidenceMetricsEntry precision. - * @member {number} precision - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precision = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ConfidenceMetricsEntry f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * ExportDataOutputInfo outputLocation. + * @member {"gcsOutputDirectory"|undefined} outputLocation + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @instance */ - ConfidenceMetricsEntry.prototype.f1Score = 0; + Object.defineProperty(ExportDataOutputInfo.prototype, "outputLocation", { + get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * Creates a new ExportDataOutputInfo instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @static - * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance + * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo instance */ - ConfidenceMetricsEntry.create = function create(properties) { - return new ConfidenceMetricsEntry(properties); + ExportDataOutputInfo.create = function create(properties) { + return new ExportDataOutputInfo(properties); }; /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @static - * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfidenceMetricsEntry.encode = function encode(message, writer) { + ExportDataOutputInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.recall); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.precision); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.f1Score); + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); return writer; }; /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @static - * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + ExportDataOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * Decodes an ExportDataOutputInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfidenceMetricsEntry.decode = function decode(reader, length) { + ExportDataOutputInfo.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.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.confidenceThreshold = reader.float(); - break; - case 3: - message.recall = reader.float(); - break; - case 4: - message.precision = reader.float(); - break; - case 5: - message.f1Score = reader.float(); + message.gcsOutputDirectory = reader.string(); break; default: reader.skipType(tag & 7); @@ -15273,239 +15508,115 @@ }; /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + ExportDataOutputInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConfidenceMetricsEntry message. + * Verifies an ExportDataOutputInfo message. * @function verify - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConfidenceMetricsEntry.verify = function verify(message) { + ExportDataOutputInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; - return null; - }; - - /** - * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry - */ - ConfidenceMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) - return object; - var message = new $root.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.recall != null) - message.recall = Number(object.recall); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); - return message; - }; - - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidenceMetricsEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.confidenceThreshold = 0; - object.recall = 0; - object.precision = 0; - object.f1Score = 0; + var properties = {}; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + properties.outputLocation = 1; + if (!$util.isString(message.gcsOutputDirectory)) + return "gcsOutputDirectory: string expected"; } - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; - return object; - }; - - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - * @instance - * @returns {Object.} JSON object - */ - ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return null; }; - return ConfidenceMetricsEntry; - })(); - - return TextExtractionEvaluationMetrics; - })(); - - v1.PredictionService = (function() { - - /** - * Constructs a new PredictionService service. - * @memberof google.cloud.automl.v1 - * @classdesc Represents a PredictionService - * @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 PredictionService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PredictionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PredictionService; - - /** - * Creates new PredictionService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.automl.v1.PredictionService - * @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 {PredictionService} RPC service. Useful where requests and/or responses are streamed. - */ - PredictionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.automl.v1.PredictionService#predict}. - * @memberof google.cloud.automl.v1.PredictionService - * @typedef PredictCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1.PredictResponse} [response] PredictResponse - */ - - /** - * Calls Predict. - * @function predict - * @memberof google.cloud.automl.v1.PredictionService - * @instance - * @param {google.cloud.automl.v1.IPredictRequest} request PredictRequest message or plain object - * @param {google.cloud.automl.v1.PredictionService.PredictCallback} callback Node-style callback called with the error, if any, and PredictResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PredictionService.prototype.predict = function predict(request, callback) { - return this.rpcCall(predict, $root.google.cloud.automl.v1.PredictRequest, $root.google.cloud.automl.v1.PredictResponse, request, callback); - }, "name", { value: "Predict" }); - - /** - * Calls Predict. - * @function predict - * @memberof google.cloud.automl.v1.PredictionService - * @instance - * @param {google.cloud.automl.v1.IPredictRequest} request PredictRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates an ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo + */ + ExportDataOutputInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo) + return object; + var message = new $root.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo(); + if (object.gcsOutputDirectory != null) + message.gcsOutputDirectory = String(object.gcsOutputDirectory); + return message; + }; - /** - * Callback as used by {@link google.cloud.automl.v1.PredictionService#batchPredict}. - * @memberof google.cloud.automl.v1.PredictionService - * @typedef BatchPredictCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * @static + * @param {google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo} message ExportDataOutputInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportDataOutputInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + object.gcsOutputDirectory = message.gcsOutputDirectory; + if (options.oneofs) + object.outputLocation = "gcsOutputDirectory"; + } + return object; + }; - /** - * Calls BatchPredict. - * @function batchPredict - * @memberof google.cloud.automl.v1.PredictionService - * @instance - * @param {google.cloud.automl.v1.IBatchPredictRequest} request BatchPredictRequest message or plain object - * @param {google.cloud.automl.v1.PredictionService.BatchPredictCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PredictionService.prototype.batchPredict = function batchPredict(request, callback) { - return this.rpcCall(batchPredict, $root.google.cloud.automl.v1.BatchPredictRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchPredict" }); + /** + * Converts this ExportDataOutputInfo to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo + * @instance + * @returns {Object.} JSON object + */ + ExportDataOutputInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls BatchPredict. - * @function batchPredict - * @memberof google.cloud.automl.v1.PredictionService - * @instance - * @param {google.cloud.automl.v1.IBatchPredictRequest} request BatchPredictRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return ExportDataOutputInfo; + })(); - return PredictionService; + return ExportDataOperationMetadata; })(); - v1.PredictRequest = (function() { + v1.BatchPredictOperationMetadata = (function() { /** - * Properties of a PredictRequest. + * Properties of a BatchPredictOperationMetadata. * @memberof google.cloud.automl.v1 - * @interface IPredictRequest - * @property {string|null} [name] PredictRequest name - * @property {google.cloud.automl.v1.IExamplePayload|null} [payload] PredictRequest payload - * @property {Object.|null} [params] PredictRequest params + * @interface IBatchPredictOperationMetadata + * @property {google.cloud.automl.v1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictOperationMetadata inputConfig + * @property {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null} [outputInfo] BatchPredictOperationMetadata outputInfo */ /** - * Constructs a new PredictRequest. + * Constructs a new BatchPredictOperationMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a PredictRequest. - * @implements IPredictRequest + * @classdesc Represents a BatchPredictOperationMetadata. + * @implements IBatchPredictOperationMetadata * @constructor - * @param {google.cloud.automl.v1.IPredictRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata=} [properties] Properties to set */ - function PredictRequest(properties) { - this.params = {}; + function BatchPredictOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15513,107 +15624,88 @@ } /** - * PredictRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1.PredictRequest - * @instance - */ - PredictRequest.prototype.name = ""; - - /** - * PredictRequest payload. - * @member {google.cloud.automl.v1.IExamplePayload|null|undefined} payload - * @memberof google.cloud.automl.v1.PredictRequest + * BatchPredictOperationMetadata inputConfig. + * @member {google.cloud.automl.v1.IBatchPredictInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @instance */ - PredictRequest.prototype.payload = null; + BatchPredictOperationMetadata.prototype.inputConfig = null; /** - * PredictRequest params. - * @member {Object.} params - * @memberof google.cloud.automl.v1.PredictRequest + * BatchPredictOperationMetadata outputInfo. + * @member {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null|undefined} outputInfo + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @instance */ - PredictRequest.prototype.params = $util.emptyObject; + BatchPredictOperationMetadata.prototype.outputInfo = null; /** - * Creates a new PredictRequest instance using the specified properties. + * Creates a new BatchPredictOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static - * @param {google.cloud.automl.v1.IPredictRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest instance + * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata instance */ - PredictRequest.create = function create(properties) { - return new PredictRequest(properties); + BatchPredictOperationMetadata.create = function create(properties) { + return new BatchPredictOperationMetadata(properties); }; /** - * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. + * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static - * @param {google.cloud.automl.v1.IPredictRequest} message PredictRequest message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictRequest.encode = function encode(message, writer) { + BatchPredictOperationMetadata.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.payload != null && message.hasOwnProperty("payload")) - $root.google.cloud.automl.v1.ExamplePayload.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.params != null && message.hasOwnProperty("params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. + * Encodes the specified BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static - * @param {google.cloud.automl.v1.IPredictRequest} message PredictRequest message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PredictRequest message from the specified reader or buffer. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictRequest.decode = function decode(reader, length) { + BatchPredictOperationMetadata.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.automl.v1.PredictRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.BatchPredictOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.decode(reader, reader.uint32()); break; case 2: - message.payload = $root.google.cloud.automl.v1.ExamplePayload.decode(reader, reader.uint32()); - break; - case 3: - reader.skip().pos++; - if (message.params === $util.emptyObject) - message.params = {}; - key = reader.string(); - reader.pos++; - message.params[key] = reader.string(); + message.outputInfo = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15624,148 +15716,331 @@ }; /** - * Decodes a PredictRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictRequest.decodeDelimited = function decodeDelimited(reader) { + BatchPredictOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PredictRequest message. + * Verifies a BatchPredictOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PredictRequest.verify = function verify(message) { + BatchPredictOperationMetadata.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.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.cloud.automl.v1.ExamplePayload.verify(message.payload); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.automl.v1.BatchPredictInputConfig.verify(message.inputConfig); if (error) - return "payload." + error; + return "inputConfig." + error; } - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { + var error = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify(message.outputInfo); + if (error) + return "outputInfo." + error; } return null; }; /** - * Creates a PredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata} BatchPredictOperationMetadata */ - PredictRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.PredictRequest) + BatchPredictOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BatchPredictOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.PredictRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.automl.v1.PredictRequest.payload: object expected"); - message.payload = $root.google.cloud.automl.v1.ExamplePayload.fromObject(object.payload); + var message = new $root.google.cloud.automl.v1.BatchPredictOperationMetadata(); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictOperationMetadata.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.fromObject(object.inputConfig); } - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1.PredictRequest.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); + if (object.outputInfo != null) { + if (typeof object.outputInfo !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictOperationMetadata.outputInfo: object expected"); + message.outputInfo = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.fromObject(object.outputInfo); } return message; }; /** - * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @static - * @param {google.cloud.automl.v1.PredictRequest} message PredictRequest + * @param {google.cloud.automl.v1.BatchPredictOperationMetadata} message BatchPredictOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PredictRequest.toObject = function toObject(message, options) { + BatchPredictOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.params = {}; if (options.defaults) { - object.name = ""; - object.payload = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = $root.google.cloud.automl.v1.ExamplePayload.toObject(message.payload, options); - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; + object.inputConfig = null; + object.outputInfo = null; } + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.toObject(message.inputConfig, options); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + object.outputInfo = $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.toObject(message.outputInfo, options); return object; }; /** - * Converts this PredictRequest to JSON. + * Converts this BatchPredictOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.PredictRequest + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata * @instance * @returns {Object.} JSON object */ - PredictRequest.prototype.toJSON = function toJSON() { + BatchPredictOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PredictRequest; + BatchPredictOperationMetadata.BatchPredictOutputInfo = (function() { + + /** + * Properties of a BatchPredictOutputInfo. + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * @interface IBatchPredictOutputInfo + * @property {string|null} [gcsOutputDirectory] BatchPredictOutputInfo gcsOutputDirectory + */ + + /** + * Constructs a new BatchPredictOutputInfo. + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata + * @classdesc Represents a BatchPredictOutputInfo. + * @implements IBatchPredictOutputInfo + * @constructor + * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set + */ + function BatchPredictOutputInfo(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]]; + } + + /** + * BatchPredictOutputInfo gcsOutputDirectory. + * @member {string} gcsOutputDirectory + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @instance + */ + BatchPredictOutputInfo.prototype.gcsOutputDirectory = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BatchPredictOutputInfo outputLocation. + * @member {"gcsOutputDirectory"|undefined} outputLocation + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @instance + */ + Object.defineProperty(BatchPredictOutputInfo.prototype, "outputLocation", { + get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BatchPredictOutputInfo instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo instance + */ + BatchPredictOutputInfo.create = function create(properties) { + return new BatchPredictOutputInfo(properties); + }; + + /** + * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchPredictOutputInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); + return writer; + }; + + /** + * Encodes the specified BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchPredictOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchPredictOutputInfo.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.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsOutputDirectory = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchPredictOutputInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchPredictOutputInfo message. + * @function verify + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchPredictOutputInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + properties.outputLocation = 1; + if (!$util.isString(message.gcsOutputDirectory)) + return "gcsOutputDirectory: string expected"; + } + return null; + }; + + /** + * Creates a BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo + */ + BatchPredictOutputInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo) + return object; + var message = new $root.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); + if (object.gcsOutputDirectory != null) + message.gcsOutputDirectory = String(object.gcsOutputDirectory); + return message; + }; + + /** + * Creates a plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo} message BatchPredictOutputInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchPredictOutputInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + object.gcsOutputDirectory = message.gcsOutputDirectory; + if (options.oneofs) + object.outputLocation = "gcsOutputDirectory"; + } + return object; + }; + + /** + * Converts this BatchPredictOutputInfo to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @instance + * @returns {Object.} JSON object + */ + BatchPredictOutputInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BatchPredictOutputInfo; + })(); + + return BatchPredictOperationMetadata; })(); - v1.PredictResponse = (function() { + v1.ExportModelOperationMetadata = (function() { /** - * Properties of a PredictResponse. - * @memberof google.cloud.automl.v1 - * @interface IPredictResponse - * @property {Array.|null} [payload] PredictResponse payload - * @property {google.cloud.automl.v1.IExamplePayload|null} [preprocessedInput] PredictResponse preprocessedInput - * @property {Object.|null} [metadata] PredictResponse metadata + * Properties of an ExportModelOperationMetadata. + * @memberof google.cloud.automl.v1 + * @interface IExportModelOperationMetadata + * @property {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null} [outputInfo] ExportModelOperationMetadata outputInfo */ /** - * Constructs a new PredictResponse. + * Constructs a new ExportModelOperationMetadata. * @memberof google.cloud.automl.v1 - * @classdesc Represents a PredictResponse. - * @implements IPredictResponse + * @classdesc Represents an ExportModelOperationMetadata. + * @implements IExportModelOperationMetadata * @constructor - * @param {google.cloud.automl.v1.IPredictResponse=} [properties] Properties to set + * @param {google.cloud.automl.v1.IExportModelOperationMetadata=} [properties] Properties to set */ - function PredictResponse(properties) { - this.payload = []; - this.metadata = {}; + function ExportModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15773,110 +16048,75 @@ } /** - * PredictResponse payload. - * @member {Array.} payload - * @memberof google.cloud.automl.v1.PredictResponse - * @instance - */ - PredictResponse.prototype.payload = $util.emptyArray; - - /** - * PredictResponse preprocessedInput. - * @member {google.cloud.automl.v1.IExamplePayload|null|undefined} preprocessedInput - * @memberof google.cloud.automl.v1.PredictResponse - * @instance - */ - PredictResponse.prototype.preprocessedInput = null; - - /** - * PredictResponse metadata. - * @member {Object.} metadata - * @memberof google.cloud.automl.v1.PredictResponse + * ExportModelOperationMetadata outputInfo. + * @member {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo|null|undefined} outputInfo + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @instance */ - PredictResponse.prototype.metadata = $util.emptyObject; + ExportModelOperationMetadata.prototype.outputInfo = null; /** - * Creates a new PredictResponse instance using the specified properties. + * Creates a new ExportModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1.IPredictResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse instance + * @param {google.cloud.automl.v1.IExportModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata instance */ - PredictResponse.create = function create(properties) { - return new PredictResponse(properties); + ExportModelOperationMetadata.create = function create(properties) { + return new ExportModelOperationMetadata(properties); }; /** - * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. + * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1.IPredictResponse} message PredictResponse message or plain object to encode + * @param {google.cloud.automl.v1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictResponse.encode = function encode(message, writer) { + ExportModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.payload != null && message.payload.length) - for (var i = 0; i < message.payload.length; ++i) - $root.google.cloud.automl.v1.AnnotationPayload.encode(message.payload[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) - $root.google.cloud.automl.v1.ExamplePayload.encode(message.preprocessedInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. + * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1.IPredictResponse} message PredictResponse message or plain object to encode + * @param {google.cloud.automl.v1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExportModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PredictResponse message from the specified reader or buffer. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictResponse.decode = function decode(reader, length) { + ExportModelOperationMetadata.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.automl.v1.PredictResponse(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.ExportModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.payload && message.payload.length)) - message.payload = []; - message.payload.push($root.google.cloud.automl.v1.AnnotationPayload.decode(reader, reader.uint32())); - break; - case 3: - message.preprocessedInput = $root.google.cloud.automl.v1.ExamplePayload.decode(reader, reader.uint32()); - break; case 2: - reader.skip().pos++; - if (message.metadata === $util.emptyObject) - message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); + message.outputInfo = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15887,164 +16127,402 @@ }; /** - * Decodes a PredictResponse message from the specified reader or buffer, length delimited. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictResponse.decodeDelimited = function decodeDelimited(reader) { + ExportModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PredictResponse message. + * Verifies an ExportModelOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PredictResponse.verify = function verify(message) { + ExportModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.payload != null && message.hasOwnProperty("payload")) { - if (!Array.isArray(message.payload)) - return "payload: array expected"; - for (var i = 0; i < message.payload.length; ++i) { - var error = $root.google.cloud.automl.v1.AnnotationPayload.verify(message.payload[i]); - if (error) - return "payload." + error; - } - } - if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) { - var error = $root.google.cloud.automl.v1.ExamplePayload.verify(message.preprocessedInput); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { + var error = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify(message.outputInfo); if (error) - return "preprocessedInput." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + return "outputInfo." + error; } return null; }; /** - * Creates a PredictResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata} ExportModelOperationMetadata */ - PredictResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.PredictResponse) + ExportModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ExportModelOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1.PredictResponse(); - if (object.payload) { - if (!Array.isArray(object.payload)) - throw TypeError(".google.cloud.automl.v1.PredictResponse.payload: array expected"); - message.payload = []; - for (var i = 0; i < object.payload.length; ++i) { - if (typeof object.payload[i] !== "object") - throw TypeError(".google.cloud.automl.v1.PredictResponse.payload: object expected"); - message.payload[i] = $root.google.cloud.automl.v1.AnnotationPayload.fromObject(object.payload[i]); - } - } - if (object.preprocessedInput != null) { - if (typeof object.preprocessedInput !== "object") - throw TypeError(".google.cloud.automl.v1.PredictResponse.preprocessedInput: object expected"); - message.preprocessedInput = $root.google.cloud.automl.v1.ExamplePayload.fromObject(object.preprocessedInput); - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.automl.v1.PredictResponse.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + var message = new $root.google.cloud.automl.v1.ExportModelOperationMetadata(); + if (object.outputInfo != null) { + if (typeof object.outputInfo !== "object") + throw TypeError(".google.cloud.automl.v1.ExportModelOperationMetadata.outputInfo: object expected"); + message.outputInfo = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.fromObject(object.outputInfo); } return message; }; /** - * Creates a plain object from a PredictResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1.PredictResponse} message PredictResponse + * @param {google.cloud.automl.v1.ExportModelOperationMetadata} message ExportModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PredictResponse.toObject = function toObject(message, options) { + ExportModelOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.payload = []; - if (options.objects || options.defaults) - object.metadata = {}; if (options.defaults) - object.preprocessedInput = null; - if (message.payload && message.payload.length) { - object.payload = []; - for (var j = 0; j < message.payload.length; ++j) - object.payload[j] = $root.google.cloud.automl.v1.AnnotationPayload.toObject(message.payload[j], options); - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) - object.preprocessedInput = $root.google.cloud.automl.v1.ExamplePayload.toObject(message.preprocessedInput, options); + object.outputInfo = null; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + object.outputInfo = $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.toObject(message.outputInfo, options); return object; }; /** - * Converts this PredictResponse to JSON. + * Converts this ExportModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.PredictResponse + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata * @instance * @returns {Object.} JSON object */ - PredictResponse.prototype.toJSON = function toJSON() { + ExportModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PredictResponse; + ExportModelOperationMetadata.ExportModelOutputInfo = (function() { + + /** + * Properties of an ExportModelOutputInfo. + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @interface IExportModelOutputInfo + * @property {string|null} [gcsOutputDirectory] ExportModelOutputInfo gcsOutputDirectory + */ + + /** + * Constructs a new ExportModelOutputInfo. + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata + * @classdesc Represents an ExportModelOutputInfo. + * @implements IExportModelOutputInfo + * @constructor + * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set + */ + function ExportModelOutputInfo(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]]; + } + + /** + * ExportModelOutputInfo gcsOutputDirectory. + * @member {string} gcsOutputDirectory + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @instance + */ + ExportModelOutputInfo.prototype.gcsOutputDirectory = ""; + + /** + * Creates a new ExportModelOutputInfo instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo instance + */ + ExportModelOutputInfo.create = function create(properties) { + return new ExportModelOutputInfo(properties); + }; + + /** + * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportModelOutputInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); + return writer; + }; + + /** + * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportModelOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportModelOutputInfo.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.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsOutputDirectory = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportModelOutputInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportModelOutputInfo message. + * @function verify + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportModelOutputInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + if (!$util.isString(message.gcsOutputDirectory)) + return "gcsOutputDirectory: string expected"; + return null; + }; + + /** + * Creates an ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + */ + ExportModelOutputInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo) + return object; + var message = new $root.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo(); + if (object.gcsOutputDirectory != null) + message.gcsOutputDirectory = String(object.gcsOutputDirectory); + return message; + }; + + /** + * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo} message ExportModelOutputInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportModelOutputInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.gcsOutputDirectory = ""; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + object.gcsOutputDirectory = message.gcsOutputDirectory; + return object; + }; + + /** + * Converts this ExportModelOutputInfo to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo + * @instance + * @returns {Object.} JSON object + */ + ExportModelOutputInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExportModelOutputInfo; + })(); + + return ExportModelOperationMetadata; })(); - v1.BatchPredictRequest = (function() { + v1.PredictionService = (function() { /** - * Properties of a BatchPredictRequest. + * Constructs a new PredictionService service. * @memberof google.cloud.automl.v1 - * @interface IBatchPredictRequest - * @property {string|null} [name] BatchPredictRequest name - * @property {google.cloud.automl.v1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictRequest inputConfig - * @property {google.cloud.automl.v1.IBatchPredictOutputConfig|null} [outputConfig] BatchPredictRequest outputConfig - * @property {Object.|null} [params] BatchPredictRequest params + * @classdesc Represents a PredictionService + * @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 PredictionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PredictionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PredictionService; + + /** + * Creates new PredictionService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.automl.v1.PredictionService + * @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 {PredictionService} RPC service. Useful where requests and/or responses are streamed. + */ + PredictionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.automl.v1.PredictionService#predict}. + * @memberof google.cloud.automl.v1.PredictionService + * @typedef PredictCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1.PredictResponse} [response] PredictResponse + */ + + /** + * Calls Predict. + * @function predict + * @memberof google.cloud.automl.v1.PredictionService + * @instance + * @param {google.cloud.automl.v1.IPredictRequest} request PredictRequest message or plain object + * @param {google.cloud.automl.v1.PredictionService.PredictCallback} callback Node-style callback called with the error, if any, and PredictResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PredictionService.prototype.predict = function predict(request, callback) { + return this.rpcCall(predict, $root.google.cloud.automl.v1.PredictRequest, $root.google.cloud.automl.v1.PredictResponse, request, callback); + }, "name", { value: "Predict" }); + + /** + * Calls Predict. + * @function predict + * @memberof google.cloud.automl.v1.PredictionService + * @instance + * @param {google.cloud.automl.v1.IPredictRequest} request PredictRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.automl.v1.PredictionService#batchPredict}. + * @memberof google.cloud.automl.v1.PredictionService + * @typedef BatchPredictCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BatchPredict. + * @function batchPredict + * @memberof google.cloud.automl.v1.PredictionService + * @instance + * @param {google.cloud.automl.v1.IBatchPredictRequest} request BatchPredictRequest message or plain object + * @param {google.cloud.automl.v1.PredictionService.BatchPredictCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PredictionService.prototype.batchPredict = function batchPredict(request, callback) { + return this.rpcCall(batchPredict, $root.google.cloud.automl.v1.BatchPredictRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchPredict" }); + + /** + * Calls BatchPredict. + * @function batchPredict + * @memberof google.cloud.automl.v1.PredictionService + * @instance + * @param {google.cloud.automl.v1.IBatchPredictRequest} request BatchPredictRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return PredictionService; + })(); + + v1.PredictRequest = (function() { + + /** + * Properties of a PredictRequest. + * @memberof google.cloud.automl.v1 + * @interface IPredictRequest + * @property {string|null} [name] PredictRequest name + * @property {google.cloud.automl.v1.IExamplePayload|null} [payload] PredictRequest payload + * @property {Object.|null} [params] PredictRequest params */ /** - * Constructs a new BatchPredictRequest. + * Constructs a new PredictRequest. * @memberof google.cloud.automl.v1 - * @classdesc Represents a BatchPredictRequest. - * @implements IBatchPredictRequest + * @classdesc Represents a PredictRequest. + * @implements IPredictRequest * @constructor - * @param {google.cloud.automl.v1.IBatchPredictRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1.IPredictRequest=} [properties] Properties to set */ - function BatchPredictRequest(properties) { + function PredictRequest(properties) { this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -16053,114 +16531,101 @@ } /** - * BatchPredictRequest name. + * PredictRequest name. * @member {string} name - * @memberof google.cloud.automl.v1.BatchPredictRequest - * @instance - */ - BatchPredictRequest.prototype.name = ""; - - /** - * BatchPredictRequest inputConfig. - * @member {google.cloud.automl.v1.IBatchPredictInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @instance */ - BatchPredictRequest.prototype.inputConfig = null; + PredictRequest.prototype.name = ""; /** - * BatchPredictRequest outputConfig. - * @member {google.cloud.automl.v1.IBatchPredictOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.automl.v1.BatchPredictRequest + * PredictRequest payload. + * @member {google.cloud.automl.v1.IExamplePayload|null|undefined} payload + * @memberof google.cloud.automl.v1.PredictRequest * @instance */ - BatchPredictRequest.prototype.outputConfig = null; + PredictRequest.prototype.payload = null; /** - * BatchPredictRequest params. + * PredictRequest params. * @member {Object.} params - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @instance */ - BatchPredictRequest.prototype.params = $util.emptyObject; + PredictRequest.prototype.params = $util.emptyObject; /** - * Creates a new BatchPredictRequest instance using the specified properties. + * Creates a new PredictRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static - * @param {google.cloud.automl.v1.IBatchPredictRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest instance + * @param {google.cloud.automl.v1.IPredictRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest instance */ - BatchPredictRequest.create = function create(properties) { - return new BatchPredictRequest(properties); + PredictRequest.create = function create(properties) { + return new PredictRequest(properties); }; /** - * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. + * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static - * @param {google.cloud.automl.v1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode + * @param {google.cloud.automl.v1.IPredictRequest} message PredictRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictRequest.encode = function encode(message, writer) { + PredictRequest.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.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.automl.v1.BatchPredictOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.payload != null && message.hasOwnProperty("payload")) + $root.google.cloud.automl.v1.ExamplePayload.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.params != null && message.hasOwnProperty("params")) for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. + * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static - * @param {google.cloud.automl.v1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode + * @param {google.cloud.automl.v1.IPredictRequest} message PredictRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictRequest.encodeDelimited = function encodeDelimited(message, writer) { + PredictRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer. + * Decodes a PredictRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest + * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictRequest.decode = function decode(reader, length) { + PredictRequest.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.automl.v1.BatchPredictRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.PredictRequest(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 3: - message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.decode(reader, reader.uint32()); - break; - case 4: - message.outputConfig = $root.google.cloud.automl.v1.BatchPredictOutputConfig.decode(reader, reader.uint32()); + case 2: + message.payload = $root.google.cloud.automl.v1.ExamplePayload.decode(reader, reader.uint32()); break; - case 5: + case 3: reader.skip().pos++; if (message.params === $util.emptyObject) message.params = {}; @@ -16177,44 +16642,39 @@ }; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. + * Decodes a PredictRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest + * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictRequest.decodeDelimited = function decodeDelimited(reader) { + PredictRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictRequest message. + * Verifies a PredictRequest message. * @function verify - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchPredictRequest.verify = function verify(message) { + PredictRequest.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.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.automl.v1.BatchPredictInputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.automl.v1.BatchPredictOutputConfig.verify(message.outputConfig); + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.cloud.automl.v1.ExamplePayload.verify(message.payload); if (error) - return "outputConfig." + error; + return "payload." + error; } if (message.params != null && message.hasOwnProperty("params")) { if (!$util.isObject(message.params)) @@ -16228,32 +16688,27 @@ }; /** - * Creates a BatchPredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PredictRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest + * @returns {google.cloud.automl.v1.PredictRequest} PredictRequest */ - BatchPredictRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BatchPredictRequest) + PredictRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.PredictRequest) return object; - var message = new $root.google.cloud.automl.v1.BatchPredictRequest(); + var message = new $root.google.cloud.automl.v1.PredictRequest(); if (object.name != null) message.name = String(object.name); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictRequest.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.fromObject(object.inputConfig); - } - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictRequest.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.automl.v1.BatchPredictOutputConfig.fromObject(object.outputConfig); + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.automl.v1.PredictRequest.payload: object expected"); + message.payload = $root.google.cloud.automl.v1.ExamplePayload.fromObject(object.payload); } if (object.params) { if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictRequest.params: object expected"); + throw TypeError(".google.cloud.automl.v1.PredictRequest.params: object expected"); message.params = {}; for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) message.params[keys[i]] = String(object.params[keys[i]]); @@ -16262,15 +16717,15 @@ }; /** - * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. + * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @static - * @param {google.cloud.automl.v1.BatchPredictRequest} message BatchPredictRequest + * @param {google.cloud.automl.v1.PredictRequest} message PredictRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchPredictRequest.toObject = function toObject(message, options) { + PredictRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -16278,15 +16733,12 @@ object.params = {}; if (options.defaults) { object.name = ""; - object.inputConfig = null; - object.outputConfig = null; + object.payload = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.toObject(message.inputConfig, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.automl.v1.BatchPredictOutputConfig.toObject(message.outputConfig, options); + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = $root.google.cloud.automl.v1.ExamplePayload.toObject(message.payload, options); var keys2; if (message.params && (keys2 = Object.keys(message.params)).length) { object.params = {}; @@ -16297,37 +16749,40 @@ }; /** - * Converts this BatchPredictRequest to JSON. + * Converts this PredictRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.BatchPredictRequest + * @memberof google.cloud.automl.v1.PredictRequest * @instance * @returns {Object.} JSON object */ - BatchPredictRequest.prototype.toJSON = function toJSON() { + PredictRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchPredictRequest; + return PredictRequest; })(); - v1.BatchPredictResult = (function() { + v1.PredictResponse = (function() { /** - * Properties of a BatchPredictResult. + * Properties of a PredictResponse. * @memberof google.cloud.automl.v1 - * @interface IBatchPredictResult - * @property {Object.|null} [metadata] BatchPredictResult metadata + * @interface IPredictResponse + * @property {Array.|null} [payload] PredictResponse payload + * @property {google.cloud.automl.v1.IExamplePayload|null} [preprocessedInput] PredictResponse preprocessedInput + * @property {Object.|null} [metadata] PredictResponse metadata */ /** - * Constructs a new BatchPredictResult. + * Constructs a new PredictResponse. * @memberof google.cloud.automl.v1 - * @classdesc Represents a BatchPredictResult. - * @implements IBatchPredictResult + * @classdesc Represents a PredictResponse. + * @implements IPredictResponse * @constructor - * @param {google.cloud.automl.v1.IBatchPredictResult=} [properties] Properties to set + * @param {google.cloud.automl.v1.IPredictResponse=} [properties] Properties to set */ - function BatchPredictResult(properties) { + function PredictResponse(properties) { + this.payload = []; this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -16336,380 +16791,110 @@ } /** - * BatchPredictResult metadata. - * @member {Object.} metadata - * @memberof google.cloud.automl.v1.BatchPredictResult - * @instance - */ - BatchPredictResult.prototype.metadata = $util.emptyObject; - - /** - * Creates a new BatchPredictResult instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {google.cloud.automl.v1.IBatchPredictResult=} [properties] Properties to set - * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult instance - */ - BatchPredictResult.create = function create(properties) { - return new BatchPredictResult(properties); - }; - - /** - * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {google.cloud.automl.v1.IBatchPredictResult} message BatchPredictResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchPredictResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {google.cloud.automl.v1.IBatchPredictResult} message BatchPredictResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchPredictResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchPredictResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchPredictResult.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.automl.v1.BatchPredictResult(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - reader.skip().pos++; - if (message.metadata === $util.emptyObject) - message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchPredictResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchPredictResult message. - * @function verify - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchPredictResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a BatchPredictResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult - */ - BatchPredictResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.BatchPredictResult) - return object; - var message = new $root.google.cloud.automl.v1.BatchPredictResult(); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.automl.v1.BatchPredictResult.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1.BatchPredictResult - * @static - * @param {google.cloud.automl.v1.BatchPredictResult} message BatchPredictResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchPredictResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - return object; - }; - - /** - * Converts this BatchPredictResult to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1.BatchPredictResult - * @instance - * @returns {Object.} JSON object - */ - BatchPredictResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BatchPredictResult; - })(); - - v1.AnnotationPayload = (function() { - - /** - * Properties of an AnnotationPayload. - * @memberof google.cloud.automl.v1 - * @interface IAnnotationPayload - * @property {google.cloud.automl.v1.ITranslationAnnotation|null} [translation] AnnotationPayload translation - * @property {google.cloud.automl.v1.IClassificationAnnotation|null} [classification] AnnotationPayload classification - * @property {google.cloud.automl.v1.IImageObjectDetectionAnnotation|null} [imageObjectDetection] AnnotationPayload imageObjectDetection - * @property {google.cloud.automl.v1.ITextExtractionAnnotation|null} [textExtraction] AnnotationPayload textExtraction - * @property {google.cloud.automl.v1.ITextSentimentAnnotation|null} [textSentiment] AnnotationPayload textSentiment - * @property {string|null} [annotationSpecId] AnnotationPayload annotationSpecId - * @property {string|null} [displayName] AnnotationPayload displayName - */ - - /** - * Constructs a new AnnotationPayload. - * @memberof google.cloud.automl.v1 - * @classdesc Represents an AnnotationPayload. - * @implements IAnnotationPayload - * @constructor - * @param {google.cloud.automl.v1.IAnnotationPayload=} [properties] Properties to set - */ - function AnnotationPayload(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]]; - } - - /** - * AnnotationPayload translation. - * @member {google.cloud.automl.v1.ITranslationAnnotation|null|undefined} translation - * @memberof google.cloud.automl.v1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.translation = null; - - /** - * AnnotationPayload classification. - * @member {google.cloud.automl.v1.IClassificationAnnotation|null|undefined} classification - * @memberof google.cloud.automl.v1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.classification = null; - - /** - * AnnotationPayload imageObjectDetection. - * @member {google.cloud.automl.v1.IImageObjectDetectionAnnotation|null|undefined} imageObjectDetection - * @memberof google.cloud.automl.v1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.imageObjectDetection = null; - - /** - * AnnotationPayload textExtraction. - * @member {google.cloud.automl.v1.ITextExtractionAnnotation|null|undefined} textExtraction - * @memberof google.cloud.automl.v1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.textExtraction = null; - - /** - * AnnotationPayload textSentiment. - * @member {google.cloud.automl.v1.ITextSentimentAnnotation|null|undefined} textSentiment - * @memberof google.cloud.automl.v1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.textSentiment = null; - - /** - * AnnotationPayload annotationSpecId. - * @member {string} annotationSpecId - * @memberof google.cloud.automl.v1.AnnotationPayload + * PredictResponse payload. + * @member {Array.} payload + * @memberof google.cloud.automl.v1.PredictResponse * @instance */ - AnnotationPayload.prototype.annotationSpecId = ""; + PredictResponse.prototype.payload = $util.emptyArray; /** - * AnnotationPayload displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1.AnnotationPayload + * PredictResponse preprocessedInput. + * @member {google.cloud.automl.v1.IExamplePayload|null|undefined} preprocessedInput + * @memberof google.cloud.automl.v1.PredictResponse * @instance */ - AnnotationPayload.prototype.displayName = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + PredictResponse.prototype.preprocessedInput = null; /** - * AnnotationPayload detail. - * @member {"translation"|"classification"|"imageObjectDetection"|"textExtraction"|"textSentiment"|undefined} detail - * @memberof google.cloud.automl.v1.AnnotationPayload + * PredictResponse metadata. + * @member {Object.} metadata + * @memberof google.cloud.automl.v1.PredictResponse * @instance */ - Object.defineProperty(AnnotationPayload.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["translation", "classification", "imageObjectDetection", "textExtraction", "textSentiment"]), - set: $util.oneOfSetter($oneOfFields) - }); + PredictResponse.prototype.metadata = $util.emptyObject; /** - * Creates a new AnnotationPayload instance using the specified properties. + * Creates a new PredictResponse instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static - * @param {google.cloud.automl.v1.IAnnotationPayload=} [properties] Properties to set - * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload instance + * @param {google.cloud.automl.v1.IPredictResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse instance */ - AnnotationPayload.create = function create(properties) { - return new AnnotationPayload(properties); + PredictResponse.create = function create(properties) { + return new PredictResponse(properties); }; /** - * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. + * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static - * @param {google.cloud.automl.v1.IAnnotationPayload} message AnnotationPayload message or plain object to encode + * @param {google.cloud.automl.v1.IPredictResponse} message PredictResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationPayload.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId); - if (message.translation != null && message.hasOwnProperty("translation")) - $root.google.cloud.automl.v1.TranslationAnnotation.encode(message.translation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.classification != null && message.hasOwnProperty("classification")) - $root.google.cloud.automl.v1.ClassificationAnnotation.encode(message.classification, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) - $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.encode(message.imageObjectDetection, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) - $root.google.cloud.automl.v1.TextExtractionAnnotation.encode(message.textExtraction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) - $root.google.cloud.automl.v1.TextSentimentAnnotation.encode(message.textSentiment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + PredictResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.payload != null && message.payload.length) + for (var i = 0; i < message.payload.length; ++i) + $root.google.cloud.automl.v1.AnnotationPayload.encode(message.payload[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) + $root.google.cloud.automl.v1.ExamplePayload.encode(message.preprocessedInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1.AnnotationPayload.verify|verify} messages. + * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.PredictResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static - * @param {google.cloud.automl.v1.IAnnotationPayload} message AnnotationPayload message or plain object to encode + * @param {google.cloud.automl.v1.IPredictResponse} message PredictResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationPayload.encodeDelimited = function encodeDelimited(message, writer) { + PredictResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationPayload message from the specified reader or buffer. + * Decodes a PredictResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload + * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationPayload.decode = function decode(reader, length) { + PredictResponse.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.automl.v1.AnnotationPayload(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.PredictResponse(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.translation = $root.google.cloud.automl.v1.TranslationAnnotation.decode(reader, reader.uint32()); + case 1: + if (!(message.payload && message.payload.length)) + message.payload = []; + message.payload.push($root.google.cloud.automl.v1.AnnotationPayload.decode(reader, reader.uint32())); break; case 3: - message.classification = $root.google.cloud.automl.v1.ClassificationAnnotation.decode(reader, reader.uint32()); - break; - case 4: - message.imageObjectDetection = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.decode(reader, reader.uint32()); - break; - case 6: - message.textExtraction = $root.google.cloud.automl.v1.TextExtractionAnnotation.decode(reader, reader.uint32()); - break; - case 7: - message.textSentiment = $root.google.cloud.automl.v1.TextSentimentAnnotation.decode(reader, reader.uint32()); - break; - case 1: - message.annotationSpecId = reader.string(); + message.preprocessedInput = $root.google.cloud.automl.v1.ExamplePayload.decode(reader, reader.uint32()); break; - case 5: - message.displayName = reader.string(); + case 2: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -16720,229 +16905,165 @@ }; /** - * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. + * Decodes a PredictResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload + * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationPayload.decodeDelimited = function decodeDelimited(reader) { + PredictResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationPayload message. + * Verifies a PredictResponse message. * @function verify - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationPayload.verify = function verify(message) { + PredictResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translation != null && message.hasOwnProperty("translation")) { - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1.TranslationAnnotation.verify(message.translation); - if (error) - return "translation." + error; - } - } - if (message.classification != null && message.hasOwnProperty("classification")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1.ClassificationAnnotation.verify(message.classification); - if (error) - return "classification." + error; - } - } - if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.verify(message.imageObjectDetection); + if (message.payload != null && message.hasOwnProperty("payload")) { + if (!Array.isArray(message.payload)) + return "payload: array expected"; + for (var i = 0; i < message.payload.length; ++i) { + var error = $root.google.cloud.automl.v1.AnnotationPayload.verify(message.payload[i]); if (error) - return "imageObjectDetection." + error; + return "payload." + error; } } - if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1.TextExtractionAnnotation.verify(message.textExtraction); - if (error) - return "textExtraction." + error; - } + if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) { + var error = $root.google.cloud.automl.v1.ExamplePayload.verify(message.preprocessedInput); + if (error) + return "preprocessedInput." + error; } - if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1.TextSentimentAnnotation.verify(message.textSentiment); - if (error) - return "textSentiment." + error; - } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; } - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - if (!$util.isString(message.annotationSpecId)) - return "annotationSpecId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; return null; }; /** - * Creates an AnnotationPayload message from a plain object. Also converts values to their respective internal types. + * Creates a PredictResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.AnnotationPayload} AnnotationPayload + * @returns {google.cloud.automl.v1.PredictResponse} PredictResponse */ - AnnotationPayload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.AnnotationPayload) + PredictResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.PredictResponse) return object; - var message = new $root.google.cloud.automl.v1.AnnotationPayload(); - if (object.translation != null) { - if (typeof object.translation !== "object") - throw TypeError(".google.cloud.automl.v1.AnnotationPayload.translation: object expected"); - message.translation = $root.google.cloud.automl.v1.TranslationAnnotation.fromObject(object.translation); - } - if (object.classification != null) { - if (typeof object.classification !== "object") - throw TypeError(".google.cloud.automl.v1.AnnotationPayload.classification: object expected"); - message.classification = $root.google.cloud.automl.v1.ClassificationAnnotation.fromObject(object.classification); - } - if (object.imageObjectDetection != null) { - if (typeof object.imageObjectDetection !== "object") - throw TypeError(".google.cloud.automl.v1.AnnotationPayload.imageObjectDetection: object expected"); - message.imageObjectDetection = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.fromObject(object.imageObjectDetection); + var message = new $root.google.cloud.automl.v1.PredictResponse(); + if (object.payload) { + if (!Array.isArray(object.payload)) + throw TypeError(".google.cloud.automl.v1.PredictResponse.payload: array expected"); + message.payload = []; + for (var i = 0; i < object.payload.length; ++i) { + if (typeof object.payload[i] !== "object") + throw TypeError(".google.cloud.automl.v1.PredictResponse.payload: object expected"); + message.payload[i] = $root.google.cloud.automl.v1.AnnotationPayload.fromObject(object.payload[i]); + } } - if (object.textExtraction != null) { - if (typeof object.textExtraction !== "object") - throw TypeError(".google.cloud.automl.v1.AnnotationPayload.textExtraction: object expected"); - message.textExtraction = $root.google.cloud.automl.v1.TextExtractionAnnotation.fromObject(object.textExtraction); + if (object.preprocessedInput != null) { + if (typeof object.preprocessedInput !== "object") + throw TypeError(".google.cloud.automl.v1.PredictResponse.preprocessedInput: object expected"); + message.preprocessedInput = $root.google.cloud.automl.v1.ExamplePayload.fromObject(object.preprocessedInput); } - if (object.textSentiment != null) { - if (typeof object.textSentiment !== "object") - throw TypeError(".google.cloud.automl.v1.AnnotationPayload.textSentiment: object expected"); - message.textSentiment = $root.google.cloud.automl.v1.TextSentimentAnnotation.fromObject(object.textSentiment); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.automl.v1.PredictResponse.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); } - if (object.annotationSpecId != null) - message.annotationSpecId = String(object.annotationSpecId); - if (object.displayName != null) - message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. + * Creates a plain object from a PredictResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @static - * @param {google.cloud.automl.v1.AnnotationPayload} message AnnotationPayload + * @param {google.cloud.automl.v1.PredictResponse} message PredictResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationPayload.toObject = function toObject(message, options) { + PredictResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.annotationSpecId = ""; - object.displayName = ""; - } - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - object.annotationSpecId = message.annotationSpecId; - if (message.translation != null && message.hasOwnProperty("translation")) { - object.translation = $root.google.cloud.automl.v1.TranslationAnnotation.toObject(message.translation, options); - if (options.oneofs) - object.detail = "translation"; - } - if (message.classification != null && message.hasOwnProperty("classification")) { - object.classification = $root.google.cloud.automl.v1.ClassificationAnnotation.toObject(message.classification, options); - if (options.oneofs) - object.detail = "classification"; - } - if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { - object.imageObjectDetection = $root.google.cloud.automl.v1.ImageObjectDetectionAnnotation.toObject(message.imageObjectDetection, options); - if (options.oneofs) - object.detail = "imageObjectDetection"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { - object.textExtraction = $root.google.cloud.automl.v1.TextExtractionAnnotation.toObject(message.textExtraction, options); - if (options.oneofs) - object.detail = "textExtraction"; + if (options.arrays || options.defaults) + object.payload = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) + object.preprocessedInput = null; + if (message.payload && message.payload.length) { + object.payload = []; + for (var j = 0; j < message.payload.length; ++j) + object.payload[j] = $root.google.cloud.automl.v1.AnnotationPayload.toObject(message.payload[j], options); } - if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { - object.textSentiment = $root.google.cloud.automl.v1.TextSentimentAnnotation.toObject(message.textSentiment, options); - if (options.oneofs) - object.detail = "textSentiment"; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; } + if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) + object.preprocessedInput = $root.google.cloud.automl.v1.ExamplePayload.toObject(message.preprocessedInput, options); return object; }; /** - * Converts this AnnotationPayload to JSON. + * Converts this PredictResponse to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.AnnotationPayload + * @memberof google.cloud.automl.v1.PredictResponse * @instance * @returns {Object.} JSON object */ - AnnotationPayload.prototype.toJSON = function toJSON() { + PredictResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnnotationPayload; + return PredictResponse; })(); - v1.Model = (function() { + v1.BatchPredictRequest = (function() { /** - * Properties of a Model. + * Properties of a BatchPredictRequest. * @memberof google.cloud.automl.v1 - * @interface IModel - * @property {google.cloud.automl.v1.ITranslationModelMetadata|null} [translationModelMetadata] Model translationModelMetadata - * @property {google.cloud.automl.v1.IImageClassificationModelMetadata|null} [imageClassificationModelMetadata] Model imageClassificationModelMetadata - * @property {google.cloud.automl.v1.ITextClassificationModelMetadata|null} [textClassificationModelMetadata] Model textClassificationModelMetadata - * @property {google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null} [imageObjectDetectionModelMetadata] Model imageObjectDetectionModelMetadata - * @property {google.cloud.automl.v1.ITextExtractionModelMetadata|null} [textExtractionModelMetadata] Model textExtractionModelMetadata - * @property {google.cloud.automl.v1.ITextSentimentModelMetadata|null} [textSentimentModelMetadata] Model textSentimentModelMetadata - * @property {string|null} [name] Model name - * @property {string|null} [displayName] Model displayName - * @property {string|null} [datasetId] Model datasetId - * @property {google.protobuf.ITimestamp|null} [createTime] Model createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Model updateTime - * @property {google.cloud.automl.v1.Model.DeploymentState|null} [deploymentState] Model deploymentState - * @property {string|null} [etag] Model etag - * @property {Object.|null} [labels] Model labels + * @interface IBatchPredictRequest + * @property {string|null} [name] BatchPredictRequest name + * @property {google.cloud.automl.v1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictRequest inputConfig + * @property {google.cloud.automl.v1.IBatchPredictOutputConfig|null} [outputConfig] BatchPredictRequest outputConfig + * @property {Object.|null} [params] BatchPredictRequest params */ /** - * Constructs a new Model. + * Constructs a new BatchPredictRequest. * @memberof google.cloud.automl.v1 - * @classdesc Represents a Model. - * @implements IModel + * @classdesc Represents a BatchPredictRequest. + * @implements IBatchPredictRequest * @constructor - * @param {google.cloud.automl.v1.IModel=} [properties] Properties to set + * @param {google.cloud.automl.v1.IBatchPredictRequest=} [properties] Properties to set */ - function Model(properties) { - this.labels = {}; + function BatchPredictRequest(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16950,264 +17071,364 @@ } /** - * Model translationModelMetadata. - * @member {google.cloud.automl.v1.ITranslationModelMetadata|null|undefined} translationModelMetadata - * @memberof google.cloud.automl.v1.Model + * BatchPredictRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1.BatchPredictRequest * @instance */ - Model.prototype.translationModelMetadata = null; + BatchPredictRequest.prototype.name = ""; /** - * Model imageClassificationModelMetadata. - * @member {google.cloud.automl.v1.IImageClassificationModelMetadata|null|undefined} imageClassificationModelMetadata - * @memberof google.cloud.automl.v1.Model + * BatchPredictRequest inputConfig. + * @member {google.cloud.automl.v1.IBatchPredictInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1.BatchPredictRequest * @instance */ - Model.prototype.imageClassificationModelMetadata = null; + BatchPredictRequest.prototype.inputConfig = null; /** - * Model textClassificationModelMetadata. - * @member {google.cloud.automl.v1.ITextClassificationModelMetadata|null|undefined} textClassificationModelMetadata - * @memberof google.cloud.automl.v1.Model + * BatchPredictRequest outputConfig. + * @member {google.cloud.automl.v1.IBatchPredictOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.automl.v1.BatchPredictRequest * @instance */ - Model.prototype.textClassificationModelMetadata = null; + BatchPredictRequest.prototype.outputConfig = null; /** - * Model imageObjectDetectionModelMetadata. - * @member {google.cloud.automl.v1.IImageObjectDetectionModelMetadata|null|undefined} imageObjectDetectionModelMetadata - * @memberof google.cloud.automl.v1.Model + * BatchPredictRequest params. + * @member {Object.} params + * @memberof google.cloud.automl.v1.BatchPredictRequest * @instance */ - Model.prototype.imageObjectDetectionModelMetadata = null; + BatchPredictRequest.prototype.params = $util.emptyObject; /** - * Model textExtractionModelMetadata. - * @member {google.cloud.automl.v1.ITextExtractionModelMetadata|null|undefined} textExtractionModelMetadata - * @memberof google.cloud.automl.v1.Model - * @instance + * Creates a new BatchPredictRequest instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {google.cloud.automl.v1.IBatchPredictRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest instance */ - Model.prototype.textExtractionModelMetadata = null; + BatchPredictRequest.create = function create(properties) { + return new BatchPredictRequest(properties); + }; /** - * Model textSentimentModelMetadata. - * @member {google.cloud.automl.v1.ITextSentimentModelMetadata|null|undefined} textSentimentModelMetadata - * @memberof google.cloud.automl.v1.Model - * @instance + * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {google.cloud.automl.v1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Model.prototype.textSentimentModelMetadata = null; + BatchPredictRequest.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.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.automl.v1.BatchPredictOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + return writer; + }; /** - * Model name. - * @member {string} name - * @memberof google.cloud.automl.v1.Model - * @instance + * Encodes the specified BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {google.cloud.automl.v1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Model.prototype.name = ""; + BatchPredictRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Model displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1.Model - * @instance + * Decodes a BatchPredictRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Model.prototype.displayName = ""; + BatchPredictRequest.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.automl.v1.BatchPredictRequest(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.decode(reader, reader.uint32()); + break; + case 4: + message.outputConfig = $root.google.cloud.automl.v1.BatchPredictOutputConfig.decode(reader, reader.uint32()); + break; + case 5: + reader.skip().pos++; + if (message.params === $util.emptyObject) + message.params = {}; + key = reader.string(); + reader.pos++; + message.params[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Model datasetId. - * @member {string} datasetId - * @memberof google.cloud.automl.v1.Model - * @instance + * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Model.prototype.datasetId = ""; + BatchPredictRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchPredictRequest message. + * @function verify + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchPredictRequest.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.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.automl.v1.BatchPredictInputConfig.verify(message.inputConfig); + if (error) + return "inputConfig." + error; + } + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.automl.v1.BatchPredictOutputConfig.verify(message.outputConfig); + if (error) + return "outputConfig." + error; + } + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a BatchPredictRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.BatchPredictRequest} BatchPredictRequest + */ + BatchPredictRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BatchPredictRequest) + return object; + var message = new $root.google.cloud.automl.v1.BatchPredictRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictRequest.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.fromObject(object.inputConfig); + } + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictRequest.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.automl.v1.BatchPredictOutputConfig.fromObject(object.outputConfig); + } + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictRequest.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); + } + return message; + }; /** - * Model createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.automl.v1.Model - * @instance + * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.BatchPredictRequest + * @static + * @param {google.cloud.automl.v1.BatchPredictRequest} message BatchPredictRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Model.prototype.createTime = null; + BatchPredictRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.params = {}; + if (options.defaults) { + object.name = ""; + object.inputConfig = null; + object.outputConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.automl.v1.BatchPredictInputConfig.toObject(message.inputConfig, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.automl.v1.BatchPredictOutputConfig.toObject(message.outputConfig, options); + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; + } + return object; + }; /** - * Model updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.automl.v1.Model + * Converts this BatchPredictRequest to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.BatchPredictRequest * @instance + * @returns {Object.} JSON object */ - Model.prototype.updateTime = null; + BatchPredictRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Model deploymentState. - * @member {google.cloud.automl.v1.Model.DeploymentState} deploymentState - * @memberof google.cloud.automl.v1.Model - * @instance - */ - Model.prototype.deploymentState = 0; + return BatchPredictRequest; + })(); + + v1.BatchPredictResult = (function() { /** - * Model etag. - * @member {string} etag - * @memberof google.cloud.automl.v1.Model - * @instance + * Properties of a BatchPredictResult. + * @memberof google.cloud.automl.v1 + * @interface IBatchPredictResult + * @property {Object.|null} [metadata] BatchPredictResult metadata */ - Model.prototype.etag = ""; /** - * Model labels. - * @member {Object.} labels - * @memberof google.cloud.automl.v1.Model - * @instance + * Constructs a new BatchPredictResult. + * @memberof google.cloud.automl.v1 + * @classdesc Represents a BatchPredictResult. + * @implements IBatchPredictResult + * @constructor + * @param {google.cloud.automl.v1.IBatchPredictResult=} [properties] Properties to set */ - Model.prototype.labels = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function BatchPredictResult(properties) { + this.metadata = {}; + 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]]; + } /** - * Model modelMetadata. - * @member {"translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"textExtractionModelMetadata"|"textSentimentModelMetadata"|undefined} modelMetadata - * @memberof google.cloud.automl.v1.Model + * BatchPredictResult metadata. + * @member {Object.} metadata + * @memberof google.cloud.automl.v1.BatchPredictResult * @instance */ - Object.defineProperty(Model.prototype, "modelMetadata", { - get: $util.oneOfGetter($oneOfFields = ["translationModelMetadata", "imageClassificationModelMetadata", "textClassificationModelMetadata", "imageObjectDetectionModelMetadata", "textExtractionModelMetadata", "textSentimentModelMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchPredictResult.prototype.metadata = $util.emptyObject; /** - * Creates a new Model instance using the specified properties. + * Creates a new BatchPredictResult instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static - * @param {google.cloud.automl.v1.IModel=} [properties] Properties to set - * @returns {google.cloud.automl.v1.Model} Model instance + * @param {google.cloud.automl.v1.IBatchPredictResult=} [properties] Properties to set + * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult instance */ - Model.create = function create(properties) { - return new Model(properties); + BatchPredictResult.create = function create(properties) { + return new BatchPredictResult(properties); }; /** - * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. + * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static - * @param {google.cloud.automl.v1.IModel} message Model message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictResult} message BatchPredictResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Model.encode = function encode(message, writer) { + BatchPredictResult.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.datasetId != null && message.hasOwnProperty("datasetId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.datasetId); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.deploymentState); - if (message.etag != null && message.hasOwnProperty("etag")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) - $root.google.cloud.automl.v1.ImageClassificationModelMetadata.encode(message.imageClassificationModelMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) - $root.google.cloud.automl.v1.TextClassificationModelMetadata.encode(message.textClassificationModelMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) - $root.google.cloud.automl.v1.TranslationModelMetadata.encode(message.translationModelMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) - $root.google.cloud.automl.v1.TextExtractionModelMetadata.encode(message.textExtractionModelMetadata, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) - $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.encode(message.imageObjectDetectionModelMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) - $root.google.cloud.automl.v1.TextSentimentModelMetadata.encode(message.textSentimentModelMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 34, wireType 2 =*/274).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1.Model.verify|verify} messages. + * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1.BatchPredictResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static - * @param {google.cloud.automl.v1.IModel} message Model message or plain object to encode + * @param {google.cloud.automl.v1.IBatchPredictResult} message BatchPredictResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Model.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Model message from the specified reader or buffer. + * Decodes a BatchPredictResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.Model} Model + * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Model.decode = function decode(reader, length) { + BatchPredictResult.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.automl.v1.Model(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1.BatchPredictResult(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 15: - message.translationModelMetadata = $root.google.cloud.automl.v1.TranslationModelMetadata.decode(reader, reader.uint32()); - break; - case 13: - message.imageClassificationModelMetadata = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.decode(reader, reader.uint32()); - break; - case 14: - message.textClassificationModelMetadata = $root.google.cloud.automl.v1.TextClassificationModelMetadata.decode(reader, reader.uint32()); - break; - case 20: - message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.decode(reader, reader.uint32()); - break; - case 19: - message.textExtractionModelMetadata = $root.google.cloud.automl.v1.TextExtractionModelMetadata.decode(reader, reader.uint32()); - break; - case 22: - message.textSentimentModelMetadata = $root.google.cloud.automl.v1.TextSentimentModelMetadata.decode(reader, reader.uint32()); - break; case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.datasetId = reader.string(); - break; - case 7: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.deploymentState = reader.int32(); - break; - case 10: - message.etag = reader.string(); - break; - case 34: reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; + if (message.metadata === $util.emptyObject) + message.metadata = {}; key = reader.string(); reader.pos++; - message.labels[key] = reader.string(); + message.metadata[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -17218,322 +17439,101 @@ }; /** - * Decodes a Model message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.Model} Model + * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Model.decodeDelimited = function decodeDelimited(reader) { + BatchPredictResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Model message. + * Verifies a BatchPredictResult message. * @function verify - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Model.verify = function verify(message) { + BatchPredictResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TranslationModelMetadata.verify(message.translationModelMetadata); - if (error) - return "translationModelMetadata." + error; - } - } - if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.verify(message.imageClassificationModelMetadata); - if (error) - return "imageClassificationModelMetadata." + error; - } - } - if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TextClassificationModelMetadata.verify(message.textClassificationModelMetadata); - if (error) - return "textClassificationModelMetadata." + error; - } - } - if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.verify(message.imageObjectDetectionModelMetadata); - if (error) - return "imageObjectDetectionModelMetadata." + error; - } - } - if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TextExtractionModelMetadata.verify(message.textExtractionModelMetadata); - if (error) - return "textExtractionModelMetadata." + error; - } - } - if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1.TextSentimentModelMetadata.verify(message.textSentimentModelMetadata); - if (error) - return "textSentimentModelMetadata." + error; - } - } - 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.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string 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.deploymentState != null && message.hasOwnProperty("deploymentState")) - switch (message.deploymentState) { - default: - return "deploymentState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; } return null; }; /** - * Creates a Model message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.Model} Model + * @returns {google.cloud.automl.v1.BatchPredictResult} BatchPredictResult */ - Model.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.Model) + BatchPredictResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.BatchPredictResult) return object; - var message = new $root.google.cloud.automl.v1.Model(); - if (object.translationModelMetadata != null) { - if (typeof object.translationModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Model.translationModelMetadata: object expected"); - message.translationModelMetadata = $root.google.cloud.automl.v1.TranslationModelMetadata.fromObject(object.translationModelMetadata); - } - if (object.imageClassificationModelMetadata != null) { - if (typeof object.imageClassificationModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Model.imageClassificationModelMetadata: object expected"); - message.imageClassificationModelMetadata = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.fromObject(object.imageClassificationModelMetadata); - } - if (object.textClassificationModelMetadata != null) { - if (typeof object.textClassificationModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Model.textClassificationModelMetadata: object expected"); - message.textClassificationModelMetadata = $root.google.cloud.automl.v1.TextClassificationModelMetadata.fromObject(object.textClassificationModelMetadata); - } - if (object.imageObjectDetectionModelMetadata != null) { - if (typeof object.imageObjectDetectionModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Model.imageObjectDetectionModelMetadata: object expected"); - message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.fromObject(object.imageObjectDetectionModelMetadata); - } - if (object.textExtractionModelMetadata != null) { - if (typeof object.textExtractionModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Model.textExtractionModelMetadata: object expected"); - message.textExtractionModelMetadata = $root.google.cloud.automl.v1.TextExtractionModelMetadata.fromObject(object.textExtractionModelMetadata); - } - if (object.textSentimentModelMetadata != null) { - if (typeof object.textSentimentModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1.Model.textSentimentModelMetadata: object expected"); - message.textSentimentModelMetadata = $root.google.cloud.automl.v1.TextSentimentModelMetadata.fromObject(object.textSentimentModelMetadata); - } - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1.Model.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.automl.v1.Model.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.deploymentState) { - case "DEPLOYMENT_STATE_UNSPECIFIED": - case 0: - message.deploymentState = 0; - break; - case "DEPLOYED": - case 1: - message.deploymentState = 1; - break; - case "UNDEPLOYED": - case 2: - message.deploymentState = 2; - break; - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.automl.v1.Model.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.cloud.automl.v1.BatchPredictResult(); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.automl.v1.BatchPredictResult.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); } return message; }; /** - * Creates a plain object from a Model message. Also converts values to other types if specified. + * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @static - * @param {google.cloud.automl.v1.Model} message Model + * @param {google.cloud.automl.v1.BatchPredictResult} message BatchPredictResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Model.toObject = function toObject(message, options) { + BatchPredictResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.datasetId = ""; - object.createTime = null; - object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; - object.etag = ""; - object.updateTime = 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.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1.Model.DeploymentState[message.deploymentState] : message.deploymentState; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { - object.imageClassificationModelMetadata = $root.google.cloud.automl.v1.ImageClassificationModelMetadata.toObject(message.imageClassificationModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "imageClassificationModelMetadata"; - } - if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { - object.textClassificationModelMetadata = $root.google.cloud.automl.v1.TextClassificationModelMetadata.toObject(message.textClassificationModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "textClassificationModelMetadata"; - } - if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { - object.translationModelMetadata = $root.google.cloud.automl.v1.TranslationModelMetadata.toObject(message.translationModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "translationModelMetadata"; - } - if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { - object.textExtractionModelMetadata = $root.google.cloud.automl.v1.TextExtractionModelMetadata.toObject(message.textExtractionModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "textExtractionModelMetadata"; - } - if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { - object.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1.ImageObjectDetectionModelMetadata.toObject(message.imageObjectDetectionModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "imageObjectDetectionModelMetadata"; - } - if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { - object.textSentimentModelMetadata = $root.google.cloud.automl.v1.TextSentimentModelMetadata.toObject(message.textSentimentModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "textSentimentModelMetadata"; - } + object.metadata = {}; var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.metadata[keys2[j]] = message.metadata[keys2[j]]; } return object; }; /** - * Converts this Model to JSON. + * Converts this BatchPredictResult to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.Model + * @memberof google.cloud.automl.v1.BatchPredictResult * @instance * @returns {Object.} JSON object */ - Model.prototype.toJSON = function toJSON() { + BatchPredictResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * DeploymentState enum. - * @name google.cloud.automl.v1.Model.DeploymentState - * @enum {string} - * @property {number} DEPLOYMENT_STATE_UNSPECIFIED=0 DEPLOYMENT_STATE_UNSPECIFIED value - * @property {number} DEPLOYED=1 DEPLOYED value - * @property {number} UNDEPLOYED=2 UNDEPLOYED value - */ - Model.DeploymentState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEPLOYMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEPLOYED"] = 1; - values[valuesById[2] = "UNDEPLOYED"] = 2; - return values; - })(); - - return Model; + return BatchPredictResult; })(); v1.AutoMl = (function() { @@ -22521,78 +22521,443 @@ * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse * @instance */ - ListModelEvaluationsResponse.prototype.nextPageToken = ""; + ListModelEvaluationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListModelEvaluationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {google.cloud.automl.v1.IListModelEvaluationsResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse instance + */ + ListModelEvaluationsResponse.create = function create(properties) { + return new ListModelEvaluationsResponse(properties); + }; + + /** + * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {google.cloud.automl.v1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListModelEvaluationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.modelEvaluation != null && message.modelEvaluation.length) + for (var i = 0; i < message.modelEvaluation.length; ++i) + $root.google.cloud.automl.v1.ModelEvaluation.encode(message.modelEvaluation[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 ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {google.cloud.automl.v1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListModelEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListModelEvaluationsResponse.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.automl.v1.ListModelEvaluationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.modelEvaluation && message.modelEvaluation.length)) + message.modelEvaluation = []; + message.modelEvaluation.push($root.google.cloud.automl.v1.ModelEvaluation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListModelEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListModelEvaluationsResponse message. + * @function verify + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListModelEvaluationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.modelEvaluation != null && message.hasOwnProperty("modelEvaluation")) { + if (!Array.isArray(message.modelEvaluation)) + return "modelEvaluation: array expected"; + for (var i = 0; i < message.modelEvaluation.length; ++i) { + var error = $root.google.cloud.automl.v1.ModelEvaluation.verify(message.modelEvaluation[i]); + if (error) + return "modelEvaluation." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + */ + ListModelEvaluationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1.ListModelEvaluationsResponse) + return object; + var message = new $root.google.cloud.automl.v1.ListModelEvaluationsResponse(); + if (object.modelEvaluation) { + if (!Array.isArray(object.modelEvaluation)) + throw TypeError(".google.cloud.automl.v1.ListModelEvaluationsResponse.modelEvaluation: array expected"); + message.modelEvaluation = []; + for (var i = 0; i < object.modelEvaluation.length; ++i) { + if (typeof object.modelEvaluation[i] !== "object") + throw TypeError(".google.cloud.automl.v1.ListModelEvaluationsResponse.modelEvaluation: object expected"); + message.modelEvaluation[i] = $root.google.cloud.automl.v1.ModelEvaluation.fromObject(object.modelEvaluation[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @static + * @param {google.cloud.automl.v1.ListModelEvaluationsResponse} message ListModelEvaluationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListModelEvaluationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.modelEvaluation = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.modelEvaluation && message.modelEvaluation.length) { + object.modelEvaluation = []; + for (var j = 0; j < message.modelEvaluation.length; ++j) + object.modelEvaluation[j] = $root.google.cloud.automl.v1.ModelEvaluation.toObject(message.modelEvaluation[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListModelEvaluationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListModelEvaluationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListModelEvaluationsResponse; + })(); + + return v1; + })(); + + automl.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.automl + * @namespace + */ + var v1beta1 = {}; + + v1beta1.AnnotationPayload = (function() { + + /** + * Properties of an AnnotationPayload. + * @memberof google.cloud.automl.v1beta1 + * @interface IAnnotationPayload + * @property {google.cloud.automl.v1beta1.ITranslationAnnotation|null} [translation] AnnotationPayload translation + * @property {google.cloud.automl.v1beta1.IClassificationAnnotation|null} [classification] AnnotationPayload classification + * @property {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null} [imageObjectDetection] AnnotationPayload imageObjectDetection + * @property {google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null} [videoClassification] AnnotationPayload videoClassification + * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null} [videoObjectTracking] AnnotationPayload videoObjectTracking + * @property {google.cloud.automl.v1beta1.ITextExtractionAnnotation|null} [textExtraction] AnnotationPayload textExtraction + * @property {google.cloud.automl.v1beta1.ITextSentimentAnnotation|null} [textSentiment] AnnotationPayload textSentiment + * @property {google.cloud.automl.v1beta1.ITablesAnnotation|null} [tables] AnnotationPayload tables + * @property {string|null} [annotationSpecId] AnnotationPayload annotationSpecId + * @property {string|null} [displayName] AnnotationPayload displayName + */ + + /** + * Constructs a new AnnotationPayload. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents an AnnotationPayload. + * @implements IAnnotationPayload + * @constructor + * @param {google.cloud.automl.v1beta1.IAnnotationPayload=} [properties] Properties to set + */ + function AnnotationPayload(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]]; + } + + /** + * AnnotationPayload translation. + * @member {google.cloud.automl.v1beta1.ITranslationAnnotation|null|undefined} translation + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.translation = null; + + /** + * AnnotationPayload classification. + * @member {google.cloud.automl.v1beta1.IClassificationAnnotation|null|undefined} classification + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.classification = null; + + /** + * AnnotationPayload imageObjectDetection. + * @member {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null|undefined} imageObjectDetection + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.imageObjectDetection = null; + + /** + * AnnotationPayload videoClassification. + * @member {google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null|undefined} videoClassification + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.videoClassification = null; + + /** + * AnnotationPayload videoObjectTracking. + * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null|undefined} videoObjectTracking + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.videoObjectTracking = null; + + /** + * AnnotationPayload textExtraction. + * @member {google.cloud.automl.v1beta1.ITextExtractionAnnotation|null|undefined} textExtraction + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.textExtraction = null; + + /** + * AnnotationPayload textSentiment. + * @member {google.cloud.automl.v1beta1.ITextSentimentAnnotation|null|undefined} textSentiment + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.textSentiment = null; + + /** + * AnnotationPayload tables. + * @member {google.cloud.automl.v1beta1.ITablesAnnotation|null|undefined} tables + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.tables = null; + + /** + * AnnotationPayload annotationSpecId. + * @member {string} annotationSpecId + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.annotationSpecId = ""; + + /** + * AnnotationPayload displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + AnnotationPayload.prototype.displayName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnnotationPayload detail. + * @member {"translation"|"classification"|"imageObjectDetection"|"videoClassification"|"videoObjectTracking"|"textExtraction"|"textSentiment"|"tables"|undefined} detail + * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @instance + */ + Object.defineProperty(AnnotationPayload.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["translation", "classification", "imageObjectDetection", "videoClassification", "videoObjectTracking", "textExtraction", "textSentiment", "tables"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListModelEvaluationsResponse instance using the specified properties. + * Creates a new AnnotationPayload instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static - * @param {google.cloud.automl.v1.IListModelEvaluationsResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse instance + * @param {google.cloud.automl.v1beta1.IAnnotationPayload=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload instance */ - ListModelEvaluationsResponse.create = function create(properties) { - return new ListModelEvaluationsResponse(properties); + AnnotationPayload.create = function create(properties) { + return new AnnotationPayload(properties); }; /** - * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. + * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static - * @param {google.cloud.automl.v1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IAnnotationPayload} message AnnotationPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelEvaluationsResponse.encode = function encode(message, writer) { + AnnotationPayload.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.modelEvaluation != null && message.modelEvaluation.length) - for (var i = 0; i < message.modelEvaluation.length; ++i) - $root.google.cloud.automl.v1.ModelEvaluation.encode(message.modelEvaluation[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.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId); + if (message.translation != null && message.hasOwnProperty("translation")) + $root.google.cloud.automl.v1beta1.TranslationAnnotation.encode(message.translation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.classification != null && message.hasOwnProperty("classification")) + $root.google.cloud.automl.v1beta1.ClassificationAnnotation.encode(message.classification, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) + $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.encode(message.imageObjectDetection, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) + $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.encode(message.textExtraction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) + $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.encode(message.textSentiment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.videoObjectTracking != null && message.hasOwnProperty("videoObjectTracking")) + $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.encode(message.videoObjectTracking, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.videoClassification != null && message.hasOwnProperty("videoClassification")) + $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.encode(message.videoClassification, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.tables != null && message.hasOwnProperty("tables")) + $root.google.cloud.automl.v1beta1.TablesAnnotation.encode(message.tables, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1.ListModelEvaluationsResponse.verify|verify} messages. + * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static - * @param {google.cloud.automl.v1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IAnnotationPayload} message AnnotationPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationPayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. + * Decodes an AnnotationPayload message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelEvaluationsResponse.decode = function decode(reader, length) { + AnnotationPayload.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.automl.v1.ListModelEvaluationsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.AnnotationPayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: + message.translation = $root.google.cloud.automl.v1beta1.TranslationAnnotation.decode(reader, reader.uint32()); + break; + case 3: + message.classification = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.decode(reader, reader.uint32()); + break; + case 4: + message.imageObjectDetection = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.decode(reader, reader.uint32()); + break; + case 9: + message.videoClassification = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.decode(reader, reader.uint32()); + break; + case 8: + message.videoObjectTracking = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.decode(reader, reader.uint32()); + break; + case 6: + message.textExtraction = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.decode(reader, reader.uint32()); + break; + case 7: + message.textSentiment = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.decode(reader, reader.uint32()); + break; + case 10: + message.tables = $root.google.cloud.automl.v1beta1.TablesAnnotation.decode(reader, reader.uint32()); + break; case 1: - if (!(message.modelEvaluation && message.modelEvaluation.length)) - message.modelEvaluation = []; - message.modelEvaluation.push($root.google.cloud.automl.v1.ModelEvaluation.decode(reader, reader.uint32())); + message.annotationSpecId = reader.string(); break; - case 2: - message.nextPageToken = reader.string(); + case 5: + message.displayName = reader.string(); break; default: reader.skipType(tag & 7); @@ -22603,1377 +22968,2111 @@ }; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { + AnnotationPayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListModelEvaluationsResponse message. + * Verifies an AnnotationPayload message. * @function verify - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListModelEvaluationsResponse.verify = function verify(message) { + AnnotationPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modelEvaluation != null && message.hasOwnProperty("modelEvaluation")) { - if (!Array.isArray(message.modelEvaluation)) - return "modelEvaluation: array expected"; - for (var i = 0; i < message.modelEvaluation.length; ++i) { - var error = $root.google.cloud.automl.v1.ModelEvaluation.verify(message.modelEvaluation[i]); + var properties = {}; + if (message.translation != null && message.hasOwnProperty("translation")) { + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.TranslationAnnotation.verify(message.translation); if (error) - return "modelEvaluation." + error; + return "translation." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.classification != null && message.hasOwnProperty("classification")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.verify(message.classification); + if (error) + return "classification." + error; + } + } + if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify(message.imageObjectDetection); + if (error) + return "imageObjectDetection." + error; + } + } + if (message.videoClassification != null && message.hasOwnProperty("videoClassification")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify(message.videoClassification); + if (error) + return "videoClassification." + error; + } + } + if (message.videoObjectTracking != null && message.hasOwnProperty("videoObjectTracking")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify(message.videoObjectTracking); + if (error) + return "videoObjectTracking." + error; + } + } + if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.verify(message.textExtraction); + if (error) + return "textExtraction." + error; + } + } + if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.verify(message.textSentiment); + if (error) + return "textSentiment." + error; + } + } + if (message.tables != null && message.hasOwnProperty("tables")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.automl.v1beta1.TablesAnnotation.verify(message.tables); + if (error) + return "tables." + error; + } + } + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + if (!$util.isString(message.annotationSpecId)) + return "annotationSpecId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationPayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload */ - ListModelEvaluationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1.ListModelEvaluationsResponse) + AnnotationPayload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.AnnotationPayload) return object; - var message = new $root.google.cloud.automl.v1.ListModelEvaluationsResponse(); - if (object.modelEvaluation) { - if (!Array.isArray(object.modelEvaluation)) - throw TypeError(".google.cloud.automl.v1.ListModelEvaluationsResponse.modelEvaluation: array expected"); - message.modelEvaluation = []; - for (var i = 0; i < object.modelEvaluation.length; ++i) { - if (typeof object.modelEvaluation[i] !== "object") - throw TypeError(".google.cloud.automl.v1.ListModelEvaluationsResponse.modelEvaluation: object expected"); - message.modelEvaluation[i] = $root.google.cloud.automl.v1.ModelEvaluation.fromObject(object.modelEvaluation[i]); - } + var message = new $root.google.cloud.automl.v1beta1.AnnotationPayload(); + if (object.translation != null) { + if (typeof object.translation !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.translation: object expected"); + message.translation = $root.google.cloud.automl.v1beta1.TranslationAnnotation.fromObject(object.translation); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.classification != null) { + if (typeof object.classification !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.classification: object expected"); + message.classification = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.fromObject(object.classification); + } + if (object.imageObjectDetection != null) { + if (typeof object.imageObjectDetection !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.imageObjectDetection: object expected"); + message.imageObjectDetection = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.fromObject(object.imageObjectDetection); + } + if (object.videoClassification != null) { + if (typeof object.videoClassification !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.videoClassification: object expected"); + message.videoClassification = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.fromObject(object.videoClassification); + } + if (object.videoObjectTracking != null) { + if (typeof object.videoObjectTracking !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.videoObjectTracking: object expected"); + message.videoObjectTracking = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.fromObject(object.videoObjectTracking); + } + if (object.textExtraction != null) { + if (typeof object.textExtraction !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.textExtraction: object expected"); + message.textExtraction = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.fromObject(object.textExtraction); + } + if (object.textSentiment != null) { + if (typeof object.textSentiment !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.textSentiment: object expected"); + message.textSentiment = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.fromObject(object.textSentiment); + } + if (object.tables != null) { + if (typeof object.tables !== "object") + throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.tables: object expected"); + message.tables = $root.google.cloud.automl.v1beta1.TablesAnnotation.fromObject(object.tables); + } + if (object.annotationSpecId != null) + message.annotationSpecId = String(object.annotationSpecId); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. + * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @static - * @param {google.cloud.automl.v1.ListModelEvaluationsResponse} message ListModelEvaluationsResponse + * @param {google.cloud.automl.v1beta1.AnnotationPayload} message AnnotationPayload * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListModelEvaluationsResponse.toObject = function toObject(message, options) { + AnnotationPayload.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.modelEvaluation = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.modelEvaluation && message.modelEvaluation.length) { - object.modelEvaluation = []; - for (var j = 0; j < message.modelEvaluation.length; ++j) - object.modelEvaluation[j] = $root.google.cloud.automl.v1.ModelEvaluation.toObject(message.modelEvaluation[j], options); + if (options.defaults) { + object.annotationSpecId = ""; + object.displayName = ""; + } + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + object.annotationSpecId = message.annotationSpecId; + if (message.translation != null && message.hasOwnProperty("translation")) { + object.translation = $root.google.cloud.automl.v1beta1.TranslationAnnotation.toObject(message.translation, options); + if (options.oneofs) + object.detail = "translation"; + } + if (message.classification != null && message.hasOwnProperty("classification")) { + object.classification = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.toObject(message.classification, options); + if (options.oneofs) + object.detail = "classification"; + } + if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { + object.imageObjectDetection = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.toObject(message.imageObjectDetection, options); + if (options.oneofs) + object.detail = "imageObjectDetection"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { + object.textExtraction = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.toObject(message.textExtraction, options); + if (options.oneofs) + object.detail = "textExtraction"; + } + if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { + object.textSentiment = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.toObject(message.textSentiment, options); + if (options.oneofs) + object.detail = "textSentiment"; + } + if (message.videoObjectTracking != null && message.hasOwnProperty("videoObjectTracking")) { + object.videoObjectTracking = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.toObject(message.videoObjectTracking, options); + if (options.oneofs) + object.detail = "videoObjectTracking"; + } + if (message.videoClassification != null && message.hasOwnProperty("videoClassification")) { + object.videoClassification = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.toObject(message.videoClassification, options); + if (options.oneofs) + object.detail = "videoClassification"; + } + if (message.tables != null && message.hasOwnProperty("tables")) { + object.tables = $root.google.cloud.automl.v1beta1.TablesAnnotation.toObject(message.tables, options); + if (options.oneofs) + object.detail = "tables"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListModelEvaluationsResponse to JSON. + * Converts this AnnotationPayload to JSON. * @function toJSON - * @memberof google.cloud.automl.v1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.AnnotationPayload * @instance * @returns {Object.} JSON object */ - ListModelEvaluationsResponse.prototype.toJSON = function toJSON() { + AnnotationPayload.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListModelEvaluationsResponse; + return AnnotationPayload; })(); - return v1; - })(); - - automl.v1beta1 = (function() { - /** - * Namespace v1beta1. - * @memberof google.cloud.automl - * @namespace + * ClassificationType enum. + * @name google.cloud.automl.v1beta1.ClassificationType + * @enum {string} + * @property {number} CLASSIFICATION_TYPE_UNSPECIFIED=0 CLASSIFICATION_TYPE_UNSPECIFIED value + * @property {number} MULTICLASS=1 MULTICLASS value + * @property {number} MULTILABEL=2 MULTILABEL value */ - var v1beta1 = {}; + v1beta1.ClassificationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLASSIFICATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MULTICLASS"] = 1; + values[valuesById[2] = "MULTILABEL"] = 2; + return values; + })(); - v1beta1.AutoMl = (function() { + v1beta1.ClassificationAnnotation = (function() { /** - * Constructs a new AutoMl service. + * Properties of a ClassificationAnnotation. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an AutoMl - * @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 AutoMl(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AutoMl.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AutoMl; - - /** - * Creates new AutoMl service using the specified rpc implementation. - * @function create - * @memberof google.cloud.automl.v1beta1.AutoMl - * @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 {AutoMl} RPC service. Useful where requests and/or responses are streamed. - */ - AutoMl.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#createDataset}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef CreateDatasetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.Dataset} [response] Dataset - */ - - /** - * Calls CreateDataset. - * @function createDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} request CreateDatasetRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.CreateDatasetCallback} callback Node-style callback called with the error, if any, and Dataset - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.createDataset = function createDataset(request, callback) { - return this.rpcCall(createDataset, $root.google.cloud.automl.v1beta1.CreateDatasetRequest, $root.google.cloud.automl.v1beta1.Dataset, request, callback); - }, "name", { value: "CreateDataset" }); - - /** - * Calls CreateDataset. - * @function createDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} request CreateDatasetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getDataset}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef GetDatasetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.Dataset} [response] Dataset - */ - - /** - * Calls GetDataset. - * @function getDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} request GetDatasetRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.GetDatasetCallback} callback Node-style callback called with the error, if any, and Dataset - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.getDataset = function getDataset(request, callback) { - return this.rpcCall(getDataset, $root.google.cloud.automl.v1beta1.GetDatasetRequest, $root.google.cloud.automl.v1beta1.Dataset, request, callback); - }, "name", { value: "GetDataset" }); - - /** - * Calls GetDataset. - * @function getDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} request GetDatasetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @interface IClassificationAnnotation + * @property {number|null} [score] ClassificationAnnotation score */ /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listDatasets}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ListDatasetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ListDatasetsResponse} [response] ListDatasetsResponse + * Constructs a new ClassificationAnnotation. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a ClassificationAnnotation. + * @implements IClassificationAnnotation + * @constructor + * @param {google.cloud.automl.v1beta1.IClassificationAnnotation=} [properties] Properties to set */ + function ClassificationAnnotation(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 ListDatasets. - * @function listDatasets - * @memberof google.cloud.automl.v1beta1.AutoMl + * ClassificationAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation * @instance - * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} request ListDatasetsRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ListDatasetsCallback} callback Node-style callback called with the error, if any, and ListDatasetsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AutoMl.prototype.listDatasets = function listDatasets(request, callback) { - return this.rpcCall(listDatasets, $root.google.cloud.automl.v1beta1.ListDatasetsRequest, $root.google.cloud.automl.v1beta1.ListDatasetsResponse, request, callback); - }, "name", { value: "ListDatasets" }); + ClassificationAnnotation.prototype.score = 0; /** - * Calls ListDatasets. - * @function listDatasets - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} request ListDatasetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ClassificationAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.IClassificationAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation instance */ + ClassificationAnnotation.create = function create(properties) { + return new ClassificationAnnotation(properties); + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateDataset}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef UpdateDatasetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.Dataset} [response] Dataset + * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ClassificationAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; /** - * Calls UpdateDataset. - * @function updateDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} request UpdateDatasetRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.UpdateDatasetCallback} callback Node-style callback called with the error, if any, and Dataset - * @returns {undefined} - * @variation 1 + * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AutoMl.prototype.updateDataset = function updateDataset(request, callback) { - return this.rpcCall(updateDataset, $root.google.cloud.automl.v1beta1.UpdateDatasetRequest, $root.google.cloud.automl.v1beta1.Dataset, request, callback); - }, "name", { value: "UpdateDataset" }); + ClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateDataset. - * @function updateDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} request UpdateDatasetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ClassificationAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ClassificationAnnotation.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.automl.v1beta1.ClassificationAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.score = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deleteDataset}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef DeleteDatasetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteDataset. - * @function deleteDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} request DeleteDatasetRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.DeleteDatasetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a ClassificationAnnotation message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AutoMl.prototype.deleteDataset = function deleteDataset(request, callback) { - return this.rpcCall(deleteDataset, $root.google.cloud.automl.v1beta1.DeleteDatasetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDataset" }); + ClassificationAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + return null; + }; /** - * Calls DeleteDataset. - * @function deleteDataset - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} request DeleteDatasetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation */ + ClassificationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationAnnotation) + return object; + var message = new $root.google.cloud.automl.v1beta1.ClassificationAnnotation(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#importData}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ImportDataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.ClassificationAnnotation} message ClassificationAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ClassificationAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.score = 0; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + return object; + }; /** - * Calls ImportData. - * @function importData - * @memberof google.cloud.automl.v1beta1.AutoMl + * Converts this ClassificationAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation * @instance - * @param {google.cloud.automl.v1beta1.IImportDataRequest} request ImportDataRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ImportDataCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AutoMl.prototype.importData = function importData(request, callback) { - return this.rpcCall(importData, $root.google.cloud.automl.v1beta1.ImportDataRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportData" }); + ClassificationAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls ImportData. - * @function importData - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IImportDataRequest} request ImportDataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return ClassificationAnnotation; + })(); + + v1beta1.VideoClassificationAnnotation = (function() { /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportData}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ExportDataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of a VideoClassificationAnnotation. + * @memberof google.cloud.automl.v1beta1 + * @interface IVideoClassificationAnnotation + * @property {string|null} [type] VideoClassificationAnnotation type + * @property {google.cloud.automl.v1beta1.IClassificationAnnotation|null} [classificationAnnotation] VideoClassificationAnnotation classificationAnnotation + * @property {google.cloud.automl.v1beta1.ITimeSegment|null} [timeSegment] VideoClassificationAnnotation timeSegment */ /** - * Calls ExportData. - * @function exportData - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IExportDataRequest} request ExportDataRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ExportDataCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new VideoClassificationAnnotation. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a VideoClassificationAnnotation. + * @implements IVideoClassificationAnnotation + * @constructor + * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set */ - Object.defineProperty(AutoMl.prototype.exportData = function exportData(request, callback) { - return this.rpcCall(exportData, $root.google.cloud.automl.v1beta1.ExportDataRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportData" }); + function VideoClassificationAnnotation(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 ExportData. - * @function exportData - * @memberof google.cloud.automl.v1beta1.AutoMl + * VideoClassificationAnnotation type. + * @member {string} type + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation * @instance - * @param {google.cloud.automl.v1beta1.IExportDataRequest} request ExportDataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + VideoClassificationAnnotation.prototype.type = ""; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getAnnotationSpec}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef GetAnnotationSpecCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.AnnotationSpec} [response] AnnotationSpec + * VideoClassificationAnnotation classificationAnnotation. + * @member {google.cloud.automl.v1beta1.IClassificationAnnotation|null|undefined} classificationAnnotation + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @instance */ + VideoClassificationAnnotation.prototype.classificationAnnotation = null; /** - * Calls GetAnnotationSpec. - * @function getAnnotationSpec - * @memberof google.cloud.automl.v1beta1.AutoMl + * VideoClassificationAnnotation timeSegment. + * @member {google.cloud.automl.v1beta1.ITimeSegment|null|undefined} timeSegment + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation * @instance - * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} request GetAnnotationSpecRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpecCallback} callback Node-style callback called with the error, if any, and AnnotationSpec - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AutoMl.prototype.getAnnotationSpec = function getAnnotationSpec(request, callback) { - return this.rpcCall(getAnnotationSpec, $root.google.cloud.automl.v1beta1.GetAnnotationSpecRequest, $root.google.cloud.automl.v1beta1.AnnotationSpec, request, callback); - }, "name", { value: "GetAnnotationSpec" }); + VideoClassificationAnnotation.prototype.timeSegment = null; /** - * Calls GetAnnotationSpec. - * @function getAnnotationSpec - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} request GetAnnotationSpecRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new VideoClassificationAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation instance */ + VideoClassificationAnnotation.create = function create(properties) { + return new VideoClassificationAnnotation(properties); + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getTableSpec}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef GetTableSpecCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.TableSpec} [response] TableSpec + * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + VideoClassificationAnnotation.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.classificationAnnotation != null && message.hasOwnProperty("classificationAnnotation")) + $root.google.cloud.automl.v1beta1.ClassificationAnnotation.encode(message.classificationAnnotation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + $root.google.cloud.automl.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls GetTableSpec. - * @function getTableSpec - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} request GetTableSpecRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.GetTableSpecCallback} callback Node-style callback called with the error, if any, and TableSpec - * @returns {undefined} - * @variation 1 + * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AutoMl.prototype.getTableSpec = function getTableSpec(request, callback) { - return this.rpcCall(getTableSpec, $root.google.cloud.automl.v1beta1.GetTableSpecRequest, $root.google.cloud.automl.v1beta1.TableSpec, request, callback); - }, "name", { value: "GetTableSpec" }); + VideoClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetTableSpec. - * @function getTableSpec - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} request GetTableSpecRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + VideoClassificationAnnotation.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.automl.v1beta1.VideoClassificationAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.classificationAnnotation = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.decode(reader, reader.uint32()); + break; + case 3: + message.timeSegment = $root.google.cloud.automl.v1beta1.TimeSegment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listTableSpecs}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ListTableSpecsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ListTableSpecsResponse} [response] ListTableSpecsResponse + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + VideoClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListTableSpecs. - * @function listTableSpecs - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} request ListTableSpecsRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ListTableSpecsCallback} callback Node-style callback called with the error, if any, and ListTableSpecsResponse - * @returns {undefined} - * @variation 1 + * Verifies a VideoClassificationAnnotation message. + * @function verify + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AutoMl.prototype.listTableSpecs = function listTableSpecs(request, callback) { - return this.rpcCall(listTableSpecs, $root.google.cloud.automl.v1beta1.ListTableSpecsRequest, $root.google.cloud.automl.v1beta1.ListTableSpecsResponse, request, callback); - }, "name", { value: "ListTableSpecs" }); + VideoClassificationAnnotation.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.classificationAnnotation != null && message.hasOwnProperty("classificationAnnotation")) { + var error = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.verify(message.classificationAnnotation); + if (error) + return "classificationAnnotation." + error; + } + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { + var error = $root.google.cloud.automl.v1beta1.TimeSegment.verify(message.timeSegment); + if (error) + return "timeSegment." + error; + } + return null; + }; /** - * Calls ListTableSpecs. - * @function listTableSpecs - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} request ListTableSpecsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation */ + VideoClassificationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation) + return object; + var message = new $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation(); + if (object.type != null) + message.type = String(object.type); + if (object.classificationAnnotation != null) { + if (typeof object.classificationAnnotation !== "object") + throw TypeError(".google.cloud.automl.v1beta1.VideoClassificationAnnotation.classificationAnnotation: object expected"); + message.classificationAnnotation = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.fromObject(object.classificationAnnotation); + } + if (object.timeSegment != null) { + if (typeof object.timeSegment !== "object") + throw TypeError(".google.cloud.automl.v1beta1.VideoClassificationAnnotation.timeSegment: object expected"); + message.timeSegment = $root.google.cloud.automl.v1beta1.TimeSegment.fromObject(object.timeSegment); + } + return message; + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateTableSpec}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef UpdateTableSpecCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.TableSpec} [response] TableSpec + * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @static + * @param {google.cloud.automl.v1beta1.VideoClassificationAnnotation} message VideoClassificationAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + VideoClassificationAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.classificationAnnotation = null; + object.timeSegment = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.classificationAnnotation != null && message.hasOwnProperty("classificationAnnotation")) + object.classificationAnnotation = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.toObject(message.classificationAnnotation, options); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + object.timeSegment = $root.google.cloud.automl.v1beta1.TimeSegment.toObject(message.timeSegment, options); + return object; + }; /** - * Calls UpdateTableSpec. - * @function updateTableSpec - * @memberof google.cloud.automl.v1beta1.AutoMl + * Converts this VideoClassificationAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation * @instance - * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} request UpdateTableSpecRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.UpdateTableSpecCallback} callback Node-style callback called with the error, if any, and TableSpec - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AutoMl.prototype.updateTableSpec = function updateTableSpec(request, callback) { - return this.rpcCall(updateTableSpec, $root.google.cloud.automl.v1beta1.UpdateTableSpecRequest, $root.google.cloud.automl.v1beta1.TableSpec, request, callback); - }, "name", { value: "UpdateTableSpec" }); + VideoClassificationAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VideoClassificationAnnotation; + })(); + + v1beta1.ClassificationEvaluationMetrics = (function() { /** - * Calls UpdateTableSpec. - * @function updateTableSpec - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} request UpdateTableSpecRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a ClassificationEvaluationMetrics. + * @memberof google.cloud.automl.v1beta1 + * @interface IClassificationEvaluationMetrics + * @property {number|null} [auPrc] ClassificationEvaluationMetrics auPrc + * @property {number|null} [baseAuPrc] ClassificationEvaluationMetrics baseAuPrc + * @property {number|null} [auRoc] ClassificationEvaluationMetrics auRoc + * @property {number|null} [logLoss] ClassificationEvaluationMetrics logLoss + * @property {Array.|null} [confidenceMetricsEntry] ClassificationEvaluationMetrics confidenceMetricsEntry + * @property {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] ClassificationEvaluationMetrics confusionMatrix + * @property {Array.|null} [annotationSpecId] ClassificationEvaluationMetrics annotationSpecId */ /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getColumnSpec}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef GetColumnSpecCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ColumnSpec} [response] ColumnSpec + * Constructs a new ClassificationEvaluationMetrics. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a ClassificationEvaluationMetrics. + * @implements IClassificationEvaluationMetrics + * @constructor + * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics=} [properties] Properties to set */ + function ClassificationEvaluationMetrics(properties) { + this.confidenceMetricsEntry = []; + this.annotationSpecId = []; + 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 GetColumnSpec. - * @function getColumnSpec - * @memberof google.cloud.automl.v1beta1.AutoMl + * ClassificationEvaluationMetrics auPrc. + * @member {number} auPrc + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics * @instance - * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} request GetColumnSpecRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.GetColumnSpecCallback} callback Node-style callback called with the error, if any, and ColumnSpec - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AutoMl.prototype.getColumnSpec = function getColumnSpec(request, callback) { - return this.rpcCall(getColumnSpec, $root.google.cloud.automl.v1beta1.GetColumnSpecRequest, $root.google.cloud.automl.v1beta1.ColumnSpec, request, callback); - }, "name", { value: "GetColumnSpec" }); + ClassificationEvaluationMetrics.prototype.auPrc = 0; /** - * Calls GetColumnSpec. - * @function getColumnSpec - * @memberof google.cloud.automl.v1beta1.AutoMl + * ClassificationEvaluationMetrics baseAuPrc. + * @member {number} baseAuPrc + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics * @instance - * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} request GetColumnSpecRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listColumnSpecs}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ListColumnSpecsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ListColumnSpecsResponse} [response] ListColumnSpecsResponse */ + ClassificationEvaluationMetrics.prototype.baseAuPrc = 0; /** - * Calls ListColumnSpecs. - * @function listColumnSpecs - * @memberof google.cloud.automl.v1beta1.AutoMl + * ClassificationEvaluationMetrics auRoc. + * @member {number} auRoc + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics * @instance - * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} request ListColumnSpecsRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ListColumnSpecsCallback} callback Node-style callback called with the error, if any, and ListColumnSpecsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AutoMl.prototype.listColumnSpecs = function listColumnSpecs(request, callback) { - return this.rpcCall(listColumnSpecs, $root.google.cloud.automl.v1beta1.ListColumnSpecsRequest, $root.google.cloud.automl.v1beta1.ListColumnSpecsResponse, request, callback); - }, "name", { value: "ListColumnSpecs" }); + ClassificationEvaluationMetrics.prototype.auRoc = 0; /** - * Calls ListColumnSpecs. - * @function listColumnSpecs - * @memberof google.cloud.automl.v1beta1.AutoMl + * ClassificationEvaluationMetrics logLoss. + * @member {number} logLoss + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics * @instance - * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} request ListColumnSpecsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ClassificationEvaluationMetrics.prototype.logLoss = 0; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateColumnSpec}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef UpdateColumnSpecCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ColumnSpec} [response] ColumnSpec + * ClassificationEvaluationMetrics confidenceMetricsEntry. + * @member {Array.} confidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @instance */ + ClassificationEvaluationMetrics.prototype.confidenceMetricsEntry = $util.emptyArray; /** - * Calls UpdateColumnSpec. - * @function updateColumnSpec - * @memberof google.cloud.automl.v1beta1.AutoMl + * ClassificationEvaluationMetrics confusionMatrix. + * @member {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics * @instance - * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} request UpdateColumnSpecRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpecCallback} callback Node-style callback called with the error, if any, and ColumnSpec - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AutoMl.prototype.updateColumnSpec = function updateColumnSpec(request, callback) { - return this.rpcCall(updateColumnSpec, $root.google.cloud.automl.v1beta1.UpdateColumnSpecRequest, $root.google.cloud.automl.v1beta1.ColumnSpec, request, callback); - }, "name", { value: "UpdateColumnSpec" }); + ClassificationEvaluationMetrics.prototype.confusionMatrix = null; /** - * Calls UpdateColumnSpec. - * @function updateColumnSpec - * @memberof google.cloud.automl.v1beta1.AutoMl + * ClassificationEvaluationMetrics annotationSpecId. + * @member {Array.} annotationSpecId + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics * @instance - * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} request UpdateColumnSpecRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ClassificationEvaluationMetrics.prototype.annotationSpecId = $util.emptyArray; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#createModel}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef CreateModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new ClassificationEvaluationMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics instance */ + ClassificationEvaluationMetrics.create = function create(properties) { + return new ClassificationEvaluationMetrics(properties); + }; /** - * Calls CreateModel. - * @function createModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.ICreateModelRequest} request CreateModelRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.CreateModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AutoMl.prototype.createModel = function createModel(request, callback) { - return this.rpcCall(createModel, $root.google.cloud.automl.v1beta1.CreateModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateModel" }); + ClassificationEvaluationMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); + if (message.baseAuPrc != null && message.hasOwnProperty("baseAuPrc")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.baseAuPrc); + if (message.confidenceMetricsEntry != null && message.confidenceMetricsEntry.length) + for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) + $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntry[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.annotationSpecId != null && message.annotationSpecId.length) + for (var i = 0; i < message.annotationSpecId.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.annotationSpecId[i]); + if (message.auRoc != null && message.hasOwnProperty("auRoc")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.auRoc); + if (message.logLoss != null && message.hasOwnProperty("logLoss")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.logLoss); + return writer; + }; /** - * Calls CreateModel. - * @function createModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.ICreateModelRequest} request CreateModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ClassificationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getModel}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef GetModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.Model} [response] Model + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ClassificationEvaluationMetrics.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.automl.v1beta1.ClassificationEvaluationMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.auPrc = reader.float(); + break; + case 2: + message.baseAuPrc = reader.float(); + break; + case 6: + message.auRoc = reader.float(); + break; + case 7: + message.logLoss = reader.float(); + break; + case 3: + if (!(message.confidenceMetricsEntry && message.confidenceMetricsEntry.length)) + message.confidenceMetricsEntry = []; + message.confidenceMetricsEntry.push($root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); + break; + case 4: + message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.annotationSpecId && message.annotationSpecId.length)) + message.annotationSpecId = []; + message.annotationSpecId.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetModel. - * @function getModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetModelRequest} request GetModelRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.GetModelCallback} callback Node-style callback called with the error, if any, and Model - * @returns {undefined} - * @variation 1 + * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(AutoMl.prototype.getModel = function getModel(request, callback) { - return this.rpcCall(getModel, $root.google.cloud.automl.v1beta1.GetModelRequest, $root.google.cloud.automl.v1beta1.Model, request, callback); - }, "name", { value: "GetModel" }); + ClassificationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetModel. - * @function getModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetModelRequest} request GetModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ClassificationEvaluationMetrics message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ClassificationEvaluationMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + if (typeof message.auPrc !== "number") + return "auPrc: number expected"; + if (message.baseAuPrc != null && message.hasOwnProperty("baseAuPrc")) + if (typeof message.baseAuPrc !== "number") + return "baseAuPrc: number expected"; + if (message.auRoc != null && message.hasOwnProperty("auRoc")) + if (typeof message.auRoc !== "number") + return "auRoc: number expected"; + if (message.logLoss != null && message.hasOwnProperty("logLoss")) + if (typeof message.logLoss !== "number") + return "logLoss: number expected"; + if (message.confidenceMetricsEntry != null && message.hasOwnProperty("confidenceMetricsEntry")) { + if (!Array.isArray(message.confidenceMetricsEntry)) + return "confidenceMetricsEntry: array expected"; + for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntry[i]); + if (error) + return "confidenceMetricsEntry." + error; + } + } + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { + var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); + if (error) + return "confusionMatrix." + error; + } + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { + if (!Array.isArray(message.annotationSpecId)) + return "annotationSpecId: array expected"; + for (var i = 0; i < message.annotationSpecId.length; ++i) + if (!$util.isString(message.annotationSpecId[i])) + return "annotationSpecId: string[] expected"; + } + return null; + }; /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModels}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ListModelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ListModelsResponse} [response] ListModelsResponse + * Creates a ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics */ + ClassificationEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics) + return object; + var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics(); + if (object.auPrc != null) + message.auPrc = Number(object.auPrc); + if (object.baseAuPrc != null) + message.baseAuPrc = Number(object.baseAuPrc); + if (object.auRoc != null) + message.auRoc = Number(object.auRoc); + if (object.logLoss != null) + message.logLoss = Number(object.logLoss); + if (object.confidenceMetricsEntry) { + if (!Array.isArray(object.confidenceMetricsEntry)) + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confidenceMetricsEntry: array expected"); + message.confidenceMetricsEntry = []; + for (var i = 0; i < object.confidenceMetricsEntry.length; ++i) { + if (typeof object.confidenceMetricsEntry[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confidenceMetricsEntry: object expected"); + message.confidenceMetricsEntry[i] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntry[i]); + } + } + if (object.confusionMatrix != null) { + if (typeof object.confusionMatrix !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confusionMatrix: object expected"); + message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); + } + if (object.annotationSpecId) { + if (!Array.isArray(object.annotationSpecId)) + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.annotationSpecId: array expected"); + message.annotationSpecId = []; + for (var i = 0; i < object.annotationSpecId.length; ++i) + message.annotationSpecId[i] = String(object.annotationSpecId[i]); + } + return message; + }; /** - * Calls ListModels. - * @function listModels - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IListModelsRequest} request ListModelsRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ListModelsCallback} callback Node-style callback called with the error, if any, and ListModelsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} message ClassificationEvaluationMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(AutoMl.prototype.listModels = function listModels(request, callback) { - return this.rpcCall(listModels, $root.google.cloud.automl.v1beta1.ListModelsRequest, $root.google.cloud.automl.v1beta1.ListModelsResponse, request, callback); - }, "name", { value: "ListModels" }); + ClassificationEvaluationMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.confidenceMetricsEntry = []; + object.annotationSpecId = []; + } + if (options.defaults) { + object.auPrc = 0; + object.baseAuPrc = 0; + object.confusionMatrix = null; + object.auRoc = 0; + object.logLoss = 0; + } + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; + if (message.baseAuPrc != null && message.hasOwnProperty("baseAuPrc")) + object.baseAuPrc = options.json && !isFinite(message.baseAuPrc) ? String(message.baseAuPrc) : message.baseAuPrc; + if (message.confidenceMetricsEntry && message.confidenceMetricsEntry.length) { + object.confidenceMetricsEntry = []; + for (var j = 0; j < message.confidenceMetricsEntry.length; ++j) + object.confidenceMetricsEntry[j] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntry[j], options); + } + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + object.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); + if (message.annotationSpecId && message.annotationSpecId.length) { + object.annotationSpecId = []; + for (var j = 0; j < message.annotationSpecId.length; ++j) + object.annotationSpecId[j] = message.annotationSpecId[j]; + } + if (message.auRoc != null && message.hasOwnProperty("auRoc")) + object.auRoc = options.json && !isFinite(message.auRoc) ? String(message.auRoc) : message.auRoc; + if (message.logLoss != null && message.hasOwnProperty("logLoss")) + object.logLoss = options.json && !isFinite(message.logLoss) ? String(message.logLoss) : message.logLoss; + return object; + }; /** - * Calls ListModels. - * @function listModels - * @memberof google.cloud.automl.v1beta1.AutoMl + * Converts this ClassificationEvaluationMetrics to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics * @instance - * @param {google.cloud.automl.v1beta1.IListModelsRequest} request ListModelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ClassificationEvaluationMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deleteModel}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef DeleteModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + ClassificationEvaluationMetrics.ConfidenceMetricsEntry = (function() { + + /** + * Properties of a ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @interface IConfidenceMetricsEntry + * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold + * @property {number|null} [positionThreshold] ConfidenceMetricsEntry positionThreshold + * @property {number|null} [recall] ConfidenceMetricsEntry recall + * @property {number|null} [precision] ConfidenceMetricsEntry precision + * @property {number|null} [falsePositiveRate] ConfidenceMetricsEntry falsePositiveRate + * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score + * @property {number|null} [recallAt1] ConfidenceMetricsEntry recallAt1 + * @property {number|null} [precisionAt1] ConfidenceMetricsEntry precisionAt1 + * @property {number|null} [falsePositiveRateAt1] ConfidenceMetricsEntry falsePositiveRateAt1 + * @property {number|null} [f1ScoreAt1] ConfidenceMetricsEntry f1ScoreAt1 + * @property {number|Long|null} [truePositiveCount] ConfidenceMetricsEntry truePositiveCount + * @property {number|Long|null} [falsePositiveCount] ConfidenceMetricsEntry falsePositiveCount + * @property {number|Long|null} [falseNegativeCount] ConfidenceMetricsEntry falseNegativeCount + * @property {number|Long|null} [trueNegativeCount] ConfidenceMetricsEntry trueNegativeCount + */ + + /** + * Constructs a new ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @classdesc Represents a ConfidenceMetricsEntry. + * @implements IConfidenceMetricsEntry + * @constructor + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + */ + function ConfidenceMetricsEntry(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]]; + } + + /** + * ConfidenceMetricsEntry confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; + + /** + * ConfidenceMetricsEntry positionThreshold. + * @member {number} positionThreshold + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.positionThreshold = 0; + + /** + * ConfidenceMetricsEntry recall. + * @member {number} recall + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.recall = 0; + + /** + * ConfidenceMetricsEntry precision. + * @member {number} precision + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precision = 0; - /** - * Calls DeleteModel. - * @function deleteModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} request DeleteModelRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.DeleteModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.deleteModel = function deleteModel(request, callback) { - return this.rpcCall(deleteModel, $root.google.cloud.automl.v1beta1.DeleteModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteModel" }); + /** + * ConfidenceMetricsEntry falsePositiveRate. + * @member {number} falsePositiveRate + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falsePositiveRate = 0; - /** - * Calls DeleteModel. - * @function deleteModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} request DeleteModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * ConfidenceMetricsEntry f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1Score = 0; - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deployModel}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef DeployModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * ConfidenceMetricsEntry recallAt1. + * @member {number} recallAt1 + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.recallAt1 = 0; - /** - * Calls DeployModel. - * @function deployModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IDeployModelRequest} request DeployModelRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.DeployModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.deployModel = function deployModel(request, callback) { - return this.rpcCall(deployModel, $root.google.cloud.automl.v1beta1.DeployModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeployModel" }); + /** + * ConfidenceMetricsEntry precisionAt1. + * @member {number} precisionAt1 + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precisionAt1 = 0; - /** - * Calls DeployModel. - * @function deployModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IDeployModelRequest} request DeployModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * ConfidenceMetricsEntry falsePositiveRateAt1. + * @member {number} falsePositiveRateAt1 + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falsePositiveRateAt1 = 0; - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#undeployModel}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef UndeployModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * ConfidenceMetricsEntry f1ScoreAt1. + * @member {number} f1ScoreAt1 + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1ScoreAt1 = 0; - /** - * Calls UndeployModel. - * @function undeployModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} request UndeployModelRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.UndeployModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.undeployModel = function undeployModel(request, callback) { - return this.rpcCall(undeployModel, $root.google.cloud.automl.v1beta1.UndeployModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UndeployModel" }); + /** + * ConfidenceMetricsEntry truePositiveCount. + * @member {number|Long} truePositiveCount + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.truePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Calls UndeployModel. - * @function undeployModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} request UndeployModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * ConfidenceMetricsEntry falsePositiveCount. + * @member {number|Long} falsePositiveCount + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falsePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportModel}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ExportModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * ConfidenceMetricsEntry falseNegativeCount. + * @member {number|Long} falseNegativeCount + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.falseNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Calls ExportModel. - * @function exportModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IExportModelRequest} request ExportModelRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ExportModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.exportModel = function exportModel(request, callback) { - return this.rpcCall(exportModel, $root.google.cloud.automl.v1beta1.ExportModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportModel" }); + /** + * ConfidenceMetricsEntry trueNegativeCount. + * @member {number|Long} trueNegativeCount + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.trueNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Calls ExportModel. - * @function exportModel - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IExportModelRequest} request ExportModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance + */ + ConfidenceMetricsEntry.create = function create(properties) { + return new ConfidenceMetricsEntry(properties); + }; - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportEvaluatedExamples}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ExportEvaluatedExamplesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); + if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.recallAt1); + if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.precisionAt1); + if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.f1ScoreAt1); + if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) + writer.uint32(/* id 8, wireType 5 =*/69).float(message.falsePositiveRate); + if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.falsePositiveRateAt1); + if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.truePositiveCount); + if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.falsePositiveCount); + if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.falseNegativeCount); + if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.trueNegativeCount); + if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.positionThreshold); + return writer; + }; - /** - * Calls ExportEvaluatedExamples. - * @function exportEvaluatedExamples - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} request ExportEvaluatedExamplesRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamplesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.exportEvaluatedExamples = function exportEvaluatedExamples(request, callback) { - return this.rpcCall(exportEvaluatedExamples, $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportEvaluatedExamples" }); + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls ExportEvaluatedExamples. - * @function exportEvaluatedExamples - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} request ExportEvaluatedExamplesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.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.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.confidenceThreshold = reader.float(); + break; + case 14: + message.positionThreshold = reader.int32(); + break; + case 2: + message.recall = reader.float(); + break; + case 3: + message.precision = reader.float(); + break; + case 8: + message.falsePositiveRate = reader.float(); + break; + case 4: + message.f1Score = reader.float(); + break; + case 5: + message.recallAt1 = reader.float(); + break; + case 6: + message.precisionAt1 = reader.float(); + break; + case 9: + message.falsePositiveRateAt1 = reader.float(); + break; + case 7: + message.f1ScoreAt1 = reader.float(); + break; + case 10: + message.truePositiveCount = reader.int64(); + break; + case 11: + message.falsePositiveCount = reader.int64(); + break; + case 12: + message.falseNegativeCount = reader.int64(); + break; + case 13: + message.trueNegativeCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getModelEvaluation}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef GetModelEvaluationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ModelEvaluation} [response] ModelEvaluation - */ + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls GetModelEvaluation. - * @function getModelEvaluation - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} request GetModelEvaluationRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.GetModelEvaluationCallback} callback Node-style callback called with the error, if any, and ModelEvaluation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.getModelEvaluation = function getModelEvaluation(request, callback) { - return this.rpcCall(getModelEvaluation, $root.google.cloud.automl.v1beta1.GetModelEvaluationRequest, $root.google.cloud.automl.v1beta1.ModelEvaluation, request, callback); - }, "name", { value: "GetModelEvaluation" }); + /** + * Verifies a ConfidenceMetricsEntry message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidenceMetricsEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) + if (!$util.isInteger(message.positionThreshold)) + return "positionThreshold: integer expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) + if (typeof message.falsePositiveRate !== "number") + return "falsePositiveRate: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; + if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) + if (typeof message.recallAt1 !== "number") + return "recallAt1: number expected"; + if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) + if (typeof message.precisionAt1 !== "number") + return "precisionAt1: number expected"; + if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) + if (typeof message.falsePositiveRateAt1 !== "number") + return "falsePositiveRateAt1: number expected"; + if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) + if (typeof message.f1ScoreAt1 !== "number") + return "f1ScoreAt1: number expected"; + if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) + if (!$util.isInteger(message.truePositiveCount) && !(message.truePositiveCount && $util.isInteger(message.truePositiveCount.low) && $util.isInteger(message.truePositiveCount.high))) + return "truePositiveCount: integer|Long expected"; + if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) + if (!$util.isInteger(message.falsePositiveCount) && !(message.falsePositiveCount && $util.isInteger(message.falsePositiveCount.low) && $util.isInteger(message.falsePositiveCount.high))) + return "falsePositiveCount: integer|Long expected"; + if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) + if (!$util.isInteger(message.falseNegativeCount) && !(message.falseNegativeCount && $util.isInteger(message.falseNegativeCount.low) && $util.isInteger(message.falseNegativeCount.high))) + return "falseNegativeCount: integer|Long expected"; + if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) + if (!$util.isInteger(message.trueNegativeCount) && !(message.trueNegativeCount && $util.isInteger(message.trueNegativeCount.low) && $util.isInteger(message.trueNegativeCount.high))) + return "trueNegativeCount: integer|Long expected"; + return null; + }; - /** - * Calls GetModelEvaluation. - * @function getModelEvaluation - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} request GetModelEvaluationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + */ + ConfidenceMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) + return object; + var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.positionThreshold != null) + message.positionThreshold = object.positionThreshold | 0; + if (object.recall != null) + message.recall = Number(object.recall); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.falsePositiveRate != null) + message.falsePositiveRate = Number(object.falsePositiveRate); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); + if (object.recallAt1 != null) + message.recallAt1 = Number(object.recallAt1); + if (object.precisionAt1 != null) + message.precisionAt1 = Number(object.precisionAt1); + if (object.falsePositiveRateAt1 != null) + message.falsePositiveRateAt1 = Number(object.falsePositiveRateAt1); + if (object.f1ScoreAt1 != null) + message.f1ScoreAt1 = Number(object.f1ScoreAt1); + if (object.truePositiveCount != null) + if ($util.Long) + (message.truePositiveCount = $util.Long.fromValue(object.truePositiveCount)).unsigned = false; + else if (typeof object.truePositiveCount === "string") + message.truePositiveCount = parseInt(object.truePositiveCount, 10); + else if (typeof object.truePositiveCount === "number") + message.truePositiveCount = object.truePositiveCount; + else if (typeof object.truePositiveCount === "object") + message.truePositiveCount = new $util.LongBits(object.truePositiveCount.low >>> 0, object.truePositiveCount.high >>> 0).toNumber(); + if (object.falsePositiveCount != null) + if ($util.Long) + (message.falsePositiveCount = $util.Long.fromValue(object.falsePositiveCount)).unsigned = false; + else if (typeof object.falsePositiveCount === "string") + message.falsePositiveCount = parseInt(object.falsePositiveCount, 10); + else if (typeof object.falsePositiveCount === "number") + message.falsePositiveCount = object.falsePositiveCount; + else if (typeof object.falsePositiveCount === "object") + message.falsePositiveCount = new $util.LongBits(object.falsePositiveCount.low >>> 0, object.falsePositiveCount.high >>> 0).toNumber(); + if (object.falseNegativeCount != null) + if ($util.Long) + (message.falseNegativeCount = $util.Long.fromValue(object.falseNegativeCount)).unsigned = false; + else if (typeof object.falseNegativeCount === "string") + message.falseNegativeCount = parseInt(object.falseNegativeCount, 10); + else if (typeof object.falseNegativeCount === "number") + message.falseNegativeCount = object.falseNegativeCount; + else if (typeof object.falseNegativeCount === "object") + message.falseNegativeCount = new $util.LongBits(object.falseNegativeCount.low >>> 0, object.falseNegativeCount.high >>> 0).toNumber(); + if (object.trueNegativeCount != null) + if ($util.Long) + (message.trueNegativeCount = $util.Long.fromValue(object.trueNegativeCount)).unsigned = false; + else if (typeof object.trueNegativeCount === "string") + message.trueNegativeCount = parseInt(object.trueNegativeCount, 10); + else if (typeof object.trueNegativeCount === "number") + message.trueNegativeCount = object.trueNegativeCount; + else if (typeof object.trueNegativeCount === "object") + message.trueNegativeCount = new $util.LongBits(object.trueNegativeCount.low >>> 0, object.trueNegativeCount.high >>> 0).toNumber(); + return message; + }; - /** - * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModelEvaluations}. - * @memberof google.cloud.automl.v1beta1.AutoMl - * @typedef ListModelEvaluationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} [response] ListModelEvaluationsResponse - */ + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidenceMetricsEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.confidenceThreshold = 0; + object.recall = 0; + object.precision = 0; + object.f1Score = 0; + object.recallAt1 = 0; + object.precisionAt1 = 0; + object.f1ScoreAt1 = 0; + object.falsePositiveRate = 0; + object.falsePositiveRateAt1 = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.truePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.truePositiveCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.falsePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.falsePositiveCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.falseNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.falseNegativeCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trueNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trueNegativeCount = options.longs === String ? "0" : 0; + object.positionThreshold = 0; + } + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) + object.recallAt1 = options.json && !isFinite(message.recallAt1) ? String(message.recallAt1) : message.recallAt1; + if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) + object.precisionAt1 = options.json && !isFinite(message.precisionAt1) ? String(message.precisionAt1) : message.precisionAt1; + if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) + object.f1ScoreAt1 = options.json && !isFinite(message.f1ScoreAt1) ? String(message.f1ScoreAt1) : message.f1ScoreAt1; + if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) + object.falsePositiveRate = options.json && !isFinite(message.falsePositiveRate) ? String(message.falsePositiveRate) : message.falsePositiveRate; + if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) + object.falsePositiveRateAt1 = options.json && !isFinite(message.falsePositiveRateAt1) ? String(message.falsePositiveRateAt1) : message.falsePositiveRateAt1; + if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) + if (typeof message.truePositiveCount === "number") + object.truePositiveCount = options.longs === String ? String(message.truePositiveCount) : message.truePositiveCount; + else + object.truePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.truePositiveCount) : options.longs === Number ? new $util.LongBits(message.truePositiveCount.low >>> 0, message.truePositiveCount.high >>> 0).toNumber() : message.truePositiveCount; + if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) + if (typeof message.falsePositiveCount === "number") + object.falsePositiveCount = options.longs === String ? String(message.falsePositiveCount) : message.falsePositiveCount; + else + object.falsePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.falsePositiveCount) : options.longs === Number ? new $util.LongBits(message.falsePositiveCount.low >>> 0, message.falsePositiveCount.high >>> 0).toNumber() : message.falsePositiveCount; + if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) + if (typeof message.falseNegativeCount === "number") + object.falseNegativeCount = options.longs === String ? String(message.falseNegativeCount) : message.falseNegativeCount; + else + object.falseNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.falseNegativeCount) : options.longs === Number ? new $util.LongBits(message.falseNegativeCount.low >>> 0, message.falseNegativeCount.high >>> 0).toNumber() : message.falseNegativeCount; + if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) + if (typeof message.trueNegativeCount === "number") + object.trueNegativeCount = options.longs === String ? String(message.trueNegativeCount) : message.trueNegativeCount; + else + object.trueNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.trueNegativeCount) : options.longs === Number ? new $util.LongBits(message.trueNegativeCount.low >>> 0, message.trueNegativeCount.high >>> 0).toNumber() : message.trueNegativeCount; + if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) + object.positionThreshold = message.positionThreshold; + return object; + }; - /** - * Calls ListModelEvaluations. - * @function listModelEvaluations - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} request ListModelEvaluationsRequest message or plain object - * @param {google.cloud.automl.v1beta1.AutoMl.ListModelEvaluationsCallback} callback Node-style callback called with the error, if any, and ListModelEvaluationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AutoMl.prototype.listModelEvaluations = function listModelEvaluations(request, callback) { - return this.rpcCall(listModelEvaluations, $root.google.cloud.automl.v1beta1.ListModelEvaluationsRequest, $root.google.cloud.automl.v1beta1.ListModelEvaluationsResponse, request, callback); - }, "name", { value: "ListModelEvaluations" }); + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + * @instance + * @returns {Object.} JSON object + */ + ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls ListModelEvaluations. - * @function listModelEvaluations - * @memberof google.cloud.automl.v1beta1.AutoMl - * @instance - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} request ListModelEvaluationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return ConfidenceMetricsEntry; + })(); - return AutoMl; - })(); + ClassificationEvaluationMetrics.ConfusionMatrix = (function() { - v1beta1.CreateDatasetRequest = (function() { + /** + * Properties of a ConfusionMatrix. + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @interface IConfusionMatrix + * @property {Array.|null} [annotationSpecId] ConfusionMatrix annotationSpecId + * @property {Array.|null} [displayName] ConfusionMatrix displayName + * @property {Array.|null} [row] ConfusionMatrix row + */ - /** - * Properties of a CreateDatasetRequest. - * @memberof google.cloud.automl.v1beta1 - * @interface ICreateDatasetRequest - * @property {string|null} [parent] CreateDatasetRequest parent - * @property {google.cloud.automl.v1beta1.IDataset|null} [dataset] CreateDatasetRequest dataset - */ + /** + * Constructs a new ConfusionMatrix. + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @classdesc Represents a ConfusionMatrix. + * @implements IConfusionMatrix + * @constructor + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set + */ + function ConfusionMatrix(properties) { + this.annotationSpecId = []; + this.displayName = []; + this.row = []; + 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 CreateDatasetRequest. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a CreateDatasetRequest. - * @implements ICreateDatasetRequest - * @constructor - * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest=} [properties] Properties to set - */ - function CreateDatasetRequest(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]]; - } + /** + * ConfusionMatrix annotationSpecId. + * @member {Array.} annotationSpecId + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @instance + */ + ConfusionMatrix.prototype.annotationSpecId = $util.emptyArray; - /** - * CreateDatasetRequest parent. - * @member {string} parent - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @instance - */ - CreateDatasetRequest.prototype.parent = ""; + /** + * ConfusionMatrix displayName. + * @member {Array.} displayName + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @instance + */ + ConfusionMatrix.prototype.displayName = $util.emptyArray; - /** - * CreateDatasetRequest dataset. - * @member {google.cloud.automl.v1beta1.IDataset|null|undefined} dataset - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @instance - */ - CreateDatasetRequest.prototype.dataset = null; + /** + * ConfusionMatrix row. + * @member {Array.} row + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @instance + */ + ConfusionMatrix.prototype.row = $util.emptyArray; - /** - * Creates a new CreateDatasetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest instance - */ - CreateDatasetRequest.create = function create(properties) { - return new CreateDatasetRequest(properties); - }; + /** + * Creates a new ConfusionMatrix instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix instance + */ + ConfusionMatrix.create = function create(properties) { + return new ConfusionMatrix(properties); + }; - /** - * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} message CreateDatasetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDatasetRequest.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.dataset != null && message.hasOwnProperty("dataset")) - $root.google.cloud.automl.v1beta1.Dataset.encode(message.dataset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfusionMatrix.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotationSpecId != null && message.annotationSpecId.length) + for (var i = 0; i < message.annotationSpecId.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId[i]); + if (message.row != null && message.row.length) + for (var i = 0; i < message.row.length; ++i) + $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.encode(message.row[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.displayName != null && message.displayName.length) + for (var i = 0; i < message.displayName.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName[i]); + return writer; + }; - /** - * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} message CreateDatasetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfusionMatrix.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a CreateDatasetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDatasetRequest.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.automl.v1beta1.CreateDatasetRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.dataset = $root.google.cloud.automl.v1beta1.Dataset.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ConfusionMatrix message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfusionMatrix.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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotationSpecId && message.annotationSpecId.length)) + message.annotationSpecId = []; + message.annotationSpecId.push(reader.string()); + break; + case 3: + if (!(message.displayName && message.displayName.length)) + message.displayName = []; + message.displayName.push(reader.string()); + break; + case 2: + if (!(message.row && message.row.length)) + message.row = []; + message.row.push($root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDatasetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfusionMatrix.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a CreateDatasetRequest message. - * @function verify - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDatasetRequest.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.dataset != null && message.hasOwnProperty("dataset")) { - var error = $root.google.cloud.automl.v1beta1.Dataset.verify(message.dataset); - if (error) - return "dataset." + error; - } - return null; - }; + /** + * Verifies a ConfusionMatrix message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfusionMatrix.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { + if (!Array.isArray(message.annotationSpecId)) + return "annotationSpecId: array expected"; + for (var i = 0; i < message.annotationSpecId.length; ++i) + if (!$util.isString(message.annotationSpecId[i])) + return "annotationSpecId: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + if (!Array.isArray(message.displayName)) + return "displayName: array expected"; + for (var i = 0; i < message.displayName.length; ++i) + if (!$util.isString(message.displayName[i])) + return "displayName: string[] expected"; + } + if (message.row != null && message.hasOwnProperty("row")) { + if (!Array.isArray(message.row)) + return "row: array expected"; + for (var i = 0; i < message.row.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify(message.row[i]); + if (error) + return "row." + error; + } + } + return null; + }; - /** - * Creates a CreateDatasetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest - */ - CreateDatasetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.CreateDatasetRequest) + /** + * Creates a ConfusionMatrix message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix + */ + ConfusionMatrix.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix) + return object; + var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix(); + if (object.annotationSpecId) { + if (!Array.isArray(object.annotationSpecId)) + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.annotationSpecId: array expected"); + message.annotationSpecId = []; + for (var i = 0; i < object.annotationSpecId.length; ++i) + message.annotationSpecId[i] = String(object.annotationSpecId[i]); + } + if (object.displayName) { + if (!Array.isArray(object.displayName)) + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.displayName: array expected"); + message.displayName = []; + for (var i = 0; i < object.displayName.length; ++i) + message.displayName[i] = String(object.displayName[i]); + } + if (object.row) { + if (!Array.isArray(object.row)) + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.row: array expected"); + message.row = []; + for (var i = 0; i < object.row.length; ++i) { + if (typeof object.row[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.row: object expected"); + message.row[i] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.fromObject(object.row[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ConfusionMatrix message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} message ConfusionMatrix + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfusionMatrix.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.annotationSpecId = []; + object.row = []; + object.displayName = []; + } + if (message.annotationSpecId && message.annotationSpecId.length) { + object.annotationSpecId = []; + for (var j = 0; j < message.annotationSpecId.length; ++j) + object.annotationSpecId[j] = message.annotationSpecId[j]; + } + if (message.row && message.row.length) { + object.row = []; + for (var j = 0; j < message.row.length; ++j) + object.row[j] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.toObject(message.row[j], options); + } + if (message.displayName && message.displayName.length) { + object.displayName = []; + for (var j = 0; j < message.displayName.length; ++j) + object.displayName[j] = message.displayName[j]; + } return object; - var message = new $root.google.cloud.automl.v1beta1.CreateDatasetRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.dataset != null) { - if (typeof object.dataset !== "object") - throw TypeError(".google.cloud.automl.v1beta1.CreateDatasetRequest.dataset: object expected"); - message.dataset = $root.google.cloud.automl.v1beta1.Dataset.fromObject(object.dataset); - } - return message; - }; + }; - /** - * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.CreateDatasetRequest} message CreateDatasetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDatasetRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.dataset = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = $root.google.cloud.automl.v1beta1.Dataset.toObject(message.dataset, options); - return object; - }; + /** + * Converts this ConfusionMatrix to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @instance + * @returns {Object.} JSON object + */ + ConfusionMatrix.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CreateDatasetRequest to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDatasetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ConfusionMatrix.Row = (function() { - return CreateDatasetRequest; - })(); + /** + * Properties of a Row. + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @interface IRow + * @property {Array.|null} [exampleCount] Row exampleCount + */ - v1beta1.GetDatasetRequest = (function() { + /** + * Constructs a new Row. + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.exampleCount = []; + 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 GetDatasetRequest. - * @memberof google.cloud.automl.v1beta1 - * @interface IGetDatasetRequest - * @property {string|null} [name] GetDatasetRequest name - */ + /** + * Row exampleCount. + * @member {Array.} exampleCount + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @instance + */ + Row.prototype.exampleCount = $util.emptyArray; - /** - * Constructs a new GetDatasetRequest. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GetDatasetRequest. - * @implements IGetDatasetRequest - * @constructor - * @param {google.cloud.automl.v1beta1.IGetDatasetRequest=} [properties] Properties to set - */ - function GetDatasetRequest(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 new Row instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; - /** - * GetDatasetRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @instance - */ - GetDatasetRequest.prototype.name = ""; + /** + * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exampleCount != null && message.exampleCount.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.exampleCount.length; ++i) + writer.int32(message.exampleCount[i]); + writer.ldelim(); + } + return writer; + }; - /** - * Creates a new GetDatasetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.IGetDatasetRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest instance - */ - GetDatasetRequest.create = function create(properties) { - return new GetDatasetRequest(properties); - }; + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} message GetDatasetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDatasetRequest.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; - }; + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.exampleCount && message.exampleCount.length)) + message.exampleCount = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.exampleCount.push(reader.int32()); + } else + message.exampleCount.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} message GetDatasetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a GetDatasetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDatasetRequest.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.automl.v1beta1.GetDatasetRequest(); - 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; - }; + /** + * Verifies a Row message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) { + if (!Array.isArray(message.exampleCount)) + return "exampleCount: array expected"; + for (var i = 0; i < message.exampleCount.length; ++i) + if (!$util.isInteger(message.exampleCount[i])) + return "exampleCount: integer[] expected"; + } + return null; + }; - /** - * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDatasetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) + return object; + var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); + if (object.exampleCount) { + if (!Array.isArray(object.exampleCount)) + throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.exampleCount: array expected"); + message.exampleCount = []; + for (var i = 0; i < object.exampleCount.length; ++i) + message.exampleCount[i] = object.exampleCount[i] | 0; + } + return message; + }; - /** - * Verifies a GetDatasetRequest message. - * @function verify - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDatasetRequest.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 plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @static + * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exampleCount = []; + if (message.exampleCount && message.exampleCount.length) { + object.exampleCount = []; + for (var j = 0; j < message.exampleCount.length; ++j) + object.exampleCount[j] = message.exampleCount[j]; + } + return object; + }; - /** - * Creates a GetDatasetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest - */ - GetDatasetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GetDatasetRequest) - return object; - var message = new $root.google.cloud.automl.v1beta1.GetDatasetRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @static - * @param {google.cloud.automl.v1beta1.GetDatasetRequest} message GetDatasetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDatasetRequest.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; - }; + return Row; + })(); - /** - * Converts this GetDatasetRequest to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.GetDatasetRequest - * @instance - * @returns {Object.} JSON object - */ - GetDatasetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ConfusionMatrix; + })(); - return GetDatasetRequest; + return ClassificationEvaluationMetrics; })(); - v1beta1.ListDatasetsRequest = (function() { + v1beta1.TimeSegment = (function() { /** - * Properties of a ListDatasetsRequest. + * Properties of a TimeSegment. * @memberof google.cloud.automl.v1beta1 - * @interface IListDatasetsRequest - * @property {string|null} [parent] ListDatasetsRequest parent - * @property {string|null} [filter] ListDatasetsRequest filter - * @property {number|null} [pageSize] ListDatasetsRequest pageSize - * @property {string|null} [pageToken] ListDatasetsRequest pageToken + * @interface ITimeSegment + * @property {google.protobuf.IDuration|null} [startTimeOffset] TimeSegment startTimeOffset + * @property {google.protobuf.IDuration|null} [endTimeOffset] TimeSegment endTimeOffset */ /** - * Constructs a new ListDatasetsRequest. + * Constructs a new TimeSegment. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListDatasetsRequest. - * @implements IListDatasetsRequest + * @classdesc Represents a TimeSegment. + * @implements ITimeSegment * @constructor - * @param {google.cloud.automl.v1beta1.IListDatasetsRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITimeSegment=} [properties] Properties to set */ - function ListDatasetsRequest(properties) { + function TimeSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23981,114 +25080,88 @@ } /** - * ListDatasetsRequest parent. - * @member {string} parent - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest - * @instance - */ - ListDatasetsRequest.prototype.parent = ""; - - /** - * ListDatasetsRequest filter. - * @member {string} filter - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest - * @instance - */ - ListDatasetsRequest.prototype.filter = ""; - - /** - * ListDatasetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * TimeSegment startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.automl.v1beta1.TimeSegment * @instance */ - ListDatasetsRequest.prototype.pageSize = 0; + TimeSegment.prototype.startTimeOffset = null; /** - * ListDatasetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * TimeSegment endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.automl.v1beta1.TimeSegment * @instance */ - ListDatasetsRequest.prototype.pageToken = ""; + TimeSegment.prototype.endTimeOffset = null; /** - * Creates a new ListDatasetsRequest instance using the specified properties. + * Creates a new TimeSegment instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static - * @param {google.cloud.automl.v1beta1.IListDatasetsRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest instance + * @param {google.cloud.automl.v1beta1.ITimeSegment=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment instance */ - ListDatasetsRequest.create = function create(properties) { - return new ListDatasetsRequest(properties); + TimeSegment.create = function create(properties) { + return new TimeSegment(properties); }; /** - * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. + * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static - * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} message ListDatasetsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDatasetsRequest.encode = function encode(message, writer) { + TimeSegment.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.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. + * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static - * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} message ListDatasetsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDatasetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TimeSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDatasetsRequest message from the specified reader or buffer. + * Decodes a TimeSegment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest + * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDatasetsRequest.decode = function decode(reader, length) { + TimeSegment.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.automl.v1beta1.ListDatasetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TimeSegment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.pageSize = reader.int32(); + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; - case 6: - message.pageToken = reader.string(); + case 2: + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -24099,134 +25172,127 @@ }; /** - * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest + * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDatasetsRequest.decodeDelimited = function decodeDelimited(reader) { + TimeSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDatasetsRequest message. + * Verifies a TimeSegment message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDatasetsRequest.verify = function verify(message) { + TimeSegment.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); + if (error) + return "endTimeOffset." + error; + } return null; }; /** - * Creates a ListDatasetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest + * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment */ - ListDatasetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListDatasetsRequest) + TimeSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TimeSegment) return object; - var message = new $root.google.cloud.automl.v1beta1.ListDatasetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.automl.v1beta1.TimeSegment(); + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TimeSegment.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TimeSegment.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + } return message; }; /** - * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @static - * @param {google.cloud.automl.v1beta1.ListDatasetsRequest} message ListDatasetsRequest + * @param {google.cloud.automl.v1beta1.TimeSegment} message TimeSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDatasetsRequest.toObject = function toObject(message, options) { + TimeSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.startTimeOffset = null; + object.endTimeOffset = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); return object; }; /** - * Converts this ListDatasetsRequest to JSON. + * Converts this TimeSegment to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @memberof google.cloud.automl.v1beta1.TimeSegment * @instance * @returns {Object.} JSON object */ - ListDatasetsRequest.prototype.toJSON = function toJSON() { + TimeSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDatasetsRequest; + return TimeSegment; })(); - v1beta1.ListDatasetsResponse = (function() { + v1beta1.ImageObjectDetectionAnnotation = (function() { /** - * Properties of a ListDatasetsResponse. + * Properties of an ImageObjectDetectionAnnotation. * @memberof google.cloud.automl.v1beta1 - * @interface IListDatasetsResponse - * @property {Array.|null} [datasets] ListDatasetsResponse datasets - * @property {string|null} [nextPageToken] ListDatasetsResponse nextPageToken + * @interface IImageObjectDetectionAnnotation + * @property {google.cloud.automl.v1beta1.IBoundingPoly|null} [boundingBox] ImageObjectDetectionAnnotation boundingBox + * @property {number|null} [score] ImageObjectDetectionAnnotation score */ /** - * Constructs a new ListDatasetsResponse. + * Constructs a new ImageObjectDetectionAnnotation. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListDatasetsResponse. - * @implements IListDatasetsResponse + * @classdesc Represents an ImageObjectDetectionAnnotation. + * @implements IImageObjectDetectionAnnotation * @constructor - * @param {google.cloud.automl.v1beta1.IListDatasetsResponse=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation=} [properties] Properties to set */ - function ListDatasetsResponse(properties) { - this.datasets = []; + function ImageObjectDetectionAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24234,91 +25300,88 @@ } /** - * ListDatasetsResponse datasets. - * @member {Array.} datasets - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * ImageObjectDetectionAnnotation boundingBox. + * @member {google.cloud.automl.v1beta1.IBoundingPoly|null|undefined} boundingBox + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @instance */ - ListDatasetsResponse.prototype.datasets = $util.emptyArray; + ImageObjectDetectionAnnotation.prototype.boundingBox = null; /** - * ListDatasetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * ImageObjectDetectionAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @instance */ - ListDatasetsResponse.prototype.nextPageToken = ""; + ImageObjectDetectionAnnotation.prototype.score = 0; /** - * Creates a new ListDatasetsResponse instance using the specified properties. + * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static - * @param {google.cloud.automl.v1beta1.IListDatasetsResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse instance + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation instance */ - ListDatasetsResponse.create = function create(properties) { - return new ListDatasetsResponse(properties); + ImageObjectDetectionAnnotation.create = function create(properties) { + return new ImageObjectDetectionAnnotation(properties); }; /** - * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. + * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static - * @param {google.cloud.automl.v1beta1.IListDatasetsResponse} message ListDatasetsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDatasetsResponse.encode = function encode(message, writer) { + ImageObjectDetectionAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.datasets != null && message.datasets.length) - for (var i = 0; i < message.datasets.length; ++i) - $root.google.cloud.automl.v1beta1.Dataset.encode(message.datasets[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.boundingBox != null && message.hasOwnProperty("boundingBox")) + $root.google.cloud.automl.v1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); return writer; }; /** - * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. + * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static - * @param {google.cloud.automl.v1beta1.IListDatasetsResponse} message ListDatasetsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDatasetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDatasetsResponse message from the specified reader or buffer. + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDatasetsResponse.decode = function decode(reader, length) { + ImageObjectDetectionAnnotation.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.automl.v1beta1.ListDatasetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.datasets && message.datasets.length)) - message.datasets = []; - message.datasets.push($root.google.cloud.automl.v1beta1.Dataset.decode(reader, reader.uint32())); + message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.score = reader.float(); break; default: reader.skipType(tag & 7); @@ -24329,134 +25392,124 @@ }; /** - * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDatasetsResponse.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDatasetsResponse message. + * Verifies an ImageObjectDetectionAnnotation message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDatasetsResponse.verify = function verify(message) { + ImageObjectDetectionAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.datasets != null && message.hasOwnProperty("datasets")) { - if (!Array.isArray(message.datasets)) - return "datasets: array expected"; - for (var i = 0; i < message.datasets.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.Dataset.verify(message.datasets[i]); - if (error) - return "datasets." + error; - } + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) { + var error = $root.google.cloud.automl.v1beta1.BoundingPoly.verify(message.boundingBox); + if (error) + return "boundingBox." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; return null; }; /** - * Creates a ListDatasetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation */ - ListDatasetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListDatasetsResponse) + ImageObjectDetectionAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) return object; - var message = new $root.google.cloud.automl.v1beta1.ListDatasetsResponse(); - if (object.datasets) { - if (!Array.isArray(object.datasets)) - throw TypeError(".google.cloud.automl.v1beta1.ListDatasetsResponse.datasets: array expected"); - message.datasets = []; - for (var i = 0; i < object.datasets.length; ++i) { - if (typeof object.datasets[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ListDatasetsResponse.datasets: object expected"); - message.datasets[i] = $root.google.cloud.automl.v1beta1.Dataset.fromObject(object.datasets[i]); - } + var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation(); + if (object.boundingBox != null) { + if (typeof object.boundingBox !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.boundingBox: object expected"); + message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.fromObject(object.boundingBox); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.score != null) + message.score = Number(object.score); return message; }; /** - * Creates a plain object from a ListDatasetsResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @static - * @param {google.cloud.automl.v1beta1.ListDatasetsResponse} message ListDatasetsResponse + * @param {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDatasetsResponse.toObject = function toObject(message, options) { + ImageObjectDetectionAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.datasets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.datasets && message.datasets.length) { - object.datasets = []; - for (var j = 0; j < message.datasets.length; ++j) - object.datasets[j] = $root.google.cloud.automl.v1beta1.Dataset.toObject(message.datasets[j], options); + if (options.defaults) { + object.boundingBox = null; + object.score = 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) + object.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.toObject(message.boundingBox, options); + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; return object; }; /** - * Converts this ListDatasetsResponse to JSON. + * Converts this ImageObjectDetectionAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation * @instance * @returns {Object.} JSON object */ - ListDatasetsResponse.prototype.toJSON = function toJSON() { + ImageObjectDetectionAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDatasetsResponse; + return ImageObjectDetectionAnnotation; })(); - v1beta1.UpdateDatasetRequest = (function() { + v1beta1.VideoObjectTrackingAnnotation = (function() { /** - * Properties of an UpdateDatasetRequest. + * Properties of a VideoObjectTrackingAnnotation. * @memberof google.cloud.automl.v1beta1 - * @interface IUpdateDatasetRequest - * @property {google.cloud.automl.v1beta1.IDataset|null} [dataset] UpdateDatasetRequest dataset - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDatasetRequest updateMask + * @interface IVideoObjectTrackingAnnotation + * @property {string|null} [instanceId] VideoObjectTrackingAnnotation instanceId + * @property {google.protobuf.IDuration|null} [timeOffset] VideoObjectTrackingAnnotation timeOffset + * @property {google.cloud.automl.v1beta1.IBoundingPoly|null} [boundingBox] VideoObjectTrackingAnnotation boundingBox + * @property {number|null} [score] VideoObjectTrackingAnnotation score */ /** - * Constructs a new UpdateDatasetRequest. + * Constructs a new VideoObjectTrackingAnnotation. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an UpdateDatasetRequest. - * @implements IUpdateDatasetRequest + * @classdesc Represents a VideoObjectTrackingAnnotation. + * @implements IVideoObjectTrackingAnnotation * @constructor - * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set */ - function UpdateDatasetRequest(properties) { + function VideoObjectTrackingAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24464,88 +25517,114 @@ } /** - * UpdateDatasetRequest dataset. - * @member {google.cloud.automl.v1beta1.IDataset|null|undefined} dataset - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * VideoObjectTrackingAnnotation instanceId. + * @member {string} instanceId + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @instance */ - UpdateDatasetRequest.prototype.dataset = null; + VideoObjectTrackingAnnotation.prototype.instanceId = ""; /** - * UpdateDatasetRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * VideoObjectTrackingAnnotation timeOffset. + * @member {google.protobuf.IDuration|null|undefined} timeOffset + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @instance */ - UpdateDatasetRequest.prototype.updateMask = null; + VideoObjectTrackingAnnotation.prototype.timeOffset = null; /** - * Creates a new UpdateDatasetRequest instance using the specified properties. + * VideoObjectTrackingAnnotation boundingBox. + * @member {google.cloud.automl.v1beta1.IBoundingPoly|null|undefined} boundingBox + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @instance + */ + VideoObjectTrackingAnnotation.prototype.boundingBox = null; + + /** + * VideoObjectTrackingAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @instance + */ + VideoObjectTrackingAnnotation.prototype.score = 0; + + /** + * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest instance + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation instance */ - UpdateDatasetRequest.create = function create(properties) { - return new UpdateDatasetRequest(properties); + VideoObjectTrackingAnnotation.create = function create(properties) { + return new VideoObjectTrackingAnnotation(properties); }; /** - * Encodes the specified UpdateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. + * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} message UpdateDatasetRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDatasetRequest.encode = function encode(message, writer) { + VideoObjectTrackingAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataset != null && message.hasOwnProperty("dataset")) - $root.google.cloud.automl.v1beta1.Dataset.encode(message.dataset, 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.instanceId != null && message.hasOwnProperty("instanceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceId); + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + $root.google.protobuf.Duration.encode(message.timeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) + $root.google.cloud.automl.v1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.score); return writer; }; /** - * Encodes the specified UpdateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. + * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} message UpdateDatasetRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { + VideoObjectTrackingAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDatasetRequest message from the specified reader or buffer. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDatasetRequest.decode = function decode(reader, length) { + VideoObjectTrackingAnnotation.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.automl.v1beta1.UpdateDatasetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.dataset = $root.google.cloud.automl.v1beta1.Dataset.decode(reader, reader.uint32()); + message.instanceId = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.timeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.decode(reader, reader.uint32()); + break; + case 4: + message.score = reader.float(); break; default: reader.skipType(tag & 7); @@ -24556,126 +25635,145 @@ }; /** - * Decodes an UpdateDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDatasetRequest.decodeDelimited = function decodeDelimited(reader) { + VideoObjectTrackingAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDatasetRequest message. + * Verifies a VideoObjectTrackingAnnotation message. * @function verify - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDatasetRequest.verify = function verify(message) { + VideoObjectTrackingAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) { - var error = $root.google.cloud.automl.v1beta1.Dataset.verify(message.dataset); + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.timeOffset); if (error) - return "dataset." + error; + return "timeOffset." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) { + var error = $root.google.cloud.automl.v1beta1.BoundingPoly.verify(message.boundingBox); if (error) - return "updateMask." + error; + return "boundingBox." + error; } + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; return null; }; /** - * Creates an UpdateDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation */ - UpdateDatasetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.UpdateDatasetRequest) + VideoObjectTrackingAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) return object; - var message = new $root.google.cloud.automl.v1beta1.UpdateDatasetRequest(); - if (object.dataset != null) { - if (typeof object.dataset !== "object") - throw TypeError(".google.cloud.automl.v1beta1.UpdateDatasetRequest.dataset: object expected"); - message.dataset = $root.google.cloud.automl.v1beta1.Dataset.fromObject(object.dataset); + var message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation(); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); + if (object.timeOffset != null) { + if (typeof object.timeOffset !== "object") + throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.timeOffset: object expected"); + message.timeOffset = $root.google.protobuf.Duration.fromObject(object.timeOffset); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.automl.v1beta1.UpdateDatasetRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.boundingBox != null) { + if (typeof object.boundingBox !== "object") + throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.boundingBox: object expected"); + message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.fromObject(object.boundingBox); } + if (object.score != null) + message.score = Number(object.score); return message; }; /** - * Creates a plain object from an UpdateDatasetRequest message. Also converts values to other types if specified. + * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.automl.v1beta1.UpdateDatasetRequest} message UpdateDatasetRequest + * @param {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDatasetRequest.toObject = function toObject(message, options) { + VideoObjectTrackingAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataset = null; - object.updateMask = null; + object.instanceId = ""; + object.timeOffset = null; + object.boundingBox = null; + object.score = 0; } - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = $root.google.cloud.automl.v1beta1.Dataset.toObject(message.dataset, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + object.timeOffset = $root.google.protobuf.Duration.toObject(message.timeOffset, options); + if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) + object.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.toObject(message.boundingBox, options); + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; return object; }; /** - * Converts this UpdateDatasetRequest to JSON. + * Converts this VideoObjectTrackingAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation * @instance * @returns {Object.} JSON object */ - UpdateDatasetRequest.prototype.toJSON = function toJSON() { + VideoObjectTrackingAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateDatasetRequest; + return VideoObjectTrackingAnnotation; })(); - v1beta1.DeleteDatasetRequest = (function() { + v1beta1.BoundingBoxMetricsEntry = (function() { /** - * Properties of a DeleteDatasetRequest. + * Properties of a BoundingBoxMetricsEntry. * @memberof google.cloud.automl.v1beta1 - * @interface IDeleteDatasetRequest - * @property {string|null} [name] DeleteDatasetRequest name + * @interface IBoundingBoxMetricsEntry + * @property {number|null} [iouThreshold] BoundingBoxMetricsEntry iouThreshold + * @property {number|null} [meanAveragePrecision] BoundingBoxMetricsEntry meanAveragePrecision + * @property {Array.|null} [confidenceMetricsEntries] BoundingBoxMetricsEntry confidenceMetricsEntries */ /** - * Constructs a new DeleteDatasetRequest. + * Constructs a new BoundingBoxMetricsEntry. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DeleteDatasetRequest. - * @implements IDeleteDatasetRequest + * @classdesc Represents a BoundingBoxMetricsEntry. + * @implements IBoundingBoxMetricsEntry * @constructor - * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry=} [properties] Properties to set */ - function DeleteDatasetRequest(properties) { + function BoundingBoxMetricsEntry(properties) { + this.confidenceMetricsEntries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24683,75 +25781,104 @@ } /** - * DeleteDatasetRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * BoundingBoxMetricsEntry iouThreshold. + * @member {number} iouThreshold + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @instance */ - DeleteDatasetRequest.prototype.name = ""; + BoundingBoxMetricsEntry.prototype.iouThreshold = 0; /** - * Creates a new DeleteDatasetRequest instance using the specified properties. + * BoundingBoxMetricsEntry meanAveragePrecision. + * @member {number} meanAveragePrecision + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @instance + */ + BoundingBoxMetricsEntry.prototype.meanAveragePrecision = 0; + + /** + * BoundingBoxMetricsEntry confidenceMetricsEntries. + * @member {Array.} confidenceMetricsEntries + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @instance + */ + BoundingBoxMetricsEntry.prototype.confidenceMetricsEntries = $util.emptyArray; + + /** + * Creates a new BoundingBoxMetricsEntry instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest instance + * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry instance */ - DeleteDatasetRequest.create = function create(properties) { - return new DeleteDatasetRequest(properties); + BoundingBoxMetricsEntry.create = function create(properties) { + return new BoundingBoxMetricsEntry(properties); }; /** - * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. + * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} message DeleteDatasetRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDatasetRequest.encode = function encode(message, writer) { + BoundingBoxMetricsEntry.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.iouThreshold != null && message.hasOwnProperty("iouThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.iouThreshold); + if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.meanAveragePrecision); + if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) + $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. + * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} message DeleteDatasetRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { + BoundingBoxMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDatasetRequest message from the specified reader or buffer. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDatasetRequest.decode = function decode(reader, length) { + BoundingBoxMetricsEntry.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.automl.v1beta1.DeleteDatasetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.iouThreshold = reader.float(); + break; + case 2: + message.meanAveragePrecision = reader.float(); + break; + case 3: + if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) + message.confidenceMetricsEntries = []; + message.confidenceMetricsEntries.push($root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -24762,108 +25889,399 @@ }; /** - * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDatasetRequest.decodeDelimited = function decodeDelimited(reader) { + BoundingBoxMetricsEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDatasetRequest message. + * Verifies a BoundingBoxMetricsEntry message. * @function verify - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDatasetRequest.verify = function verify(message) { + BoundingBoxMetricsEntry.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.iouThreshold != null && message.hasOwnProperty("iouThreshold")) + if (typeof message.iouThreshold !== "number") + return "iouThreshold: number expected"; + if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) + if (typeof message.meanAveragePrecision !== "number") + return "meanAveragePrecision: number expected"; + if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { + if (!Array.isArray(message.confidenceMetricsEntries)) + return "confidenceMetricsEntries: array expected"; + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); + if (error) + return "confidenceMetricsEntries." + error; + } + } return null; }; /** - * Creates a DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry */ - DeleteDatasetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DeleteDatasetRequest) + BoundingBoxMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) return object; - var message = new $root.google.cloud.automl.v1beta1.DeleteDatasetRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry(); + if (object.iouThreshold != null) + message.iouThreshold = Number(object.iouThreshold); + if (object.meanAveragePrecision != null) + message.meanAveragePrecision = Number(object.meanAveragePrecision); + if (object.confidenceMetricsEntries) { + if (!Array.isArray(object.confidenceMetricsEntries)) + throw TypeError(".google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.confidenceMetricsEntries: array expected"); + message.confidenceMetricsEntries = []; + for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { + if (typeof object.confidenceMetricsEntries[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.confidenceMetricsEntries: object expected"); + message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); + } + } return message; }; /** - * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified. + * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.DeleteDatasetRequest} message DeleteDatasetRequest + * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} message BoundingBoxMetricsEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDatasetRequest.toObject = function toObject(message, options) { + BoundingBoxMetricsEntry.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.arrays || options.defaults) + object.confidenceMetricsEntries = []; + if (options.defaults) { + object.iouThreshold = 0; + object.meanAveragePrecision = 0; + } + if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) + object.iouThreshold = options.json && !isFinite(message.iouThreshold) ? String(message.iouThreshold) : message.iouThreshold; + if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) + object.meanAveragePrecision = options.json && !isFinite(message.meanAveragePrecision) ? String(message.meanAveragePrecision) : message.meanAveragePrecision; + if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { + object.confidenceMetricsEntries = []; + for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) + object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); + } return object; }; /** - * Converts this DeleteDatasetRequest to JSON. + * Converts this BoundingBoxMetricsEntry to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry * @instance * @returns {Object.} JSON object */ - DeleteDatasetRequest.prototype.toJSON = function toJSON() { + BoundingBoxMetricsEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDatasetRequest; + BoundingBoxMetricsEntry.ConfidenceMetricsEntry = (function() { + + /** + * Properties of a ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @interface IConfidenceMetricsEntry + * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold + * @property {number|null} [recall] ConfidenceMetricsEntry recall + * @property {number|null} [precision] ConfidenceMetricsEntry precision + * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score + */ + + /** + * Constructs a new ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @classdesc Represents a ConfidenceMetricsEntry. + * @implements IConfidenceMetricsEntry + * @constructor + * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set + */ + function ConfidenceMetricsEntry(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]]; + } + + /** + * ConfidenceMetricsEntry confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; + + /** + * ConfidenceMetricsEntry recall. + * @member {number} recall + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.recall = 0; + + /** + * ConfidenceMetricsEntry precision. + * @member {number} precision + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precision = 0; + + /** + * ConfidenceMetricsEntry f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1Score = 0; + + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance + */ + ConfidenceMetricsEntry.create = function create(properties) { + return new ConfidenceMetricsEntry(properties); + }; + + /** + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); + return writer; + }; + + /** + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.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.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.confidenceThreshold = reader.float(); + break; + case 2: + message.recall = reader.float(); + break; + case 3: + message.precision = reader.float(); + break; + case 4: + message.f1Score = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidenceMetricsEntry message. + * @function verify + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidenceMetricsEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; + return null; + }; + + /** + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry + */ + ConfidenceMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) + return object; + var message = new $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.recall != null) + message.recall = Number(object.recall); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); + return message; + }; + + /** + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @static + * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} message ConfidenceMetricsEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidenceMetricsEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.confidenceThreshold = 0; + object.recall = 0; + object.precision = 0; + object.f1Score = 0; + } + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + return object; + }; + + /** + * Converts this ConfidenceMetricsEntry to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + * @instance + * @returns {Object.} JSON object + */ + ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfidenceMetricsEntry; + })(); + + return BoundingBoxMetricsEntry; })(); - v1beta1.ImportDataRequest = (function() { + v1beta1.ImageObjectDetectionEvaluationMetrics = (function() { /** - * Properties of an ImportDataRequest. + * Properties of an ImageObjectDetectionEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @interface IImportDataRequest - * @property {string|null} [name] ImportDataRequest name - * @property {google.cloud.automl.v1beta1.IInputConfig|null} [inputConfig] ImportDataRequest inputConfig + * @interface IImageObjectDetectionEvaluationMetrics + * @property {number|null} [evaluatedBoundingBoxCount] ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount + * @property {Array.|null} [boundingBoxMetricsEntries] ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries + * @property {number|null} [boundingBoxMeanAveragePrecision] ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision */ /** - * Constructs a new ImportDataRequest. + * Constructs a new ImageObjectDetectionEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImportDataRequest. - * @implements IImportDataRequest + * @classdesc Represents an ImageObjectDetectionEvaluationMetrics. + * @implements IImageObjectDetectionEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1beta1.IImportDataRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set */ - function ImportDataRequest(properties) { + function ImageObjectDetectionEvaluationMetrics(properties) { + this.boundingBoxMetricsEntries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24871,88 +26289,104 @@ } /** - * ImportDataRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. + * @member {number} evaluatedBoundingBoxCount + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @instance */ - ImportDataRequest.prototype.name = ""; + ImageObjectDetectionEvaluationMetrics.prototype.evaluatedBoundingBoxCount = 0; /** - * ImportDataRequest inputConfig. - * @member {google.cloud.automl.v1beta1.IInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. + * @member {Array.} boundingBoxMetricsEntries + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @instance */ - ImportDataRequest.prototype.inputConfig = null; + ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMetricsEntries = $util.emptyArray; /** - * Creates a new ImportDataRequest instance using the specified properties. + * ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. + * @member {number} boundingBoxMeanAveragePrecision + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @instance + */ + ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMeanAveragePrecision = 0; + + /** + * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IImportDataRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest instance + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics instance */ - ImportDataRequest.create = function create(properties) { - return new ImportDataRequest(properties); + ImageObjectDetectionEvaluationMetrics.create = function create(properties) { + return new ImageObjectDetectionEvaluationMetrics(properties); }; /** - * Encodes the specified ImportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. + * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IImportDataRequest} message ImportDataRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDataRequest.encode = function encode(message, writer) { + ImageObjectDetectionEvaluationMetrics.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.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.evaluatedBoundingBoxCount); + if (message.boundingBoxMetricsEntries != null && message.boundingBoxMetricsEntries.length) + for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) + $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.encode(message.boundingBoxMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.boundingBoxMeanAveragePrecision); return writer; }; /** - * Encodes the specified ImportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. + * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IImportDataRequest} message ImportDataRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDataRequest message from the specified reader or buffer. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDataRequest.decode = function decode(reader, length) { + ImageObjectDetectionEvaluationMetrics.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.automl.v1beta1.ImportDataRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.evaluatedBoundingBoxCount = reader.int32(); + break; + case 2: + if (!(message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length)) + message.boundingBoxMetricsEntries = []; + message.boundingBoxMetricsEntries.push($root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.decode(reader, reader.uint32())); break; case 3: - message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.decode(reader, reader.uint32()); + message.boundingBoxMeanAveragePrecision = reader.float(); break; default: reader.skipType(tag & 7); @@ -24963,122 +26397,146 @@ }; /** - * Decodes an ImportDataRequest message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDataRequest.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDataRequest message. + * Verifies an ImageObjectDetectionEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDataRequest.verify = function verify(message) { + ImageObjectDetectionEvaluationMetrics.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.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.automl.v1beta1.InputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + if (!$util.isInteger(message.evaluatedBoundingBoxCount)) + return "evaluatedBoundingBoxCount: integer expected"; + if (message.boundingBoxMetricsEntries != null && message.hasOwnProperty("boundingBoxMetricsEntries")) { + if (!Array.isArray(message.boundingBoxMetricsEntries)) + return "boundingBoxMetricsEntries: array expected"; + for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify(message.boundingBoxMetricsEntries[i]); + if (error) + return "boundingBoxMetricsEntries." + error; + } } + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + if (typeof message.boundingBoxMeanAveragePrecision !== "number") + return "boundingBoxMeanAveragePrecision: number expected"; return null; }; /** - * Creates an ImportDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics */ - ImportDataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImportDataRequest) + ImageObjectDetectionEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1beta1.ImportDataRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ImportDataRequest.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.fromObject(object.inputConfig); + var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics(); + if (object.evaluatedBoundingBoxCount != null) + message.evaluatedBoundingBoxCount = object.evaluatedBoundingBoxCount | 0; + if (object.boundingBoxMetricsEntries) { + if (!Array.isArray(object.boundingBoxMetricsEntries)) + throw TypeError(".google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: array expected"); + message.boundingBoxMetricsEntries = []; + for (var i = 0; i < object.boundingBoxMetricsEntries.length; ++i) { + if (typeof object.boundingBoxMetricsEntries[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: object expected"); + message.boundingBoxMetricsEntries[i] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.fromObject(object.boundingBoxMetricsEntries[i]); + } } + if (object.boundingBoxMeanAveragePrecision != null) + message.boundingBoxMeanAveragePrecision = Number(object.boundingBoxMeanAveragePrecision); return message; }; /** - * Creates a plain object from an ImportDataRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.ImportDataRequest} message ImportDataRequest + * @param {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDataRequest.toObject = function toObject(message, options) { + ImageObjectDetectionEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.boundingBoxMetricsEntries = []; if (options.defaults) { - object.name = ""; - object.inputConfig = null; + object.evaluatedBoundingBoxCount = 0; + object.boundingBoxMeanAveragePrecision = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.toObject(message.inputConfig, options); + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + object.evaluatedBoundingBoxCount = message.evaluatedBoundingBoxCount; + if (message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length) { + object.boundingBoxMetricsEntries = []; + for (var j = 0; j < message.boundingBoxMetricsEntries.length; ++j) + object.boundingBoxMetricsEntries[j] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.toObject(message.boundingBoxMetricsEntries[j], options); + } + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + object.boundingBoxMeanAveragePrecision = options.json && !isFinite(message.boundingBoxMeanAveragePrecision) ? String(message.boundingBoxMeanAveragePrecision) : message.boundingBoxMeanAveragePrecision; return object; }; /** - * Converts this ImportDataRequest to JSON. + * Converts this ImageObjectDetectionEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics * @instance * @returns {Object.} JSON object */ - ImportDataRequest.prototype.toJSON = function toJSON() { + ImageObjectDetectionEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImportDataRequest; + return ImageObjectDetectionEvaluationMetrics; })(); - v1beta1.ExportDataRequest = (function() { + v1beta1.VideoObjectTrackingEvaluationMetrics = (function() { /** - * Properties of an ExportDataRequest. + * Properties of a VideoObjectTrackingEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @interface IExportDataRequest - * @property {string|null} [name] ExportDataRequest name - * @property {google.cloud.automl.v1beta1.IOutputConfig|null} [outputConfig] ExportDataRequest outputConfig + * @interface IVideoObjectTrackingEvaluationMetrics + * @property {number|null} [evaluatedFrameCount] VideoObjectTrackingEvaluationMetrics evaluatedFrameCount + * @property {number|null} [evaluatedBoundingBoxCount] VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount + * @property {Array.|null} [boundingBoxMetricsEntries] VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries + * @property {number|null} [boundingBoxMeanAveragePrecision] VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision */ /** - * Constructs a new ExportDataRequest. + * Constructs a new VideoObjectTrackingEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExportDataRequest. - * @implements IExportDataRequest + * @classdesc Represents a VideoObjectTrackingEvaluationMetrics. + * @implements IVideoObjectTrackingEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1beta1.IExportDataRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics=} [properties] Properties to set */ - function ExportDataRequest(properties) { + function VideoObjectTrackingEvaluationMetrics(properties) { + this.boundingBoxMetricsEntries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25086,88 +26544,117 @@ } /** - * ExportDataRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * VideoObjectTrackingEvaluationMetrics evaluatedFrameCount. + * @member {number} evaluatedFrameCount + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @instance */ - ExportDataRequest.prototype.name = ""; + VideoObjectTrackingEvaluationMetrics.prototype.evaluatedFrameCount = 0; /** - * ExportDataRequest outputConfig. - * @member {google.cloud.automl.v1beta1.IOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount. + * @member {number} evaluatedBoundingBoxCount + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @instance */ - ExportDataRequest.prototype.outputConfig = null; + VideoObjectTrackingEvaluationMetrics.prototype.evaluatedBoundingBoxCount = 0; /** - * Creates a new ExportDataRequest instance using the specified properties. + * VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries. + * @member {Array.} boundingBoxMetricsEntries + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @instance + */ + VideoObjectTrackingEvaluationMetrics.prototype.boundingBoxMetricsEntries = $util.emptyArray; + + /** + * VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision. + * @member {number} boundingBoxMeanAveragePrecision + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @instance + */ + VideoObjectTrackingEvaluationMetrics.prototype.boundingBoxMeanAveragePrecision = 0; + + /** + * Creates a new VideoObjectTrackingEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IExportDataRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest instance + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics instance */ - ExportDataRequest.create = function create(properties) { - return new ExportDataRequest(properties); + VideoObjectTrackingEvaluationMetrics.create = function create(properties) { + return new VideoObjectTrackingEvaluationMetrics(properties); }; /** - * Encodes the specified ExportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. + * Encodes the specified VideoObjectTrackingEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IExportDataRequest} message ExportDataRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics} message VideoObjectTrackingEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportDataRequest.encode = function encode(message, writer) { + VideoObjectTrackingEvaluationMetrics.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.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.automl.v1beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.evaluatedFrameCount != null && message.hasOwnProperty("evaluatedFrameCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.evaluatedFrameCount); + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluatedBoundingBoxCount); + if (message.boundingBoxMetricsEntries != null && message.boundingBoxMetricsEntries.length) + for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) + $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.encode(message.boundingBoxMetricsEntries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.boundingBoxMeanAveragePrecision); return writer; }; /** - * Encodes the specified ExportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. + * Encodes the specified VideoObjectTrackingEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IExportDataRequest} message ExportDataRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics} message VideoObjectTrackingEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + VideoObjectTrackingEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportDataRequest message from the specified reader or buffer. + * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportDataRequest.decode = function decode(reader, length) { + VideoObjectTrackingEvaluationMetrics.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.automl.v1beta1.ExportDataRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.evaluatedFrameCount = reader.int32(); break; - case 3: - message.outputConfig = $root.google.cloud.automl.v1beta1.OutputConfig.decode(reader, reader.uint32()); + case 2: + message.evaluatedBoundingBoxCount = reader.int32(); + break; + case 4: + if (!(message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length)) + message.boundingBoxMetricsEntries = []; + message.boundingBoxMetricsEntries.push($root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.decode(reader, reader.uint32())); + break; + case 6: + message.boundingBoxMeanAveragePrecision = reader.float(); break; default: reader.skipType(tag & 7); @@ -25178,121 +26665,151 @@ }; /** - * Decodes an ExportDataRequest message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportDataRequest.decodeDelimited = function decodeDelimited(reader) { + VideoObjectTrackingEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportDataRequest message. + * Verifies a VideoObjectTrackingEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportDataRequest.verify = function verify(message) { + VideoObjectTrackingEvaluationMetrics.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.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.automl.v1beta1.OutputConfig.verify(message.outputConfig); - if (error) - return "outputConfig." + error; + if (message.evaluatedFrameCount != null && message.hasOwnProperty("evaluatedFrameCount")) + if (!$util.isInteger(message.evaluatedFrameCount)) + return "evaluatedFrameCount: integer expected"; + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + if (!$util.isInteger(message.evaluatedBoundingBoxCount)) + return "evaluatedBoundingBoxCount: integer expected"; + if (message.boundingBoxMetricsEntries != null && message.hasOwnProperty("boundingBoxMetricsEntries")) { + if (!Array.isArray(message.boundingBoxMetricsEntries)) + return "boundingBoxMetricsEntries: array expected"; + for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify(message.boundingBoxMetricsEntries[i]); + if (error) + return "boundingBoxMetricsEntries." + error; + } } + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + if (typeof message.boundingBoxMeanAveragePrecision !== "number") + return "boundingBoxMeanAveragePrecision: number expected"; return null; }; /** - * Creates an ExportDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics */ - ExportDataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportDataRequest) + VideoObjectTrackingEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1beta1.ExportDataRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExportDataRequest.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.automl.v1beta1.OutputConfig.fromObject(object.outputConfig); + var message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics(); + if (object.evaluatedFrameCount != null) + message.evaluatedFrameCount = object.evaluatedFrameCount | 0; + if (object.evaluatedBoundingBoxCount != null) + message.evaluatedBoundingBoxCount = object.evaluatedBoundingBoxCount | 0; + if (object.boundingBoxMetricsEntries) { + if (!Array.isArray(object.boundingBoxMetricsEntries)) + throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.boundingBoxMetricsEntries: array expected"); + message.boundingBoxMetricsEntries = []; + for (var i = 0; i < object.boundingBoxMetricsEntries.length; ++i) { + if (typeof object.boundingBoxMetricsEntries[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.boundingBoxMetricsEntries: object expected"); + message.boundingBoxMetricsEntries[i] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.fromObject(object.boundingBoxMetricsEntries[i]); + } } + if (object.boundingBoxMeanAveragePrecision != null) + message.boundingBoxMeanAveragePrecision = Number(object.boundingBoxMeanAveragePrecision); return message; }; /** - * Creates a plain object from an ExportDataRequest message. Also converts values to other types if specified. + * Creates a plain object from a VideoObjectTrackingEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.ExportDataRequest} message ExportDataRequest + * @param {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} message VideoObjectTrackingEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportDataRequest.toObject = function toObject(message, options) { + VideoObjectTrackingEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.boundingBoxMetricsEntries = []; if (options.defaults) { - object.name = ""; - object.outputConfig = null; + object.evaluatedFrameCount = 0; + object.evaluatedBoundingBoxCount = 0; + object.boundingBoxMeanAveragePrecision = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.automl.v1beta1.OutputConfig.toObject(message.outputConfig, options); + if (message.evaluatedFrameCount != null && message.hasOwnProperty("evaluatedFrameCount")) + object.evaluatedFrameCount = message.evaluatedFrameCount; + if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) + object.evaluatedBoundingBoxCount = message.evaluatedBoundingBoxCount; + if (message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length) { + object.boundingBoxMetricsEntries = []; + for (var j = 0; j < message.boundingBoxMetricsEntries.length; ++j) + object.boundingBoxMetricsEntries[j] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.toObject(message.boundingBoxMetricsEntries[j], options); + } + if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) + object.boundingBoxMeanAveragePrecision = options.json && !isFinite(message.boundingBoxMeanAveragePrecision) ? String(message.boundingBoxMeanAveragePrecision) : message.boundingBoxMeanAveragePrecision; return object; }; /** - * Converts this ExportDataRequest to JSON. + * Converts this VideoObjectTrackingEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics * @instance * @returns {Object.} JSON object */ - ExportDataRequest.prototype.toJSON = function toJSON() { + VideoObjectTrackingEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportDataRequest; + return VideoObjectTrackingEvaluationMetrics; })(); - v1beta1.GetAnnotationSpecRequest = (function() { + v1beta1.NormalizedVertex = (function() { /** - * Properties of a GetAnnotationSpecRequest. + * Properties of a NormalizedVertex. * @memberof google.cloud.automl.v1beta1 - * @interface IGetAnnotationSpecRequest - * @property {string|null} [name] GetAnnotationSpecRequest name + * @interface INormalizedVertex + * @property {number|null} [x] NormalizedVertex x + * @property {number|null} [y] NormalizedVertex y */ /** - * Constructs a new GetAnnotationSpecRequest. + * Constructs a new NormalizedVertex. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GetAnnotationSpecRequest. - * @implements IGetAnnotationSpecRequest + * @classdesc Represents a NormalizedVertex. + * @implements INormalizedVertex * @constructor - * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.INormalizedVertex=} [properties] Properties to set */ - function GetAnnotationSpecRequest(properties) { + function NormalizedVertex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25300,75 +26817,88 @@ } /** - * GetAnnotationSpecRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * NormalizedVertex x. + * @member {number} x + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @instance */ - GetAnnotationSpecRequest.prototype.name = ""; + NormalizedVertex.prototype.x = 0; /** - * Creates a new GetAnnotationSpecRequest instance using the specified properties. + * NormalizedVertex y. + * @member {number} y + * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @instance + */ + NormalizedVertex.prototype.y = 0; + + /** + * Creates a new NormalizedVertex instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static - * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest instance + * @param {google.cloud.automl.v1beta1.INormalizedVertex=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex instance */ - GetAnnotationSpecRequest.create = function create(properties) { - return new GetAnnotationSpecRequest(properties); + NormalizedVertex.create = function create(properties) { + return new NormalizedVertex(properties); }; /** - * Encodes the specified GetAnnotationSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. + * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static - * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} message GetAnnotationSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAnnotationSpecRequest.encode = function encode(message, writer) { + NormalizedVertex.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.x != null && message.hasOwnProperty("x")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); + if (message.y != null && message.hasOwnProperty("y")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); return writer; }; /** - * Encodes the specified GetAnnotationSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. + * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static - * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} message GetAnnotationSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAnnotationSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer. + * Decodes a NormalizedVertex message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest + * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAnnotationSpecRequest.decode = function decode(reader, length) { + NormalizedVertex.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.automl.v1beta1.GetAnnotationSpecRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.NormalizedVertex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.x = reader.float(); + break; + case 2: + message.y = reader.float(); break; default: reader.skipType(tag & 7); @@ -25379,108 +26909,117 @@ }; /** - * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest + * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAnnotationSpecRequest.decodeDelimited = function decodeDelimited(reader) { + NormalizedVertex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAnnotationSpecRequest message. + * Verifies a NormalizedVertex message. * @function verify - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAnnotationSpecRequest.verify = function verify(message) { + NormalizedVertex.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.x != null && message.hasOwnProperty("x")) + if (typeof message.x !== "number") + return "x: number expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (typeof message.y !== "number") + return "y: number expected"; return null; }; /** - * Creates a GetAnnotationSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest + * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex */ - GetAnnotationSpecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GetAnnotationSpecRequest) + NormalizedVertex.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.NormalizedVertex) return object; - var message = new $root.google.cloud.automl.v1beta1.GetAnnotationSpecRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.automl.v1beta1.NormalizedVertex(); + if (object.x != null) + message.x = Number(object.x); + if (object.y != null) + message.y = Number(object.y); return message; }; /** - * Creates a plain object from a GetAnnotationSpecRequest message. Also converts values to other types if specified. + * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @static - * @param {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} message GetAnnotationSpecRequest + * @param {google.cloud.automl.v1beta1.NormalizedVertex} message NormalizedVertex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAnnotationSpecRequest.toObject = function toObject(message, options) { + NormalizedVertex.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.x = 0; + object.y = 0; + } + if (message.x != null && message.hasOwnProperty("x")) + object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; return object; }; /** - * Converts this GetAnnotationSpecRequest to JSON. + * Converts this NormalizedVertex to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @memberof google.cloud.automl.v1beta1.NormalizedVertex * @instance * @returns {Object.} JSON object */ - GetAnnotationSpecRequest.prototype.toJSON = function toJSON() { + NormalizedVertex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetAnnotationSpecRequest; + return NormalizedVertex; })(); - v1beta1.GetTableSpecRequest = (function() { + v1beta1.BoundingPoly = (function() { /** - * Properties of a GetTableSpecRequest. + * Properties of a BoundingPoly. * @memberof google.cloud.automl.v1beta1 - * @interface IGetTableSpecRequest - * @property {string|null} [name] GetTableSpecRequest name - * @property {google.protobuf.IFieldMask|null} [fieldMask] GetTableSpecRequest fieldMask + * @interface IBoundingPoly + * @property {Array.|null} [normalizedVertices] BoundingPoly normalizedVertices */ /** - * Constructs a new GetTableSpecRequest. + * Constructs a new BoundingPoly. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GetTableSpecRequest. - * @implements IGetTableSpecRequest + * @classdesc Represents a BoundingPoly. + * @implements IBoundingPoly * @constructor - * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBoundingPoly=} [properties] Properties to set */ - function GetTableSpecRequest(properties) { + function BoundingPoly(properties) { + this.normalizedVertices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25488,88 +27027,78 @@ } /** - * GetTableSpecRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest - * @instance - */ - GetTableSpecRequest.prototype.name = ""; - - /** - * GetTableSpecRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * BoundingPoly normalizedVertices. + * @member {Array.} normalizedVertices + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @instance */ - GetTableSpecRequest.prototype.fieldMask = null; + BoundingPoly.prototype.normalizedVertices = $util.emptyArray; /** - * Creates a new GetTableSpecRequest instance using the specified properties. + * Creates a new BoundingPoly instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static - * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest instance + * @param {google.cloud.automl.v1beta1.IBoundingPoly=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly instance */ - GetTableSpecRequest.create = function create(properties) { - return new GetTableSpecRequest(properties); + BoundingPoly.create = function create(properties) { + return new BoundingPoly(properties); }; /** - * Encodes the specified GetTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. + * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static - * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} message GetTableSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTableSpecRequest.encode = function encode(message, writer) { + BoundingPoly.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.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.normalizedVertices != null && message.normalizedVertices.length) + for (var i = 0; i < message.normalizedVertices.length; ++i) + $root.google.cloud.automl.v1beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. + * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static - * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} message GetTableSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTableSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTableSpecRequest message from the specified reader or buffer. + * Decodes a BoundingPoly message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest + * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTableSpecRequest.decode = function decode(reader, length) { + BoundingPoly.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.automl.v1beta1.GetTableSpecRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BoundingPoly(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; case 2: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.normalizedVertices && message.normalizedVertices.length)) + message.normalizedVertices = []; + message.normalizedVertices.push($root.google.cloud.automl.v1beta1.NormalizedVertex.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -25580,125 +27109,130 @@ }; /** - * Decodes a GetTableSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest + * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTableSpecRequest.decodeDelimited = function decodeDelimited(reader) { + BoundingPoly.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTableSpecRequest message. + * Verifies a BoundingPoly message. * @function verify - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTableSpecRequest.verify = function verify(message) { + BoundingPoly.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); - if (error) - return "fieldMask." + error; + if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { + if (!Array.isArray(message.normalizedVertices)) + return "normalizedVertices: array expected"; + for (var i = 0; i < message.normalizedVertices.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.NormalizedVertex.verify(message.normalizedVertices[i]); + if (error) + return "normalizedVertices." + error; + } } return null; }; /** - * Creates a GetTableSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest + * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly */ - GetTableSpecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GetTableSpecRequest) + BoundingPoly.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BoundingPoly) return object; - var message = new $root.google.cloud.automl.v1beta1.GetTableSpecRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.automl.v1beta1.GetTableSpecRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + var message = new $root.google.cloud.automl.v1beta1.BoundingPoly(); + if (object.normalizedVertices) { + if (!Array.isArray(object.normalizedVertices)) + throw TypeError(".google.cloud.automl.v1beta1.BoundingPoly.normalizedVertices: array expected"); + message.normalizedVertices = []; + for (var i = 0; i < object.normalizedVertices.length; ++i) { + if (typeof object.normalizedVertices[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BoundingPoly.normalizedVertices: object expected"); + message.normalizedVertices[i] = $root.google.cloud.automl.v1beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]); + } } return message; }; /** - * Creates a plain object from a GetTableSpecRequest message. Also converts values to other types if specified. + * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @static - * @param {google.cloud.automl.v1beta1.GetTableSpecRequest} message GetTableSpecRequest + * @param {google.cloud.automl.v1beta1.BoundingPoly} message BoundingPoly * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTableSpecRequest.toObject = function toObject(message, options) { + BoundingPoly.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.fieldMask = null; + if (options.arrays || options.defaults) + object.normalizedVertices = []; + if (message.normalizedVertices && message.normalizedVertices.length) { + object.normalizedVertices = []; + for (var j = 0; j < message.normalizedVertices.length; ++j) + object.normalizedVertices[j] = $root.google.cloud.automl.v1beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); return object; }; /** - * Converts this GetTableSpecRequest to JSON. + * Converts this BoundingPoly to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @memberof google.cloud.automl.v1beta1.BoundingPoly * @instance * @returns {Object.} JSON object */ - GetTableSpecRequest.prototype.toJSON = function toJSON() { + BoundingPoly.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTableSpecRequest; + return BoundingPoly; })(); - v1beta1.ListTableSpecsRequest = (function() { + v1beta1.TablesDatasetMetadata = (function() { /** - * Properties of a ListTableSpecsRequest. + * Properties of a TablesDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IListTableSpecsRequest - * @property {string|null} [parent] ListTableSpecsRequest parent - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListTableSpecsRequest fieldMask - * @property {string|null} [filter] ListTableSpecsRequest filter - * @property {number|null} [pageSize] ListTableSpecsRequest pageSize - * @property {string|null} [pageToken] ListTableSpecsRequest pageToken + * @interface ITablesDatasetMetadata + * @property {string|null} [primaryTableSpecId] TablesDatasetMetadata primaryTableSpecId + * @property {string|null} [targetColumnSpecId] TablesDatasetMetadata targetColumnSpecId + * @property {string|null} [weightColumnSpecId] TablesDatasetMetadata weightColumnSpecId + * @property {string|null} [mlUseColumnSpecId] TablesDatasetMetadata mlUseColumnSpecId + * @property {Object.|null} [targetColumnCorrelations] TablesDatasetMetadata targetColumnCorrelations + * @property {google.protobuf.ITimestamp|null} [statsUpdateTime] TablesDatasetMetadata statsUpdateTime */ /** - * Constructs a new ListTableSpecsRequest. + * Constructs a new TablesDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListTableSpecsRequest. - * @implements IListTableSpecsRequest + * @classdesc Represents a TablesDatasetMetadata. + * @implements ITablesDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata=} [properties] Properties to set */ - function ListTableSpecsRequest(properties) { + function TablesDatasetMetadata(properties) { + this.targetColumnCorrelations = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25706,127 +27240,148 @@ } /** - * ListTableSpecsRequest parent. - * @member {string} parent - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * TablesDatasetMetadata primaryTableSpecId. + * @member {string} primaryTableSpecId + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @instance */ - ListTableSpecsRequest.prototype.parent = ""; + TablesDatasetMetadata.prototype.primaryTableSpecId = ""; /** - * ListTableSpecsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * TablesDatasetMetadata targetColumnSpecId. + * @member {string} targetColumnSpecId + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @instance */ - ListTableSpecsRequest.prototype.fieldMask = null; + TablesDatasetMetadata.prototype.targetColumnSpecId = ""; /** - * ListTableSpecsRequest filter. - * @member {string} filter - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * TablesDatasetMetadata weightColumnSpecId. + * @member {string} weightColumnSpecId + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @instance */ - ListTableSpecsRequest.prototype.filter = ""; + TablesDatasetMetadata.prototype.weightColumnSpecId = ""; /** - * ListTableSpecsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * TablesDatasetMetadata mlUseColumnSpecId. + * @member {string} mlUseColumnSpecId + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @instance */ - ListTableSpecsRequest.prototype.pageSize = 0; + TablesDatasetMetadata.prototype.mlUseColumnSpecId = ""; /** - * ListTableSpecsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * TablesDatasetMetadata targetColumnCorrelations. + * @member {Object.} targetColumnCorrelations + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @instance */ - ListTableSpecsRequest.prototype.pageToken = ""; + TablesDatasetMetadata.prototype.targetColumnCorrelations = $util.emptyObject; /** - * Creates a new ListTableSpecsRequest instance using the specified properties. + * TablesDatasetMetadata statsUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} statsUpdateTime + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @instance + */ + TablesDatasetMetadata.prototype.statsUpdateTime = null; + + /** + * Creates a new TablesDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest instance + * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata instance */ - ListTableSpecsRequest.create = function create(properties) { - return new ListTableSpecsRequest(properties); + TablesDatasetMetadata.create = function create(properties) { + return new TablesDatasetMetadata(properties); }; /** - * Encodes the specified ListTableSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. + * Encodes the specified TablesDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} message ListTableSpecsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata} message TablesDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTableSpecsRequest.encode = function encode(message, writer) { + TablesDatasetMetadata.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.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.primaryTableSpecId != null && message.hasOwnProperty("primaryTableSpecId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.primaryTableSpecId); + if (message.targetColumnSpecId != null && message.hasOwnProperty("targetColumnSpecId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetColumnSpecId); + if (message.weightColumnSpecId != null && message.hasOwnProperty("weightColumnSpecId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.weightColumnSpecId); + if (message.mlUseColumnSpecId != null && message.hasOwnProperty("mlUseColumnSpecId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mlUseColumnSpecId); + if (message.targetColumnCorrelations != null && message.hasOwnProperty("targetColumnCorrelations")) + for (var keys = Object.keys(message.targetColumnCorrelations), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.automl.v1beta1.CorrelationStats.encode(message.targetColumnCorrelations[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.statsUpdateTime != null && message.hasOwnProperty("statsUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.statsUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListTableSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. + * Encodes the specified TablesDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} message ListTableSpecsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata} message TablesDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTableSpecsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TablesDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTableSpecsRequest message from the specified reader or buffer. + * Decodes a TablesDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest + * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTableSpecsRequest.decode = function decode(reader, length) { + TablesDatasetMetadata.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.automl.v1beta1.ListTableSpecsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TablesDatasetMetadata(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.primaryTableSpecId = reader.string(); break; case 2: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.targetColumnSpecId = reader.string(); break; case 3: - message.filter = reader.string(); + message.weightColumnSpecId = reader.string(); break; case 4: - message.pageSize = reader.int32(); + message.mlUseColumnSpecId = reader.string(); break; case 6: - message.pageToken = reader.string(); + reader.skip().pos++; + if (message.targetColumnCorrelations === $util.emptyObject) + message.targetColumnCorrelations = {}; + key = reader.string(); + reader.pos++; + message.targetColumnCorrelations[key] = $root.google.cloud.automl.v1beta1.CorrelationStats.decode(reader, reader.uint32()); + break; + case 7: + message.statsUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -25837,147 +27392,183 @@ }; /** - * Decodes a ListTableSpecsRequest message from the specified reader or buffer, length delimited. + * Decodes a TablesDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest + * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTableSpecsRequest.decodeDelimited = function decodeDelimited(reader) { + TablesDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTableSpecsRequest message. + * Verifies a TablesDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTableSpecsRequest.verify = function verify(message) { + TablesDatasetMetadata.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (message.primaryTableSpecId != null && message.hasOwnProperty("primaryTableSpecId")) + if (!$util.isString(message.primaryTableSpecId)) + return "primaryTableSpecId: string expected"; + if (message.targetColumnSpecId != null && message.hasOwnProperty("targetColumnSpecId")) + if (!$util.isString(message.targetColumnSpecId)) + return "targetColumnSpecId: string expected"; + if (message.weightColumnSpecId != null && message.hasOwnProperty("weightColumnSpecId")) + if (!$util.isString(message.weightColumnSpecId)) + return "weightColumnSpecId: string expected"; + if (message.mlUseColumnSpecId != null && message.hasOwnProperty("mlUseColumnSpecId")) + if (!$util.isString(message.mlUseColumnSpecId)) + return "mlUseColumnSpecId: string expected"; + if (message.targetColumnCorrelations != null && message.hasOwnProperty("targetColumnCorrelations")) { + if (!$util.isObject(message.targetColumnCorrelations)) + return "targetColumnCorrelations: object expected"; + var key = Object.keys(message.targetColumnCorrelations); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.CorrelationStats.verify(message.targetColumnCorrelations[key[i]]); + if (error) + return "targetColumnCorrelations." + error; + } + } + if (message.statsUpdateTime != null && message.hasOwnProperty("statsUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.statsUpdateTime); if (error) - return "fieldMask." + error; + return "statsUpdateTime." + error; } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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 ListTableSpecsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TablesDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest + * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata */ - ListTableSpecsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListTableSpecsRequest) + TablesDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TablesDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.ListTableSpecsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ListTableSpecsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + var message = new $root.google.cloud.automl.v1beta1.TablesDatasetMetadata(); + if (object.primaryTableSpecId != null) + message.primaryTableSpecId = String(object.primaryTableSpecId); + if (object.targetColumnSpecId != null) + message.targetColumnSpecId = String(object.targetColumnSpecId); + if (object.weightColumnSpecId != null) + message.weightColumnSpecId = String(object.weightColumnSpecId); + if (object.mlUseColumnSpecId != null) + message.mlUseColumnSpecId = String(object.mlUseColumnSpecId); + if (object.targetColumnCorrelations) { + if (typeof object.targetColumnCorrelations !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesDatasetMetadata.targetColumnCorrelations: object expected"); + message.targetColumnCorrelations = {}; + for (var keys = Object.keys(object.targetColumnCorrelations), i = 0; i < keys.length; ++i) { + if (typeof object.targetColumnCorrelations[keys[i]] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesDatasetMetadata.targetColumnCorrelations: object expected"); + message.targetColumnCorrelations[keys[i]] = $root.google.cloud.automl.v1beta1.CorrelationStats.fromObject(object.targetColumnCorrelations[keys[i]]); + } + } + if (object.statsUpdateTime != null) { + if (typeof object.statsUpdateTime !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesDatasetMetadata.statsUpdateTime: object expected"); + message.statsUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.statsUpdateTime); } - if (object.filter != null) - message.filter = String(object.filter); - 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 ListTableSpecsRequest message. Also converts values to other types if specified. + * Creates a plain object from a TablesDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.ListTableSpecsRequest} message ListTableSpecsRequest + * @param {google.cloud.automl.v1beta1.TablesDatasetMetadata} message TablesDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTableSpecsRequest.toObject = function toObject(message, options) { + TablesDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.targetColumnCorrelations = {}; if (options.defaults) { - object.parent = ""; - object.fieldMask = null; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.primaryTableSpecId = ""; + object.targetColumnSpecId = ""; + object.weightColumnSpecId = ""; + object.mlUseColumnSpecId = ""; + object.statsUpdateTime = null; + } + if (message.primaryTableSpecId != null && message.hasOwnProperty("primaryTableSpecId")) + object.primaryTableSpecId = message.primaryTableSpecId; + if (message.targetColumnSpecId != null && message.hasOwnProperty("targetColumnSpecId")) + object.targetColumnSpecId = message.targetColumnSpecId; + if (message.weightColumnSpecId != null && message.hasOwnProperty("weightColumnSpecId")) + object.weightColumnSpecId = message.weightColumnSpecId; + if (message.mlUseColumnSpecId != null && message.hasOwnProperty("mlUseColumnSpecId")) + object.mlUseColumnSpecId = message.mlUseColumnSpecId; + var keys2; + if (message.targetColumnCorrelations && (keys2 = Object.keys(message.targetColumnCorrelations)).length) { + object.targetColumnCorrelations = {}; + for (var j = 0; j < keys2.length; ++j) + object.targetColumnCorrelations[keys2[j]] = $root.google.cloud.automl.v1beta1.CorrelationStats.toObject(message.targetColumnCorrelations[keys2[j]], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.statsUpdateTime != null && message.hasOwnProperty("statsUpdateTime")) + object.statsUpdateTime = $root.google.protobuf.Timestamp.toObject(message.statsUpdateTime, options); return object; }; /** - * Converts this ListTableSpecsRequest to JSON. + * Converts this TablesDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest + * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata * @instance * @returns {Object.} JSON object */ - ListTableSpecsRequest.prototype.toJSON = function toJSON() { + TablesDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTableSpecsRequest; + return TablesDatasetMetadata; })(); - v1beta1.ListTableSpecsResponse = (function() { + v1beta1.TablesModelMetadata = (function() { /** - * Properties of a ListTableSpecsResponse. + * Properties of a TablesModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IListTableSpecsResponse - * @property {Array.|null} [tableSpecs] ListTableSpecsResponse tableSpecs - * @property {string|null} [nextPageToken] ListTableSpecsResponse nextPageToken + * @interface ITablesModelMetadata + * @property {number|null} [optimizationObjectiveRecallValue] TablesModelMetadata optimizationObjectiveRecallValue + * @property {number|null} [optimizationObjectivePrecisionValue] TablesModelMetadata optimizationObjectivePrecisionValue + * @property {google.cloud.automl.v1beta1.IColumnSpec|null} [targetColumnSpec] TablesModelMetadata targetColumnSpec + * @property {Array.|null} [inputFeatureColumnSpecs] TablesModelMetadata inputFeatureColumnSpecs + * @property {string|null} [optimizationObjective] TablesModelMetadata optimizationObjective + * @property {Array.|null} [tablesModelColumnInfo] TablesModelMetadata tablesModelColumnInfo + * @property {number|Long|null} [trainBudgetMilliNodeHours] TablesModelMetadata trainBudgetMilliNodeHours + * @property {number|Long|null} [trainCostMilliNodeHours] TablesModelMetadata trainCostMilliNodeHours + * @property {boolean|null} [disableEarlyStopping] TablesModelMetadata disableEarlyStopping */ /** - * Constructs a new ListTableSpecsResponse. + * Constructs a new TablesModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListTableSpecsResponse. - * @implements IListTableSpecsResponse + * @classdesc Represents a TablesModelMetadata. + * @implements ITablesModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITablesModelMetadata=} [properties] Properties to set */ - function ListTableSpecsResponse(properties) { - this.tableSpecs = []; + function TablesModelMetadata(properties) { + this.inputFeatureColumnSpecs = []; + this.tablesModelColumnInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25985,91 +27576,199 @@ } /** - * ListTableSpecsResponse tableSpecs. - * @member {Array.} tableSpecs - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * TablesModelMetadata optimizationObjectiveRecallValue. + * @member {number} optimizationObjectiveRecallValue + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @instance */ - ListTableSpecsResponse.prototype.tableSpecs = $util.emptyArray; + TablesModelMetadata.prototype.optimizationObjectiveRecallValue = 0; /** - * ListTableSpecsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * TablesModelMetadata optimizationObjectivePrecisionValue. + * @member {number} optimizationObjectivePrecisionValue + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @instance */ - ListTableSpecsResponse.prototype.nextPageToken = ""; + TablesModelMetadata.prototype.optimizationObjectivePrecisionValue = 0; /** - * Creates a new ListTableSpecsResponse instance using the specified properties. + * TablesModelMetadata targetColumnSpec. + * @member {google.cloud.automl.v1beta1.IColumnSpec|null|undefined} targetColumnSpec + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + TablesModelMetadata.prototype.targetColumnSpec = null; + + /** + * TablesModelMetadata inputFeatureColumnSpecs. + * @member {Array.} inputFeatureColumnSpecs + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + TablesModelMetadata.prototype.inputFeatureColumnSpecs = $util.emptyArray; + + /** + * TablesModelMetadata optimizationObjective. + * @member {string} optimizationObjective + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + TablesModelMetadata.prototype.optimizationObjective = ""; + + /** + * TablesModelMetadata tablesModelColumnInfo. + * @member {Array.} tablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + TablesModelMetadata.prototype.tablesModelColumnInfo = $util.emptyArray; + + /** + * TablesModelMetadata trainBudgetMilliNodeHours. + * @member {number|Long} trainBudgetMilliNodeHours + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + TablesModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TablesModelMetadata trainCostMilliNodeHours. + * @member {number|Long} trainCostMilliNodeHours + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + TablesModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TablesModelMetadata disableEarlyStopping. + * @member {boolean} disableEarlyStopping + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + TablesModelMetadata.prototype.disableEarlyStopping = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TablesModelMetadata additionalOptimizationObjectiveConfig. + * @member {"optimizationObjectiveRecallValue"|"optimizationObjectivePrecisionValue"|undefined} additionalOptimizationObjectiveConfig + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @instance + */ + Object.defineProperty(TablesModelMetadata.prototype, "additionalOptimizationObjectiveConfig", { + get: $util.oneOfGetter($oneOfFields = ["optimizationObjectiveRecallValue", "optimizationObjectivePrecisionValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TablesModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse instance + * @param {google.cloud.automl.v1beta1.ITablesModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata instance */ - ListTableSpecsResponse.create = function create(properties) { - return new ListTableSpecsResponse(properties); + TablesModelMetadata.create = function create(properties) { + return new TablesModelMetadata(properties); }; /** - * Encodes the specified ListTableSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. + * Encodes the specified TablesModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse} message ListTableSpecsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesModelMetadata} message TablesModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTableSpecsResponse.encode = function encode(message, writer) { + TablesModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tableSpecs != null && message.tableSpecs.length) - for (var i = 0; i < message.tableSpecs.length; ++i) - $root.google.cloud.automl.v1beta1.TableSpec.encode(message.tableSpecs[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.targetColumnSpec != null && message.hasOwnProperty("targetColumnSpec")) + $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.targetColumnSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inputFeatureColumnSpecs != null && message.inputFeatureColumnSpecs.length) + for (var i = 0; i < message.inputFeatureColumnSpecs.length; ++i) + $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.inputFeatureColumnSpecs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.optimizationObjective != null && message.hasOwnProperty("optimizationObjective")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.optimizationObjective); + if (message.tablesModelColumnInfo != null && message.tablesModelColumnInfo.length) + for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) + $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.encode(message.tablesModelColumnInfo[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.trainBudgetMilliNodeHours); + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.trainCostMilliNodeHours); + if (message.disableEarlyStopping != null && message.hasOwnProperty("disableEarlyStopping")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.disableEarlyStopping); + if (message.optimizationObjectiveRecallValue != null && message.hasOwnProperty("optimizationObjectiveRecallValue")) + writer.uint32(/* id 17, wireType 5 =*/141).float(message.optimizationObjectiveRecallValue); + if (message.optimizationObjectivePrecisionValue != null && message.hasOwnProperty("optimizationObjectivePrecisionValue")) + writer.uint32(/* id 18, wireType 5 =*/149).float(message.optimizationObjectivePrecisionValue); return writer; }; /** - * Encodes the specified ListTableSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. + * Encodes the specified TablesModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse} message ListTableSpecsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesModelMetadata} message TablesModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTableSpecsResponse.encodeDelimited = function encodeDelimited(message, writer) { + TablesModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTableSpecsResponse message from the specified reader or buffer. + * Decodes a TablesModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse + * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTableSpecsResponse.decode = function decode(reader, length) { + TablesModelMetadata.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.automl.v1beta1.ListTableSpecsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TablesModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.tableSpecs && message.tableSpecs.length)) - message.tableSpecs = []; - message.tableSpecs.push($root.google.cloud.automl.v1beta1.TableSpec.decode(reader, reader.uint32())); + case 17: + message.optimizationObjectiveRecallValue = reader.float(); + break; + case 18: + message.optimizationObjectivePrecisionValue = reader.float(); break; case 2: - message.nextPageToken = reader.string(); + message.targetColumnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.inputFeatureColumnSpecs && message.inputFeatureColumnSpecs.length)) + message.inputFeatureColumnSpecs = []; + message.inputFeatureColumnSpecs.push($root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32())); + break; + case 4: + message.optimizationObjective = reader.string(); + break; + case 5: + if (!(message.tablesModelColumnInfo && message.tablesModelColumnInfo.length)) + message.tablesModelColumnInfo = []; + message.tablesModelColumnInfo.push($root.google.cloud.automl.v1beta1.TablesModelColumnInfo.decode(reader, reader.uint32())); + break; + case 6: + message.trainBudgetMilliNodeHours = reader.int64(); + break; + case 7: + message.trainCostMilliNodeHours = reader.int64(); + break; + case 12: + message.disableEarlyStopping = reader.bool(); break; default: reader.skipType(tag & 7); @@ -26080,134 +27779,257 @@ }; /** - * Decodes a ListTableSpecsResponse message from the specified reader or buffer, length delimited. + * Decodes a TablesModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse + * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTableSpecsResponse.decodeDelimited = function decodeDelimited(reader) { + TablesModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTableSpecsResponse message. + * Verifies a TablesModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTableSpecsResponse.verify = function verify(message) { + TablesModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tableSpecs != null && message.hasOwnProperty("tableSpecs")) { - if (!Array.isArray(message.tableSpecs)) - return "tableSpecs: array expected"; - for (var i = 0; i < message.tableSpecs.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.TableSpec.verify(message.tableSpecs[i]); + var properties = {}; + if (message.optimizationObjectiveRecallValue != null && message.hasOwnProperty("optimizationObjectiveRecallValue")) { + properties.additionalOptimizationObjectiveConfig = 1; + if (typeof message.optimizationObjectiveRecallValue !== "number") + return "optimizationObjectiveRecallValue: number expected"; + } + if (message.optimizationObjectivePrecisionValue != null && message.hasOwnProperty("optimizationObjectivePrecisionValue")) { + if (properties.additionalOptimizationObjectiveConfig === 1) + return "additionalOptimizationObjectiveConfig: multiple values"; + properties.additionalOptimizationObjectiveConfig = 1; + if (typeof message.optimizationObjectivePrecisionValue !== "number") + return "optimizationObjectivePrecisionValue: number expected"; + } + if (message.targetColumnSpec != null && message.hasOwnProperty("targetColumnSpec")) { + var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.targetColumnSpec); + if (error) + return "targetColumnSpec." + error; + } + if (message.inputFeatureColumnSpecs != null && message.hasOwnProperty("inputFeatureColumnSpecs")) { + if (!Array.isArray(message.inputFeatureColumnSpecs)) + return "inputFeatureColumnSpecs: array expected"; + for (var i = 0; i < message.inputFeatureColumnSpecs.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.inputFeatureColumnSpecs[i]); if (error) - return "tableSpecs." + error; + return "inputFeatureColumnSpecs." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.optimizationObjective != null && message.hasOwnProperty("optimizationObjective")) + if (!$util.isString(message.optimizationObjective)) + return "optimizationObjective: string expected"; + if (message.tablesModelColumnInfo != null && message.hasOwnProperty("tablesModelColumnInfo")) { + if (!Array.isArray(message.tablesModelColumnInfo)) + return "tablesModelColumnInfo: array expected"; + for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.verify(message.tablesModelColumnInfo[i]); + if (error) + return "tablesModelColumnInfo." + error; + } + } + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) + return "trainBudgetMilliNodeHours: integer|Long expected"; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) + return "trainCostMilliNodeHours: integer|Long expected"; + if (message.disableEarlyStopping != null && message.hasOwnProperty("disableEarlyStopping")) + if (typeof message.disableEarlyStopping !== "boolean") + return "disableEarlyStopping: boolean expected"; return null; }; /** - * Creates a ListTableSpecsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TablesModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse + * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata */ - ListTableSpecsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListTableSpecsResponse) + TablesModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TablesModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.ListTableSpecsResponse(); - if (object.tableSpecs) { - if (!Array.isArray(object.tableSpecs)) - throw TypeError(".google.cloud.automl.v1beta1.ListTableSpecsResponse.tableSpecs: array expected"); - message.tableSpecs = []; - for (var i = 0; i < object.tableSpecs.length; ++i) { - if (typeof object.tableSpecs[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ListTableSpecsResponse.tableSpecs: object expected"); - message.tableSpecs[i] = $root.google.cloud.automl.v1beta1.TableSpec.fromObject(object.tableSpecs[i]); + var message = new $root.google.cloud.automl.v1beta1.TablesModelMetadata(); + if (object.optimizationObjectiveRecallValue != null) + message.optimizationObjectiveRecallValue = Number(object.optimizationObjectiveRecallValue); + if (object.optimizationObjectivePrecisionValue != null) + message.optimizationObjectivePrecisionValue = Number(object.optimizationObjectivePrecisionValue); + if (object.targetColumnSpec != null) { + if (typeof object.targetColumnSpec !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.targetColumnSpec: object expected"); + message.targetColumnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.targetColumnSpec); + } + if (object.inputFeatureColumnSpecs) { + if (!Array.isArray(object.inputFeatureColumnSpecs)) + throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.inputFeatureColumnSpecs: array expected"); + message.inputFeatureColumnSpecs = []; + for (var i = 0; i < object.inputFeatureColumnSpecs.length; ++i) { + if (typeof object.inputFeatureColumnSpecs[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.inputFeatureColumnSpecs: object expected"); + message.inputFeatureColumnSpecs[i] = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.inputFeatureColumnSpecs[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.optimizationObjective != null) + message.optimizationObjective = String(object.optimizationObjective); + if (object.tablesModelColumnInfo) { + if (!Array.isArray(object.tablesModelColumnInfo)) + throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.tablesModelColumnInfo: array expected"); + message.tablesModelColumnInfo = []; + for (var i = 0; i < object.tablesModelColumnInfo.length; ++i) { + if (typeof object.tablesModelColumnInfo[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.tablesModelColumnInfo: object expected"); + message.tablesModelColumnInfo[i] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.fromObject(object.tablesModelColumnInfo[i]); + } + } + if (object.trainBudgetMilliNodeHours != null) + if ($util.Long) + (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; + else if (typeof object.trainBudgetMilliNodeHours === "string") + message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); + else if (typeof object.trainBudgetMilliNodeHours === "number") + message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; + else if (typeof object.trainBudgetMilliNodeHours === "object") + message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); + if (object.trainCostMilliNodeHours != null) + if ($util.Long) + (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; + else if (typeof object.trainCostMilliNodeHours === "string") + message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); + else if (typeof object.trainCostMilliNodeHours === "number") + message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; + else if (typeof object.trainCostMilliNodeHours === "object") + message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); + if (object.disableEarlyStopping != null) + message.disableEarlyStopping = Boolean(object.disableEarlyStopping); return message; }; /** - * Creates a plain object from a ListTableSpecsResponse message. Also converts values to other types if specified. + * Creates a plain object from a TablesModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @static - * @param {google.cloud.automl.v1beta1.ListTableSpecsResponse} message ListTableSpecsResponse + * @param {google.cloud.automl.v1beta1.TablesModelMetadata} message TablesModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTableSpecsResponse.toObject = function toObject(message, options) { + TablesModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tableSpecs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.tableSpecs && message.tableSpecs.length) { - object.tableSpecs = []; - for (var j = 0; j < message.tableSpecs.length; ++j) - object.tableSpecs[j] = $root.google.cloud.automl.v1beta1.TableSpec.toObject(message.tableSpecs[j], options); + if (options.arrays || options.defaults) { + object.inputFeatureColumnSpecs = []; + object.tablesModelColumnInfo = []; + } + if (options.defaults) { + object.targetColumnSpec = null; + object.optimizationObjective = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; + object.disableEarlyStopping = false; + } + if (message.targetColumnSpec != null && message.hasOwnProperty("targetColumnSpec")) + object.targetColumnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.targetColumnSpec, options); + if (message.inputFeatureColumnSpecs && message.inputFeatureColumnSpecs.length) { + object.inputFeatureColumnSpecs = []; + for (var j = 0; j < message.inputFeatureColumnSpecs.length; ++j) + object.inputFeatureColumnSpecs[j] = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.inputFeatureColumnSpecs[j], options); + } + if (message.optimizationObjective != null && message.hasOwnProperty("optimizationObjective")) + object.optimizationObjective = message.optimizationObjective; + if (message.tablesModelColumnInfo && message.tablesModelColumnInfo.length) { + object.tablesModelColumnInfo = []; + for (var j = 0; j < message.tablesModelColumnInfo.length; ++j) + object.tablesModelColumnInfo[j] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.toObject(message.tablesModelColumnInfo[j], options); + } + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (typeof message.trainBudgetMilliNodeHours === "number") + object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; + else + object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (typeof message.trainCostMilliNodeHours === "number") + object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; + else + object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; + if (message.disableEarlyStopping != null && message.hasOwnProperty("disableEarlyStopping")) + object.disableEarlyStopping = message.disableEarlyStopping; + if (message.optimizationObjectiveRecallValue != null && message.hasOwnProperty("optimizationObjectiveRecallValue")) { + object.optimizationObjectiveRecallValue = options.json && !isFinite(message.optimizationObjectiveRecallValue) ? String(message.optimizationObjectiveRecallValue) : message.optimizationObjectiveRecallValue; + if (options.oneofs) + object.additionalOptimizationObjectiveConfig = "optimizationObjectiveRecallValue"; + } + if (message.optimizationObjectivePrecisionValue != null && message.hasOwnProperty("optimizationObjectivePrecisionValue")) { + object.optimizationObjectivePrecisionValue = options.json && !isFinite(message.optimizationObjectivePrecisionValue) ? String(message.optimizationObjectivePrecisionValue) : message.optimizationObjectivePrecisionValue; + if (options.oneofs) + object.additionalOptimizationObjectiveConfig = "optimizationObjectivePrecisionValue"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListTableSpecsResponse to JSON. + * Converts this TablesModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @memberof google.cloud.automl.v1beta1.TablesModelMetadata * @instance * @returns {Object.} JSON object */ - ListTableSpecsResponse.prototype.toJSON = function toJSON() { + TablesModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTableSpecsResponse; + return TablesModelMetadata; })(); - v1beta1.UpdateTableSpecRequest = (function() { + v1beta1.TablesAnnotation = (function() { /** - * Properties of an UpdateTableSpecRequest. + * Properties of a TablesAnnotation. * @memberof google.cloud.automl.v1beta1 - * @interface IUpdateTableSpecRequest - * @property {google.cloud.automl.v1beta1.ITableSpec|null} [tableSpec] UpdateTableSpecRequest tableSpec - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTableSpecRequest updateMask + * @interface ITablesAnnotation + * @property {number|null} [score] TablesAnnotation score + * @property {google.cloud.automl.v1beta1.IDoubleRange|null} [predictionInterval] TablesAnnotation predictionInterval + * @property {google.protobuf.IValue|null} [value] TablesAnnotation value + * @property {Array.|null} [tablesModelColumnInfo] TablesAnnotation tablesModelColumnInfo + * @property {number|null} [baselineScore] TablesAnnotation baselineScore */ /** - * Constructs a new UpdateTableSpecRequest. + * Constructs a new TablesAnnotation. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an UpdateTableSpecRequest. - * @implements IUpdateTableSpecRequest + * @classdesc Represents a TablesAnnotation. + * @implements ITablesAnnotation * @constructor - * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITablesAnnotation=} [properties] Properties to set */ - function UpdateTableSpecRequest(properties) { + function TablesAnnotation(properties) { + this.tablesModelColumnInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26215,88 +28037,130 @@ } /** - * UpdateTableSpecRequest tableSpec. - * @member {google.cloud.automl.v1beta1.ITableSpec|null|undefined} tableSpec - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * TablesAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @instance + */ + TablesAnnotation.prototype.score = 0; + + /** + * TablesAnnotation predictionInterval. + * @member {google.cloud.automl.v1beta1.IDoubleRange|null|undefined} predictionInterval + * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @instance + */ + TablesAnnotation.prototype.predictionInterval = null; + + /** + * TablesAnnotation value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @instance + */ + TablesAnnotation.prototype.value = null; + + /** + * TablesAnnotation tablesModelColumnInfo. + * @member {Array.} tablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @instance */ - UpdateTableSpecRequest.prototype.tableSpec = null; + TablesAnnotation.prototype.tablesModelColumnInfo = $util.emptyArray; /** - * UpdateTableSpecRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * TablesAnnotation baselineScore. + * @member {number} baselineScore + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @instance */ - UpdateTableSpecRequest.prototype.updateMask = null; + TablesAnnotation.prototype.baselineScore = 0; /** - * Creates a new UpdateTableSpecRequest instance using the specified properties. + * Creates a new TablesAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static - * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest instance + * @param {google.cloud.automl.v1beta1.ITablesAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation instance */ - UpdateTableSpecRequest.create = function create(properties) { - return new UpdateTableSpecRequest(properties); + TablesAnnotation.create = function create(properties) { + return new TablesAnnotation(properties); }; /** - * Encodes the specified UpdateTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. + * Encodes the specified TablesAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static - * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} message UpdateTableSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesAnnotation} message TablesAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTableSpecRequest.encode = function encode(message, writer) { + TablesAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) - $root.google.cloud.automl.v1beta1.TableSpec.encode(message.tableSpec, 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.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.value != null && message.hasOwnProperty("value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tablesModelColumnInfo != null && message.tablesModelColumnInfo.length) + for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) + $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.encode(message.tablesModelColumnInfo[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.predictionInterval != null && message.hasOwnProperty("predictionInterval")) + $root.google.cloud.automl.v1beta1.DoubleRange.encode(message.predictionInterval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.baselineScore != null && message.hasOwnProperty("baselineScore")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.baselineScore); return writer; }; /** - * Encodes the specified UpdateTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. + * Encodes the specified TablesAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static - * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} message UpdateTableSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesAnnotation} message TablesAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTableSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + TablesAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTableSpecRequest message from the specified reader or buffer. + * Decodes a TablesAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest + * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTableSpecRequest.decode = function decode(reader, length) { + TablesAnnotation.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.automl.v1beta1.UpdateTableSpecRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TablesAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tableSpec = $root.google.cloud.automl.v1beta1.TableSpec.decode(reader, reader.uint32()); + message.score = reader.float(); + break; + case 4: + message.predictionInterval = $root.google.cloud.automl.v1beta1.DoubleRange.decode(reader, reader.uint32()); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.tablesModelColumnInfo && message.tablesModelColumnInfo.length)) + message.tablesModelColumnInfo = []; + message.tablesModelColumnInfo.push($root.google.cloud.automl.v1beta1.TablesModelColumnInfo.decode(reader, reader.uint32())); + break; + case 5: + message.baselineScore = reader.float(); break; default: reader.skipType(tag & 7); @@ -26307,127 +28171,170 @@ }; /** - * Decodes an UpdateTableSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a TablesAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest + * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTableSpecRequest.decodeDelimited = function decodeDelimited(reader) { + TablesAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTableSpecRequest message. + * Verifies a TablesAnnotation message. * @function verify - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTableSpecRequest.verify = function verify(message) { + TablesAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { - var error = $root.google.cloud.automl.v1beta1.TableSpec.verify(message.tableSpec); + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.predictionInterval != null && message.hasOwnProperty("predictionInterval")) { + var error = $root.google.cloud.automl.v1beta1.DoubleRange.verify(message.predictionInterval); if (error) - return "tableSpec." + error; + return "predictionInterval." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); if (error) - return "updateMask." + error; + return "value." + error; + } + if (message.tablesModelColumnInfo != null && message.hasOwnProperty("tablesModelColumnInfo")) { + if (!Array.isArray(message.tablesModelColumnInfo)) + return "tablesModelColumnInfo: array expected"; + for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.verify(message.tablesModelColumnInfo[i]); + if (error) + return "tablesModelColumnInfo." + error; + } } + if (message.baselineScore != null && message.hasOwnProperty("baselineScore")) + if (typeof message.baselineScore !== "number") + return "baselineScore: number expected"; return null; }; /** - * Creates an UpdateTableSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TablesAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest + * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation */ - UpdateTableSpecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.UpdateTableSpecRequest) + TablesAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TablesAnnotation) return object; - var message = new $root.google.cloud.automl.v1beta1.UpdateTableSpecRequest(); - if (object.tableSpec != null) { - if (typeof object.tableSpec !== "object") - throw TypeError(".google.cloud.automl.v1beta1.UpdateTableSpecRequest.tableSpec: object expected"); - message.tableSpec = $root.google.cloud.automl.v1beta1.TableSpec.fromObject(object.tableSpec); + var message = new $root.google.cloud.automl.v1beta1.TablesAnnotation(); + if (object.score != null) + message.score = Number(object.score); + if (object.predictionInterval != null) { + if (typeof object.predictionInterval !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.predictionInterval: object expected"); + message.predictionInterval = $root.google.cloud.automl.v1beta1.DoubleRange.fromObject(object.predictionInterval); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.automl.v1beta1.UpdateTableSpecRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); + } + if (object.tablesModelColumnInfo) { + if (!Array.isArray(object.tablesModelColumnInfo)) + throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.tablesModelColumnInfo: array expected"); + message.tablesModelColumnInfo = []; + for (var i = 0; i < object.tablesModelColumnInfo.length; ++i) { + if (typeof object.tablesModelColumnInfo[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.tablesModelColumnInfo: object expected"); + message.tablesModelColumnInfo[i] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.fromObject(object.tablesModelColumnInfo[i]); + } } + if (object.baselineScore != null) + message.baselineScore = Number(object.baselineScore); return message; }; /** - * Creates a plain object from an UpdateTableSpecRequest message. Also converts values to other types if specified. + * Creates a plain object from a TablesAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @static - * @param {google.cloud.automl.v1beta1.UpdateTableSpecRequest} message UpdateTableSpecRequest + * @param {google.cloud.automl.v1beta1.TablesAnnotation} message TablesAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTableSpecRequest.toObject = function toObject(message, options) { + TablesAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.tablesModelColumnInfo = []; if (options.defaults) { - object.tableSpec = null; - object.updateMask = null; + object.score = 0; + object.value = null; + object.predictionInterval = null; + object.baselineScore = 0; } - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) - object.tableSpec = $root.google.cloud.automl.v1beta1.TableSpec.toObject(message.tableSpec, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); + if (message.tablesModelColumnInfo && message.tablesModelColumnInfo.length) { + object.tablesModelColumnInfo = []; + for (var j = 0; j < message.tablesModelColumnInfo.length; ++j) + object.tablesModelColumnInfo[j] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.toObject(message.tablesModelColumnInfo[j], options); + } + if (message.predictionInterval != null && message.hasOwnProperty("predictionInterval")) + object.predictionInterval = $root.google.cloud.automl.v1beta1.DoubleRange.toObject(message.predictionInterval, options); + if (message.baselineScore != null && message.hasOwnProperty("baselineScore")) + object.baselineScore = options.json && !isFinite(message.baselineScore) ? String(message.baselineScore) : message.baselineScore; return object; }; /** - * Converts this UpdateTableSpecRequest to JSON. + * Converts this TablesAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesAnnotation * @instance * @returns {Object.} JSON object */ - UpdateTableSpecRequest.prototype.toJSON = function toJSON() { + TablesAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateTableSpecRequest; + return TablesAnnotation; })(); - v1beta1.GetColumnSpecRequest = (function() { + v1beta1.TablesModelColumnInfo = (function() { /** - * Properties of a GetColumnSpecRequest. + * Properties of a TablesModelColumnInfo. * @memberof google.cloud.automl.v1beta1 - * @interface IGetColumnSpecRequest - * @property {string|null} [name] GetColumnSpecRequest name - * @property {google.protobuf.IFieldMask|null} [fieldMask] GetColumnSpecRequest fieldMask + * @interface ITablesModelColumnInfo + * @property {string|null} [columnSpecName] TablesModelColumnInfo columnSpecName + * @property {string|null} [columnDisplayName] TablesModelColumnInfo columnDisplayName + * @property {number|null} [featureImportance] TablesModelColumnInfo featureImportance */ /** - * Constructs a new GetColumnSpecRequest. + * Constructs a new TablesModelColumnInfo. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GetColumnSpecRequest. - * @implements IGetColumnSpecRequest + * @classdesc Represents a TablesModelColumnInfo. + * @implements ITablesModelColumnInfo * @constructor - * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo=} [properties] Properties to set */ - function GetColumnSpecRequest(properties) { + function TablesModelColumnInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26435,88 +28342,101 @@ } /** - * GetColumnSpecRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * TablesModelColumnInfo columnSpecName. + * @member {string} columnSpecName + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @instance */ - GetColumnSpecRequest.prototype.name = ""; + TablesModelColumnInfo.prototype.columnSpecName = ""; /** - * GetColumnSpecRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * TablesModelColumnInfo columnDisplayName. + * @member {string} columnDisplayName + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @instance */ - GetColumnSpecRequest.prototype.fieldMask = null; + TablesModelColumnInfo.prototype.columnDisplayName = ""; /** - * Creates a new GetColumnSpecRequest instance using the specified properties. + * TablesModelColumnInfo featureImportance. + * @member {number} featureImportance + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @instance + */ + TablesModelColumnInfo.prototype.featureImportance = 0; + + /** + * Creates a new TablesModelColumnInfo instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static - * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest instance + * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo instance */ - GetColumnSpecRequest.create = function create(properties) { - return new GetColumnSpecRequest(properties); + TablesModelColumnInfo.create = function create(properties) { + return new TablesModelColumnInfo(properties); }; /** - * Encodes the specified GetColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. + * Encodes the specified TablesModelColumnInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static - * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} message GetColumnSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo} message TablesModelColumnInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetColumnSpecRequest.encode = function encode(message, writer) { + TablesModelColumnInfo.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.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.columnSpecName != null && message.hasOwnProperty("columnSpecName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.columnSpecName); + if (message.columnDisplayName != null && message.hasOwnProperty("columnDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.columnDisplayName); + if (message.featureImportance != null && message.hasOwnProperty("featureImportance")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.featureImportance); return writer; }; /** - * Encodes the specified GetColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. + * Encodes the specified TablesModelColumnInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static - * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} message GetColumnSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo} message TablesModelColumnInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetColumnSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + TablesModelColumnInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetColumnSpecRequest message from the specified reader or buffer. + * Decodes a TablesModelColumnInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest + * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetColumnSpecRequest.decode = function decode(reader, length) { + TablesModelColumnInfo.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.automl.v1beta1.GetColumnSpecRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TablesModelColumnInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.columnSpecName = reader.string(); break; case 2: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.columnDisplayName = reader.string(); + break; + case 3: + message.featureImportance = reader.float(); break; default: reader.skipType(tag & 7); @@ -26527,125 +28447,130 @@ }; /** - * Decodes a GetColumnSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a TablesModelColumnInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest + * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetColumnSpecRequest.decodeDelimited = function decodeDelimited(reader) { + TablesModelColumnInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetColumnSpecRequest message. + * Verifies a TablesModelColumnInfo message. * @function verify - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetColumnSpecRequest.verify = function verify(message) { + TablesModelColumnInfo.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); - if (error) - return "fieldMask." + error; - } + if (message.columnSpecName != null && message.hasOwnProperty("columnSpecName")) + if (!$util.isString(message.columnSpecName)) + return "columnSpecName: string expected"; + if (message.columnDisplayName != null && message.hasOwnProperty("columnDisplayName")) + if (!$util.isString(message.columnDisplayName)) + return "columnDisplayName: string expected"; + if (message.featureImportance != null && message.hasOwnProperty("featureImportance")) + if (typeof message.featureImportance !== "number") + return "featureImportance: number expected"; return null; }; /** - * Creates a GetColumnSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TablesModelColumnInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest + * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo */ - GetColumnSpecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GetColumnSpecRequest) + TablesModelColumnInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TablesModelColumnInfo) return object; - var message = new $root.google.cloud.automl.v1beta1.GetColumnSpecRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.automl.v1beta1.GetColumnSpecRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); - } + var message = new $root.google.cloud.automl.v1beta1.TablesModelColumnInfo(); + if (object.columnSpecName != null) + message.columnSpecName = String(object.columnSpecName); + if (object.columnDisplayName != null) + message.columnDisplayName = String(object.columnDisplayName); + if (object.featureImportance != null) + message.featureImportance = Number(object.featureImportance); return message; }; /** - * Creates a plain object from a GetColumnSpecRequest message. Also converts values to other types if specified. + * Creates a plain object from a TablesModelColumnInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @static - * @param {google.cloud.automl.v1beta1.GetColumnSpecRequest} message GetColumnSpecRequest + * @param {google.cloud.automl.v1beta1.TablesModelColumnInfo} message TablesModelColumnInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetColumnSpecRequest.toObject = function toObject(message, options) { + TablesModelColumnInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.fieldMask = null; + object.columnSpecName = ""; + object.columnDisplayName = ""; + object.featureImportance = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.columnSpecName != null && message.hasOwnProperty("columnSpecName")) + object.columnSpecName = message.columnSpecName; + if (message.columnDisplayName != null && message.hasOwnProperty("columnDisplayName")) + object.columnDisplayName = message.columnDisplayName; + if (message.featureImportance != null && message.hasOwnProperty("featureImportance")) + object.featureImportance = options.json && !isFinite(message.featureImportance) ? String(message.featureImportance) : message.featureImportance; return object; }; /** - * Converts this GetColumnSpecRequest to JSON. + * Converts this TablesModelColumnInfo to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo * @instance * @returns {Object.} JSON object */ - GetColumnSpecRequest.prototype.toJSON = function toJSON() { + TablesModelColumnInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetColumnSpecRequest; + return TablesModelColumnInfo; })(); - v1beta1.ListColumnSpecsRequest = (function() { + v1beta1.ColumnSpec = (function() { /** - * Properties of a ListColumnSpecsRequest. + * Properties of a ColumnSpec. * @memberof google.cloud.automl.v1beta1 - * @interface IListColumnSpecsRequest - * @property {string|null} [parent] ListColumnSpecsRequest parent - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListColumnSpecsRequest fieldMask - * @property {string|null} [filter] ListColumnSpecsRequest filter - * @property {number|null} [pageSize] ListColumnSpecsRequest pageSize - * @property {string|null} [pageToken] ListColumnSpecsRequest pageToken + * @interface IColumnSpec + * @property {string|null} [name] ColumnSpec name + * @property {google.cloud.automl.v1beta1.IDataType|null} [dataType] ColumnSpec dataType + * @property {string|null} [displayName] ColumnSpec displayName + * @property {google.cloud.automl.v1beta1.IDataStats|null} [dataStats] ColumnSpec dataStats + * @property {Array.|null} [topCorrelatedColumns] ColumnSpec topCorrelatedColumns + * @property {string|null} [etag] ColumnSpec etag */ /** - * Constructs a new ListColumnSpecsRequest. + * Constructs a new ColumnSpec. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListColumnSpecsRequest. - * @implements IListColumnSpecsRequest + * @classdesc Represents a ColumnSpec. + * @implements IColumnSpec * @constructor - * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IColumnSpec=} [properties] Properties to set */ - function ListColumnSpecsRequest(properties) { + function ColumnSpec(properties) { + this.topCorrelatedColumns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26653,127 +28578,143 @@ } /** - * ListColumnSpecsRequest parent. - * @member {string} parent - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * ColumnSpec name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @instance */ - ListColumnSpecsRequest.prototype.parent = ""; + ColumnSpec.prototype.name = ""; /** - * ListColumnSpecsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * ColumnSpec dataType. + * @member {google.cloud.automl.v1beta1.IDataType|null|undefined} dataType + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @instance */ - ListColumnSpecsRequest.prototype.fieldMask = null; + ColumnSpec.prototype.dataType = null; /** - * ListColumnSpecsRequest filter. - * @member {string} filter - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * ColumnSpec displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @instance */ - ListColumnSpecsRequest.prototype.filter = ""; + ColumnSpec.prototype.displayName = ""; /** - * ListColumnSpecsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * ColumnSpec dataStats. + * @member {google.cloud.automl.v1beta1.IDataStats|null|undefined} dataStats + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @instance */ - ListColumnSpecsRequest.prototype.pageSize = 0; + ColumnSpec.prototype.dataStats = null; /** - * ListColumnSpecsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * ColumnSpec topCorrelatedColumns. + * @member {Array.} topCorrelatedColumns + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @instance */ - ListColumnSpecsRequest.prototype.pageToken = ""; + ColumnSpec.prototype.topCorrelatedColumns = $util.emptyArray; /** - * Creates a new ListColumnSpecsRequest instance using the specified properties. + * ColumnSpec etag. + * @member {string} etag + * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @instance + */ + ColumnSpec.prototype.etag = ""; + + /** + * Creates a new ColumnSpec instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static - * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest instance + * @param {google.cloud.automl.v1beta1.IColumnSpec=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec instance */ - ListColumnSpecsRequest.create = function create(properties) { - return new ListColumnSpecsRequest(properties); + ColumnSpec.create = function create(properties) { + return new ColumnSpec(properties); }; /** - * Encodes the specified ListColumnSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. + * Encodes the specified ColumnSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static - * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} message ListColumnSpecsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IColumnSpec} message ColumnSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListColumnSpecsRequest.encode = function encode(message, writer) { + ColumnSpec.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.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dataType != null && message.hasOwnProperty("dataType")) + $root.google.cloud.automl.v1beta1.DataType.encode(message.dataType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.dataStats != null && message.hasOwnProperty("dataStats")) + $root.google.cloud.automl.v1beta1.DataStats.encode(message.dataStats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.topCorrelatedColumns != null && message.topCorrelatedColumns.length) + for (var i = 0; i < message.topCorrelatedColumns.length; ++i) + $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.encode(message.topCorrelatedColumns[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.etag); return writer; }; /** - * Encodes the specified ListColumnSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. + * Encodes the specified ColumnSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static - * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} message ListColumnSpecsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IColumnSpec} message ColumnSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListColumnSpecsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ColumnSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListColumnSpecsRequest message from the specified reader or buffer. + * Decodes a ColumnSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest + * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListColumnSpecsRequest.decode = function decode(reader, length) { + ColumnSpec.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.automl.v1beta1.ListColumnSpecsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ColumnSpec(); 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.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.dataType = $root.google.cloud.automl.v1beta1.DataType.decode(reader, reader.uint32()); break; case 3: - message.filter = reader.string(); + message.displayName = reader.string(); break; case 4: - message.pageSize = reader.int32(); + message.dataStats = $root.google.cloud.automl.v1beta1.DataStats.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.topCorrelatedColumns && message.topCorrelatedColumns.length)) + message.topCorrelatedColumns = []; + message.topCorrelatedColumns.push($root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.decode(reader, reader.uint32())); break; case 6: - message.pageToken = reader.string(); + message.etag = reader.string(); break; default: reader.skipType(tag & 7); @@ -26784,466 +28725,593 @@ }; /** - * Decodes a ListColumnSpecsRequest message from the specified reader or buffer, length delimited. + * Decodes a ColumnSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest + * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListColumnSpecsRequest.decodeDelimited = function decodeDelimited(reader) { + ColumnSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListColumnSpecsRequest message. + * Verifies a ColumnSpec message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListColumnSpecsRequest.verify = function verify(message) { + ColumnSpec.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dataType != null && message.hasOwnProperty("dataType")) { + var error = $root.google.cloud.automl.v1beta1.DataType.verify(message.dataType); if (error) - return "fieldMask." + error; + return "dataType." + error; } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.dataStats != null && message.hasOwnProperty("dataStats")) { + var error = $root.google.cloud.automl.v1beta1.DataStats.verify(message.dataStats); + if (error) + return "dataStats." + error; + } + if (message.topCorrelatedColumns != null && message.hasOwnProperty("topCorrelatedColumns")) { + if (!Array.isArray(message.topCorrelatedColumns)) + return "topCorrelatedColumns: array expected"; + for (var i = 0; i < message.topCorrelatedColumns.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify(message.topCorrelatedColumns[i]); + if (error) + return "topCorrelatedColumns." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates a ListColumnSpecsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest + * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec */ - ListColumnSpecsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListColumnSpecsRequest) + ColumnSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ColumnSpec) return object; - var message = new $root.google.cloud.automl.v1beta1.ListColumnSpecsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ListColumnSpecsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + var message = new $root.google.cloud.automl.v1beta1.ColumnSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.dataType != null) { + if (typeof object.dataType !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.dataType: object expected"); + message.dataType = $root.google.cloud.automl.v1beta1.DataType.fromObject(object.dataType); } - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.dataStats != null) { + if (typeof object.dataStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.dataStats: object expected"); + message.dataStats = $root.google.cloud.automl.v1beta1.DataStats.fromObject(object.dataStats); + } + if (object.topCorrelatedColumns) { + if (!Array.isArray(object.topCorrelatedColumns)) + throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.topCorrelatedColumns: array expected"); + message.topCorrelatedColumns = []; + for (var i = 0; i < object.topCorrelatedColumns.length; ++i) { + if (typeof object.topCorrelatedColumns[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.topCorrelatedColumns: object expected"); + message.topCorrelatedColumns[i] = $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.fromObject(object.topCorrelatedColumns[i]); + } + } + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a ListColumnSpecsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ColumnSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @static - * @param {google.cloud.automl.v1beta1.ListColumnSpecsRequest} message ListColumnSpecsRequest + * @param {google.cloud.automl.v1beta1.ColumnSpec} message ColumnSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListColumnSpecsRequest.toObject = function toObject(message, options) { + ColumnSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.topCorrelatedColumns = []; if (options.defaults) { - object.parent = ""; - object.fieldMask = null; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.dataType = null; + object.displayName = ""; + object.dataStats = null; + object.etag = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dataType != null && message.hasOwnProperty("dataType")) + object.dataType = $root.google.cloud.automl.v1beta1.DataType.toObject(message.dataType, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.dataStats != null && message.hasOwnProperty("dataStats")) + object.dataStats = $root.google.cloud.automl.v1beta1.DataStats.toObject(message.dataStats, options); + if (message.topCorrelatedColumns && message.topCorrelatedColumns.length) { + object.topCorrelatedColumns = []; + for (var j = 0; j < message.topCorrelatedColumns.length; ++j) + object.topCorrelatedColumns[j] = $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.toObject(message.topCorrelatedColumns[j], options); + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this ListColumnSpecsRequest to JSON. + * Converts this ColumnSpec to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @memberof google.cloud.automl.v1beta1.ColumnSpec * @instance * @returns {Object.} JSON object */ - ListColumnSpecsRequest.prototype.toJSON = function toJSON() { + ColumnSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListColumnSpecsRequest; - })(); + ColumnSpec.CorrelatedColumn = (function() { - v1beta1.ListColumnSpecsResponse = (function() { + /** + * Properties of a CorrelatedColumn. + * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @interface ICorrelatedColumn + * @property {string|null} [columnSpecId] CorrelatedColumn columnSpecId + * @property {google.cloud.automl.v1beta1.ICorrelationStats|null} [correlationStats] CorrelatedColumn correlationStats + */ - /** - * Properties of a ListColumnSpecsResponse. - * @memberof google.cloud.automl.v1beta1 - * @interface IListColumnSpecsResponse - * @property {Array.|null} [columnSpecs] ListColumnSpecsResponse columnSpecs - * @property {string|null} [nextPageToken] ListColumnSpecsResponse nextPageToken - */ + /** + * Constructs a new CorrelatedColumn. + * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @classdesc Represents a CorrelatedColumn. + * @implements ICorrelatedColumn + * @constructor + * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn=} [properties] Properties to set + */ + function CorrelatedColumn(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]]; + } - /** - * Constructs a new ListColumnSpecsResponse. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListColumnSpecsResponse. - * @implements IListColumnSpecsResponse - * @constructor - * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse=} [properties] Properties to set - */ - function ListColumnSpecsResponse(properties) { - this.columnSpecs = []; - 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]]; - } + /** + * CorrelatedColumn columnSpecId. + * @member {string} columnSpecId + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @instance + */ + CorrelatedColumn.prototype.columnSpecId = ""; - /** - * ListColumnSpecsResponse columnSpecs. - * @member {Array.} columnSpecs - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @instance - */ - ListColumnSpecsResponse.prototype.columnSpecs = $util.emptyArray; + /** + * CorrelatedColumn correlationStats. + * @member {google.cloud.automl.v1beta1.ICorrelationStats|null|undefined} correlationStats + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @instance + */ + CorrelatedColumn.prototype.correlationStats = null; - /** - * ListColumnSpecsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @instance - */ - ListColumnSpecsResponse.prototype.nextPageToken = ""; + /** + * Creates a new CorrelatedColumn instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn instance + */ + CorrelatedColumn.create = function create(properties) { + return new CorrelatedColumn(properties); + }; - /** - * Creates a new ListColumnSpecsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse instance - */ - ListColumnSpecsResponse.create = function create(properties) { - return new ListColumnSpecsResponse(properties); - }; + /** + * Encodes the specified CorrelatedColumn message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn} message CorrelatedColumn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CorrelatedColumn.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columnSpecId != null && message.hasOwnProperty("columnSpecId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.columnSpecId); + if (message.correlationStats != null && message.hasOwnProperty("correlationStats")) + $root.google.cloud.automl.v1beta1.CorrelationStats.encode(message.correlationStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ListColumnSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse} message ListColumnSpecsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListColumnSpecsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columnSpecs != null && message.columnSpecs.length) - for (var i = 0; i < message.columnSpecs.length; ++i) - $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.columnSpecs[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 CorrelatedColumn message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn} message CorrelatedColumn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CorrelatedColumn.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ListColumnSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse} message ListColumnSpecsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListColumnSpecsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a CorrelatedColumn message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CorrelatedColumn.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.automl.v1beta1.ColumnSpec.CorrelatedColumn(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columnSpecId = reader.string(); + break; + case 2: + message.correlationStats = $root.google.cloud.automl.v1beta1.CorrelationStats.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a ListColumnSpecsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListColumnSpecsResponse.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.automl.v1beta1.ListColumnSpecsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.columnSpecs && message.columnSpecs.length)) - message.columnSpecs = []; - message.columnSpecs.push($root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a CorrelatedColumn message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CorrelatedColumn.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CorrelatedColumn message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CorrelatedColumn.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columnSpecId != null && message.hasOwnProperty("columnSpecId")) + if (!$util.isString(message.columnSpecId)) + return "columnSpecId: string expected"; + if (message.correlationStats != null && message.hasOwnProperty("correlationStats")) { + var error = $root.google.cloud.automl.v1beta1.CorrelationStats.verify(message.correlationStats); + if (error) + return "correlationStats." + error; } - } - return message; - }; + return null; + }; + + /** + * Creates a CorrelatedColumn message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn + */ + CorrelatedColumn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) + return object; + var message = new $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn(); + if (object.columnSpecId != null) + message.columnSpecId = String(object.columnSpecId); + if (object.correlationStats != null) { + if (typeof object.correlationStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.correlationStats: object expected"); + message.correlationStats = $root.google.cloud.automl.v1beta1.CorrelationStats.fromObject(object.correlationStats); + } + return message; + }; + + /** + * Creates a plain object from a CorrelatedColumn message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @static + * @param {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} message CorrelatedColumn + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CorrelatedColumn.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.columnSpecId = ""; + object.correlationStats = null; + } + if (message.columnSpecId != null && message.hasOwnProperty("columnSpecId")) + object.columnSpecId = message.columnSpecId; + if (message.correlationStats != null && message.hasOwnProperty("correlationStats")) + object.correlationStats = $root.google.cloud.automl.v1beta1.CorrelationStats.toObject(message.correlationStats, options); + return object; + }; + + /** + * Converts this CorrelatedColumn to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @instance + * @returns {Object.} JSON object + */ + CorrelatedColumn.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CorrelatedColumn; + })(); + + return ColumnSpec; + })(); + + v1beta1.DataStats = (function() { + + /** + * Properties of a DataStats. + * @memberof google.cloud.automl.v1beta1 + * @interface IDataStats + * @property {google.cloud.automl.v1beta1.IFloat64Stats|null} [float64Stats] DataStats float64Stats + * @property {google.cloud.automl.v1beta1.IStringStats|null} [stringStats] DataStats stringStats + * @property {google.cloud.automl.v1beta1.ITimestampStats|null} [timestampStats] DataStats timestampStats + * @property {google.cloud.automl.v1beta1.IArrayStats|null} [arrayStats] DataStats arrayStats + * @property {google.cloud.automl.v1beta1.IStructStats|null} [structStats] DataStats structStats + * @property {google.cloud.automl.v1beta1.ICategoryStats|null} [categoryStats] DataStats categoryStats + * @property {number|Long|null} [distinctValueCount] DataStats distinctValueCount + * @property {number|Long|null} [nullValueCount] DataStats nullValueCount + * @property {number|Long|null} [validValueCount] DataStats validValueCount + */ /** - * Decodes a ListColumnSpecsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new DataStats. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a DataStats. + * @implements IDataStats + * @constructor + * @param {google.cloud.automl.v1beta1.IDataStats=} [properties] Properties to set */ - ListColumnSpecsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + function DataStats(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]]; + } /** - * Verifies a ListColumnSpecsResponse message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * DataStats float64Stats. + * @member {google.cloud.automl.v1beta1.IFloat64Stats|null|undefined} float64Stats + * @memberof google.cloud.automl.v1beta1.DataStats + * @instance */ - ListColumnSpecsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columnSpecs != null && message.hasOwnProperty("columnSpecs")) { - if (!Array.isArray(message.columnSpecs)) - return "columnSpecs: array expected"; - for (var i = 0; i < message.columnSpecs.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.columnSpecs[i]); - if (error) - return "columnSpecs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + DataStats.prototype.float64Stats = null; /** - * Creates a ListColumnSpecsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse + * DataStats stringStats. + * @member {google.cloud.automl.v1beta1.IStringStats|null|undefined} stringStats + * @memberof google.cloud.automl.v1beta1.DataStats + * @instance */ - ListColumnSpecsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListColumnSpecsResponse) - return object; - var message = new $root.google.cloud.automl.v1beta1.ListColumnSpecsResponse(); - if (object.columnSpecs) { - if (!Array.isArray(object.columnSpecs)) - throw TypeError(".google.cloud.automl.v1beta1.ListColumnSpecsResponse.columnSpecs: array expected"); - message.columnSpecs = []; - for (var i = 0; i < object.columnSpecs.length; ++i) { - if (typeof object.columnSpecs[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ListColumnSpecsResponse.columnSpecs: object expected"); - message.columnSpecs[i] = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.columnSpecs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + DataStats.prototype.stringStats = null; /** - * Creates a plain object from a ListColumnSpecsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse - * @static - * @param {google.cloud.automl.v1beta1.ListColumnSpecsResponse} message ListColumnSpecsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * DataStats timestampStats. + * @member {google.cloud.automl.v1beta1.ITimestampStats|null|undefined} timestampStats + * @memberof google.cloud.automl.v1beta1.DataStats + * @instance */ - ListColumnSpecsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columnSpecs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.columnSpecs && message.columnSpecs.length) { - object.columnSpecs = []; - for (var j = 0; j < message.columnSpecs.length; ++j) - object.columnSpecs[j] = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.columnSpecs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + DataStats.prototype.timestampStats = null; /** - * Converts this ListColumnSpecsResponse to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse + * DataStats arrayStats. + * @member {google.cloud.automl.v1beta1.IArrayStats|null|undefined} arrayStats + * @memberof google.cloud.automl.v1beta1.DataStats * @instance - * @returns {Object.} JSON object */ - ListColumnSpecsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + DataStats.prototype.arrayStats = null; - return ListColumnSpecsResponse; - })(); + /** + * DataStats structStats. + * @member {google.cloud.automl.v1beta1.IStructStats|null|undefined} structStats + * @memberof google.cloud.automl.v1beta1.DataStats + * @instance + */ + DataStats.prototype.structStats = null; - v1beta1.UpdateColumnSpecRequest = (function() { + /** + * DataStats categoryStats. + * @member {google.cloud.automl.v1beta1.ICategoryStats|null|undefined} categoryStats + * @memberof google.cloud.automl.v1beta1.DataStats + * @instance + */ + DataStats.prototype.categoryStats = null; /** - * Properties of an UpdateColumnSpecRequest. - * @memberof google.cloud.automl.v1beta1 - * @interface IUpdateColumnSpecRequest - * @property {google.cloud.automl.v1beta1.IColumnSpec|null} [columnSpec] UpdateColumnSpecRequest columnSpec - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateColumnSpecRequest updateMask + * DataStats distinctValueCount. + * @member {number|Long} distinctValueCount + * @memberof google.cloud.automl.v1beta1.DataStats + * @instance */ + DataStats.prototype.distinctValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Constructs a new UpdateColumnSpecRequest. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an UpdateColumnSpecRequest. - * @implements IUpdateColumnSpecRequest - * @constructor - * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest=} [properties] Properties to set + * DataStats nullValueCount. + * @member {number|Long} nullValueCount + * @memberof google.cloud.automl.v1beta1.DataStats + * @instance */ - function UpdateColumnSpecRequest(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]]; - } + DataStats.prototype.nullValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * UpdateColumnSpecRequest columnSpec. - * @member {google.cloud.automl.v1beta1.IColumnSpec|null|undefined} columnSpec - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * DataStats validValueCount. + * @member {number|Long} validValueCount + * @memberof google.cloud.automl.v1beta1.DataStats * @instance */ - UpdateColumnSpecRequest.prototype.columnSpec = null; + DataStats.prototype.validValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * UpdateColumnSpecRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * DataStats stats. + * @member {"float64Stats"|"stringStats"|"timestampStats"|"arrayStats"|"structStats"|"categoryStats"|undefined} stats + * @memberof google.cloud.automl.v1beta1.DataStats * @instance */ - UpdateColumnSpecRequest.prototype.updateMask = null; + Object.defineProperty(DataStats.prototype, "stats", { + get: $util.oneOfGetter($oneOfFields = ["float64Stats", "stringStats", "timestampStats", "arrayStats", "structStats", "categoryStats"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new UpdateColumnSpecRequest instance using the specified properties. + * Creates a new DataStats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static - * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest instance + * @param {google.cloud.automl.v1beta1.IDataStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DataStats} DataStats instance */ - UpdateColumnSpecRequest.create = function create(properties) { - return new UpdateColumnSpecRequest(properties); + DataStats.create = function create(properties) { + return new DataStats(properties); }; /** - * Encodes the specified UpdateColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. + * Encodes the specified DataStats message. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static - * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} message UpdateColumnSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDataStats} message DataStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateColumnSpecRequest.encode = function encode(message, writer) { + DataStats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columnSpec != null && message.hasOwnProperty("columnSpec")) - $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.columnSpec, 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.distinctValueCount != null && message.hasOwnProperty("distinctValueCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.distinctValueCount); + if (message.nullValueCount != null && message.hasOwnProperty("nullValueCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.nullValueCount); + if (message.float64Stats != null && message.hasOwnProperty("float64Stats")) + $root.google.cloud.automl.v1beta1.Float64Stats.encode(message.float64Stats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.stringStats != null && message.hasOwnProperty("stringStats")) + $root.google.cloud.automl.v1beta1.StringStats.encode(message.stringStats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timestampStats != null && message.hasOwnProperty("timestampStats")) + $root.google.cloud.automl.v1beta1.TimestampStats.encode(message.timestampStats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.arrayStats != null && message.hasOwnProperty("arrayStats")) + $root.google.cloud.automl.v1beta1.ArrayStats.encode(message.arrayStats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.structStats != null && message.hasOwnProperty("structStats")) + $root.google.cloud.automl.v1beta1.StructStats.encode(message.structStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.categoryStats != null && message.hasOwnProperty("categoryStats")) + $root.google.cloud.automl.v1beta1.CategoryStats.encode(message.categoryStats, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.validValueCount != null && message.hasOwnProperty("validValueCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.validValueCount); return writer; }; /** - * Encodes the specified UpdateColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. + * Encodes the specified DataStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static - * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} message UpdateColumnSpecRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDataStats} message DataStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateColumnSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + DataStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer. + * Decodes a DataStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest + * @returns {google.cloud.automl.v1beta1.DataStats} DataStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateColumnSpecRequest.decode = function decode(reader, length) { + DataStats.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.automl.v1beta1.UpdateColumnSpecRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DataStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.float64Stats = $root.google.cloud.automl.v1beta1.Float64Stats.decode(reader, reader.uint32()); + break; + case 4: + message.stringStats = $root.google.cloud.automl.v1beta1.StringStats.decode(reader, reader.uint32()); + break; + case 5: + message.timestampStats = $root.google.cloud.automl.v1beta1.TimestampStats.decode(reader, reader.uint32()); + break; + case 6: + message.arrayStats = $root.google.cloud.automl.v1beta1.ArrayStats.decode(reader, reader.uint32()); + break; + case 7: + message.structStats = $root.google.cloud.automl.v1beta1.StructStats.decode(reader, reader.uint32()); + break; + case 8: + message.categoryStats = $root.google.cloud.automl.v1beta1.CategoryStats.decode(reader, reader.uint32()); + break; case 1: - message.columnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32()); + message.distinctValueCount = reader.int64(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nullValueCount = reader.int64(); + break; + case 9: + message.validValueCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -27254,127 +29322,290 @@ }; /** - * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a DataStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest + * @returns {google.cloud.automl.v1beta1.DataStats} DataStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateColumnSpecRequest.decodeDelimited = function decodeDelimited(reader) { + DataStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateColumnSpecRequest message. + * Verifies a DataStats message. * @function verify - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateColumnSpecRequest.verify = function verify(message) { + DataStats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columnSpec != null && message.hasOwnProperty("columnSpec")) { - var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.columnSpec); - if (error) - return "columnSpec." + error; + var properties = {}; + if (message.float64Stats != null && message.hasOwnProperty("float64Stats")) { + properties.stats = 1; + { + var error = $root.google.cloud.automl.v1beta1.Float64Stats.verify(message.float64Stats); + if (error) + return "float64Stats." + error; + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.stringStats != null && message.hasOwnProperty("stringStats")) { + if (properties.stats === 1) + return "stats: multiple values"; + properties.stats = 1; + { + var error = $root.google.cloud.automl.v1beta1.StringStats.verify(message.stringStats); + if (error) + return "stringStats." + error; + } + } + if (message.timestampStats != null && message.hasOwnProperty("timestampStats")) { + if (properties.stats === 1) + return "stats: multiple values"; + properties.stats = 1; + { + var error = $root.google.cloud.automl.v1beta1.TimestampStats.verify(message.timestampStats); + if (error) + return "timestampStats." + error; + } + } + if (message.arrayStats != null && message.hasOwnProperty("arrayStats")) { + if (properties.stats === 1) + return "stats: multiple values"; + properties.stats = 1; + { + var error = $root.google.cloud.automl.v1beta1.ArrayStats.verify(message.arrayStats); + if (error) + return "arrayStats." + error; + } + } + if (message.structStats != null && message.hasOwnProperty("structStats")) { + if (properties.stats === 1) + return "stats: multiple values"; + properties.stats = 1; + { + var error = $root.google.cloud.automl.v1beta1.StructStats.verify(message.structStats); + if (error) + return "structStats." + error; + } + } + if (message.categoryStats != null && message.hasOwnProperty("categoryStats")) { + if (properties.stats === 1) + return "stats: multiple values"; + properties.stats = 1; + { + var error = $root.google.cloud.automl.v1beta1.CategoryStats.verify(message.categoryStats); + if (error) + return "categoryStats." + error; + } } + if (message.distinctValueCount != null && message.hasOwnProperty("distinctValueCount")) + if (!$util.isInteger(message.distinctValueCount) && !(message.distinctValueCount && $util.isInteger(message.distinctValueCount.low) && $util.isInteger(message.distinctValueCount.high))) + return "distinctValueCount: integer|Long expected"; + if (message.nullValueCount != null && message.hasOwnProperty("nullValueCount")) + if (!$util.isInteger(message.nullValueCount) && !(message.nullValueCount && $util.isInteger(message.nullValueCount.low) && $util.isInteger(message.nullValueCount.high))) + return "nullValueCount: integer|Long expected"; + if (message.validValueCount != null && message.hasOwnProperty("validValueCount")) + if (!$util.isInteger(message.validValueCount) && !(message.validValueCount && $util.isInteger(message.validValueCount.low) && $util.isInteger(message.validValueCount.high))) + return "validValueCount: integer|Long expected"; return null; }; /** - * Creates an UpdateColumnSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest + * @returns {google.cloud.automl.v1beta1.DataStats} DataStats */ - UpdateColumnSpecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.UpdateColumnSpecRequest) + DataStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DataStats) return object; - var message = new $root.google.cloud.automl.v1beta1.UpdateColumnSpecRequest(); - if (object.columnSpec != null) { - if (typeof object.columnSpec !== "object") - throw TypeError(".google.cloud.automl.v1beta1.UpdateColumnSpecRequest.columnSpec: object expected"); - message.columnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.columnSpec); + var message = new $root.google.cloud.automl.v1beta1.DataStats(); + if (object.float64Stats != null) { + if (typeof object.float64Stats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataStats.float64Stats: object expected"); + message.float64Stats = $root.google.cloud.automl.v1beta1.Float64Stats.fromObject(object.float64Stats); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.automl.v1beta1.UpdateColumnSpecRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.stringStats != null) { + if (typeof object.stringStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataStats.stringStats: object expected"); + message.stringStats = $root.google.cloud.automl.v1beta1.StringStats.fromObject(object.stringStats); + } + if (object.timestampStats != null) { + if (typeof object.timestampStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataStats.timestampStats: object expected"); + message.timestampStats = $root.google.cloud.automl.v1beta1.TimestampStats.fromObject(object.timestampStats); + } + if (object.arrayStats != null) { + if (typeof object.arrayStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataStats.arrayStats: object expected"); + message.arrayStats = $root.google.cloud.automl.v1beta1.ArrayStats.fromObject(object.arrayStats); + } + if (object.structStats != null) { + if (typeof object.structStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataStats.structStats: object expected"); + message.structStats = $root.google.cloud.automl.v1beta1.StructStats.fromObject(object.structStats); + } + if (object.categoryStats != null) { + if (typeof object.categoryStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataStats.categoryStats: object expected"); + message.categoryStats = $root.google.cloud.automl.v1beta1.CategoryStats.fromObject(object.categoryStats); } + if (object.distinctValueCount != null) + if ($util.Long) + (message.distinctValueCount = $util.Long.fromValue(object.distinctValueCount)).unsigned = false; + else if (typeof object.distinctValueCount === "string") + message.distinctValueCount = parseInt(object.distinctValueCount, 10); + else if (typeof object.distinctValueCount === "number") + message.distinctValueCount = object.distinctValueCount; + else if (typeof object.distinctValueCount === "object") + message.distinctValueCount = new $util.LongBits(object.distinctValueCount.low >>> 0, object.distinctValueCount.high >>> 0).toNumber(); + if (object.nullValueCount != null) + if ($util.Long) + (message.nullValueCount = $util.Long.fromValue(object.nullValueCount)).unsigned = false; + else if (typeof object.nullValueCount === "string") + message.nullValueCount = parseInt(object.nullValueCount, 10); + else if (typeof object.nullValueCount === "number") + message.nullValueCount = object.nullValueCount; + else if (typeof object.nullValueCount === "object") + message.nullValueCount = new $util.LongBits(object.nullValueCount.low >>> 0, object.nullValueCount.high >>> 0).toNumber(); + if (object.validValueCount != null) + if ($util.Long) + (message.validValueCount = $util.Long.fromValue(object.validValueCount)).unsigned = false; + else if (typeof object.validValueCount === "string") + message.validValueCount = parseInt(object.validValueCount, 10); + else if (typeof object.validValueCount === "number") + message.validValueCount = object.validValueCount; + else if (typeof object.validValueCount === "object") + message.validValueCount = new $util.LongBits(object.validValueCount.low >>> 0, object.validValueCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an UpdateColumnSpecRequest message. Also converts values to other types if specified. + * Creates a plain object from a DataStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @static - * @param {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} message UpdateColumnSpecRequest + * @param {google.cloud.automl.v1beta1.DataStats} message DataStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateColumnSpecRequest.toObject = function toObject(message, options) { + DataStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.columnSpec = null; - object.updateMask = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.distinctValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.distinctValueCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nullValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nullValueCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.validValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.validValueCount = options.longs === String ? "0" : 0; + } + if (message.distinctValueCount != null && message.hasOwnProperty("distinctValueCount")) + if (typeof message.distinctValueCount === "number") + object.distinctValueCount = options.longs === String ? String(message.distinctValueCount) : message.distinctValueCount; + else + object.distinctValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.distinctValueCount) : options.longs === Number ? new $util.LongBits(message.distinctValueCount.low >>> 0, message.distinctValueCount.high >>> 0).toNumber() : message.distinctValueCount; + if (message.nullValueCount != null && message.hasOwnProperty("nullValueCount")) + if (typeof message.nullValueCount === "number") + object.nullValueCount = options.longs === String ? String(message.nullValueCount) : message.nullValueCount; + else + object.nullValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.nullValueCount) : options.longs === Number ? new $util.LongBits(message.nullValueCount.low >>> 0, message.nullValueCount.high >>> 0).toNumber() : message.nullValueCount; + if (message.float64Stats != null && message.hasOwnProperty("float64Stats")) { + object.float64Stats = $root.google.cloud.automl.v1beta1.Float64Stats.toObject(message.float64Stats, options); + if (options.oneofs) + object.stats = "float64Stats"; + } + if (message.stringStats != null && message.hasOwnProperty("stringStats")) { + object.stringStats = $root.google.cloud.automl.v1beta1.StringStats.toObject(message.stringStats, options); + if (options.oneofs) + object.stats = "stringStats"; + } + if (message.timestampStats != null && message.hasOwnProperty("timestampStats")) { + object.timestampStats = $root.google.cloud.automl.v1beta1.TimestampStats.toObject(message.timestampStats, options); + if (options.oneofs) + object.stats = "timestampStats"; + } + if (message.arrayStats != null && message.hasOwnProperty("arrayStats")) { + object.arrayStats = $root.google.cloud.automl.v1beta1.ArrayStats.toObject(message.arrayStats, options); + if (options.oneofs) + object.stats = "arrayStats"; + } + if (message.structStats != null && message.hasOwnProperty("structStats")) { + object.structStats = $root.google.cloud.automl.v1beta1.StructStats.toObject(message.structStats, options); + if (options.oneofs) + object.stats = "structStats"; + } + if (message.categoryStats != null && message.hasOwnProperty("categoryStats")) { + object.categoryStats = $root.google.cloud.automl.v1beta1.CategoryStats.toObject(message.categoryStats, options); + if (options.oneofs) + object.stats = "categoryStats"; } - if (message.columnSpec != null && message.hasOwnProperty("columnSpec")) - object.columnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.columnSpec, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validValueCount != null && message.hasOwnProperty("validValueCount")) + if (typeof message.validValueCount === "number") + object.validValueCount = options.longs === String ? String(message.validValueCount) : message.validValueCount; + else + object.validValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.validValueCount) : options.longs === Number ? new $util.LongBits(message.validValueCount.low >>> 0, message.validValueCount.high >>> 0).toNumber() : message.validValueCount; return object; }; /** - * Converts this UpdateColumnSpecRequest to JSON. + * Converts this DataStats to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @memberof google.cloud.automl.v1beta1.DataStats * @instance * @returns {Object.} JSON object */ - UpdateColumnSpecRequest.prototype.toJSON = function toJSON() { + DataStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateColumnSpecRequest; + return DataStats; })(); - v1beta1.CreateModelRequest = (function() { + v1beta1.Float64Stats = (function() { /** - * Properties of a CreateModelRequest. + * Properties of a Float64Stats. * @memberof google.cloud.automl.v1beta1 - * @interface ICreateModelRequest - * @property {string|null} [parent] CreateModelRequest parent - * @property {google.cloud.automl.v1beta1.IModel|null} [model] CreateModelRequest model + * @interface IFloat64Stats + * @property {number|null} [mean] Float64Stats mean + * @property {number|null} [standardDeviation] Float64Stats standardDeviation + * @property {Array.|null} [quantiles] Float64Stats quantiles + * @property {Array.|null} [histogramBuckets] Float64Stats histogramBuckets */ /** - * Constructs a new CreateModelRequest. + * Constructs a new Float64Stats. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a CreateModelRequest. - * @implements ICreateModelRequest + * @classdesc Represents a Float64Stats. + * @implements IFloat64Stats * @constructor - * @param {google.cloud.automl.v1beta1.ICreateModelRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IFloat64Stats=} [properties] Properties to set */ - function CreateModelRequest(properties) { + function Float64Stats(properties) { + this.quantiles = []; + this.histogramBuckets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27382,88 +29613,128 @@ } /** - * CreateModelRequest parent. - * @member {string} parent - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * Float64Stats mean. + * @member {number} mean + * @memberof google.cloud.automl.v1beta1.Float64Stats * @instance */ - CreateModelRequest.prototype.parent = ""; + Float64Stats.prototype.mean = 0; /** - * CreateModelRequest model. - * @member {google.cloud.automl.v1beta1.IModel|null|undefined} model - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * Float64Stats standardDeviation. + * @member {number} standardDeviation + * @memberof google.cloud.automl.v1beta1.Float64Stats * @instance */ - CreateModelRequest.prototype.model = null; + Float64Stats.prototype.standardDeviation = 0; /** - * Creates a new CreateModelRequest instance using the specified properties. + * Float64Stats quantiles. + * @member {Array.} quantiles + * @memberof google.cloud.automl.v1beta1.Float64Stats + * @instance + */ + Float64Stats.prototype.quantiles = $util.emptyArray; + + /** + * Float64Stats histogramBuckets. + * @member {Array.} histogramBuckets + * @memberof google.cloud.automl.v1beta1.Float64Stats + * @instance + */ + Float64Stats.prototype.histogramBuckets = $util.emptyArray; + + /** + * Creates a new Float64Stats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static - * @param {google.cloud.automl.v1beta1.ICreateModelRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest instance + * @param {google.cloud.automl.v1beta1.IFloat64Stats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats instance */ - CreateModelRequest.create = function create(properties) { - return new CreateModelRequest(properties); + Float64Stats.create = function create(properties) { + return new Float64Stats(properties); }; /** - * Encodes the specified CreateModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. + * Encodes the specified Float64Stats message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static - * @param {google.cloud.automl.v1beta1.ICreateModelRequest} message CreateModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IFloat64Stats} message Float64Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateModelRequest.encode = function encode(message, writer) { + Float64Stats.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.model != null && message.hasOwnProperty("model")) - $root.google.cloud.automl.v1beta1.Model.encode(message.model, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.mean != null && message.hasOwnProperty("mean")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.mean); + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.standardDeviation); + if (message.quantiles != null && message.quantiles.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.quantiles.length; ++i) + writer.double(message.quantiles[i]); + writer.ldelim(); + } + if (message.histogramBuckets != null && message.histogramBuckets.length) + for (var i = 0; i < message.histogramBuckets.length; ++i) + $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.encode(message.histogramBuckets[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. + * Encodes the specified Float64Stats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static - * @param {google.cloud.automl.v1beta1.ICreateModelRequest} message CreateModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IFloat64Stats} message Float64Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + Float64Stats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateModelRequest message from the specified reader or buffer. + * Decodes a Float64Stats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest + * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateModelRequest.decode = function decode(reader, length) { + Float64Stats.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.automl.v1beta1.CreateModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.Float64Stats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.mean = reader.double(); + break; + case 2: + message.standardDeviation = reader.double(); + break; + case 3: + if (!(message.quantiles && message.quantiles.length)) + message.quantiles = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.quantiles.push(reader.double()); + } else + message.quantiles.push(reader.double()); break; case 4: - message.model = $root.google.cloud.automl.v1beta1.Model.decode(reader, reader.uint32()); + if (!(message.histogramBuckets && message.histogramBuckets.length)) + message.histogramBuckets = []; + message.histogramBuckets.push($root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -27474,121 +29745,410 @@ }; /** - * Decodes a CreateModelRequest message from the specified reader or buffer, length delimited. + * Decodes a Float64Stats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest + * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateModelRequest.decodeDelimited = function decodeDelimited(reader) { + Float64Stats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateModelRequest message. + * Verifies a Float64Stats message. * @function verify - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateModelRequest.verify = function verify(message) { + Float64Stats.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.model != null && message.hasOwnProperty("model")) { - var error = $root.google.cloud.automl.v1beta1.Model.verify(message.model); - if (error) - return "model." + error; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + if (typeof message.standardDeviation !== "number") + return "standardDeviation: number expected"; + if (message.quantiles != null && message.hasOwnProperty("quantiles")) { + if (!Array.isArray(message.quantiles)) + return "quantiles: array expected"; + for (var i = 0; i < message.quantiles.length; ++i) + if (typeof message.quantiles[i] !== "number") + return "quantiles: number[] expected"; + } + if (message.histogramBuckets != null && message.hasOwnProperty("histogramBuckets")) { + if (!Array.isArray(message.histogramBuckets)) + return "histogramBuckets: array expected"; + for (var i = 0; i < message.histogramBuckets.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify(message.histogramBuckets[i]); + if (error) + return "histogramBuckets." + error; + } } return null; }; /** - * Creates a CreateModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Float64Stats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest + * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats */ - CreateModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.CreateModelRequest) + Float64Stats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Float64Stats) return object; - var message = new $root.google.cloud.automl.v1beta1.CreateModelRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.model != null) { - if (typeof object.model !== "object") - throw TypeError(".google.cloud.automl.v1beta1.CreateModelRequest.model: object expected"); - message.model = $root.google.cloud.automl.v1beta1.Model.fromObject(object.model); + var message = new $root.google.cloud.automl.v1beta1.Float64Stats(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.standardDeviation != null) + message.standardDeviation = Number(object.standardDeviation); + if (object.quantiles) { + if (!Array.isArray(object.quantiles)) + throw TypeError(".google.cloud.automl.v1beta1.Float64Stats.quantiles: array expected"); + message.quantiles = []; + for (var i = 0; i < object.quantiles.length; ++i) + message.quantiles[i] = Number(object.quantiles[i]); + } + if (object.histogramBuckets) { + if (!Array.isArray(object.histogramBuckets)) + throw TypeError(".google.cloud.automl.v1beta1.Float64Stats.histogramBuckets: array expected"); + message.histogramBuckets = []; + for (var i = 0; i < object.histogramBuckets.length; ++i) { + if (typeof object.histogramBuckets[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Float64Stats.histogramBuckets: object expected"); + message.histogramBuckets[i] = $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.fromObject(object.histogramBuckets[i]); + } } return message; }; /** - * Creates a plain object from a CreateModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a Float64Stats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @static - * @param {google.cloud.automl.v1beta1.CreateModelRequest} message CreateModelRequest + * @param {google.cloud.automl.v1beta1.Float64Stats} message Float64Stats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateModelRequest.toObject = function toObject(message, options) { + Float64Stats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.quantiles = []; + object.histogramBuckets = []; + } if (options.defaults) { - object.parent = ""; - object.model = null; + object.mean = 0; + object.standardDeviation = 0; + } + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; + if (message.quantiles && message.quantiles.length) { + object.quantiles = []; + for (var j = 0; j < message.quantiles.length; ++j) + object.quantiles[j] = options.json && !isFinite(message.quantiles[j]) ? String(message.quantiles[j]) : message.quantiles[j]; + } + if (message.histogramBuckets && message.histogramBuckets.length) { + object.histogramBuckets = []; + for (var j = 0; j < message.histogramBuckets.length; ++j) + object.histogramBuckets[j] = $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.toObject(message.histogramBuckets[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.model != null && message.hasOwnProperty("model")) - object.model = $root.google.cloud.automl.v1beta1.Model.toObject(message.model, options); return object; }; /** - * Converts this CreateModelRequest to JSON. + * Converts this Float64Stats to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @memberof google.cloud.automl.v1beta1.Float64Stats * @instance * @returns {Object.} JSON object */ - CreateModelRequest.prototype.toJSON = function toJSON() { + Float64Stats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateModelRequest; + Float64Stats.HistogramBucket = (function() { + + /** + * Properties of a HistogramBucket. + * @memberof google.cloud.automl.v1beta1.Float64Stats + * @interface IHistogramBucket + * @property {number|null} [min] HistogramBucket min + * @property {number|null} [max] HistogramBucket max + * @property {number|Long|null} [count] HistogramBucket count + */ + + /** + * Constructs a new HistogramBucket. + * @memberof google.cloud.automl.v1beta1.Float64Stats + * @classdesc Represents a HistogramBucket. + * @implements IHistogramBucket + * @constructor + * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket=} [properties] Properties to set + */ + function HistogramBucket(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]]; + } + + /** + * HistogramBucket min. + * @member {number} min + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @instance + */ + HistogramBucket.prototype.min = 0; + + /** + * HistogramBucket max. + * @member {number} max + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @instance + */ + HistogramBucket.prototype.max = 0; + + /** + * HistogramBucket count. + * @member {number|Long} count + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @instance + */ + HistogramBucket.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HistogramBucket instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket instance + */ + HistogramBucket.create = function create(properties) { + return new HistogramBucket(properties); + }; + + /** + * Encodes the specified HistogramBucket message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket} message HistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramBucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && message.hasOwnProperty("min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && message.hasOwnProperty("max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.count); + return writer; + }; + + /** + * Encodes the specified HistogramBucket message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket} message HistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramBucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistogramBucket message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramBucket.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.automl.v1beta1.Float64Stats.HistogramBucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.min = reader.double(); + break; + case 2: + message.max = reader.double(); + break; + case 3: + message.count = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistogramBucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramBucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistogramBucket message. + * @function verify + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistogramBucket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a HistogramBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket + */ + HistogramBucket.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) + return object; + var message = new $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HistogramBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @static + * @param {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} message HistogramBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistogramBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.min = 0; + object.max = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this HistogramBucket to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + * @instance + * @returns {Object.} JSON object + */ + HistogramBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HistogramBucket; + })(); + + return Float64Stats; })(); - v1beta1.GetModelRequest = (function() { + v1beta1.StringStats = (function() { /** - * Properties of a GetModelRequest. + * Properties of a StringStats. * @memberof google.cloud.automl.v1beta1 - * @interface IGetModelRequest - * @property {string|null} [name] GetModelRequest name + * @interface IStringStats + * @property {Array.|null} [topUnigramStats] StringStats topUnigramStats */ /** - * Constructs a new GetModelRequest. + * Constructs a new StringStats. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GetModelRequest. - * @implements IGetModelRequest + * @classdesc Represents a StringStats. + * @implements IStringStats * @constructor - * @param {google.cloud.automl.v1beta1.IGetModelRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IStringStats=} [properties] Properties to set */ - function GetModelRequest(properties) { + function StringStats(properties) { + this.topUnigramStats = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27596,75 +30156,78 @@ } /** - * GetModelRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * StringStats topUnigramStats. + * @member {Array.} topUnigramStats + * @memberof google.cloud.automl.v1beta1.StringStats * @instance */ - GetModelRequest.prototype.name = ""; + StringStats.prototype.topUnigramStats = $util.emptyArray; /** - * Creates a new GetModelRequest instance using the specified properties. + * Creates a new StringStats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static - * @param {google.cloud.automl.v1beta1.IGetModelRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest instance + * @param {google.cloud.automl.v1beta1.IStringStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.StringStats} StringStats instance */ - GetModelRequest.create = function create(properties) { - return new GetModelRequest(properties); + StringStats.create = function create(properties) { + return new StringStats(properties); }; /** - * Encodes the specified GetModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. + * Encodes the specified StringStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static - * @param {google.cloud.automl.v1beta1.IGetModelRequest} message GetModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IStringStats} message StringStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetModelRequest.encode = function encode(message, writer) { + StringStats.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.topUnigramStats != null && message.topUnigramStats.length) + for (var i = 0; i < message.topUnigramStats.length; ++i) + $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.encode(message.topUnigramStats[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. + * Encodes the specified StringStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static - * @param {google.cloud.automl.v1beta1.IGetModelRequest} message GetModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IStringStats} message StringStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + StringStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetModelRequest message from the specified reader or buffer. + * Decodes a StringStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest + * @returns {google.cloud.automl.v1beta1.StringStats} StringStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetModelRequest.decode = function decode(reader, length) { + StringStats.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.automl.v1beta1.GetModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.StringStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.topUnigramStats && message.topUnigramStats.length)) + message.topUnigramStats = []; + message.topUnigramStats.push($root.google.cloud.automl.v1beta1.StringStats.UnigramStats.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -27675,110 +30238,349 @@ }; /** - * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. + * Decodes a StringStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest + * @returns {google.cloud.automl.v1beta1.StringStats} StringStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetModelRequest.decodeDelimited = function decodeDelimited(reader) { + StringStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetModelRequest message. + * Verifies a StringStats message. * @function verify - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetModelRequest.verify = function verify(message) { + StringStats.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.topUnigramStats != null && message.hasOwnProperty("topUnigramStats")) { + if (!Array.isArray(message.topUnigramStats)) + return "topUnigramStats: array expected"; + for (var i = 0; i < message.topUnigramStats.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.verify(message.topUnigramStats[i]); + if (error) + return "topUnigramStats." + error; + } + } return null; }; /** - * Creates a GetModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StringStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest + * @returns {google.cloud.automl.v1beta1.StringStats} StringStats */ - GetModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GetModelRequest) + StringStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.StringStats) return object; - var message = new $root.google.cloud.automl.v1beta1.GetModelRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.automl.v1beta1.StringStats(); + if (object.topUnigramStats) { + if (!Array.isArray(object.topUnigramStats)) + throw TypeError(".google.cloud.automl.v1beta1.StringStats.topUnigramStats: array expected"); + message.topUnigramStats = []; + for (var i = 0; i < object.topUnigramStats.length; ++i) { + if (typeof object.topUnigramStats[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.StringStats.topUnigramStats: object expected"); + message.topUnigramStats[i] = $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.fromObject(object.topUnigramStats[i]); + } + } return message; }; /** - * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a StringStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @static - * @param {google.cloud.automl.v1beta1.GetModelRequest} message GetModelRequest + * @param {google.cloud.automl.v1beta1.StringStats} message StringStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetModelRequest.toObject = function toObject(message, options) { + StringStats.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.arrays || options.defaults) + object.topUnigramStats = []; + if (message.topUnigramStats && message.topUnigramStats.length) { + object.topUnigramStats = []; + for (var j = 0; j < message.topUnigramStats.length; ++j) + object.topUnigramStats[j] = $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.toObject(message.topUnigramStats[j], options); + } return object; }; /** - * Converts this GetModelRequest to JSON. + * Converts this StringStats to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @memberof google.cloud.automl.v1beta1.StringStats * @instance * @returns {Object.} JSON object */ - GetModelRequest.prototype.toJSON = function toJSON() { + StringStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetModelRequest; + StringStats.UnigramStats = (function() { + + /** + * Properties of an UnigramStats. + * @memberof google.cloud.automl.v1beta1.StringStats + * @interface IUnigramStats + * @property {string|null} [value] UnigramStats value + * @property {number|Long|null} [count] UnigramStats count + */ + + /** + * Constructs a new UnigramStats. + * @memberof google.cloud.automl.v1beta1.StringStats + * @classdesc Represents an UnigramStats. + * @implements IUnigramStats + * @constructor + * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats=} [properties] Properties to set + */ + function UnigramStats(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]]; + } + + /** + * UnigramStats value. + * @member {string} value + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @instance + */ + UnigramStats.prototype.value = ""; + + /** + * UnigramStats count. + * @member {number|Long} count + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @instance + */ + UnigramStats.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new UnigramStats instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats instance + */ + UnigramStats.create = function create(properties) { + return new UnigramStats(properties); + }; + + /** + * Encodes the specified UnigramStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats} message UnigramStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnigramStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + return writer; + }; + + /** + * Encodes the specified UnigramStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats} message UnigramStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnigramStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnigramStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnigramStats.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.automl.v1beta1.StringStats.UnigramStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + case 2: + message.count = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnigramStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnigramStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnigramStats message. + * @function verify + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnigramStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates an UnigramStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats + */ + UnigramStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.StringStats.UnigramStats) + return object; + var message = new $root.google.cloud.automl.v1beta1.StringStats.UnigramStats(); + if (object.value != null) + message.value = String(object.value); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an UnigramStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @static + * @param {google.cloud.automl.v1beta1.StringStats.UnigramStats} message UnigramStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnigramStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this UnigramStats to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats + * @instance + * @returns {Object.} JSON object + */ + UnigramStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnigramStats; + })(); + + return StringStats; })(); - v1beta1.ListModelsRequest = (function() { + v1beta1.TimestampStats = (function() { /** - * Properties of a ListModelsRequest. + * Properties of a TimestampStats. * @memberof google.cloud.automl.v1beta1 - * @interface IListModelsRequest - * @property {string|null} [parent] ListModelsRequest parent - * @property {string|null} [filter] ListModelsRequest filter - * @property {number|null} [pageSize] ListModelsRequest pageSize - * @property {string|null} [pageToken] ListModelsRequest pageToken + * @interface ITimestampStats + * @property {Object.|null} [granularStats] TimestampStats granularStats */ /** - * Constructs a new ListModelsRequest. + * Constructs a new TimestampStats. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListModelsRequest. - * @implements IListModelsRequest + * @classdesc Represents a TimestampStats. + * @implements ITimestampStats * @constructor - * @param {google.cloud.automl.v1beta1.IListModelsRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITimestampStats=} [properties] Properties to set */ - function ListModelsRequest(properties) { + function TimestampStats(properties) { + this.granularStats = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27786,114 +30588,83 @@ } /** - * ListModelsRequest parent. - * @member {string} parent - * @memberof google.cloud.automl.v1beta1.ListModelsRequest - * @instance - */ - ListModelsRequest.prototype.parent = ""; - - /** - * ListModelsRequest filter. - * @member {string} filter - * @memberof google.cloud.automl.v1beta1.ListModelsRequest - * @instance - */ - ListModelsRequest.prototype.filter = ""; - - /** - * ListModelsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.automl.v1beta1.ListModelsRequest - * @instance - */ - ListModelsRequest.prototype.pageSize = 0; - - /** - * ListModelsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * TimestampStats granularStats. + * @member {Object.} granularStats + * @memberof google.cloud.automl.v1beta1.TimestampStats * @instance */ - ListModelsRequest.prototype.pageToken = ""; + TimestampStats.prototype.granularStats = $util.emptyObject; /** - * Creates a new ListModelsRequest instance using the specified properties. + * Creates a new TimestampStats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static - * @param {google.cloud.automl.v1beta1.IListModelsRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest instance + * @param {google.cloud.automl.v1beta1.ITimestampStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats instance */ - ListModelsRequest.create = function create(properties) { - return new ListModelsRequest(properties); + TimestampStats.create = function create(properties) { + return new TimestampStats(properties); }; /** - * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. + * Encodes the specified TimestampStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static - * @param {google.cloud.automl.v1beta1.IListModelsRequest} message ListModelsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITimestampStats} message TimestampStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelsRequest.encode = function encode(message, writer) { + TimestampStats.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.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.granularStats != null && message.hasOwnProperty("granularStats")) + for (var keys = Object.keys(message.granularStats), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.encode(message.granularStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. + * Encodes the specified TimestampStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static - * @param {google.cloud.automl.v1beta1.IListModelsRequest} message ListModelsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITimestampStats} message TimestampStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TimestampStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListModelsRequest message from the specified reader or buffer. + * Decodes a TimestampStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest + * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelsRequest.decode = function decode(reader, length) { + TimestampStats.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.automl.v1beta1.ListModelsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TimestampStats(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.pageSize = reader.int32(); - break; - case 6: - message.pageToken = reader.string(); + reader.skip().pos++; + if (message.granularStats === $util.emptyObject) + message.granularStats = {}; + key = reader.string(); + reader.pos++; + message.granularStats[key] = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -27904,134 +30675,347 @@ }; /** - * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. + * Decodes a TimestampStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest + * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelsRequest.decodeDelimited = function decodeDelimited(reader) { + TimestampStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListModelsRequest message. + * Verifies a TimestampStats message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListModelsRequest.verify = function verify(message) { + TimestampStats.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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.granularStats != null && message.hasOwnProperty("granularStats")) { + if (!$util.isObject(message.granularStats)) + return "granularStats: object expected"; + var key = Object.keys(message.granularStats); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify(message.granularStats[key[i]]); + if (error) + return "granularStats." + error; + } + } return null; }; /** - * Creates a ListModelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimestampStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest + * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats */ - ListModelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListModelsRequest) + TimestampStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TimestampStats) return object; - var message = new $root.google.cloud.automl.v1beta1.ListModelsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.automl.v1beta1.TimestampStats(); + if (object.granularStats) { + if (typeof object.granularStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TimestampStats.granularStats: object expected"); + message.granularStats = {}; + for (var keys = Object.keys(object.granularStats), i = 0; i < keys.length; ++i) { + if (typeof object.granularStats[keys[i]] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TimestampStats.granularStats: object expected"); + message.granularStats[keys[i]] = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.fromObject(object.granularStats[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. + * Creates a plain object from a TimestampStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @static - * @param {google.cloud.automl.v1beta1.ListModelsRequest} message ListModelsRequest + * @param {google.cloud.automl.v1beta1.TimestampStats} message TimestampStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListModelsRequest.toObject = function toObject(message, options) { + TimestampStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.objects || options.defaults) + object.granularStats = {}; + var keys2; + if (message.granularStats && (keys2 = Object.keys(message.granularStats)).length) { + object.granularStats = {}; + for (var j = 0; j < keys2.length; ++j) + object.granularStats[keys2[j]] = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.toObject(message.granularStats[keys2[j]], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - 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 ListModelsRequest to JSON. + * Converts this TimestampStats to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @memberof google.cloud.automl.v1beta1.TimestampStats * @instance * @returns {Object.} JSON object */ - ListModelsRequest.prototype.toJSON = function toJSON() { + TimestampStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListModelsRequest; + TimestampStats.GranularStats = (function() { + + /** + * Properties of a GranularStats. + * @memberof google.cloud.automl.v1beta1.TimestampStats + * @interface IGranularStats + * @property {Object.|null} [buckets] GranularStats buckets + */ + + /** + * Constructs a new GranularStats. + * @memberof google.cloud.automl.v1beta1.TimestampStats + * @classdesc Represents a GranularStats. + * @implements IGranularStats + * @constructor + * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats=} [properties] Properties to set + */ + function GranularStats(properties) { + this.buckets = {}; + 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]]; + } + + /** + * GranularStats buckets. + * @member {Object.} buckets + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @instance + */ + GranularStats.prototype.buckets = $util.emptyObject; + + /** + * Creates a new GranularStats instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats instance + */ + GranularStats.create = function create(properties) { + return new GranularStats(properties); + }; + + /** + * Encodes the specified GranularStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats} message GranularStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GranularStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buckets != null && message.hasOwnProperty("buckets")) + for (var keys = Object.keys(message.buckets), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.buckets[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified GranularStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats} message GranularStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GranularStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GranularStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GranularStats.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.automl.v1beta1.TimestampStats.GranularStats(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.buckets === $util.emptyObject) + message.buckets = {}; + key = reader.int32(); + reader.pos++; + message.buckets[key] = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GranularStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GranularStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GranularStats message. + * @function verify + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GranularStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!$util.isObject(message.buckets)) + return "buckets: object expected"; + var key = Object.keys(message.buckets); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "buckets: integer key{k:int32} expected"; + if (!$util.isInteger(message.buckets[key[i]]) && !(message.buckets[key[i]] && $util.isInteger(message.buckets[key[i]].low) && $util.isInteger(message.buckets[key[i]].high))) + return "buckets: integer|Long{k:int32} expected"; + } + } + return null; + }; + + /** + * Creates a GranularStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats + */ + GranularStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats) + return object; + var message = new $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats(); + if (object.buckets) { + if (typeof object.buckets !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TimestampStats.GranularStats.buckets: object expected"); + message.buckets = {}; + for (var keys = Object.keys(object.buckets), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.buckets[keys[i]] = $util.Long.fromValue(object.buckets[keys[i]])).unsigned = false; + else if (typeof object.buckets[keys[i]] === "string") + message.buckets[keys[i]] = parseInt(object.buckets[keys[i]], 10); + else if (typeof object.buckets[keys[i]] === "number") + message.buckets[keys[i]] = object.buckets[keys[i]]; + else if (typeof object.buckets[keys[i]] === "object") + message.buckets[keys[i]] = new $util.LongBits(object.buckets[keys[i]].low >>> 0, object.buckets[keys[i]].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from a GranularStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @static + * @param {google.cloud.automl.v1beta1.TimestampStats.GranularStats} message GranularStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GranularStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.buckets = {}; + var keys2; + if (message.buckets && (keys2 = Object.keys(message.buckets)).length) { + object.buckets = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.buckets[keys2[j]] === "number") + object.buckets[keys2[j]] = options.longs === String ? String(message.buckets[keys2[j]]) : message.buckets[keys2[j]]; + else + object.buckets[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.buckets[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.buckets[keys2[j]].low >>> 0, message.buckets[keys2[j]].high >>> 0).toNumber() : message.buckets[keys2[j]]; + } + return object; + }; + + /** + * Converts this GranularStats to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats + * @instance + * @returns {Object.} JSON object + */ + GranularStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GranularStats; + })(); + + return TimestampStats; })(); - v1beta1.ListModelsResponse = (function() { + v1beta1.ArrayStats = (function() { /** - * Properties of a ListModelsResponse. + * Properties of an ArrayStats. * @memberof google.cloud.automl.v1beta1 - * @interface IListModelsResponse - * @property {Array.|null} [model] ListModelsResponse model - * @property {string|null} [nextPageToken] ListModelsResponse nextPageToken + * @interface IArrayStats + * @property {google.cloud.automl.v1beta1.IDataStats|null} [memberStats] ArrayStats memberStats */ /** - * Constructs a new ListModelsResponse. + * Constructs a new ArrayStats. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListModelsResponse. - * @implements IListModelsResponse + * @classdesc Represents an ArrayStats. + * @implements IArrayStats * @constructor - * @param {google.cloud.automl.v1beta1.IListModelsResponse=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IArrayStats=} [properties] Properties to set */ - function ListModelsResponse(properties) { - this.model = []; + function ArrayStats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28039,91 +31023,75 @@ } /** - * ListModelsResponse model. - * @member {Array.} model - * @memberof google.cloud.automl.v1beta1.ListModelsResponse - * @instance - */ - ListModelsResponse.prototype.model = $util.emptyArray; - - /** - * ListModelsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * ArrayStats memberStats. + * @member {google.cloud.automl.v1beta1.IDataStats|null|undefined} memberStats + * @memberof google.cloud.automl.v1beta1.ArrayStats * @instance */ - ListModelsResponse.prototype.nextPageToken = ""; + ArrayStats.prototype.memberStats = null; /** - * Creates a new ListModelsResponse instance using the specified properties. + * Creates a new ArrayStats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static - * @param {google.cloud.automl.v1beta1.IListModelsResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse instance + * @param {google.cloud.automl.v1beta1.IArrayStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats instance */ - ListModelsResponse.create = function create(properties) { - return new ListModelsResponse(properties); + ArrayStats.create = function create(properties) { + return new ArrayStats(properties); }; /** - * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. + * Encodes the specified ArrayStats message. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static - * @param {google.cloud.automl.v1beta1.IListModelsResponse} message ListModelsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IArrayStats} message ArrayStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelsResponse.encode = function encode(message, writer) { + ArrayStats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.model != null && message.model.length) - for (var i = 0; i < message.model.length; ++i) - $root.google.cloud.automl.v1beta1.Model.encode(message.model[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.memberStats != null && message.hasOwnProperty("memberStats")) + $root.google.cloud.automl.v1beta1.DataStats.encode(message.memberStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListModelsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. + * Encodes the specified ArrayStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static - * @param {google.cloud.automl.v1beta1.IListModelsResponse} message ListModelsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IArrayStats} message ArrayStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ArrayStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListModelsResponse message from the specified reader or buffer. + * Decodes an ArrayStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse + * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelsResponse.decode = function decode(reader, length) { + ArrayStats.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.automl.v1beta1.ListModelsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ArrayStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.model && message.model.length)) - message.model = []; - message.model.push($root.google.cloud.automl.v1beta1.Model.decode(reader, reader.uint32())); - break; case 2: - message.nextPageToken = reader.string(); + message.memberStats = $root.google.cloud.automl.v1beta1.DataStats.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -28134,133 +31102,113 @@ }; /** - * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. + * Decodes an ArrayStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse + * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelsResponse.decodeDelimited = function decodeDelimited(reader) { + ArrayStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListModelsResponse message. + * Verifies an ArrayStats message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListModelsResponse.verify = function verify(message) { + ArrayStats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.model != null && message.hasOwnProperty("model")) { - if (!Array.isArray(message.model)) - return "model: array expected"; - for (var i = 0; i < message.model.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.Model.verify(message.model[i]); - if (error) - return "model." + error; - } + if (message.memberStats != null && message.hasOwnProperty("memberStats")) { + var error = $root.google.cloud.automl.v1beta1.DataStats.verify(message.memberStats); + if (error) + return "memberStats." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListModelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ArrayStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse + * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats */ - ListModelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListModelsResponse) + ArrayStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ArrayStats) return object; - var message = new $root.google.cloud.automl.v1beta1.ListModelsResponse(); - if (object.model) { - if (!Array.isArray(object.model)) - throw TypeError(".google.cloud.automl.v1beta1.ListModelsResponse.model: array expected"); - message.model = []; - for (var i = 0; i < object.model.length; ++i) { - if (typeof object.model[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ListModelsResponse.model: object expected"); - message.model[i] = $root.google.cloud.automl.v1beta1.Model.fromObject(object.model[i]); - } + var message = new $root.google.cloud.automl.v1beta1.ArrayStats(); + if (object.memberStats != null) { + if (typeof object.memberStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ArrayStats.memberStats: object expected"); + message.memberStats = $root.google.cloud.automl.v1beta1.DataStats.fromObject(object.memberStats); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. + * Creates a plain object from an ArrayStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @static - * @param {google.cloud.automl.v1beta1.ListModelsResponse} message ListModelsResponse + * @param {google.cloud.automl.v1beta1.ArrayStats} message ArrayStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListModelsResponse.toObject = function toObject(message, options) { + ArrayStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.model = []; if (options.defaults) - object.nextPageToken = ""; - if (message.model && message.model.length) { - object.model = []; - for (var j = 0; j < message.model.length; ++j) - object.model[j] = $root.google.cloud.automl.v1beta1.Model.toObject(message.model[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.memberStats = null; + if (message.memberStats != null && message.hasOwnProperty("memberStats")) + object.memberStats = $root.google.cloud.automl.v1beta1.DataStats.toObject(message.memberStats, options); return object; }; /** - * Converts this ListModelsResponse to JSON. + * Converts this ArrayStats to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListModelsResponse + * @memberof google.cloud.automl.v1beta1.ArrayStats * @instance * @returns {Object.} JSON object */ - ListModelsResponse.prototype.toJSON = function toJSON() { + ArrayStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListModelsResponse; + return ArrayStats; })(); - v1beta1.DeleteModelRequest = (function() { + v1beta1.StructStats = (function() { /** - * Properties of a DeleteModelRequest. + * Properties of a StructStats. * @memberof google.cloud.automl.v1beta1 - * @interface IDeleteModelRequest - * @property {string|null} [name] DeleteModelRequest name + * @interface IStructStats + * @property {Object.|null} [fieldStats] StructStats fieldStats */ /** - * Constructs a new DeleteModelRequest. + * Constructs a new StructStats. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DeleteModelRequest. - * @implements IDeleteModelRequest + * @classdesc Represents a StructStats. + * @implements IStructStats * @constructor - * @param {google.cloud.automl.v1beta1.IDeleteModelRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IStructStats=} [properties] Properties to set */ - function DeleteModelRequest(properties) { + function StructStats(properties) { + this.fieldStats = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28268,75 +31216,83 @@ } /** - * DeleteModelRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * StructStats fieldStats. + * @member {Object.} fieldStats + * @memberof google.cloud.automl.v1beta1.StructStats * @instance */ - DeleteModelRequest.prototype.name = ""; + StructStats.prototype.fieldStats = $util.emptyObject; /** - * Creates a new DeleteModelRequest instance using the specified properties. + * Creates a new StructStats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static - * @param {google.cloud.automl.v1beta1.IDeleteModelRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest instance + * @param {google.cloud.automl.v1beta1.IStructStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.StructStats} StructStats instance */ - DeleteModelRequest.create = function create(properties) { - return new DeleteModelRequest(properties); + StructStats.create = function create(properties) { + return new StructStats(properties); }; /** - * Encodes the specified DeleteModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. + * Encodes the specified StructStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static - * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} message DeleteModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IStructStats} message StructStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteModelRequest.encode = function encode(message, writer) { + StructStats.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.fieldStats != null && message.hasOwnProperty("fieldStats")) + for (var keys = Object.keys(message.fieldStats), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.automl.v1beta1.DataStats.encode(message.fieldStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified DeleteModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. + * Encodes the specified StructStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static - * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} message DeleteModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IStructStats} message StructStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + StructStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteModelRequest message from the specified reader or buffer. + * Decodes a StructStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest + * @returns {google.cloud.automl.v1beta1.StructStats} StructStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteModelRequest.decode = function decode(reader, length) { + StructStats.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.automl.v1beta1.DeleteModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.StructStats(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + reader.skip().pos++; + if (message.fieldStats === $util.emptyObject) + message.fieldStats = {}; + key = reader.string(); + reader.pos++; + message.fieldStats[key] = $root.google.cloud.automl.v1beta1.DataStats.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -28347,109 +31303,127 @@ }; /** - * Decodes a DeleteModelRequest message from the specified reader or buffer, length delimited. + * Decodes a StructStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest + * @returns {google.cloud.automl.v1beta1.StructStats} StructStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteModelRequest.decodeDelimited = function decodeDelimited(reader) { + StructStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteModelRequest message. + * Verifies a StructStats message. * @function verify - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteModelRequest.verify = function verify(message) { + StructStats.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.fieldStats != null && message.hasOwnProperty("fieldStats")) { + if (!$util.isObject(message.fieldStats)) + return "fieldStats: object expected"; + var key = Object.keys(message.fieldStats); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.DataStats.verify(message.fieldStats[key[i]]); + if (error) + return "fieldStats." + error; + } + } return null; }; /** - * Creates a DeleteModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StructStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest + * @returns {google.cloud.automl.v1beta1.StructStats} StructStats */ - DeleteModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DeleteModelRequest) + StructStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.StructStats) return object; - var message = new $root.google.cloud.automl.v1beta1.DeleteModelRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.automl.v1beta1.StructStats(); + if (object.fieldStats) { + if (typeof object.fieldStats !== "object") + throw TypeError(".google.cloud.automl.v1beta1.StructStats.fieldStats: object expected"); + message.fieldStats = {}; + for (var keys = Object.keys(object.fieldStats), i = 0; i < keys.length; ++i) { + if (typeof object.fieldStats[keys[i]] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.StructStats.fieldStats: object expected"); + message.fieldStats[keys[i]] = $root.google.cloud.automl.v1beta1.DataStats.fromObject(object.fieldStats[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a DeleteModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a StructStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @static - * @param {google.cloud.automl.v1beta1.DeleteModelRequest} message DeleteModelRequest + * @param {google.cloud.automl.v1beta1.StructStats} message StructStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteModelRequest.toObject = function toObject(message, options) { + StructStats.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.objects || options.defaults) + object.fieldStats = {}; + var keys2; + if (message.fieldStats && (keys2 = Object.keys(message.fieldStats)).length) { + object.fieldStats = {}; + for (var j = 0; j < keys2.length; ++j) + object.fieldStats[keys2[j]] = $root.google.cloud.automl.v1beta1.DataStats.toObject(message.fieldStats[keys2[j]], options); + } return object; }; /** - * Converts this DeleteModelRequest to JSON. + * Converts this StructStats to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @memberof google.cloud.automl.v1beta1.StructStats * @instance * @returns {Object.} JSON object */ - DeleteModelRequest.prototype.toJSON = function toJSON() { + StructStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteModelRequest; + return StructStats; })(); - v1beta1.DeployModelRequest = (function() { + v1beta1.CategoryStats = (function() { /** - * Properties of a DeployModelRequest. + * Properties of a CategoryStats. * @memberof google.cloud.automl.v1beta1 - * @interface IDeployModelRequest - * @property {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null} [imageObjectDetectionModelDeploymentMetadata] DeployModelRequest imageObjectDetectionModelDeploymentMetadata - * @property {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null} [imageClassificationModelDeploymentMetadata] DeployModelRequest imageClassificationModelDeploymentMetadata - * @property {string|null} [name] DeployModelRequest name + * @interface ICategoryStats + * @property {Array.|null} [topCategoryStats] CategoryStats topCategoryStats */ /** - * Constructs a new DeployModelRequest. + * Constructs a new CategoryStats. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DeployModelRequest. - * @implements IDeployModelRequest + * @classdesc Represents a CategoryStats. + * @implements ICategoryStats * @constructor - * @param {google.cloud.automl.v1beta1.IDeployModelRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ICategoryStats=} [properties] Properties to set */ - function DeployModelRequest(properties) { + function CategoryStats(properties) { + this.topCategoryStats = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28457,115 +31431,78 @@ } /** - * DeployModelRequest imageObjectDetectionModelDeploymentMetadata. - * @member {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null|undefined} imageObjectDetectionModelDeploymentMetadata - * @memberof google.cloud.automl.v1beta1.DeployModelRequest - * @instance - */ - DeployModelRequest.prototype.imageObjectDetectionModelDeploymentMetadata = null; - - /** - * DeployModelRequest imageClassificationModelDeploymentMetadata. - * @member {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null|undefined} imageClassificationModelDeploymentMetadata - * @memberof google.cloud.automl.v1beta1.DeployModelRequest - * @instance - */ - DeployModelRequest.prototype.imageClassificationModelDeploymentMetadata = null; - - /** - * DeployModelRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.DeployModelRequest - * @instance - */ - DeployModelRequest.prototype.name = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DeployModelRequest modelDeploymentMetadata. - * @member {"imageObjectDetectionModelDeploymentMetadata"|"imageClassificationModelDeploymentMetadata"|undefined} modelDeploymentMetadata - * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * CategoryStats topCategoryStats. + * @member {Array.} topCategoryStats + * @memberof google.cloud.automl.v1beta1.CategoryStats * @instance */ - Object.defineProperty(DeployModelRequest.prototype, "modelDeploymentMetadata", { - get: $util.oneOfGetter($oneOfFields = ["imageObjectDetectionModelDeploymentMetadata", "imageClassificationModelDeploymentMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + CategoryStats.prototype.topCategoryStats = $util.emptyArray; /** - * Creates a new DeployModelRequest instance using the specified properties. + * Creates a new CategoryStats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @memberof google.cloud.automl.v1beta1.CategoryStats * @static - * @param {google.cloud.automl.v1beta1.IDeployModelRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest instance + * @param {google.cloud.automl.v1beta1.ICategoryStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats instance */ - DeployModelRequest.create = function create(properties) { - return new DeployModelRequest(properties); + CategoryStats.create = function create(properties) { + return new CategoryStats(properties); }; /** - * Encodes the specified DeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. + * Encodes the specified CategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @memberof google.cloud.automl.v1beta1.CategoryStats * @static - * @param {google.cloud.automl.v1beta1.IDeployModelRequest} message DeployModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICategoryStats} message CategoryStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployModelRequest.encode = function encode(message, writer) { + CategoryStats.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.imageObjectDetectionModelDeploymentMetadata != null && message.hasOwnProperty("imageObjectDetectionModelDeploymentMetadata")) - $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.encode(message.imageObjectDetectionModelDeploymentMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.imageClassificationModelDeploymentMetadata != null && message.hasOwnProperty("imageClassificationModelDeploymentMetadata")) - $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.encode(message.imageClassificationModelDeploymentMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.topCategoryStats != null && message.topCategoryStats.length) + for (var i = 0; i < message.topCategoryStats.length; ++i) + $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.encode(message.topCategoryStats[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. + * Encodes the specified CategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @memberof google.cloud.automl.v1beta1.CategoryStats * @static - * @param {google.cloud.automl.v1beta1.IDeployModelRequest} message DeployModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICategoryStats} message CategoryStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + CategoryStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployModelRequest message from the specified reader or buffer. + * Decodes a CategoryStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @memberof google.cloud.automl.v1beta1.CategoryStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest + * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployModelRequest.decode = function decode(reader, length) { + CategoryStats.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.automl.v1beta1.DeployModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.CategoryStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.imageObjectDetectionModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.decode(reader, reader.uint32()); - break; - case 4: - message.imageClassificationModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.decode(reader, reader.uint32()); - break; case 1: - message.name = reader.string(); + if (!(message.topCategoryStats && message.topCategoryStats.length)) + message.topCategoryStats = []; + message.topCategoryStats.push($root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -28576,146 +31513,348 @@ }; /** - * Decodes a DeployModelRequest message from the specified reader or buffer, length delimited. + * Decodes a CategoryStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @memberof google.cloud.automl.v1beta1.CategoryStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest + * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployModelRequest.decodeDelimited = function decodeDelimited(reader) { + CategoryStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - /** - * Verifies a DeployModelRequest message. - * @function verify - * @memberof google.cloud.automl.v1beta1.DeployModelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeployModelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.imageObjectDetectionModelDeploymentMetadata != null && message.hasOwnProperty("imageObjectDetectionModelDeploymentMetadata")) { - properties.modelDeploymentMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify(message.imageObjectDetectionModelDeploymentMetadata); - if (error) - return "imageObjectDetectionModelDeploymentMetadata." + error; - } - } - if (message.imageClassificationModelDeploymentMetadata != null && message.hasOwnProperty("imageClassificationModelDeploymentMetadata")) { - if (properties.modelDeploymentMetadata === 1) - return "modelDeploymentMetadata: multiple values"; - properties.modelDeploymentMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify(message.imageClassificationModelDeploymentMetadata); - if (error) - return "imageClassificationModelDeploymentMetadata." + error; + /** + * Verifies a CategoryStats message. + * @function verify + * @memberof google.cloud.automl.v1beta1.CategoryStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CategoryStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topCategoryStats != null && message.hasOwnProperty("topCategoryStats")) { + if (!Array.isArray(message.topCategoryStats)) + return "topCategoryStats: array expected"; + for (var i = 0; i < message.topCategoryStats.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify(message.topCategoryStats[i]); + if (error) + return "topCategoryStats." + error; + } + } + return null; + }; + + /** + * Creates a CategoryStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.CategoryStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats + */ + CategoryStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.CategoryStats) + return object; + var message = new $root.google.cloud.automl.v1beta1.CategoryStats(); + if (object.topCategoryStats) { + if (!Array.isArray(object.topCategoryStats)) + throw TypeError(".google.cloud.automl.v1beta1.CategoryStats.topCategoryStats: array expected"); + message.topCategoryStats = []; + for (var i = 0; i < object.topCategoryStats.length; ++i) { + if (typeof object.topCategoryStats[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.CategoryStats.topCategoryStats: object expected"); + message.topCategoryStats[i] = $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.fromObject(object.topCategoryStats[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CategoryStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.CategoryStats + * @static + * @param {google.cloud.automl.v1beta1.CategoryStats} message CategoryStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CategoryStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.topCategoryStats = []; + if (message.topCategoryStats && message.topCategoryStats.length) { + object.topCategoryStats = []; + for (var j = 0; j < message.topCategoryStats.length; ++j) + object.topCategoryStats[j] = $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.toObject(message.topCategoryStats[j], options); + } + return object; + }; + + /** + * Converts this CategoryStats to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.CategoryStats + * @instance + * @returns {Object.} JSON object + */ + CategoryStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CategoryStats.SingleCategoryStats = (function() { + + /** + * Properties of a SingleCategoryStats. + * @memberof google.cloud.automl.v1beta1.CategoryStats + * @interface ISingleCategoryStats + * @property {string|null} [value] SingleCategoryStats value + * @property {number|Long|null} [count] SingleCategoryStats count + */ + + /** + * Constructs a new SingleCategoryStats. + * @memberof google.cloud.automl.v1beta1.CategoryStats + * @classdesc Represents a SingleCategoryStats. + * @implements ISingleCategoryStats + * @constructor + * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats=} [properties] Properties to set + */ + function SingleCategoryStats(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]]; + } + + /** + * SingleCategoryStats value. + * @member {string} value + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @instance + */ + SingleCategoryStats.prototype.value = ""; + + /** + * SingleCategoryStats count. + * @member {number|Long} count + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @instance + */ + SingleCategoryStats.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SingleCategoryStats instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats instance + */ + SingleCategoryStats.create = function create(properties) { + return new SingleCategoryStats(properties); + }; + + /** + * Encodes the specified SingleCategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats} message SingleCategoryStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleCategoryStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + return writer; + }; + + /** + * Encodes the specified SingleCategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats} message SingleCategoryStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleCategoryStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SingleCategoryStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleCategoryStats.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.automl.v1beta1.CategoryStats.SingleCategoryStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + case 2: + message.count = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SingleCategoryStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleCategoryStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleCategoryStats message. + * @function verify + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleCategoryStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a SingleCategoryStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats + */ + SingleCategoryStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) + return object; + var message = new $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats(); + if (object.value != null) + message.value = String(object.value); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SingleCategoryStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @static + * @param {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} message SingleCategoryStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleCategoryStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; } - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeployModelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.DeployModelRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest - */ - DeployModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DeployModelRequest) + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; return object; - var message = new $root.google.cloud.automl.v1beta1.DeployModelRequest(); - if (object.imageObjectDetectionModelDeploymentMetadata != null) { - if (typeof object.imageObjectDetectionModelDeploymentMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DeployModelRequest.imageObjectDetectionModelDeploymentMetadata: object expected"); - message.imageObjectDetectionModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.fromObject(object.imageObjectDetectionModelDeploymentMetadata); - } - if (object.imageClassificationModelDeploymentMetadata != null) { - if (typeof object.imageClassificationModelDeploymentMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DeployModelRequest.imageClassificationModelDeploymentMetadata: object expected"); - message.imageClassificationModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.fromObject(object.imageClassificationModelDeploymentMetadata); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; + }; - /** - * Creates a plain object from a DeployModelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.DeployModelRequest - * @static - * @param {google.cloud.automl.v1beta1.DeployModelRequest} message DeployModelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeployModelRequest.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.imageObjectDetectionModelDeploymentMetadata != null && message.hasOwnProperty("imageObjectDetectionModelDeploymentMetadata")) { - object.imageObjectDetectionModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.toObject(message.imageObjectDetectionModelDeploymentMetadata, options); - if (options.oneofs) - object.modelDeploymentMetadata = "imageObjectDetectionModelDeploymentMetadata"; - } - if (message.imageClassificationModelDeploymentMetadata != null && message.hasOwnProperty("imageClassificationModelDeploymentMetadata")) { - object.imageClassificationModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.toObject(message.imageClassificationModelDeploymentMetadata, options); - if (options.oneofs) - object.modelDeploymentMetadata = "imageClassificationModelDeploymentMetadata"; - } - return object; - }; + /** + * Converts this SingleCategoryStats to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + * @instance + * @returns {Object.} JSON object + */ + SingleCategoryStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this DeployModelRequest to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.DeployModelRequest - * @instance - * @returns {Object.} JSON object - */ - DeployModelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return SingleCategoryStats; + })(); - return DeployModelRequest; + return CategoryStats; })(); - v1beta1.UndeployModelRequest = (function() { + v1beta1.CorrelationStats = (function() { /** - * Properties of an UndeployModelRequest. + * Properties of a CorrelationStats. * @memberof google.cloud.automl.v1beta1 - * @interface IUndeployModelRequest - * @property {string|null} [name] UndeployModelRequest name + * @interface ICorrelationStats + * @property {number|null} [cramersV] CorrelationStats cramersV */ /** - * Constructs a new UndeployModelRequest. + * Constructs a new CorrelationStats. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an UndeployModelRequest. - * @implements IUndeployModelRequest + * @classdesc Represents a CorrelationStats. + * @implements ICorrelationStats * @constructor - * @param {google.cloud.automl.v1beta1.IUndeployModelRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ICorrelationStats=} [properties] Properties to set */ - function UndeployModelRequest(properties) { + function CorrelationStats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28723,75 +31862,75 @@ } /** - * UndeployModelRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * CorrelationStats cramersV. + * @member {number} cramersV + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @instance */ - UndeployModelRequest.prototype.name = ""; + CorrelationStats.prototype.cramersV = 0; /** - * Creates a new UndeployModelRequest instance using the specified properties. + * Creates a new CorrelationStats instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static - * @param {google.cloud.automl.v1beta1.IUndeployModelRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest instance + * @param {google.cloud.automl.v1beta1.ICorrelationStats=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats instance */ - UndeployModelRequest.create = function create(properties) { - return new UndeployModelRequest(properties); + CorrelationStats.create = function create(properties) { + return new CorrelationStats(properties); }; /** - * Encodes the specified UndeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. + * Encodes the specified CorrelationStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static - * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} message UndeployModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICorrelationStats} message CorrelationStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployModelRequest.encode = function encode(message, writer) { + CorrelationStats.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.cramersV != null && message.hasOwnProperty("cramersV")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.cramersV); return writer; }; /** - * Encodes the specified UndeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. + * Encodes the specified CorrelationStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static - * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} message UndeployModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICorrelationStats} message CorrelationStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + CorrelationStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UndeployModelRequest message from the specified reader or buffer. + * Decodes a CorrelationStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest + * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployModelRequest.decode = function decode(reader, length) { + CorrelationStats.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.automl.v1beta1.UndeployModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.CorrelationStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.cramersV = reader.double(); break; default: reader.skipType(tag & 7); @@ -28802,108 +31941,135 @@ }; /** - * Decodes an UndeployModelRequest message from the specified reader or buffer, length delimited. + * Decodes a CorrelationStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest + * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployModelRequest.decodeDelimited = function decodeDelimited(reader) { + CorrelationStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UndeployModelRequest message. + * Verifies a CorrelationStats message. * @function verify - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UndeployModelRequest.verify = function verify(message) { + CorrelationStats.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.cramersV != null && message.hasOwnProperty("cramersV")) + if (typeof message.cramersV !== "number") + return "cramersV: number expected"; return null; }; /** - * Creates an UndeployModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CorrelationStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest + * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats */ - UndeployModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.UndeployModelRequest) + CorrelationStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.CorrelationStats) return object; - var message = new $root.google.cloud.automl.v1beta1.UndeployModelRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.automl.v1beta1.CorrelationStats(); + if (object.cramersV != null) + message.cramersV = Number(object.cramersV); return message; }; /** - * Creates a plain object from an UndeployModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a CorrelationStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @static - * @param {google.cloud.automl.v1beta1.UndeployModelRequest} message UndeployModelRequest + * @param {google.cloud.automl.v1beta1.CorrelationStats} message CorrelationStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeployModelRequest.toObject = function toObject(message, options) { + CorrelationStats.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; + object.cramersV = 0; + if (message.cramersV != null && message.hasOwnProperty("cramersV")) + object.cramersV = options.json && !isFinite(message.cramersV) ? String(message.cramersV) : message.cramersV; return object; }; /** - * Converts this UndeployModelRequest to JSON. + * Converts this CorrelationStats to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.UndeployModelRequest + * @memberof google.cloud.automl.v1beta1.CorrelationStats * @instance * @returns {Object.} JSON object */ - UndeployModelRequest.prototype.toJSON = function toJSON() { + CorrelationStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UndeployModelRequest; + return CorrelationStats; })(); - v1beta1.ExportModelRequest = (function() { + /** + * TypeCode enum. + * @name google.cloud.automl.v1beta1.TypeCode + * @enum {string} + * @property {number} TYPE_CODE_UNSPECIFIED=0 TYPE_CODE_UNSPECIFIED value + * @property {number} FLOAT64=3 FLOAT64 value + * @property {number} TIMESTAMP=4 TIMESTAMP value + * @property {number} STRING=6 STRING value + * @property {number} ARRAY=8 ARRAY value + * @property {number} STRUCT=9 STRUCT value + * @property {number} CATEGORY=10 CATEGORY value + */ + v1beta1.TypeCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_CODE_UNSPECIFIED"] = 0; + values[valuesById[3] = "FLOAT64"] = 3; + values[valuesById[4] = "TIMESTAMP"] = 4; + values[valuesById[6] = "STRING"] = 6; + values[valuesById[8] = "ARRAY"] = 8; + values[valuesById[9] = "STRUCT"] = 9; + values[valuesById[10] = "CATEGORY"] = 10; + return values; + })(); + + v1beta1.DataType = (function() { /** - * Properties of an ExportModelRequest. + * Properties of a DataType. * @memberof google.cloud.automl.v1beta1 - * @interface IExportModelRequest - * @property {string|null} [name] ExportModelRequest name - * @property {google.cloud.automl.v1beta1.IModelExportOutputConfig|null} [outputConfig] ExportModelRequest outputConfig + * @interface IDataType + * @property {google.cloud.automl.v1beta1.IDataType|null} [listElementType] DataType listElementType + * @property {google.cloud.automl.v1beta1.IStructType|null} [structType] DataType structType + * @property {string|null} [timeFormat] DataType timeFormat + * @property {google.cloud.automl.v1beta1.TypeCode|null} [typeCode] DataType typeCode + * @property {boolean|null} [nullable] DataType nullable */ /** - * Constructs a new ExportModelRequest. + * Constructs a new DataType. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExportModelRequest. - * @implements IExportModelRequest + * @classdesc Represents a DataType. + * @implements IDataType * @constructor - * @param {google.cloud.automl.v1beta1.IExportModelRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDataType=} [properties] Properties to set */ - function ExportModelRequest(properties) { + function DataType(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28911,88 +32077,141 @@ } /** - * ExportModelRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * DataType listElementType. + * @member {google.cloud.automl.v1beta1.IDataType|null|undefined} listElementType + * @memberof google.cloud.automl.v1beta1.DataType * @instance */ - ExportModelRequest.prototype.name = ""; + DataType.prototype.listElementType = null; /** - * ExportModelRequest outputConfig. - * @member {google.cloud.automl.v1beta1.IModelExportOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * DataType structType. + * @member {google.cloud.automl.v1beta1.IStructType|null|undefined} structType + * @memberof google.cloud.automl.v1beta1.DataType * @instance */ - ExportModelRequest.prototype.outputConfig = null; + DataType.prototype.structType = null; /** - * Creates a new ExportModelRequest instance using the specified properties. + * DataType timeFormat. + * @member {string} timeFormat + * @memberof google.cloud.automl.v1beta1.DataType + * @instance + */ + DataType.prototype.timeFormat = ""; + + /** + * DataType typeCode. + * @member {google.cloud.automl.v1beta1.TypeCode} typeCode + * @memberof google.cloud.automl.v1beta1.DataType + * @instance + */ + DataType.prototype.typeCode = 0; + + /** + * DataType nullable. + * @member {boolean} nullable + * @memberof google.cloud.automl.v1beta1.DataType + * @instance + */ + DataType.prototype.nullable = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataType details. + * @member {"listElementType"|"structType"|"timeFormat"|undefined} details + * @memberof google.cloud.automl.v1beta1.DataType + * @instance + */ + Object.defineProperty(DataType.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["listElementType", "structType", "timeFormat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataType instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static - * @param {google.cloud.automl.v1beta1.IExportModelRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest instance + * @param {google.cloud.automl.v1beta1.IDataType=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DataType} DataType instance */ - ExportModelRequest.create = function create(properties) { - return new ExportModelRequest(properties); + DataType.create = function create(properties) { + return new DataType(properties); }; /** - * Encodes the specified ExportModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. + * Encodes the specified DataType message. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static - * @param {google.cloud.automl.v1beta1.IExportModelRequest} message ExportModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDataType} message DataType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelRequest.encode = function encode(message, writer) { + DataType.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.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.encode(message.outputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.typeCode != null && message.hasOwnProperty("typeCode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.typeCode); + if (message.listElementType != null && message.hasOwnProperty("listElementType")) + $root.google.cloud.automl.v1beta1.DataType.encode(message.listElementType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.structType != null && message.hasOwnProperty("structType")) + $root.google.cloud.automl.v1beta1.StructType.encode(message.structType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.nullable != null && message.hasOwnProperty("nullable")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nullable); + if (message.timeFormat != null && message.hasOwnProperty("timeFormat")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeFormat); return writer; }; /** - * Encodes the specified ExportModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. + * Encodes the specified DataType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static - * @param {google.cloud.automl.v1beta1.IExportModelRequest} message ExportModelRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDataType} message DataType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + DataType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportModelRequest message from the specified reader or buffer. + * Decodes a DataType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest + * @returns {google.cloud.automl.v1beta1.DataType} DataType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelRequest.decode = function decode(reader, length) { + DataType.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.automl.v1beta1.ExportModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DataType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); + case 2: + message.listElementType = $root.google.cloud.automl.v1beta1.DataType.decode(reader, reader.uint32()); break; case 3: - message.outputConfig = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.decode(reader, reader.uint32()); + message.structType = $root.google.cloud.automl.v1beta1.StructType.decode(reader, reader.uint32()); + break; + case 5: + message.timeFormat = reader.string(); + break; + case 1: + message.typeCode = reader.int32(); + break; + case 4: + message.nullable = reader.bool(); break; default: reader.skipType(tag & 7); @@ -29003,122 +32222,208 @@ }; /** - * Decodes an ExportModelRequest message from the specified reader or buffer, length delimited. + * Decodes a DataType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest + * @returns {google.cloud.automl.v1beta1.DataType} DataType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelRequest.decodeDelimited = function decodeDelimited(reader) { + DataType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportModelRequest message. + * Verifies a DataType message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportModelRequest.verify = function verify(message) { + DataType.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.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.verify(message.outputConfig); - if (error) - return "outputConfig." + error; + var properties = {}; + if (message.listElementType != null && message.hasOwnProperty("listElementType")) { + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.DataType.verify(message.listElementType); + if (error) + return "listElementType." + error; + } + } + if (message.structType != null && message.hasOwnProperty("structType")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.StructType.verify(message.structType); + if (error) + return "structType." + error; + } } + if (message.timeFormat != null && message.hasOwnProperty("timeFormat")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + if (!$util.isString(message.timeFormat)) + return "timeFormat: string expected"; + } + if (message.typeCode != null && message.hasOwnProperty("typeCode")) + switch (message.typeCode) { + default: + return "typeCode: enum value expected"; + case 0: + case 3: + case 4: + case 6: + case 8: + case 9: + case 10: + break; + } + if (message.nullable != null && message.hasOwnProperty("nullable")) + if (typeof message.nullable !== "boolean") + return "nullable: boolean expected"; return null; }; /** - * Creates an ExportModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest + * @returns {google.cloud.automl.v1beta1.DataType} DataType */ - ExportModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportModelRequest) + DataType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DataType) return object; - var message = new $root.google.cloud.automl.v1beta1.ExportModelRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExportModelRequest.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.fromObject(object.outputConfig); + var message = new $root.google.cloud.automl.v1beta1.DataType(); + if (object.listElementType != null) { + if (typeof object.listElementType !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataType.listElementType: object expected"); + message.listElementType = $root.google.cloud.automl.v1beta1.DataType.fromObject(object.listElementType); + } + if (object.structType != null) { + if (typeof object.structType !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DataType.structType: object expected"); + message.structType = $root.google.cloud.automl.v1beta1.StructType.fromObject(object.structType); + } + if (object.timeFormat != null) + message.timeFormat = String(object.timeFormat); + switch (object.typeCode) { + case "TYPE_CODE_UNSPECIFIED": + case 0: + message.typeCode = 0; + break; + case "FLOAT64": + case 3: + message.typeCode = 3; + break; + case "TIMESTAMP": + case 4: + message.typeCode = 4; + break; + case "STRING": + case 6: + message.typeCode = 6; + break; + case "ARRAY": + case 8: + message.typeCode = 8; + break; + case "STRUCT": + case 9: + message.typeCode = 9; + break; + case "CATEGORY": + case 10: + message.typeCode = 10; + break; } + if (object.nullable != null) + message.nullable = Boolean(object.nullable); return message; }; /** - * Creates a plain object from an ExportModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a DataType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @static - * @param {google.cloud.automl.v1beta1.ExportModelRequest} message ExportModelRequest + * @param {google.cloud.automl.v1beta1.DataType} message DataType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportModelRequest.toObject = function toObject(message, options) { + DataType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.outputConfig = null; + object.typeCode = options.enums === String ? "TYPE_CODE_UNSPECIFIED" : 0; + object.nullable = false; + } + if (message.typeCode != null && message.hasOwnProperty("typeCode")) + object.typeCode = options.enums === String ? $root.google.cloud.automl.v1beta1.TypeCode[message.typeCode] : message.typeCode; + if (message.listElementType != null && message.hasOwnProperty("listElementType")) { + object.listElementType = $root.google.cloud.automl.v1beta1.DataType.toObject(message.listElementType, options); + if (options.oneofs) + object.details = "listElementType"; + } + if (message.structType != null && message.hasOwnProperty("structType")) { + object.structType = $root.google.cloud.automl.v1beta1.StructType.toObject(message.structType, options); + if (options.oneofs) + object.details = "structType"; + } + if (message.nullable != null && message.hasOwnProperty("nullable")) + object.nullable = message.nullable; + if (message.timeFormat != null && message.hasOwnProperty("timeFormat")) { + object.timeFormat = message.timeFormat; + if (options.oneofs) + object.details = "timeFormat"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this ExportModelRequest to JSON. + * Converts this DataType to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @memberof google.cloud.automl.v1beta1.DataType * @instance * @returns {Object.} JSON object */ - ExportModelRequest.prototype.toJSON = function toJSON() { + DataType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportModelRequest; + return DataType; })(); - v1beta1.ExportEvaluatedExamplesRequest = (function() { + v1beta1.StructType = (function() { /** - * Properties of an ExportEvaluatedExamplesRequest. + * Properties of a StructType. * @memberof google.cloud.automl.v1beta1 - * @interface IExportEvaluatedExamplesRequest - * @property {string|null} [name] ExportEvaluatedExamplesRequest name - * @property {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null} [outputConfig] ExportEvaluatedExamplesRequest outputConfig + * @interface IStructType + * @property {Object.|null} [fields] StructType fields */ /** - * Constructs a new ExportEvaluatedExamplesRequest. + * Constructs a new StructType. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExportEvaluatedExamplesRequest. - * @implements IExportEvaluatedExamplesRequest + * @classdesc Represents a StructType. + * @implements IStructType * @constructor - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IStructType=} [properties] Properties to set */ - function ExportEvaluatedExamplesRequest(properties) { + function StructType(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29126,88 +32431,83 @@ } /** - * ExportEvaluatedExamplesRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest - * @instance - */ - ExportEvaluatedExamplesRequest.prototype.name = ""; - - /** - * ExportEvaluatedExamplesRequest outputConfig. - * @member {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * StructType fields. + * @member {Object.} fields + * @memberof google.cloud.automl.v1beta1.StructType * @instance */ - ExportEvaluatedExamplesRequest.prototype.outputConfig = null; + StructType.prototype.fields = $util.emptyObject; /** - * Creates a new ExportEvaluatedExamplesRequest instance using the specified properties. + * Creates a new StructType instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest instance + * @param {google.cloud.automl.v1beta1.IStructType=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.StructType} StructType instance */ - ExportEvaluatedExamplesRequest.create = function create(properties) { - return new ExportEvaluatedExamplesRequest(properties); + StructType.create = function create(properties) { + return new StructType(properties); }; /** - * Encodes the specified ExportEvaluatedExamplesRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. + * Encodes the specified StructType message. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} message ExportEvaluatedExamplesRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IStructType} message StructType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEvaluatedExamplesRequest.encode = function encode(message, writer) { + StructType.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.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.encode(message.outputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.automl.v1beta1.DataType.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ExportEvaluatedExamplesRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. + * Encodes the specified StructType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} message ExportEvaluatedExamplesRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IStructType} message StructType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEvaluatedExamplesRequest.encodeDelimited = function encodeDelimited(message, writer) { + StructType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer. + * Decodes a StructType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest + * @returns {google.cloud.automl.v1beta1.StructType} StructType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEvaluatedExamplesRequest.decode = function decode(reader, length) { + StructType.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.automl.v1beta1.ExportEvaluatedExamplesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.StructType(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 3: - message.outputConfig = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.decode(reader, reader.uint32()); + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.cloud.automl.v1beta1.DataType.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -29218,121 +32518,128 @@ }; /** - * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer, length delimited. + * Decodes a StructType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest + * @returns {google.cloud.automl.v1beta1.StructType} StructType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEvaluatedExamplesRequest.decodeDelimited = function decodeDelimited(reader) { + StructType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportEvaluatedExamplesRequest message. + * Verifies a StructType message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportEvaluatedExamplesRequest.verify = function verify(message) { + StructType.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.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify(message.outputConfig); - if (error) - return "outputConfig." + error; + 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.automl.v1beta1.DataType.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } } return null; }; /** - * Creates an ExportEvaluatedExamplesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StructType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest + * @returns {google.cloud.automl.v1beta1.StructType} StructType */ - ExportEvaluatedExamplesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) + StructType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.StructType) return object; - var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.fromObject(object.outputConfig); + var message = new $root.google.cloud.automl.v1beta1.StructType(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.cloud.automl.v1beta1.StructType.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.automl.v1beta1.StructType.fields: object expected"); + message.fields[keys[i]] = $root.google.cloud.automl.v1beta1.DataType.fromObject(object.fields[keys[i]]); + } } return message; }; /** - * Creates a plain object from an ExportEvaluatedExamplesRequest message. Also converts values to other types if specified. + * Creates a plain object from a StructType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @static - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} message ExportEvaluatedExamplesRequest + * @param {google.cloud.automl.v1beta1.StructType} message StructType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportEvaluatedExamplesRequest.toObject = function toObject(message, options) { + StructType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.outputConfig = null; + if (options.objects || options.defaults) + object.fields = {}; + 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.automl.v1beta1.DataType.toObject(message.fields[keys2[j]], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this ExportEvaluatedExamplesRequest to JSON. + * Converts this StructType to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + * @memberof google.cloud.automl.v1beta1.StructType * @instance * @returns {Object.} JSON object */ - ExportEvaluatedExamplesRequest.prototype.toJSON = function toJSON() { + StructType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportEvaluatedExamplesRequest; + return StructType; })(); - v1beta1.GetModelEvaluationRequest = (function() { + v1beta1.Image = (function() { /** - * Properties of a GetModelEvaluationRequest. + * Properties of an Image. * @memberof google.cloud.automl.v1beta1 - * @interface IGetModelEvaluationRequest - * @property {string|null} [name] GetModelEvaluationRequest name + * @interface IImage + * @property {Uint8Array|null} [imageBytes] Image imageBytes + * @property {google.cloud.automl.v1beta1.IInputConfig|null} [inputConfig] Image inputConfig + * @property {string|null} [thumbnailUri] Image thumbnailUri */ /** - * Constructs a new GetModelEvaluationRequest. + * Constructs a new Image. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GetModelEvaluationRequest. - * @implements IGetModelEvaluationRequest + * @classdesc Represents an Image. + * @implements IImage * @constructor - * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImage=} [properties] Properties to set */ - function GetModelEvaluationRequest(properties) { + function Image(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29340,75 +32647,115 @@ } /** - * GetModelEvaluationRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * Image imageBytes. + * @member {Uint8Array} imageBytes + * @memberof google.cloud.automl.v1beta1.Image * @instance */ - GetModelEvaluationRequest.prototype.name = ""; + Image.prototype.imageBytes = $util.newBuffer([]); /** - * Creates a new GetModelEvaluationRequest instance using the specified properties. + * Image inputConfig. + * @member {google.cloud.automl.v1beta1.IInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1beta1.Image + * @instance + */ + Image.prototype.inputConfig = null; + + /** + * Image thumbnailUri. + * @member {string} thumbnailUri + * @memberof google.cloud.automl.v1beta1.Image + * @instance + */ + Image.prototype.thumbnailUri = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Image data. + * @member {"imageBytes"|"inputConfig"|undefined} data + * @memberof google.cloud.automl.v1beta1.Image + * @instance + */ + Object.defineProperty(Image.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["imageBytes", "inputConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Image instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static - * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest instance + * @param {google.cloud.automl.v1beta1.IImage=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Image} Image instance */ - GetModelEvaluationRequest.create = function create(properties) { - return new GetModelEvaluationRequest(properties); + Image.create = function create(properties) { + return new Image(properties); }; /** - * Encodes the specified GetModelEvaluationRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. + * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static - * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} message GetModelEvaluationRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImage} message Image message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetModelEvaluationRequest.encode = function encode(message, writer) { + Image.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.imageBytes != null && message.hasOwnProperty("imageBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.imageBytes); + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUri); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static - * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} message GetModelEvaluationRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImage} message Image message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetModelEvaluationRequest.encodeDelimited = function encodeDelimited(message, writer) { + Image.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetModelEvaluationRequest message from the specified reader or buffer. + * Decodes an Image message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest + * @returns {google.cloud.automl.v1beta1.Image} Image * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetModelEvaluationRequest.decode = function decode(reader, length) { + Image.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.automl.v1beta1.GetModelEvaluationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.Image(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.imageBytes = reader.bytes(); + break; + case 6: + message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.decode(reader, reader.uint32()); + break; + case 4: + message.thumbnailUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -29419,110 +32766,145 @@ }; /** - * Decodes a GetModelEvaluationRequest message from the specified reader or buffer, length delimited. + * Decodes an Image message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest + * @returns {google.cloud.automl.v1beta1.Image} Image * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetModelEvaluationRequest.decodeDelimited = function decodeDelimited(reader) { + Image.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetModelEvaluationRequest message. + * Verifies an Image message. * @function verify - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetModelEvaluationRequest.verify = function verify(message) { + Image.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.imageBytes != null && message.hasOwnProperty("imageBytes")) { + properties.data = 1; + if (!(message.imageBytes && typeof message.imageBytes.length === "number" || $util.isString(message.imageBytes))) + return "imageBytes: buffer expected"; + } + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.automl.v1beta1.InputConfig.verify(message.inputConfig); + if (error) + return "inputConfig." + error; + } + } + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + if (!$util.isString(message.thumbnailUri)) + return "thumbnailUri: string expected"; return null; }; /** - * Creates a GetModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Image message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest + * @returns {google.cloud.automl.v1beta1.Image} Image */ - GetModelEvaluationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GetModelEvaluationRequest) + Image.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Image) return object; - var message = new $root.google.cloud.automl.v1beta1.GetModelEvaluationRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.automl.v1beta1.Image(); + if (object.imageBytes != null) + if (typeof object.imageBytes === "string") + $util.base64.decode(object.imageBytes, message.imageBytes = $util.newBuffer($util.base64.length(object.imageBytes)), 0); + else if (object.imageBytes.length) + message.imageBytes = object.imageBytes; + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Image.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.fromObject(object.inputConfig); + } + if (object.thumbnailUri != null) + message.thumbnailUri = String(object.thumbnailUri); return message; }; /** - * Creates a plain object from a GetModelEvaluationRequest message. Also converts values to other types if specified. + * Creates a plain object from an Image message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @static - * @param {google.cloud.automl.v1beta1.GetModelEvaluationRequest} message GetModelEvaluationRequest + * @param {google.cloud.automl.v1beta1.Image} message Image * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetModelEvaluationRequest.toObject = function toObject(message, options) { + Image.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; + object.thumbnailUri = ""; + if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) { + object.imageBytes = options.bytes === String ? $util.base64.encode(message.imageBytes, 0, message.imageBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageBytes) : message.imageBytes; + if (options.oneofs) + object.data = "imageBytes"; + } + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + object.thumbnailUri = message.thumbnailUri; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + object.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.toObject(message.inputConfig, options); + if (options.oneofs) + object.data = "inputConfig"; + } return object; }; /** - * Converts this GetModelEvaluationRequest to JSON. + * Converts this Image to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest + * @memberof google.cloud.automl.v1beta1.Image * @instance * @returns {Object.} JSON object */ - GetModelEvaluationRequest.prototype.toJSON = function toJSON() { + Image.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetModelEvaluationRequest; + return Image; })(); - v1beta1.ListModelEvaluationsRequest = (function() { + v1beta1.TextSnippet = (function() { /** - * Properties of a ListModelEvaluationsRequest. + * Properties of a TextSnippet. * @memberof google.cloud.automl.v1beta1 - * @interface IListModelEvaluationsRequest - * @property {string|null} [parent] ListModelEvaluationsRequest parent - * @property {string|null} [filter] ListModelEvaluationsRequest filter - * @property {number|null} [pageSize] ListModelEvaluationsRequest pageSize - * @property {string|null} [pageToken] ListModelEvaluationsRequest pageToken + * @interface ITextSnippet + * @property {string|null} [content] TextSnippet content + * @property {string|null} [mimeType] TextSnippet mimeType + * @property {string|null} [contentUri] TextSnippet contentUri */ /** - * Constructs a new ListModelEvaluationsRequest. + * Constructs a new TextSnippet. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListModelEvaluationsRequest. - * @implements IListModelEvaluationsRequest + * @classdesc Represents a TextSnippet. + * @implements ITextSnippet * @constructor - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextSnippet=} [properties] Properties to set */ - function ListModelEvaluationsRequest(properties) { + function TextSnippet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29530,114 +32912,101 @@ } /** - * ListModelEvaluationsRequest parent. - * @member {string} parent - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest - * @instance - */ - ListModelEvaluationsRequest.prototype.parent = ""; - - /** - * ListModelEvaluationsRequest filter. - * @member {string} filter - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * TextSnippet content. + * @member {string} content + * @memberof google.cloud.automl.v1beta1.TextSnippet * @instance */ - ListModelEvaluationsRequest.prototype.filter = ""; + TextSnippet.prototype.content = ""; /** - * ListModelEvaluationsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * TextSnippet mimeType. + * @member {string} mimeType + * @memberof google.cloud.automl.v1beta1.TextSnippet * @instance */ - ListModelEvaluationsRequest.prototype.pageSize = 0; + TextSnippet.prototype.mimeType = ""; /** - * ListModelEvaluationsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * TextSnippet contentUri. + * @member {string} contentUri + * @memberof google.cloud.automl.v1beta1.TextSnippet * @instance */ - ListModelEvaluationsRequest.prototype.pageToken = ""; + TextSnippet.prototype.contentUri = ""; /** - * Creates a new ListModelEvaluationsRequest instance using the specified properties. + * Creates a new TextSnippet instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest instance + * @param {google.cloud.automl.v1beta1.ITextSnippet=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet instance */ - ListModelEvaluationsRequest.create = function create(properties) { - return new ListModelEvaluationsRequest(properties); + TextSnippet.create = function create(properties) { + return new TextSnippet(properties); }; /** - * Encodes the specified ListModelEvaluationsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. + * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} message ListModelEvaluationsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSnippet} message TextSnippet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelEvaluationsRequest.encode = function encode(message, writer) { + TextSnippet.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.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); + if (message.contentUri != null && message.hasOwnProperty("contentUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.contentUri); return writer; }; /** - * Encodes the specified ListModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. + * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} message ListModelEvaluationsRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSnippet} message TextSnippet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelEvaluationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TextSnippet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer. + * Decodes a TextSnippet message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest + * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelEvaluationsRequest.decode = function decode(reader, length) { + TextSnippet.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.automl.v1beta1.ListModelEvaluationsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextSnippet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.content = reader.string(); break; - case 3: - message.filter = reader.string(); + case 2: + message.mimeType = reader.string(); break; case 4: - message.pageSize = reader.int32(); - break; - case 6: - message.pageToken = reader.string(); + message.contentUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -29648,134 +33017,126 @@ }; /** - * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer, length delimited. + * Decodes a TextSnippet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest + * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelEvaluationsRequest.decodeDelimited = function decodeDelimited(reader) { + TextSnippet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListModelEvaluationsRequest message. + * Verifies a TextSnippet message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListModelEvaluationsRequest.verify = function verify(message) { + TextSnippet.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.contentUri != null && message.hasOwnProperty("contentUri")) + if (!$util.isString(message.contentUri)) + return "contentUri: string expected"; return null; }; /** - * Creates a ListModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextSnippet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest + * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet */ - ListModelEvaluationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListModelEvaluationsRequest) + TextSnippet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextSnippet) return object; - var message = new $root.google.cloud.automl.v1beta1.ListModelEvaluationsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.automl.v1beta1.TextSnippet(); + if (object.content != null) + message.content = String(object.content); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.contentUri != null) + message.contentUri = String(object.contentUri); return message; }; /** - * Creates a plain object from a ListModelEvaluationsRequest message. Also converts values to other types if specified. + * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @static - * @param {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} message ListModelEvaluationsRequest + * @param {google.cloud.automl.v1beta1.TextSnippet} message TextSnippet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListModelEvaluationsRequest.toObject = function toObject(message, options) { + TextSnippet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.content = ""; + object.mimeType = ""; + object.contentUri = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.contentUri != null && message.hasOwnProperty("contentUri")) + object.contentUri = message.contentUri; return object; }; /** - * Converts this ListModelEvaluationsRequest to JSON. + * Converts this TextSnippet to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @memberof google.cloud.automl.v1beta1.TextSnippet * @instance * @returns {Object.} JSON object */ - ListModelEvaluationsRequest.prototype.toJSON = function toJSON() { + TextSnippet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListModelEvaluationsRequest; + return TextSnippet; })(); - v1beta1.ListModelEvaluationsResponse = (function() { + v1beta1.DocumentDimensions = (function() { /** - * Properties of a ListModelEvaluationsResponse. + * Properties of a DocumentDimensions. * @memberof google.cloud.automl.v1beta1 - * @interface IListModelEvaluationsResponse - * @property {Array.|null} [modelEvaluation] ListModelEvaluationsResponse modelEvaluation - * @property {string|null} [nextPageToken] ListModelEvaluationsResponse nextPageToken + * @interface IDocumentDimensions + * @property {google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|null} [unit] DocumentDimensions unit + * @property {number|null} [width] DocumentDimensions width + * @property {number|null} [height] DocumentDimensions height */ /** - * Constructs a new ListModelEvaluationsResponse. + * Constructs a new DocumentDimensions. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ListModelEvaluationsResponse. - * @implements IListModelEvaluationsResponse + * @classdesc Represents a DocumentDimensions. + * @implements IDocumentDimensions * @constructor - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDocumentDimensions=} [properties] Properties to set */ - function ListModelEvaluationsResponse(properties) { - this.modelEvaluation = []; + function DocumentDimensions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29783,91 +33144,101 @@ } /** - * ListModelEvaluationsResponse modelEvaluation. - * @member {Array.} modelEvaluation - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * DocumentDimensions unit. + * @member {google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit} unit + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @instance */ - ListModelEvaluationsResponse.prototype.modelEvaluation = $util.emptyArray; + DocumentDimensions.prototype.unit = 0; /** - * ListModelEvaluationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * DocumentDimensions width. + * @member {number} width + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @instance */ - ListModelEvaluationsResponse.prototype.nextPageToken = ""; + DocumentDimensions.prototype.width = 0; /** - * Creates a new ListModelEvaluationsResponse instance using the specified properties. + * DocumentDimensions height. + * @member {number} height + * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @instance + */ + DocumentDimensions.prototype.height = 0; + + /** + * Creates a new DocumentDimensions instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse instance + * @param {google.cloud.automl.v1beta1.IDocumentDimensions=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions instance */ - ListModelEvaluationsResponse.create = function create(properties) { - return new ListModelEvaluationsResponse(properties); + DocumentDimensions.create = function create(properties) { + return new DocumentDimensions(properties); }; /** - * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. + * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDocumentDimensions} message DocumentDimensions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelEvaluationsResponse.encode = function encode(message, writer) { + DocumentDimensions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.modelEvaluation != null && message.modelEvaluation.length) - for (var i = 0; i < message.modelEvaluation.length; ++i) - $root.google.cloud.automl.v1beta1.ModelEvaluation.encode(message.modelEvaluation[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.unit != null && message.hasOwnProperty("unit")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.unit); + if (message.width != null && message.hasOwnProperty("width")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.width); + if (message.height != null && message.hasOwnProperty("height")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.height); return writer; }; /** - * Encodes the specified ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. + * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static - * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDocumentDimensions} message DocumentDimensions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListModelEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DocumentDimensions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. + * Decodes a DocumentDimensions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelEvaluationsResponse.decode = function decode(reader, length) { + DocumentDimensions.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.automl.v1beta1.ListModelEvaluationsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DocumentDimensions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.modelEvaluation && message.modelEvaluation.length)) - message.modelEvaluation = []; - message.modelEvaluation.push($root.google.cloud.automl.v1beta1.ModelEvaluation.decode(reader, reader.uint32())); + message.unit = reader.int32(); break; case 2: - message.nextPageToken = reader.string(); + message.width = reader.float(); + break; + case 3: + message.height = reader.float(); break; default: reader.skipType(tag & 7); @@ -29878,142 +33249,170 @@ }; /** - * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListModelEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { + DocumentDimensions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListModelEvaluationsResponse message. + * Verifies a DocumentDimensions message. * @function verify - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListModelEvaluationsResponse.verify = function verify(message) { + DocumentDimensions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modelEvaluation != null && message.hasOwnProperty("modelEvaluation")) { - if (!Array.isArray(message.modelEvaluation)) - return "modelEvaluation: array expected"; - for (var i = 0; i < message.modelEvaluation.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.ModelEvaluation.verify(message.modelEvaluation[i]); - if (error) - return "modelEvaluation." + error; + if (message.unit != null && message.hasOwnProperty("unit")) + switch (message.unit) { + default: + return "unit: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height !== "number") + return "height: number expected"; return null; }; /** - * Creates a ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentDimensions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse + * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions */ - ListModelEvaluationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ListModelEvaluationsResponse) + DocumentDimensions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DocumentDimensions) return object; - var message = new $root.google.cloud.automl.v1beta1.ListModelEvaluationsResponse(); - if (object.modelEvaluation) { - if (!Array.isArray(object.modelEvaluation)) - throw TypeError(".google.cloud.automl.v1beta1.ListModelEvaluationsResponse.modelEvaluation: array expected"); - message.modelEvaluation = []; - for (var i = 0; i < object.modelEvaluation.length; ++i) { - if (typeof object.modelEvaluation[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ListModelEvaluationsResponse.modelEvaluation: object expected"); - message.modelEvaluation[i] = $root.google.cloud.automl.v1beta1.ModelEvaluation.fromObject(object.modelEvaluation[i]); - } + var message = new $root.google.cloud.automl.v1beta1.DocumentDimensions(); + switch (object.unit) { + case "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": + case 0: + message.unit = 0; + break; + case "INCH": + case 1: + message.unit = 1; + break; + case "CENTIMETER": + case 2: + message.unit = 2; + break; + case "POINT": + case 3: + message.unit = 3; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.width != null) + message.width = Number(object.width); + if (object.height != null) + message.height = Number(object.height); return message; }; /** - * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @static - * @param {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} message ListModelEvaluationsResponse + * @param {google.cloud.automl.v1beta1.DocumentDimensions} message DocumentDimensions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListModelEvaluationsResponse.toObject = function toObject(message, options) { + DocumentDimensions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.modelEvaluation = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.modelEvaluation && message.modelEvaluation.length) { - object.modelEvaluation = []; - for (var j = 0; j < message.modelEvaluation.length; ++j) - object.modelEvaluation[j] = $root.google.cloud.automl.v1beta1.ModelEvaluation.toObject(message.modelEvaluation[j], options); + if (options.defaults) { + object.unit = options.enums === String ? "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED" : 0; + object.width = 0; + object.height = 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = options.enums === String ? $root.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height; return object; }; /** - * Converts this ListModelEvaluationsResponse to JSON. + * Converts this DocumentDimensions to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse + * @memberof google.cloud.automl.v1beta1.DocumentDimensions * @instance * @returns {Object.} JSON object */ - ListModelEvaluationsResponse.prototype.toJSON = function toJSON() { + DocumentDimensions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListModelEvaluationsResponse; + /** + * DocumentDimensionUnit enum. + * @name google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit + * @enum {string} + * @property {number} DOCUMENT_DIMENSION_UNIT_UNSPECIFIED=0 DOCUMENT_DIMENSION_UNIT_UNSPECIFIED value + * @property {number} INCH=1 INCH value + * @property {number} CENTIMETER=2 CENTIMETER value + * @property {number} POINT=3 POINT value + */ + DocumentDimensions.DocumentDimensionUnit = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCH"] = 1; + values[valuesById[2] = "CENTIMETER"] = 2; + values[valuesById[3] = "POINT"] = 3; + return values; + })(); + + return DocumentDimensions; })(); - v1beta1.AnnotationPayload = (function() { + v1beta1.Document = (function() { /** - * Properties of an AnnotationPayload. + * Properties of a Document. * @memberof google.cloud.automl.v1beta1 - * @interface IAnnotationPayload - * @property {google.cloud.automl.v1beta1.ITranslationAnnotation|null} [translation] AnnotationPayload translation - * @property {google.cloud.automl.v1beta1.IClassificationAnnotation|null} [classification] AnnotationPayload classification - * @property {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null} [imageObjectDetection] AnnotationPayload imageObjectDetection - * @property {google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null} [videoClassification] AnnotationPayload videoClassification - * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null} [videoObjectTracking] AnnotationPayload videoObjectTracking - * @property {google.cloud.automl.v1beta1.ITextExtractionAnnotation|null} [textExtraction] AnnotationPayload textExtraction - * @property {google.cloud.automl.v1beta1.ITextSentimentAnnotation|null} [textSentiment] AnnotationPayload textSentiment - * @property {google.cloud.automl.v1beta1.ITablesAnnotation|null} [tables] AnnotationPayload tables - * @property {string|null} [annotationSpecId] AnnotationPayload annotationSpecId - * @property {string|null} [displayName] AnnotationPayload displayName + * @interface IDocument + * @property {google.cloud.automl.v1beta1.IDocumentInputConfig|null} [inputConfig] Document inputConfig + * @property {google.cloud.automl.v1beta1.ITextSnippet|null} [documentText] Document documentText + * @property {Array.|null} [layout] Document layout + * @property {google.cloud.automl.v1beta1.IDocumentDimensions|null} [documentDimensions] Document documentDimensions + * @property {number|null} [pageCount] Document pageCount */ /** - * Constructs a new AnnotationPayload. + * Constructs a new Document. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an AnnotationPayload. - * @implements IAnnotationPayload + * @classdesc Represents a Document. + * @implements IDocument * @constructor - * @param {google.cloud.automl.v1beta1.IAnnotationPayload=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDocument=} [properties] Properties to set */ - function AnnotationPayload(properties) { + function Document(properties) { + this.layout = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30021,501 +33420,657 @@ } /** - * AnnotationPayload translation. - * @member {google.cloud.automl.v1beta1.ITranslationAnnotation|null|undefined} translation - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.translation = null; - - /** - * AnnotationPayload classification. - * @member {google.cloud.automl.v1beta1.IClassificationAnnotation|null|undefined} classification - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.classification = null; - - /** - * AnnotationPayload imageObjectDetection. - * @member {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation|null|undefined} imageObjectDetection - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.imageObjectDetection = null; - - /** - * AnnotationPayload videoClassification. - * @member {google.cloud.automl.v1beta1.IVideoClassificationAnnotation|null|undefined} videoClassification - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.videoClassification = null; - - /** - * AnnotationPayload videoObjectTracking. - * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation|null|undefined} videoObjectTracking - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.videoObjectTracking = null; - - /** - * AnnotationPayload textExtraction. - * @member {google.cloud.automl.v1beta1.ITextExtractionAnnotation|null|undefined} textExtraction - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @instance - */ - AnnotationPayload.prototype.textExtraction = null; - - /** - * AnnotationPayload textSentiment. - * @member {google.cloud.automl.v1beta1.ITextSentimentAnnotation|null|undefined} textSentiment - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * Document inputConfig. + * @member {google.cloud.automl.v1beta1.IDocumentInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1beta1.Document * @instance */ - AnnotationPayload.prototype.textSentiment = null; + Document.prototype.inputConfig = null; /** - * AnnotationPayload tables. - * @member {google.cloud.automl.v1beta1.ITablesAnnotation|null|undefined} tables - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * Document documentText. + * @member {google.cloud.automl.v1beta1.ITextSnippet|null|undefined} documentText + * @memberof google.cloud.automl.v1beta1.Document * @instance */ - AnnotationPayload.prototype.tables = null; + Document.prototype.documentText = null; /** - * AnnotationPayload annotationSpecId. - * @member {string} annotationSpecId - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * Document layout. + * @member {Array.} layout + * @memberof google.cloud.automl.v1beta1.Document * @instance */ - AnnotationPayload.prototype.annotationSpecId = ""; + Document.prototype.layout = $util.emptyArray; /** - * AnnotationPayload displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * Document documentDimensions. + * @member {google.cloud.automl.v1beta1.IDocumentDimensions|null|undefined} documentDimensions + * @memberof google.cloud.automl.v1beta1.Document * @instance */ - AnnotationPayload.prototype.displayName = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Document.prototype.documentDimensions = null; /** - * AnnotationPayload detail. - * @member {"translation"|"classification"|"imageObjectDetection"|"videoClassification"|"videoObjectTracking"|"textExtraction"|"textSentiment"|"tables"|undefined} detail - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * Document pageCount. + * @member {number} pageCount + * @memberof google.cloud.automl.v1beta1.Document * @instance */ - Object.defineProperty(AnnotationPayload.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["translation", "classification", "imageObjectDetection", "videoClassification", "videoObjectTracking", "textExtraction", "textSentiment", "tables"]), - set: $util.oneOfSetter($oneOfFields) - }); + Document.prototype.pageCount = 0; /** - * Creates a new AnnotationPayload instance using the specified properties. + * Creates a new Document instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @memberof google.cloud.automl.v1beta1.Document * @static - * @param {google.cloud.automl.v1beta1.IAnnotationPayload=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload instance + * @param {google.cloud.automl.v1beta1.IDocument=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Document} Document instance */ - AnnotationPayload.create = function create(properties) { - return new AnnotationPayload(properties); + Document.create = function create(properties) { + return new Document(properties); }; /** - * Encodes the specified AnnotationPayload message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. + * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @memberof google.cloud.automl.v1beta1.Document * @static - * @param {google.cloud.automl.v1beta1.IAnnotationPayload} message AnnotationPayload message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationPayload.encode = function encode(message, writer) { + Document.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId); - if (message.translation != null && message.hasOwnProperty("translation")) - $root.google.cloud.automl.v1beta1.TranslationAnnotation.encode(message.translation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.classification != null && message.hasOwnProperty("classification")) - $root.google.cloud.automl.v1beta1.ClassificationAnnotation.encode(message.classification, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) - $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.encode(message.imageObjectDetection, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) - $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.encode(message.textExtraction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) - $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.encode(message.textSentiment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.videoObjectTracking != null && message.hasOwnProperty("videoObjectTracking")) - $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.encode(message.videoObjectTracking, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.videoClassification != null && message.hasOwnProperty("videoClassification")) - $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.encode(message.videoClassification, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.tables != null && message.hasOwnProperty("tables")) - $root.google.cloud.automl.v1beta1.TablesAnnotation.encode(message.tables, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1beta1.DocumentInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.documentText != null && message.hasOwnProperty("documentText")) + $root.google.cloud.automl.v1beta1.TextSnippet.encode(message.documentText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.layout != null && message.layout.length) + for (var i = 0; i < message.layout.length; ++i) + $root.google.cloud.automl.v1beta1.Document.Layout.encode(message.layout[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) + $root.google.cloud.automl.v1beta1.DocumentDimensions.encode(message.documentDimensions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageCount); return writer; }; /** - * Encodes the specified AnnotationPayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationPayload.verify|verify} messages. + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @memberof google.cloud.automl.v1beta1.Document * @static - * @param {google.cloud.automl.v1beta1.IAnnotationPayload} message AnnotationPayload message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationPayload.encodeDelimited = function encodeDelimited(message, writer) { + Document.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationPayload message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.AnnotationPayload + * @memberof google.cloud.automl.v1beta1.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload + * @returns {google.cloud.automl.v1beta1.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationPayload.decode = function decode(reader, length) { + Document.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.automl.v1beta1.AnnotationPayload(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.Document(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.inputConfig = $root.google.cloud.automl.v1beta1.DocumentInputConfig.decode(reader, reader.uint32()); + break; + case 2: + message.documentText = $root.google.cloud.automl.v1beta1.TextSnippet.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.layout && message.layout.length)) + message.layout = []; + message.layout.push($root.google.cloud.automl.v1beta1.Document.Layout.decode(reader, reader.uint32())); + break; + case 4: + message.documentDimensions = $root.google.cloud.automl.v1beta1.DocumentDimensions.decode(reader, reader.uint32()); + break; + case 5: + message.pageCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Document message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.Document + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.Document} Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Document.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Document message. + * @function verify + * @memberof google.cloud.automl.v1beta1.Document + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Document.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.automl.v1beta1.DocumentInputConfig.verify(message.inputConfig); + if (error) + return "inputConfig." + error; + } + if (message.documentText != null && message.hasOwnProperty("documentText")) { + var error = $root.google.cloud.automl.v1beta1.TextSnippet.verify(message.documentText); + if (error) + return "documentText." + error; + } + if (message.layout != null && message.hasOwnProperty("layout")) { + if (!Array.isArray(message.layout)) + return "layout: array expected"; + for (var i = 0; i < message.layout.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.Document.Layout.verify(message.layout[i]); + if (error) + return "layout." + error; + } + } + if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) { + var error = $root.google.cloud.automl.v1beta1.DocumentDimensions.verify(message.documentDimensions); + if (error) + return "documentDimensions." + error; + } + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + if (!$util.isInteger(message.pageCount)) + return "pageCount: integer expected"; + return null; + }; + + /** + * Creates a Document message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.Document + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.Document} Document + */ + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Document) + return object; + var message = new $root.google.cloud.automl.v1beta1.Document(); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Document.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1beta1.DocumentInputConfig.fromObject(object.inputConfig); + } + if (object.documentText != null) { + if (typeof object.documentText !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Document.documentText: object expected"); + message.documentText = $root.google.cloud.automl.v1beta1.TextSnippet.fromObject(object.documentText); + } + if (object.layout) { + if (!Array.isArray(object.layout)) + throw TypeError(".google.cloud.automl.v1beta1.Document.layout: array expected"); + message.layout = []; + for (var i = 0; i < object.layout.length; ++i) { + if (typeof object.layout[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Document.layout: object expected"); + message.layout[i] = $root.google.cloud.automl.v1beta1.Document.Layout.fromObject(object.layout[i]); + } + } + if (object.documentDimensions != null) { + if (typeof object.documentDimensions !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Document.documentDimensions: object expected"); + message.documentDimensions = $root.google.cloud.automl.v1beta1.DocumentDimensions.fromObject(object.documentDimensions); + } + if (object.pageCount != null) + message.pageCount = object.pageCount | 0; + return message; + }; + + /** + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.Document + * @static + * @param {google.cloud.automl.v1beta1.Document} message Document + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Document.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.layout = []; + if (options.defaults) { + object.inputConfig = null; + object.documentText = null; + object.documentDimensions = null; + object.pageCount = 0; + } + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.automl.v1beta1.DocumentInputConfig.toObject(message.inputConfig, options); + if (message.documentText != null && message.hasOwnProperty("documentText")) + object.documentText = $root.google.cloud.automl.v1beta1.TextSnippet.toObject(message.documentText, options); + if (message.layout && message.layout.length) { + object.layout = []; + for (var j = 0; j < message.layout.length; ++j) + object.layout[j] = $root.google.cloud.automl.v1beta1.Document.Layout.toObject(message.layout[j], options); + } + if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) + object.documentDimensions = $root.google.cloud.automl.v1beta1.DocumentDimensions.toObject(message.documentDimensions, options); + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + object.pageCount = message.pageCount; + return object; + }; + + /** + * Converts this Document to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.Document + * @instance + * @returns {Object.} JSON object + */ + Document.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Document.Layout = (function() { + + /** + * Properties of a Layout. + * @memberof google.cloud.automl.v1beta1.Document + * @interface ILayout + * @property {google.cloud.automl.v1beta1.ITextSegment|null} [textSegment] Layout textSegment + * @property {number|null} [pageNumber] Layout pageNumber + * @property {google.cloud.automl.v1beta1.IBoundingPoly|null} [boundingPoly] Layout boundingPoly + * @property {google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|null} [textSegmentType] Layout textSegmentType + */ + + /** + * Constructs a new Layout. + * @memberof google.cloud.automl.v1beta1.Document + * @classdesc Represents a Layout. + * @implements ILayout + * @constructor + * @param {google.cloud.automl.v1beta1.Document.ILayout=} [properties] Properties to set + */ + function Layout(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]]; + } + + /** + * Layout textSegment. + * @member {google.cloud.automl.v1beta1.ITextSegment|null|undefined} textSegment + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @instance + */ + Layout.prototype.textSegment = null; + + /** + * Layout pageNumber. + * @member {number} pageNumber + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @instance + */ + Layout.prototype.pageNumber = 0; + + /** + * Layout boundingPoly. + * @member {google.cloud.automl.v1beta1.IBoundingPoly|null|undefined} boundingPoly + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @instance + */ + Layout.prototype.boundingPoly = null; + + /** + * Layout textSegmentType. + * @member {google.cloud.automl.v1beta1.Document.Layout.TextSegmentType} textSegmentType + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @instance + */ + Layout.prototype.textSegmentType = 0; + + /** + * Creates a new Layout instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {google.cloud.automl.v1beta1.Document.ILayout=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout instance + */ + Layout.create = function create(properties) { + return new Layout(properties); + }; + + /** + * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {google.cloud.automl.v1beta1.Document.ILayout} message Layout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Layout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.textSegment != null && message.hasOwnProperty("textSegment")) + $root.google.cloud.automl.v1beta1.TextSegment.encode(message.textSegment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber); + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) + $root.google.cloud.automl.v1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.textSegmentType); + return writer; + }; + + /** + * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {google.cloud.automl.v1beta1.Document.ILayout} message Layout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Layout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Layout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Layout.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.automl.v1beta1.Document.Layout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.decode(reader, reader.uint32()); + break; + case 2: + message.pageNumber = reader.int32(); + break; + case 3: + message.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.decode(reader, reader.uint32()); + break; + case 4: + message.textSegmentType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Layout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Layout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Layout message. + * @function verify + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Layout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.textSegment != null && message.hasOwnProperty("textSegment")) { + var error = $root.google.cloud.automl.v1beta1.TextSegment.verify(message.textSegment); + if (error) + return "textSegment." + error; + } + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + if (!$util.isInteger(message.pageNumber)) + return "pageNumber: integer expected"; + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { + var error = $root.google.cloud.automl.v1beta1.BoundingPoly.verify(message.boundingPoly); + if (error) + return "boundingPoly." + error; + } + if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) + switch (message.textSegmentType) { + default: + return "textSegmentType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + return null; + }; + + /** + * Creates a Layout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout + */ + Layout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Document.Layout) + return object; + var message = new $root.google.cloud.automl.v1beta1.Document.Layout(); + if (object.textSegment != null) { + if (typeof object.textSegment !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Document.Layout.textSegment: object expected"); + message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.fromObject(object.textSegment); + } + if (object.pageNumber != null) + message.pageNumber = object.pageNumber | 0; + if (object.boundingPoly != null) { + if (typeof object.boundingPoly !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Document.Layout.boundingPoly: object expected"); + message.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.fromObject(object.boundingPoly); + } + switch (object.textSegmentType) { + case "TEXT_SEGMENT_TYPE_UNSPECIFIED": + case 0: + message.textSegmentType = 0; + break; + case "TOKEN": + case 1: + message.textSegmentType = 1; + break; + case "PARAGRAPH": case 2: - message.translation = $root.google.cloud.automl.v1beta1.TranslationAnnotation.decode(reader, reader.uint32()); + message.textSegmentType = 2; break; + case "FORM_FIELD": case 3: - message.classification = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.decode(reader, reader.uint32()); + message.textSegmentType = 3; break; + case "FORM_FIELD_NAME": case 4: - message.imageObjectDetection = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.decode(reader, reader.uint32()); - break; - case 9: - message.videoClassification = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.decode(reader, reader.uint32()); + message.textSegmentType = 4; break; - case 8: - message.videoObjectTracking = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.decode(reader, reader.uint32()); + case "FORM_FIELD_CONTENTS": + case 5: + message.textSegmentType = 5; break; + case "TABLE": case 6: - message.textExtraction = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.decode(reader, reader.uint32()); + message.textSegmentType = 6; break; + case "TABLE_HEADER": case 7: - message.textSentiment = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.decode(reader, reader.uint32()); - break; - case 10: - message.tables = $root.google.cloud.automl.v1beta1.TablesAnnotation.decode(reader, reader.uint32()); - break; - case 1: - message.annotationSpecId = reader.string(); + message.textSegmentType = 7; break; - case 5: - message.displayName = reader.string(); + case "TABLE_ROW": + case 8: + message.textSegmentType = 8; break; - default: - reader.skipType(tag & 7); + case "TABLE_CELL": + case 9: + message.textSegmentType = 9; break; } - } - return message; - }; - - /** - * Decodes an AnnotationPayload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnnotationPayload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies an AnnotationPayload message. - * @function verify - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnnotationPayload.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.translation != null && message.hasOwnProperty("translation")) { - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.TranslationAnnotation.verify(message.translation); - if (error) - return "translation." + error; - } - } - if (message.classification != null && message.hasOwnProperty("classification")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.verify(message.classification); - if (error) - return "classification." + error; - } - } - if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify(message.imageObjectDetection); - if (error) - return "imageObjectDetection." + error; - } - } - if (message.videoClassification != null && message.hasOwnProperty("videoClassification")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify(message.videoClassification); - if (error) - return "videoClassification." + error; - } - } - if (message.videoObjectTracking != null && message.hasOwnProperty("videoObjectTracking")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify(message.videoObjectTracking); - if (error) - return "videoObjectTracking." + error; - } - } - if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.verify(message.textExtraction); - if (error) - return "textExtraction." + error; - } - } - if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.verify(message.textSentiment); - if (error) - return "textSentiment." + error; - } - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.automl.v1beta1.TablesAnnotation.verify(message.tables); - if (error) - return "tables." + error; + /** + * Creates a plain object from a Layout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @static + * @param {google.cloud.automl.v1beta1.Document.Layout} message Layout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Layout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.textSegment = null; + object.pageNumber = 0; + object.boundingPoly = null; + object.textSegmentType = options.enums === String ? "TEXT_SEGMENT_TYPE_UNSPECIFIED" : 0; } - } - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - if (!$util.isString(message.annotationSpecId)) - return "annotationSpecId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; - - /** - * Creates an AnnotationPayload message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.AnnotationPayload} AnnotationPayload - */ - AnnotationPayload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.AnnotationPayload) + if (message.textSegment != null && message.hasOwnProperty("textSegment")) + object.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.toObject(message.textSegment, options); + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + object.pageNumber = message.pageNumber; + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) + object.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.toObject(message.boundingPoly, options); + if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) + object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; return object; - var message = new $root.google.cloud.automl.v1beta1.AnnotationPayload(); - if (object.translation != null) { - if (typeof object.translation !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.translation: object expected"); - message.translation = $root.google.cloud.automl.v1beta1.TranslationAnnotation.fromObject(object.translation); - } - if (object.classification != null) { - if (typeof object.classification !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.classification: object expected"); - message.classification = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.fromObject(object.classification); - } - if (object.imageObjectDetection != null) { - if (typeof object.imageObjectDetection !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.imageObjectDetection: object expected"); - message.imageObjectDetection = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.fromObject(object.imageObjectDetection); - } - if (object.videoClassification != null) { - if (typeof object.videoClassification !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.videoClassification: object expected"); - message.videoClassification = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.fromObject(object.videoClassification); - } - if (object.videoObjectTracking != null) { - if (typeof object.videoObjectTracking !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.videoObjectTracking: object expected"); - message.videoObjectTracking = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.fromObject(object.videoObjectTracking); - } - if (object.textExtraction != null) { - if (typeof object.textExtraction !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.textExtraction: object expected"); - message.textExtraction = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.fromObject(object.textExtraction); - } - if (object.textSentiment != null) { - if (typeof object.textSentiment !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.textSentiment: object expected"); - message.textSentiment = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.fromObject(object.textSentiment); - } - if (object.tables != null) { - if (typeof object.tables !== "object") - throw TypeError(".google.cloud.automl.v1beta1.AnnotationPayload.tables: object expected"); - message.tables = $root.google.cloud.automl.v1beta1.TablesAnnotation.fromObject(object.tables); - } - if (object.annotationSpecId != null) - message.annotationSpecId = String(object.annotationSpecId); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; + }; - /** - * Creates a plain object from an AnnotationPayload message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @static - * @param {google.cloud.automl.v1beta1.AnnotationPayload} message AnnotationPayload - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnnotationPayload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.annotationSpecId = ""; - object.displayName = ""; - } - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - object.annotationSpecId = message.annotationSpecId; - if (message.translation != null && message.hasOwnProperty("translation")) { - object.translation = $root.google.cloud.automl.v1beta1.TranslationAnnotation.toObject(message.translation, options); - if (options.oneofs) - object.detail = "translation"; - } - if (message.classification != null && message.hasOwnProperty("classification")) { - object.classification = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.toObject(message.classification, options); - if (options.oneofs) - object.detail = "classification"; - } - if (message.imageObjectDetection != null && message.hasOwnProperty("imageObjectDetection")) { - object.imageObjectDetection = $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.toObject(message.imageObjectDetection, options); - if (options.oneofs) - object.detail = "imageObjectDetection"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.textExtraction != null && message.hasOwnProperty("textExtraction")) { - object.textExtraction = $root.google.cloud.automl.v1beta1.TextExtractionAnnotation.toObject(message.textExtraction, options); - if (options.oneofs) - object.detail = "textExtraction"; - } - if (message.textSentiment != null && message.hasOwnProperty("textSentiment")) { - object.textSentiment = $root.google.cloud.automl.v1beta1.TextSentimentAnnotation.toObject(message.textSentiment, options); - if (options.oneofs) - object.detail = "textSentiment"; - } - if (message.videoObjectTracking != null && message.hasOwnProperty("videoObjectTracking")) { - object.videoObjectTracking = $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.toObject(message.videoObjectTracking, options); - if (options.oneofs) - object.detail = "videoObjectTracking"; - } - if (message.videoClassification != null && message.hasOwnProperty("videoClassification")) { - object.videoClassification = $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation.toObject(message.videoClassification, options); - if (options.oneofs) - object.detail = "videoClassification"; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - object.tables = $root.google.cloud.automl.v1beta1.TablesAnnotation.toObject(message.tables, options); - if (options.oneofs) - object.detail = "tables"; - } - return object; - }; + /** + * Converts this Layout to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.Document.Layout + * @instance + * @returns {Object.} JSON object + */ + Layout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this AnnotationPayload to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.AnnotationPayload - * @instance - * @returns {Object.} JSON object - */ - AnnotationPayload.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * TextSegmentType enum. + * @name google.cloud.automl.v1beta1.Document.Layout.TextSegmentType + * @enum {string} + * @property {number} TEXT_SEGMENT_TYPE_UNSPECIFIED=0 TEXT_SEGMENT_TYPE_UNSPECIFIED value + * @property {number} TOKEN=1 TOKEN value + * @property {number} PARAGRAPH=2 PARAGRAPH value + * @property {number} FORM_FIELD=3 FORM_FIELD value + * @property {number} FORM_FIELD_NAME=4 FORM_FIELD_NAME value + * @property {number} FORM_FIELD_CONTENTS=5 FORM_FIELD_CONTENTS value + * @property {number} TABLE=6 TABLE value + * @property {number} TABLE_HEADER=7 TABLE_HEADER value + * @property {number} TABLE_ROW=8 TABLE_ROW value + * @property {number} TABLE_CELL=9 TABLE_CELL value + */ + Layout.TextSegmentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEXT_SEGMENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOKEN"] = 1; + values[valuesById[2] = "PARAGRAPH"] = 2; + values[valuesById[3] = "FORM_FIELD"] = 3; + values[valuesById[4] = "FORM_FIELD_NAME"] = 4; + values[valuesById[5] = "FORM_FIELD_CONTENTS"] = 5; + values[valuesById[6] = "TABLE"] = 6; + values[valuesById[7] = "TABLE_HEADER"] = 7; + values[valuesById[8] = "TABLE_ROW"] = 8; + values[valuesById[9] = "TABLE_CELL"] = 9; + return values; + })(); - return AnnotationPayload; - })(); + return Layout; + })(); - /** - * ClassificationType enum. - * @name google.cloud.automl.v1beta1.ClassificationType - * @enum {string} - * @property {number} CLASSIFICATION_TYPE_UNSPECIFIED=0 CLASSIFICATION_TYPE_UNSPECIFIED value - * @property {number} MULTICLASS=1 MULTICLASS value - * @property {number} MULTILABEL=2 MULTILABEL value - */ - v1beta1.ClassificationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLASSIFICATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MULTICLASS"] = 1; - values[valuesById[2] = "MULTILABEL"] = 2; - return values; + return Document; })(); - v1beta1.ClassificationAnnotation = (function() { + v1beta1.Row = (function() { /** - * Properties of a ClassificationAnnotation. + * Properties of a Row. * @memberof google.cloud.automl.v1beta1 - * @interface IClassificationAnnotation - * @property {number|null} [score] ClassificationAnnotation score + * @interface IRow + * @property {Array.|null} [columnSpecIds] Row columnSpecIds + * @property {Array.|null} [values] Row values */ /** - * Constructs a new ClassificationAnnotation. + * Constructs a new Row. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ClassificationAnnotation. - * @implements IClassificationAnnotation + * @classdesc Represents a Row. + * @implements IRow * @constructor - * @param {google.cloud.automl.v1beta1.IClassificationAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IRow=} [properties] Properties to set */ - function ClassificationAnnotation(properties) { + function Row(properties) { + this.columnSpecIds = []; + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30523,75 +34078,94 @@ } /** - * ClassificationAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * Row columnSpecIds. + * @member {Array.} columnSpecIds + * @memberof google.cloud.automl.v1beta1.Row * @instance */ - ClassificationAnnotation.prototype.score = 0; + Row.prototype.columnSpecIds = $util.emptyArray; /** - * Creates a new ClassificationAnnotation instance using the specified properties. + * Row values. + * @member {Array.} values + * @memberof google.cloud.automl.v1beta1.Row + * @instance + */ + Row.prototype.values = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static - * @param {google.cloud.automl.v1beta1.IClassificationAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation instance + * @param {google.cloud.automl.v1beta1.IRow=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Row} Row instance */ - ClassificationAnnotation.create = function create(properties) { - return new ClassificationAnnotation(properties); + Row.create = function create(properties) { + return new Row(properties); }; /** - * Encodes the specified ClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. + * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static - * @param {google.cloud.automl.v1beta1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationAnnotation.encode = function encode(message, writer) { + Row.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.columnSpecIds != null && message.columnSpecIds.length) + for (var i = 0; i < message.columnSpecIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.columnSpecIds[i]); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationAnnotation.verify|verify} messages. + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static - * @param {google.cloud.automl.v1beta1.IClassificationAnnotation} message ClassificationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + Row.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation + * @returns {google.cloud.automl.v1beta1.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationAnnotation.decode = function decode(reader, length) { + Row.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.automl.v1beta1.ClassificationAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.Row(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.score = reader.float(); + case 2: + if (!(message.columnSpecIds && message.columnSpecIds.length)) + message.columnSpecIds = []; + message.columnSpecIds.push(reader.string()); + break; + case 3: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -30602,109 +34176,148 @@ }; /** - * Decodes a ClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation + * @returns {google.cloud.automl.v1beta1.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + Row.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClassificationAnnotation message. + * Verifies a Row message. * @function verify - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClassificationAnnotation.verify = function verify(message) { + Row.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; + if (message.columnSpecIds != null && message.hasOwnProperty("columnSpecIds")) { + if (!Array.isArray(message.columnSpecIds)) + return "columnSpecIds: array expected"; + for (var i = 0; i < message.columnSpecIds.length; ++i) + if (!$util.isString(message.columnSpecIds[i])) + return "columnSpecIds: string[] expected"; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } return null; }; /** - * Creates a ClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ClassificationAnnotation} ClassificationAnnotation + * @returns {google.cloud.automl.v1beta1.Row} Row */ - ClassificationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationAnnotation) + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Row) return object; - var message = new $root.google.cloud.automl.v1beta1.ClassificationAnnotation(); - if (object.score != null) - message.score = Number(object.score); + var message = new $root.google.cloud.automl.v1beta1.Row(); + if (object.columnSpecIds) { + if (!Array.isArray(object.columnSpecIds)) + throw TypeError(".google.cloud.automl.v1beta1.Row.columnSpecIds: array expected"); + message.columnSpecIds = []; + for (var i = 0; i < object.columnSpecIds.length; ++i) + message.columnSpecIds[i] = String(object.columnSpecIds[i]); + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.automl.v1beta1.Row.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Row.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } return message; }; /** - * Creates a plain object from a ClassificationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a Row message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @static - * @param {google.cloud.automl.v1beta1.ClassificationAnnotation} message ClassificationAnnotation + * @param {google.cloud.automl.v1beta1.Row} message Row * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassificationAnnotation.toObject = function toObject(message, options) { + Row.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.score = 0; - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.arrays || options.defaults) { + object.columnSpecIds = []; + object.values = []; + } + if (message.columnSpecIds && message.columnSpecIds.length) { + object.columnSpecIds = []; + for (var j = 0; j < message.columnSpecIds.length; ++j) + object.columnSpecIds[j] = message.columnSpecIds[j]; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } return object; }; /** - * Converts this ClassificationAnnotation to JSON. + * Converts this Row to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.Row * @instance * @returns {Object.} JSON object */ - ClassificationAnnotation.prototype.toJSON = function toJSON() { + Row.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ClassificationAnnotation; + return Row; })(); - v1beta1.VideoClassificationAnnotation = (function() { + v1beta1.ExamplePayload = (function() { /** - * Properties of a VideoClassificationAnnotation. + * Properties of an ExamplePayload. * @memberof google.cloud.automl.v1beta1 - * @interface IVideoClassificationAnnotation - * @property {string|null} [type] VideoClassificationAnnotation type - * @property {google.cloud.automl.v1beta1.IClassificationAnnotation|null} [classificationAnnotation] VideoClassificationAnnotation classificationAnnotation - * @property {google.cloud.automl.v1beta1.ITimeSegment|null} [timeSegment] VideoClassificationAnnotation timeSegment + * @interface IExamplePayload + * @property {google.cloud.automl.v1beta1.IImage|null} [image] ExamplePayload image + * @property {google.cloud.automl.v1beta1.ITextSnippet|null} [textSnippet] ExamplePayload textSnippet + * @property {google.cloud.automl.v1beta1.IDocument|null} [document] ExamplePayload document + * @property {google.cloud.automl.v1beta1.IRow|null} [row] ExamplePayload row */ /** - * Constructs a new VideoClassificationAnnotation. + * Constructs a new ExamplePayload. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a VideoClassificationAnnotation. - * @implements IVideoClassificationAnnotation + * @classdesc Represents an ExamplePayload. + * @implements IExamplePayload * @constructor - * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IExamplePayload=} [properties] Properties to set */ - function VideoClassificationAnnotation(properties) { + function ExamplePayload(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30712,101 +34325,128 @@ } /** - * VideoClassificationAnnotation type. - * @member {string} type - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * ExamplePayload image. + * @member {google.cloud.automl.v1beta1.IImage|null|undefined} image + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @instance */ - VideoClassificationAnnotation.prototype.type = ""; + ExamplePayload.prototype.image = null; /** - * VideoClassificationAnnotation classificationAnnotation. - * @member {google.cloud.automl.v1beta1.IClassificationAnnotation|null|undefined} classificationAnnotation - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * ExamplePayload textSnippet. + * @member {google.cloud.automl.v1beta1.ITextSnippet|null|undefined} textSnippet + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @instance */ - VideoClassificationAnnotation.prototype.classificationAnnotation = null; + ExamplePayload.prototype.textSnippet = null; /** - * VideoClassificationAnnotation timeSegment. - * @member {google.cloud.automl.v1beta1.ITimeSegment|null|undefined} timeSegment - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * ExamplePayload document. + * @member {google.cloud.automl.v1beta1.IDocument|null|undefined} document + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @instance */ - VideoClassificationAnnotation.prototype.timeSegment = null; + ExamplePayload.prototype.document = null; /** - * Creates a new VideoClassificationAnnotation instance using the specified properties. + * ExamplePayload row. + * @member {google.cloud.automl.v1beta1.IRow|null|undefined} row + * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @instance + */ + ExamplePayload.prototype.row = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExamplePayload payload. + * @member {"image"|"textSnippet"|"document"|"row"|undefined} payload + * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @instance + */ + Object.defineProperty(ExamplePayload.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["image", "textSnippet", "document", "row"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExamplePayload instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation instance + * @param {google.cloud.automl.v1beta1.IExamplePayload=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload instance */ - VideoClassificationAnnotation.create = function create(properties) { - return new VideoClassificationAnnotation(properties); + ExamplePayload.create = function create(properties) { + return new ExamplePayload(properties); }; /** - * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExamplePayload} message ExamplePayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationAnnotation.encode = function encode(message, writer) { + ExamplePayload.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.classificationAnnotation != null && message.hasOwnProperty("classificationAnnotation")) - $root.google.cloud.automl.v1beta1.ClassificationAnnotation.encode(message.classificationAnnotation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - $root.google.cloud.automl.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.image != null && message.hasOwnProperty("image")) + $root.google.cloud.automl.v1beta1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) + $root.google.cloud.automl.v1beta1.TextSnippet.encode(message.textSnippet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.row != null && message.hasOwnProperty("row")) + $root.google.cloud.automl.v1beta1.Row.encode(message.row, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.automl.v1beta1.Document.encode(message.document, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExamplePayload} message ExamplePayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + ExamplePayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. + * Decodes an ExamplePayload message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationAnnotation.decode = function decode(reader, length) { + ExamplePayload.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.automl.v1beta1.VideoClassificationAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExamplePayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.image = $root.google.cloud.automl.v1beta1.Image.decode(reader, reader.uint32()); break; case 2: - message.classificationAnnotation = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.decode(reader, reader.uint32()); + message.textSnippet = $root.google.cloud.automl.v1beta1.TextSnippet.decode(reader, reader.uint32()); + break; + case 4: + message.document = $root.google.cloud.automl.v1beta1.Document.decode(reader, reader.uint32()); break; case 3: - message.timeSegment = $root.google.cloud.automl.v1beta1.TimeSegment.decode(reader, reader.uint32()); + message.row = $root.google.cloud.automl.v1beta1.Row.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -30817,142 +34457,180 @@ }; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + ExamplePayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoClassificationAnnotation message. + * Verifies an ExamplePayload message. * @function verify - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoClassificationAnnotation.verify = function verify(message) { + ExamplePayload.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.classificationAnnotation != null && message.hasOwnProperty("classificationAnnotation")) { - var error = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.verify(message.classificationAnnotation); - if (error) - return "classificationAnnotation." + error; + var properties = {}; + if (message.image != null && message.hasOwnProperty("image")) { + properties.payload = 1; + { + var error = $root.google.cloud.automl.v1beta1.Image.verify(message.image); + if (error) + return "image." + error; + } } - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { - var error = $root.google.cloud.automl.v1beta1.TimeSegment.verify(message.timeSegment); - if (error) - return "timeSegment." + error; + if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextSnippet.verify(message.textSnippet); + if (error) + return "textSnippet." + error; + } + } + if (message.document != null && message.hasOwnProperty("document")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.cloud.automl.v1beta1.Document.verify(message.document); + if (error) + return "document." + error; + } + } + if (message.row != null && message.hasOwnProperty("row")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.cloud.automl.v1beta1.Row.verify(message.row); + if (error) + return "row." + error; + } } return null; }; /** - * Creates a VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an ExamplePayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload */ - VideoClassificationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation) + ExamplePayload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExamplePayload) return object; - var message = new $root.google.cloud.automl.v1beta1.VideoClassificationAnnotation(); - if (object.type != null) - message.type = String(object.type); - if (object.classificationAnnotation != null) { - if (typeof object.classificationAnnotation !== "object") - throw TypeError(".google.cloud.automl.v1beta1.VideoClassificationAnnotation.classificationAnnotation: object expected"); - message.classificationAnnotation = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.fromObject(object.classificationAnnotation); + var message = new $root.google.cloud.automl.v1beta1.ExamplePayload(); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.image: object expected"); + message.image = $root.google.cloud.automl.v1beta1.Image.fromObject(object.image); } - if (object.timeSegment != null) { - if (typeof object.timeSegment !== "object") - throw TypeError(".google.cloud.automl.v1beta1.VideoClassificationAnnotation.timeSegment: object expected"); - message.timeSegment = $root.google.cloud.automl.v1beta1.TimeSegment.fromObject(object.timeSegment); + if (object.textSnippet != null) { + if (typeof object.textSnippet !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.textSnippet: object expected"); + message.textSnippet = $root.google.cloud.automl.v1beta1.TextSnippet.fromObject(object.textSnippet); + } + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.document: object expected"); + message.document = $root.google.cloud.automl.v1beta1.Document.fromObject(object.document); + } + if (object.row != null) { + if (typeof object.row !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.row: object expected"); + message.row = $root.google.cloud.automl.v1beta1.Row.fromObject(object.row); } return message; }; /** - * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @static - * @param {google.cloud.automl.v1beta1.VideoClassificationAnnotation} message VideoClassificationAnnotation + * @param {google.cloud.automl.v1beta1.ExamplePayload} message ExamplePayload * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoClassificationAnnotation.toObject = function toObject(message, options) { + ExamplePayload.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = ""; - object.classificationAnnotation = null; - object.timeSegment = null; + if (message.image != null && message.hasOwnProperty("image")) { + object.image = $root.google.cloud.automl.v1beta1.Image.toObject(message.image, options); + if (options.oneofs) + object.payload = "image"; + } + if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { + object.textSnippet = $root.google.cloud.automl.v1beta1.TextSnippet.toObject(message.textSnippet, options); + if (options.oneofs) + object.payload = "textSnippet"; + } + if (message.row != null && message.hasOwnProperty("row")) { + object.row = $root.google.cloud.automl.v1beta1.Row.toObject(message.row, options); + if (options.oneofs) + object.payload = "row"; + } + if (message.document != null && message.hasOwnProperty("document")) { + object.document = $root.google.cloud.automl.v1beta1.Document.toObject(message.document, options); + if (options.oneofs) + object.payload = "document"; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.classificationAnnotation != null && message.hasOwnProperty("classificationAnnotation")) - object.classificationAnnotation = $root.google.cloud.automl.v1beta1.ClassificationAnnotation.toObject(message.classificationAnnotation, options); - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - object.timeSegment = $root.google.cloud.automl.v1beta1.TimeSegment.toObject(message.timeSegment, options); return object; }; /** - * Converts this VideoClassificationAnnotation to JSON. + * Converts this ExamplePayload to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.automl.v1beta1.ExamplePayload * @instance * @returns {Object.} JSON object */ - VideoClassificationAnnotation.prototype.toJSON = function toJSON() { + ExamplePayload.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoClassificationAnnotation; + return ExamplePayload; })(); - v1beta1.ClassificationEvaluationMetrics = (function() { + v1beta1.InputConfig = (function() { /** - * Properties of a ClassificationEvaluationMetrics. + * Properties of an InputConfig. * @memberof google.cloud.automl.v1beta1 - * @interface IClassificationEvaluationMetrics - * @property {number|null} [auPrc] ClassificationEvaluationMetrics auPrc - * @property {number|null} [baseAuPrc] ClassificationEvaluationMetrics baseAuPrc - * @property {number|null} [auRoc] ClassificationEvaluationMetrics auRoc - * @property {number|null} [logLoss] ClassificationEvaluationMetrics logLoss - * @property {Array.|null} [confidenceMetricsEntry] ClassificationEvaluationMetrics confidenceMetricsEntry - * @property {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] ClassificationEvaluationMetrics confusionMatrix - * @property {Array.|null} [annotationSpecId] ClassificationEvaluationMetrics annotationSpecId + * @interface IInputConfig + * @property {google.cloud.automl.v1beta1.IGcsSource|null} [gcsSource] InputConfig gcsSource + * @property {google.cloud.automl.v1beta1.IBigQuerySource|null} [bigquerySource] InputConfig bigquerySource + * @property {Object.|null} [params] InputConfig params */ /** - * Constructs a new ClassificationEvaluationMetrics. + * Constructs a new InputConfig. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ClassificationEvaluationMetrics. - * @implements IClassificationEvaluationMetrics + * @classdesc Represents an InputConfig. + * @implements IInputConfig * @constructor - * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IInputConfig=} [properties] Properties to set */ - function ClassificationEvaluationMetrics(properties) { - this.confidenceMetricsEntry = []; - this.annotationSpecId = []; + function InputConfig(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30960,159 +34638,121 @@ } /** - * ClassificationEvaluationMetrics auPrc. - * @member {number} auPrc - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics - * @instance - */ - ClassificationEvaluationMetrics.prototype.auPrc = 0; - - /** - * ClassificationEvaluationMetrics baseAuPrc. - * @member {number} baseAuPrc - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics - * @instance - */ - ClassificationEvaluationMetrics.prototype.baseAuPrc = 0; - - /** - * ClassificationEvaluationMetrics auRoc. - * @member {number} auRoc - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * InputConfig gcsSource. + * @member {google.cloud.automl.v1beta1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.automl.v1beta1.InputConfig * @instance */ - ClassificationEvaluationMetrics.prototype.auRoc = 0; + InputConfig.prototype.gcsSource = null; /** - * ClassificationEvaluationMetrics logLoss. - * @member {number} logLoss - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * InputConfig bigquerySource. + * @member {google.cloud.automl.v1beta1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.automl.v1beta1.InputConfig * @instance */ - ClassificationEvaluationMetrics.prototype.logLoss = 0; + InputConfig.prototype.bigquerySource = null; /** - * ClassificationEvaluationMetrics confidenceMetricsEntry. - * @member {Array.} confidenceMetricsEntry - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * InputConfig params. + * @member {Object.} params + * @memberof google.cloud.automl.v1beta1.InputConfig * @instance */ - ClassificationEvaluationMetrics.prototype.confidenceMetricsEntry = $util.emptyArray; + InputConfig.prototype.params = $util.emptyObject; - /** - * ClassificationEvaluationMetrics confusionMatrix. - * @member {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics - * @instance - */ - ClassificationEvaluationMetrics.prototype.confusionMatrix = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ClassificationEvaluationMetrics annotationSpecId. - * @member {Array.} annotationSpecId - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * InputConfig source. + * @member {"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.automl.v1beta1.InputConfig * @instance */ - ClassificationEvaluationMetrics.prototype.annotationSpecId = $util.emptyArray; + Object.defineProperty(InputConfig.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource", "bigquerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ClassificationEvaluationMetrics instance using the specified properties. + * Creates a new InputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static - * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics instance + * @param {google.cloud.automl.v1beta1.IInputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig instance */ - ClassificationEvaluationMetrics.create = function create(properties) { - return new ClassificationEvaluationMetrics(properties); + InputConfig.create = function create(properties) { + return new InputConfig(properties); }; /** - * Encodes the specified ClassificationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. + * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static - * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IInputConfig} message InputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationEvaluationMetrics.encode = function encode(message, writer) { + InputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); - if (message.baseAuPrc != null && message.hasOwnProperty("baseAuPrc")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.baseAuPrc); - if (message.confidenceMetricsEntry != null && message.confidenceMetricsEntry.length) - for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) - $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntry[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.annotationSpecId != null && message.annotationSpecId.length) - for (var i = 0; i < message.annotationSpecId.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.annotationSpecId[i]); - if (message.auRoc != null && message.hasOwnProperty("auRoc")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.auRoc); - if (message.logLoss != null && message.hasOwnProperty("logLoss")) - writer.uint32(/* id 7, wireType 5 =*/61).float(message.logLoss); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + $root.google.cloud.automl.v1beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) + $root.google.cloud.automl.v1beta1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ClassificationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify|verify} messages. + * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static - * @param {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics} message ClassificationEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IInputConfig} message InputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassificationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + InputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer. + * Decodes an InputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationEvaluationMetrics.decode = function decode(reader, length) { + InputConfig.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.automl.v1beta1.ClassificationEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.InputConfig(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.auPrc = reader.float(); - break; - case 2: - message.baseAuPrc = reader.float(); - break; - case 6: - message.auRoc = reader.float(); - break; - case 7: - message.logLoss = reader.float(); + message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.decode(reader, reader.uint32()); break; case 3: - if (!(message.confidenceMetricsEntry && message.confidenceMetricsEntry.length)) - message.confidenceMetricsEntry = []; - message.confidenceMetricsEntry.push($root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); - break; - case 4: - message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); + message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.decode(reader, reader.uint32()); break; - case 5: - if (!(message.annotationSpecId && message.annotationSpecId.length)) - message.annotationSpecId = []; - message.annotationSpecId.push(reader.string()); + case 2: + reader.skip().pos++; + if (message.params === $util.emptyObject) + message.params = {}; + key = reader.string(); + reader.pos++; + message.params[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -31123,1219 +34763,843 @@ }; /** - * Decodes a ClassificationEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes an InputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassificationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + InputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClassificationEvaluationMetrics message. + * Verifies an InputConfig message. * @function verify - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClassificationEvaluationMetrics.verify = function verify(message) { + InputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - if (typeof message.auPrc !== "number") - return "auPrc: number expected"; - if (message.baseAuPrc != null && message.hasOwnProperty("baseAuPrc")) - if (typeof message.baseAuPrc !== "number") - return "baseAuPrc: number expected"; - if (message.auRoc != null && message.hasOwnProperty("auRoc")) - if (typeof message.auRoc !== "number") - return "auRoc: number expected"; - if (message.logLoss != null && message.hasOwnProperty("logLoss")) - if (typeof message.logLoss !== "number") - return "logLoss: number expected"; - if (message.confidenceMetricsEntry != null && message.hasOwnProperty("confidenceMetricsEntry")) { - if (!Array.isArray(message.confidenceMetricsEntry)) - return "confidenceMetricsEntry: array expected"; - for (var i = 0; i < message.confidenceMetricsEntry.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntry[i]); + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.automl.v1beta1.GcsSource.verify(message.gcsSource); if (error) - return "confidenceMetricsEntry." + error; + return "gcsSource." + error; } } - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { - var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); - if (error) - return "confusionMatrix." + error; + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.automl.v1beta1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } } - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { - if (!Array.isArray(message.annotationSpecId)) - return "annotationSpecId: array expected"; - for (var i = 0; i < message.annotationSpecId.length; ++i) - if (!$util.isString(message.annotationSpecId[i])) - return "annotationSpecId: string[] expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; } return null; }; /** - * Creates a ClassificationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} ClassificationEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig */ - ClassificationEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics) + InputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.InputConfig) return object; - var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics(); - if (object.auPrc != null) - message.auPrc = Number(object.auPrc); - if (object.baseAuPrc != null) - message.baseAuPrc = Number(object.baseAuPrc); - if (object.auRoc != null) - message.auRoc = Number(object.auRoc); - if (object.logLoss != null) - message.logLoss = Number(object.logLoss); - if (object.confidenceMetricsEntry) { - if (!Array.isArray(object.confidenceMetricsEntry)) - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confidenceMetricsEntry: array expected"); - message.confidenceMetricsEntry = []; - for (var i = 0; i < object.confidenceMetricsEntry.length; ++i) { - if (typeof object.confidenceMetricsEntry[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confidenceMetricsEntry: object expected"); - message.confidenceMetricsEntry[i] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntry[i]); - } + var message = new $root.google.cloud.automl.v1beta1.InputConfig(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.automl.v1beta1.InputConfig.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.fromObject(object.gcsSource); } - if (object.confusionMatrix != null) { - if (typeof object.confusionMatrix !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confusionMatrix: object expected"); - message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.automl.v1beta1.InputConfig.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.fromObject(object.bigquerySource); } - if (object.annotationSpecId) { - if (!Array.isArray(object.annotationSpecId)) - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.annotationSpecId: array expected"); - message.annotationSpecId = []; - for (var i = 0; i < object.annotationSpecId.length; ++i) - message.annotationSpecId[i] = String(object.annotationSpecId[i]); + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.automl.v1beta1.InputConfig.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); } return message; }; /** - * Creates a plain object from a ClassificationEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from an InputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} message ClassificationEvaluationMetrics + * @param {google.cloud.automl.v1beta1.InputConfig} message InputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassificationEvaluationMetrics.toObject = function toObject(message, options) { + InputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.confidenceMetricsEntry = []; - object.annotationSpecId = []; - } - if (options.defaults) { - object.auPrc = 0; - object.baseAuPrc = 0; - object.confusionMatrix = null; - object.auRoc = 0; - object.logLoss = 0; + if (options.objects || options.defaults) + object.params = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; } - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; - if (message.baseAuPrc != null && message.hasOwnProperty("baseAuPrc")) - object.baseAuPrc = options.json && !isFinite(message.baseAuPrc) ? String(message.baseAuPrc) : message.baseAuPrc; - if (message.confidenceMetricsEntry && message.confidenceMetricsEntry.length) { - object.confidenceMetricsEntry = []; - for (var j = 0; j < message.confidenceMetricsEntry.length; ++j) - object.confidenceMetricsEntry[j] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntry[j], options); + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; } - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - object.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); - if (message.annotationSpecId && message.annotationSpecId.length) { - object.annotationSpecId = []; - for (var j = 0; j < message.annotationSpecId.length; ++j) - object.annotationSpecId[j] = message.annotationSpecId[j]; + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; } - if (message.auRoc != null && message.hasOwnProperty("auRoc")) - object.auRoc = options.json && !isFinite(message.auRoc) ? String(message.auRoc) : message.auRoc; - if (message.logLoss != null && message.hasOwnProperty("logLoss")) - object.logLoss = options.json && !isFinite(message.logLoss) ? String(message.logLoss) : message.logLoss; return object; }; /** - * Converts this ClassificationEvaluationMetrics to JSON. + * Converts this InputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.InputConfig * @instance * @returns {Object.} JSON object */ - ClassificationEvaluationMetrics.prototype.toJSON = function toJSON() { + InputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ClassificationEvaluationMetrics.ConfidenceMetricsEntry = (function() { - - /** - * Properties of a ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics - * @interface IConfidenceMetricsEntry - * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold - * @property {number|null} [positionThreshold] ConfidenceMetricsEntry positionThreshold - * @property {number|null} [recall] ConfidenceMetricsEntry recall - * @property {number|null} [precision] ConfidenceMetricsEntry precision - * @property {number|null} [falsePositiveRate] ConfidenceMetricsEntry falsePositiveRate - * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score - * @property {number|null} [recallAt1] ConfidenceMetricsEntry recallAt1 - * @property {number|null} [precisionAt1] ConfidenceMetricsEntry precisionAt1 - * @property {number|null} [falsePositiveRateAt1] ConfidenceMetricsEntry falsePositiveRateAt1 - * @property {number|null} [f1ScoreAt1] ConfidenceMetricsEntry f1ScoreAt1 - * @property {number|Long|null} [truePositiveCount] ConfidenceMetricsEntry truePositiveCount - * @property {number|Long|null} [falsePositiveCount] ConfidenceMetricsEntry falsePositiveCount - * @property {number|Long|null} [falseNegativeCount] ConfidenceMetricsEntry falseNegativeCount - * @property {number|Long|null} [trueNegativeCount] ConfidenceMetricsEntry trueNegativeCount - */ - - /** - * Constructs a new ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics - * @classdesc Represents a ConfidenceMetricsEntry. - * @implements IConfidenceMetricsEntry - * @constructor - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set - */ - function ConfidenceMetricsEntry(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]]; - } - - /** - * ConfidenceMetricsEntry confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; - - /** - * ConfidenceMetricsEntry positionThreshold. - * @member {number} positionThreshold - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.positionThreshold = 0; - - /** - * ConfidenceMetricsEntry recall. - * @member {number} recall - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.recall = 0; - - /** - * ConfidenceMetricsEntry precision. - * @member {number} precision - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precision = 0; - - /** - * ConfidenceMetricsEntry falsePositiveRate. - * @member {number} falsePositiveRate - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falsePositiveRate = 0; - - /** - * ConfidenceMetricsEntry f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.f1Score = 0; - - /** - * ConfidenceMetricsEntry recallAt1. - * @member {number} recallAt1 - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.recallAt1 = 0; - - /** - * ConfidenceMetricsEntry precisionAt1. - * @member {number} precisionAt1 - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precisionAt1 = 0; - - /** - * ConfidenceMetricsEntry falsePositiveRateAt1. - * @member {number} falsePositiveRateAt1 - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falsePositiveRateAt1 = 0; - - /** - * ConfidenceMetricsEntry f1ScoreAt1. - * @member {number} f1ScoreAt1 - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.f1ScoreAt1 = 0; - - /** - * ConfidenceMetricsEntry truePositiveCount. - * @member {number|Long} truePositiveCount - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.truePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ConfidenceMetricsEntry falsePositiveCount. - * @member {number|Long} falsePositiveCount - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falsePositiveCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return InputConfig; + })(); - /** - * ConfidenceMetricsEntry falseNegativeCount. - * @member {number|Long} falseNegativeCount - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.falseNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v1beta1.BatchPredictInputConfig = (function() { - /** - * ConfidenceMetricsEntry trueNegativeCount. - * @member {number|Long} trueNegativeCount - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.trueNegativeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Properties of a BatchPredictInputConfig. + * @memberof google.cloud.automl.v1beta1 + * @interface IBatchPredictInputConfig + * @property {google.cloud.automl.v1beta1.IGcsSource|null} [gcsSource] BatchPredictInputConfig gcsSource + * @property {google.cloud.automl.v1beta1.IBigQuerySource|null} [bigquerySource] BatchPredictInputConfig bigquerySource + */ - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance - */ - ConfidenceMetricsEntry.create = function create(properties) { - return new ConfidenceMetricsEntry(properties); - }; + /** + * Constructs a new BatchPredictInputConfig. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a BatchPredictInputConfig. + * @implements IBatchPredictInputConfig + * @constructor + * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig=} [properties] Properties to set + */ + function BatchPredictInputConfig(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]]; + } - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); - if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.recallAt1); - if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.precisionAt1); - if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) - writer.uint32(/* id 7, wireType 5 =*/61).float(message.f1ScoreAt1); - if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) - writer.uint32(/* id 8, wireType 5 =*/69).float(message.falsePositiveRate); - if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) - writer.uint32(/* id 9, wireType 5 =*/77).float(message.falsePositiveRateAt1); - if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.truePositiveCount); - if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.falsePositiveCount); - if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.falseNegativeCount); - if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int64(message.trueNegativeCount); - if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.positionThreshold); - return writer; - }; + /** + * BatchPredictInputConfig gcsSource. + * @member {google.cloud.automl.v1beta1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @instance + */ + BatchPredictInputConfig.prototype.gcsSource = null; - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * BatchPredictInputConfig bigquerySource. + * @member {google.cloud.automl.v1beta1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @instance + */ + BatchPredictInputConfig.prototype.bigquerySource = null; - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.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.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.confidenceThreshold = reader.float(); - break; - case 14: - message.positionThreshold = reader.int32(); - break; - case 2: - message.recall = reader.float(); - break; - case 3: - message.precision = reader.float(); - break; - case 8: - message.falsePositiveRate = reader.float(); - break; - case 4: - message.f1Score = reader.float(); - break; - case 5: - message.recallAt1 = reader.float(); - break; - case 6: - message.precisionAt1 = reader.float(); - break; - case 9: - message.falsePositiveRateAt1 = reader.float(); - break; - case 7: - message.f1ScoreAt1 = reader.float(); - break; - case 10: - message.truePositiveCount = reader.int64(); - break; - case 11: - message.falsePositiveCount = reader.int64(); - break; - case 12: - message.falseNegativeCount = reader.int64(); - break; - case 13: - message.trueNegativeCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * BatchPredictInputConfig source. + * @member {"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @instance + */ + Object.defineProperty(BatchPredictInputConfig.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource", "bigquerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Verifies a ConfidenceMetricsEntry message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidenceMetricsEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) - if (!$util.isInteger(message.positionThreshold)) - return "positionThreshold: integer expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) - if (typeof message.falsePositiveRate !== "number") - return "falsePositiveRate: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; - if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) - if (typeof message.recallAt1 !== "number") - return "recallAt1: number expected"; - if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) - if (typeof message.precisionAt1 !== "number") - return "precisionAt1: number expected"; - if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) - if (typeof message.falsePositiveRateAt1 !== "number") - return "falsePositiveRateAt1: number expected"; - if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) - if (typeof message.f1ScoreAt1 !== "number") - return "f1ScoreAt1: number expected"; - if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) - if (!$util.isInteger(message.truePositiveCount) && !(message.truePositiveCount && $util.isInteger(message.truePositiveCount.low) && $util.isInteger(message.truePositiveCount.high))) - return "truePositiveCount: integer|Long expected"; - if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) - if (!$util.isInteger(message.falsePositiveCount) && !(message.falsePositiveCount && $util.isInteger(message.falsePositiveCount.low) && $util.isInteger(message.falsePositiveCount.high))) - return "falsePositiveCount: integer|Long expected"; - if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) - if (!$util.isInteger(message.falseNegativeCount) && !(message.falseNegativeCount && $util.isInteger(message.falseNegativeCount.low) && $util.isInteger(message.falseNegativeCount.high))) - return "falseNegativeCount: integer|Long expected"; - if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) - if (!$util.isInteger(message.trueNegativeCount) && !(message.trueNegativeCount && $util.isInteger(message.trueNegativeCount.low) && $util.isInteger(message.trueNegativeCount.high))) - return "trueNegativeCount: integer|Long expected"; - return null; - }; + /** + * Creates a new BatchPredictInputConfig instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig instance + */ + BatchPredictInputConfig.create = function create(properties) { + return new BatchPredictInputConfig(properties); + }; - /** - * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry - */ - ConfidenceMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) - return object; - var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(); - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.positionThreshold != null) - message.positionThreshold = object.positionThreshold | 0; - if (object.recall != null) - message.recall = Number(object.recall); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.falsePositiveRate != null) - message.falsePositiveRate = Number(object.falsePositiveRate); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); - if (object.recallAt1 != null) - message.recallAt1 = Number(object.recallAt1); - if (object.precisionAt1 != null) - message.precisionAt1 = Number(object.precisionAt1); - if (object.falsePositiveRateAt1 != null) - message.falsePositiveRateAt1 = Number(object.falsePositiveRateAt1); - if (object.f1ScoreAt1 != null) - message.f1ScoreAt1 = Number(object.f1ScoreAt1); - if (object.truePositiveCount != null) - if ($util.Long) - (message.truePositiveCount = $util.Long.fromValue(object.truePositiveCount)).unsigned = false; - else if (typeof object.truePositiveCount === "string") - message.truePositiveCount = parseInt(object.truePositiveCount, 10); - else if (typeof object.truePositiveCount === "number") - message.truePositiveCount = object.truePositiveCount; - else if (typeof object.truePositiveCount === "object") - message.truePositiveCount = new $util.LongBits(object.truePositiveCount.low >>> 0, object.truePositiveCount.high >>> 0).toNumber(); - if (object.falsePositiveCount != null) - if ($util.Long) - (message.falsePositiveCount = $util.Long.fromValue(object.falsePositiveCount)).unsigned = false; - else if (typeof object.falsePositiveCount === "string") - message.falsePositiveCount = parseInt(object.falsePositiveCount, 10); - else if (typeof object.falsePositiveCount === "number") - message.falsePositiveCount = object.falsePositiveCount; - else if (typeof object.falsePositiveCount === "object") - message.falsePositiveCount = new $util.LongBits(object.falsePositiveCount.low >>> 0, object.falsePositiveCount.high >>> 0).toNumber(); - if (object.falseNegativeCount != null) - if ($util.Long) - (message.falseNegativeCount = $util.Long.fromValue(object.falseNegativeCount)).unsigned = false; - else if (typeof object.falseNegativeCount === "string") - message.falseNegativeCount = parseInt(object.falseNegativeCount, 10); - else if (typeof object.falseNegativeCount === "number") - message.falseNegativeCount = object.falseNegativeCount; - else if (typeof object.falseNegativeCount === "object") - message.falseNegativeCount = new $util.LongBits(object.falseNegativeCount.low >>> 0, object.falseNegativeCount.high >>> 0).toNumber(); - if (object.trueNegativeCount != null) - if ($util.Long) - (message.trueNegativeCount = $util.Long.fromValue(object.trueNegativeCount)).unsigned = false; - else if (typeof object.trueNegativeCount === "string") - message.trueNegativeCount = parseInt(object.trueNegativeCount, 10); - else if (typeof object.trueNegativeCount === "number") - message.trueNegativeCount = object.trueNegativeCount; - else if (typeof object.trueNegativeCount === "object") - message.trueNegativeCount = new $util.LongBits(object.trueNegativeCount.low >>> 0, object.trueNegativeCount.high >>> 0).toNumber(); - return message; - }; + /** + * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchPredictInputConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + $root.google.cloud.automl.v1beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) + $root.google.cloud.automl.v1beta1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidenceMetricsEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.confidenceThreshold = 0; - object.recall = 0; - object.precision = 0; - object.f1Score = 0; - object.recallAt1 = 0; - object.precisionAt1 = 0; - object.f1ScoreAt1 = 0; - object.falsePositiveRate = 0; - object.falsePositiveRateAt1 = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.truePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.truePositiveCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.falsePositiveCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.falsePositiveCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.falseNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.falseNegativeCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trueNegativeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trueNegativeCount = options.longs === String ? "0" : 0; - object.positionThreshold = 0; - } - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; - if (message.recallAt1 != null && message.hasOwnProperty("recallAt1")) - object.recallAt1 = options.json && !isFinite(message.recallAt1) ? String(message.recallAt1) : message.recallAt1; - if (message.precisionAt1 != null && message.hasOwnProperty("precisionAt1")) - object.precisionAt1 = options.json && !isFinite(message.precisionAt1) ? String(message.precisionAt1) : message.precisionAt1; - if (message.f1ScoreAt1 != null && message.hasOwnProperty("f1ScoreAt1")) - object.f1ScoreAt1 = options.json && !isFinite(message.f1ScoreAt1) ? String(message.f1ScoreAt1) : message.f1ScoreAt1; - if (message.falsePositiveRate != null && message.hasOwnProperty("falsePositiveRate")) - object.falsePositiveRate = options.json && !isFinite(message.falsePositiveRate) ? String(message.falsePositiveRate) : message.falsePositiveRate; - if (message.falsePositiveRateAt1 != null && message.hasOwnProperty("falsePositiveRateAt1")) - object.falsePositiveRateAt1 = options.json && !isFinite(message.falsePositiveRateAt1) ? String(message.falsePositiveRateAt1) : message.falsePositiveRateAt1; - if (message.truePositiveCount != null && message.hasOwnProperty("truePositiveCount")) - if (typeof message.truePositiveCount === "number") - object.truePositiveCount = options.longs === String ? String(message.truePositiveCount) : message.truePositiveCount; - else - object.truePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.truePositiveCount) : options.longs === Number ? new $util.LongBits(message.truePositiveCount.low >>> 0, message.truePositiveCount.high >>> 0).toNumber() : message.truePositiveCount; - if (message.falsePositiveCount != null && message.hasOwnProperty("falsePositiveCount")) - if (typeof message.falsePositiveCount === "number") - object.falsePositiveCount = options.longs === String ? String(message.falsePositiveCount) : message.falsePositiveCount; - else - object.falsePositiveCount = options.longs === String ? $util.Long.prototype.toString.call(message.falsePositiveCount) : options.longs === Number ? new $util.LongBits(message.falsePositiveCount.low >>> 0, message.falsePositiveCount.high >>> 0).toNumber() : message.falsePositiveCount; - if (message.falseNegativeCount != null && message.hasOwnProperty("falseNegativeCount")) - if (typeof message.falseNegativeCount === "number") - object.falseNegativeCount = options.longs === String ? String(message.falseNegativeCount) : message.falseNegativeCount; - else - object.falseNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.falseNegativeCount) : options.longs === Number ? new $util.LongBits(message.falseNegativeCount.low >>> 0, message.falseNegativeCount.high >>> 0).toNumber() : message.falseNegativeCount; - if (message.trueNegativeCount != null && message.hasOwnProperty("trueNegativeCount")) - if (typeof message.trueNegativeCount === "number") - object.trueNegativeCount = options.longs === String ? String(message.trueNegativeCount) : message.trueNegativeCount; - else - object.trueNegativeCount = options.longs === String ? $util.Long.prototype.toString.call(message.trueNegativeCount) : options.longs === Number ? new $util.LongBits(message.trueNegativeCount.low >>> 0, message.trueNegativeCount.high >>> 0).toNumber() : message.trueNegativeCount; - if (message.positionThreshold != null && message.hasOwnProperty("positionThreshold")) - object.positionThreshold = message.positionThreshold; - return object; - }; + /** + * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchPredictInputConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry - * @instance - * @returns {Object.} JSON object - */ - ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a BatchPredictInputConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchPredictInputConfig.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.automl.v1beta1.BatchPredictInputConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.decode(reader, reader.uint32()); + break; + case 2: + message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return ConfidenceMetricsEntry; - })(); + /** + * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchPredictInputConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - ClassificationEvaluationMetrics.ConfusionMatrix = (function() { + /** + * Verifies a BatchPredictInputConfig message. + * @function verify + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchPredictInputConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.automl.v1beta1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.automl.v1beta1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } + return null; + }; - /** - * Properties of a ConfusionMatrix. - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics - * @interface IConfusionMatrix - * @property {Array.|null} [annotationSpecId] ConfusionMatrix annotationSpecId - * @property {Array.|null} [displayName] ConfusionMatrix displayName - * @property {Array.|null} [row] ConfusionMatrix row - */ + /** + * Creates a BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig + */ + BatchPredictInputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictInputConfig) + return object; + var message = new $root.google.cloud.automl.v1beta1.BatchPredictInputConfig(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictInputConfig.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.fromObject(object.gcsSource); + } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictInputConfig.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.fromObject(object.bigquerySource); + } + return message; + }; - /** - * Constructs a new ConfusionMatrix. - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics - * @classdesc Represents a ConfusionMatrix. - * @implements IConfusionMatrix - * @constructor - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set - */ - function ConfusionMatrix(properties) { - this.annotationSpecId = []; - this.displayName = []; - this.row = []; - 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 a BatchPredictInputConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @static + * @param {google.cloud.automl.v1beta1.BatchPredictInputConfig} message BatchPredictInputConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchPredictInputConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; } + return object; + }; - /** - * ConfusionMatrix annotationSpecId. - * @member {Array.} annotationSpecId - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - */ - ConfusionMatrix.prototype.annotationSpecId = $util.emptyArray; + /** + * Converts this BatchPredictInputConfig to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @instance + * @returns {Object.} JSON object + */ + BatchPredictInputConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ConfusionMatrix displayName. - * @member {Array.} displayName - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - */ - ConfusionMatrix.prototype.displayName = $util.emptyArray; + return BatchPredictInputConfig; + })(); - /** - * ConfusionMatrix row. - * @member {Array.} row - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - */ - ConfusionMatrix.prototype.row = $util.emptyArray; + v1beta1.DocumentInputConfig = (function() { - /** - * Creates a new ConfusionMatrix instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix instance - */ - ConfusionMatrix.create = function create(properties) { - return new ConfusionMatrix(properties); - }; + /** + * Properties of a DocumentInputConfig. + * @memberof google.cloud.automl.v1beta1 + * @interface IDocumentInputConfig + * @property {google.cloud.automl.v1beta1.IGcsSource|null} [gcsSource] DocumentInputConfig gcsSource + */ - /** - * Encodes the specified ConfusionMatrix message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfusionMatrix.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotationSpecId != null && message.annotationSpecId.length) - for (var i = 0; i < message.annotationSpecId.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationSpecId[i]); - if (message.row != null && message.row.length) - for (var i = 0; i < message.row.length; ++i) - $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.encode(message.row[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.displayName != null && message.displayName.length) - for (var i = 0; i < message.displayName.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName[i]); - return writer; - }; + /** + * Constructs a new DocumentInputConfig. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a DocumentInputConfig. + * @implements IDocumentInputConfig + * @constructor + * @param {google.cloud.automl.v1beta1.IDocumentInputConfig=} [properties] Properties to set + */ + function DocumentInputConfig(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]]; + } - /** - * Encodes the specified ConfusionMatrix message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix} message ConfusionMatrix message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfusionMatrix.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DocumentInputConfig gcsSource. + * @member {google.cloud.automl.v1beta1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @instance + */ + DocumentInputConfig.prototype.gcsSource = null; - /** - * Decodes a ConfusionMatrix message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfusionMatrix.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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.annotationSpecId && message.annotationSpecId.length)) - message.annotationSpecId = []; - message.annotationSpecId.push(reader.string()); - break; - case 3: - if (!(message.displayName && message.displayName.length)) - message.displayName = []; - message.displayName.push(reader.string()); - break; - case 2: - if (!(message.row && message.row.length)) - message.row = []; - message.row.push($root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new DocumentInputConfig instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {google.cloud.automl.v1beta1.IDocumentInputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig instance + */ + DocumentInputConfig.create = function create(properties) { + return new DocumentInputConfig(properties); + }; - /** - * Decodes a ConfusionMatrix message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfusionMatrix.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {google.cloud.automl.v1beta1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentInputConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + $root.google.cloud.automl.v1beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Verifies a ConfusionMatrix message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfusionMatrix.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { - if (!Array.isArray(message.annotationSpecId)) - return "annotationSpecId: array expected"; - for (var i = 0; i < message.annotationSpecId.length; ++i) - if (!$util.isString(message.annotationSpecId[i])) - return "annotationSpecId: string[] expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - if (!Array.isArray(message.displayName)) - return "displayName: array expected"; - for (var i = 0; i < message.displayName.length; ++i) - if (!$util.isString(message.displayName[i])) - return "displayName: string[] expected"; - } - if (message.row != null && message.hasOwnProperty("row")) { - if (!Array.isArray(message.row)) - return "row: array expected"; - for (var i = 0; i < message.row.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify(message.row[i]); - if (error) - return "row." + error; - } - } - return null; - }; + /** + * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {google.cloud.automl.v1beta1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentInputConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a ConfusionMatrix message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} ConfusionMatrix - */ - ConfusionMatrix.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix) - return object; - var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix(); - if (object.annotationSpecId) { - if (!Array.isArray(object.annotationSpecId)) - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.annotationSpecId: array expected"); - message.annotationSpecId = []; - for (var i = 0; i < object.annotationSpecId.length; ++i) - message.annotationSpecId[i] = String(object.annotationSpecId[i]); - } - if (object.displayName) { - if (!Array.isArray(object.displayName)) - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.displayName: array expected"); - message.displayName = []; - for (var i = 0; i < object.displayName.length; ++i) - message.displayName[i] = String(object.displayName[i]); - } - if (object.row) { - if (!Array.isArray(object.row)) - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.row: array expected"); - message.row = []; - for (var i = 0; i < object.row.length; ++i) { - if (typeof object.row[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.row: object expected"); - message.row[i] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.fromObject(object.row[i]); - } + /** + * Decodes a DocumentInputConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentInputConfig.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.automl.v1beta1.DocumentInputConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a ConfusionMatrix message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} message ConfusionMatrix - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfusionMatrix.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.annotationSpecId = []; - object.row = []; - object.displayName = []; - } - if (message.annotationSpecId && message.annotationSpecId.length) { - object.annotationSpecId = []; - for (var j = 0; j < message.annotationSpecId.length; ++j) - object.annotationSpecId[j] = message.annotationSpecId[j]; - } - if (message.row && message.row.length) { - object.row = []; - for (var j = 0; j < message.row.length; ++j) - object.row[j] = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.toObject(message.row[j], options); - } - if (message.displayName && message.displayName.length) { - object.displayName = []; - for (var j = 0; j < message.displayName.length; ++j) - object.displayName[j] = message.displayName[j]; - } + /** + * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentInputConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentInputConfig message. + * @function verify + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentInputConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + var error = $root.google.cloud.automl.v1beta1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + return null; + }; + + /** + * Creates a DocumentInputConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig + */ + DocumentInputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DocumentInputConfig) return object; - }; + var message = new $root.google.cloud.automl.v1beta1.DocumentInputConfig(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DocumentInputConfig.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.fromObject(object.gcsSource); + } + return message; + }; - /** - * Converts this ConfusionMatrix to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @instance - * @returns {Object.} JSON object - */ - ConfusionMatrix.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @static + * @param {google.cloud.automl.v1beta1.DocumentInputConfig} message DocumentInputConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentInputConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.gcsSource = null; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + object.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.toObject(message.gcsSource, options); + return object; + }; - ConfusionMatrix.Row = (function() { + /** + * Converts this DocumentInputConfig to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @instance + * @returns {Object.} JSON object + */ + DocumentInputConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Row. - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @interface IRow - * @property {Array.|null} [exampleCount] Row exampleCount - */ + return DocumentInputConfig; + })(); - /** - * Constructs a new Row. - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.exampleCount = []; - 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.OutputConfig = (function() { - /** - * Row exampleCount. - * @member {Array.} exampleCount - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @instance - */ - Row.prototype.exampleCount = $util.emptyArray; + /** + * Properties of an OutputConfig. + * @memberof google.cloud.automl.v1beta1 + * @interface IOutputConfig + * @property {google.cloud.automl.v1beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination + * @property {google.cloud.automl.v1beta1.IBigQueryDestination|null} [bigqueryDestination] OutputConfig bigqueryDestination + */ - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; + /** + * Constructs a new OutputConfig. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents an OutputConfig. + * @implements IOutputConfig + * @constructor + * @param {google.cloud.automl.v1beta1.IOutputConfig=} [properties] Properties to set + */ + function OutputConfig(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]]; + } - /** - * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exampleCount != null && message.exampleCount.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.exampleCount.length; ++i) - writer.int32(message.exampleCount[i]); - writer.ldelim(); - } - return writer; - }; + /** + * OutputConfig gcsDestination. + * @member {google.cloud.automl.v1beta1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @instance + */ + OutputConfig.prototype.gcsDestination = null; - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * OutputConfig bigqueryDestination. + * @member {google.cloud.automl.v1beta1.IBigQueryDestination|null|undefined} bigqueryDestination + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @instance + */ + OutputConfig.prototype.bigqueryDestination = null; - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.exampleCount && message.exampleCount.length)) - message.exampleCount = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.exampleCount.push(reader.int32()); - } else - message.exampleCount.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OutputConfig destination. + * @member {"gcsDestination"|"bigqueryDestination"|undefined} destination + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @instance + */ + Object.defineProperty(OutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "bigqueryDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputConfig instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {google.cloud.automl.v1beta1.IOutputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig instance + */ + OutputConfig.create = function create(properties) { + return new OutputConfig(properties); + }; + + /** + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {google.cloud.automl.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.automl.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) + $root.google.cloud.automl.v1beta1.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {google.cloud.automl.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a Row message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) { - if (!Array.isArray(message.exampleCount)) - return "exampleCount: array expected"; - for (var i = 0; i < message.exampleCount.length; ++i) - if (!$util.isInteger(message.exampleCount[i])) - return "exampleCount: integer[] expected"; - } - return null; - }; + /** + * Decodes an OutputConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputConfig.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.automl.v1beta1.OutputConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.decode(reader, reader.uint32()); + break; + case 2: + message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) - return object; - var message = new $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row(); - if (object.exampleCount) { - if (!Array.isArray(object.exampleCount)) - throw TypeError(".google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row.exampleCount: array expected"); - message.exampleCount = []; - for (var i = 0; i < object.exampleCount.length; ++i) - message.exampleCount[i] = object.exampleCount[i] | 0; - } - return message; - }; + /** + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @static - * @param {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exampleCount = []; - if (message.exampleCount && message.exampleCount.length) { - object.exampleCount = []; - for (var j = 0; j < message.exampleCount.length; ++j) - object.exampleCount[j] = message.exampleCount[j]; - } - return object; - }; + /** + * Verifies an OutputConfig message. + * @function verify + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OutputConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1beta1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + if (properties.destination === 1) + return "destination: multiple values"; + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1beta1.BigQueryDestination.verify(message.bigqueryDestination); + if (error) + return "bigqueryDestination." + error; + } + } + return null; + }; - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig + */ + OutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.OutputConfig) + return object; + var message = new $root.google.cloud.automl.v1beta1.OutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.fromObject(object.gcsDestination); + } + if (object.bigqueryDestination != null) { + if (typeof object.bigqueryDestination !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OutputConfig.bigqueryDestination: object expected"); + message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.fromObject(object.bigqueryDestination); + } + return message; + }; - return Row; - })(); + /** + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @static + * @param {google.cloud.automl.v1beta1.OutputConfig} message OutputConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OutputConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + object.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.toObject(message.bigqueryDestination, options); + if (options.oneofs) + object.destination = "bigqueryDestination"; + } + return object; + }; - return ConfusionMatrix; - })(); + /** + * Converts this OutputConfig to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.OutputConfig + * @instance + * @returns {Object.} JSON object + */ + OutputConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ClassificationEvaluationMetrics; + return OutputConfig; })(); - v1beta1.TimeSegment = (function() { + v1beta1.BatchPredictOutputConfig = (function() { /** - * Properties of a TimeSegment. + * Properties of a BatchPredictOutputConfig. * @memberof google.cloud.automl.v1beta1 - * @interface ITimeSegment - * @property {google.protobuf.IDuration|null} [startTimeOffset] TimeSegment startTimeOffset - * @property {google.protobuf.IDuration|null} [endTimeOffset] TimeSegment endTimeOffset + * @interface IBatchPredictOutputConfig + * @property {google.cloud.automl.v1beta1.IGcsDestination|null} [gcsDestination] BatchPredictOutputConfig gcsDestination + * @property {google.cloud.automl.v1beta1.IBigQueryDestination|null} [bigqueryDestination] BatchPredictOutputConfig bigqueryDestination */ /** - * Constructs a new TimeSegment. + * Constructs a new BatchPredictOutputConfig. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TimeSegment. - * @implements ITimeSegment + * @classdesc Represents a BatchPredictOutputConfig. + * @implements IBatchPredictOutputConfig * @constructor - * @param {google.cloud.automl.v1beta1.ITimeSegment=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig=} [properties] Properties to set */ - function TimeSegment(properties) { + function BatchPredictOutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32343,88 +35607,102 @@ } /** - * TimeSegment startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.automl.v1beta1.TimeSegment + * BatchPredictOutputConfig gcsDestination. + * @member {google.cloud.automl.v1beta1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @instance */ - TimeSegment.prototype.startTimeOffset = null; + BatchPredictOutputConfig.prototype.gcsDestination = null; /** - * TimeSegment endTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} endTimeOffset - * @memberof google.cloud.automl.v1beta1.TimeSegment + * BatchPredictOutputConfig bigqueryDestination. + * @member {google.cloud.automl.v1beta1.IBigQueryDestination|null|undefined} bigqueryDestination + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @instance */ - TimeSegment.prototype.endTimeOffset = null; + BatchPredictOutputConfig.prototype.bigqueryDestination = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new TimeSegment instance using the specified properties. + * BatchPredictOutputConfig destination. + * @member {"gcsDestination"|"bigqueryDestination"|undefined} destination + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @instance + */ + Object.defineProperty(BatchPredictOutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "bigqueryDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BatchPredictOutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1beta1.ITimeSegment=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment instance + * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig instance */ - TimeSegment.create = function create(properties) { - return new TimeSegment(properties); + BatchPredictOutputConfig.create = function create(properties) { + return new BatchPredictOutputConfig(properties); }; /** - * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. + * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSegment.encode = function encode(message, writer) { + BatchPredictOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) - $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.automl.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) + $root.google.cloud.automl.v1beta1.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimeSegment.verify|verify} messages. + * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSegment.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSegment message from the specified reader or buffer. + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment + * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSegment.decode = function decode(reader, length) { + BatchPredictOutputConfig.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.automl.v1beta1.TimeSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.decode(reader, reader.uint32()); break; case 2: - message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -32435,127 +35713,141 @@ }; /** - * Decodes a TimeSegment message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment + * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSegment.decodeDelimited = function decodeDelimited(reader) { + BatchPredictOutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSegment message. + * Verifies a BatchPredictOutputConfig message. * @function verify - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSegment.verify = function verify(message) { + BatchPredictOutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); - if (error) - return "startTimeOffset." + error; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1beta1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } } - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); - if (error) - return "endTimeOffset." + error; + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + if (properties.destination === 1) + return "destination: multiple values"; + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1beta1.BigQueryDestination.verify(message.bigqueryDestination); + if (error) + return "bigqueryDestination." + error; + } } return null; }; /** - * Creates a TimeSegment message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TimeSegment} TimeSegment + * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig */ - TimeSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TimeSegment) + BatchPredictOutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig) return object; - var message = new $root.google.cloud.automl.v1beta1.TimeSegment(); - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TimeSegment.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + var message = new $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.fromObject(object.gcsDestination); } - if (object.endTimeOffset != null) { - if (typeof object.endTimeOffset !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TimeSegment.endTimeOffset: object expected"); - message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + if (object.bigqueryDestination != null) { + if (typeof object.bigqueryDestination !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigqueryDestination: object expected"); + message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.fromObject(object.bigqueryDestination); } return message; }; /** - * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. + * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @static - * @param {google.cloud.automl.v1beta1.TimeSegment} message TimeSegment + * @param {google.cloud.automl.v1beta1.BatchPredictOutputConfig} message BatchPredictOutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSegment.toObject = function toObject(message, options) { + BatchPredictOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.startTimeOffset = null; - object.endTimeOffset = null; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + object.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.toObject(message.bigqueryDestination, options); + if (options.oneofs) + object.destination = "bigqueryDestination"; } - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) - object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); return object; }; /** - * Converts this TimeSegment to JSON. + * Converts this BatchPredictOutputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TimeSegment + * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig * @instance * @returns {Object.} JSON object */ - TimeSegment.prototype.toJSON = function toJSON() { + BatchPredictOutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeSegment; + return BatchPredictOutputConfig; })(); - v1beta1.ImageObjectDetectionAnnotation = (function() { + v1beta1.ModelExportOutputConfig = (function() { /** - * Properties of an ImageObjectDetectionAnnotation. + * Properties of a ModelExportOutputConfig. * @memberof google.cloud.automl.v1beta1 - * @interface IImageObjectDetectionAnnotation - * @property {google.cloud.automl.v1beta1.IBoundingPoly|null} [boundingBox] ImageObjectDetectionAnnotation boundingBox - * @property {number|null} [score] ImageObjectDetectionAnnotation score + * @interface IModelExportOutputConfig + * @property {google.cloud.automl.v1beta1.IGcsDestination|null} [gcsDestination] ModelExportOutputConfig gcsDestination + * @property {google.cloud.automl.v1beta1.IGcrDestination|null} [gcrDestination] ModelExportOutputConfig gcrDestination + * @property {string|null} [modelFormat] ModelExportOutputConfig modelFormat + * @property {Object.|null} [params] ModelExportOutputConfig params */ /** - * Constructs a new ImageObjectDetectionAnnotation. + * Constructs a new ModelExportOutputConfig. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageObjectDetectionAnnotation. - * @implements IImageObjectDetectionAnnotation + * @classdesc Represents a ModelExportOutputConfig. + * @implements IModelExportOutputConfig * @constructor - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig=} [properties] Properties to set */ - function ImageObjectDetectionAnnotation(properties) { + function ModelExportOutputConfig(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32563,88 +35855,134 @@ } /** - * ImageObjectDetectionAnnotation boundingBox. - * @member {google.cloud.automl.v1beta1.IBoundingPoly|null|undefined} boundingBox - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * ModelExportOutputConfig gcsDestination. + * @member {google.cloud.automl.v1beta1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @instance + */ + ModelExportOutputConfig.prototype.gcsDestination = null; + + /** + * ModelExportOutputConfig gcrDestination. + * @member {google.cloud.automl.v1beta1.IGcrDestination|null|undefined} gcrDestination + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @instance + */ + ModelExportOutputConfig.prototype.gcrDestination = null; + + /** + * ModelExportOutputConfig modelFormat. + * @member {string} modelFormat + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @instance + */ + ModelExportOutputConfig.prototype.modelFormat = ""; + + /** + * ModelExportOutputConfig params. + * @member {Object.} params + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @instance */ - ImageObjectDetectionAnnotation.prototype.boundingBox = null; + ModelExportOutputConfig.prototype.params = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ImageObjectDetectionAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * ModelExportOutputConfig destination. + * @member {"gcsDestination"|"gcrDestination"|undefined} destination + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @instance */ - ImageObjectDetectionAnnotation.prototype.score = 0; + Object.defineProperty(ModelExportOutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "gcrDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ImageObjectDetectionAnnotation instance using the specified properties. + * Creates a new ModelExportOutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation instance + * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig instance */ - ImageObjectDetectionAnnotation.create = function create(properties) { - return new ImageObjectDetectionAnnotation(properties); + ModelExportOutputConfig.create = function create(properties) { + return new ModelExportOutputConfig(properties); }; /** - * Encodes the specified ImageObjectDetectionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. + * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionAnnotation.encode = function encode(message, writer) { + ModelExportOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) - $root.google.cloud.automl.v1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.automl.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + if (message.gcrDestination != null && message.hasOwnProperty("gcrDestination")) + $root.google.cloud.automl.v1beta1.GcrDestination.encode(message.gcrDestination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.modelFormat); return writer; }; /** - * Encodes the specified ImageObjectDetectionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.verify|verify} messages. + * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + ModelExportOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionAnnotation.decode = function decode(reader, length) { + ModelExportOutputConfig.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.automl.v1beta1.ImageObjectDetectionAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ModelExportOutputConfig(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.decode(reader, reader.uint32()); + message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.decode(reader, reader.uint32()); + break; + case 3: + message.gcrDestination = $root.google.cloud.automl.v1beta1.GcrDestination.decode(reader, reader.uint32()); + break; + case 4: + message.modelFormat = reader.string(); break; case 2: - message.score = reader.float(); + reader.skip().pos++; + if (message.params === $util.emptyObject) + message.params = {}; + key = reader.string(); + reader.pos++; + message.params[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -32655,124 +35993,169 @@ }; /** - * Decodes an ImageObjectDetectionAnnotation message from the specified reader or buffer, length delimited. + * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionAnnotation.decodeDelimited = function decodeDelimited(reader) { + ModelExportOutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageObjectDetectionAnnotation message. + * Verifies a ModelExportOutputConfig message. * @function verify - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageObjectDetectionAnnotation.verify = function verify(message) { + ModelExportOutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) { - var error = $root.google.cloud.automl.v1beta1.BoundingPoly.verify(message.boundingBox); - if (error) - return "boundingBox." + error; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1beta1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + if (message.gcrDestination != null && message.hasOwnProperty("gcrDestination")) { + if (properties.destination === 1) + return "destination: multiple values"; + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1beta1.GcrDestination.verify(message.gcrDestination); + if (error) + return "gcrDestination." + error; + } + } + if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) + if (!$util.isString(message.modelFormat)) + return "modelFormat: string expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; } - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; return null; }; /** - * Creates an ImageObjectDetectionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} ImageObjectDetectionAnnotation + * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig */ - ImageObjectDetectionAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) + ModelExportOutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ModelExportOutputConfig) return object; - var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation(); - if (object.boundingBox != null) { - if (typeof object.boundingBox !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.boundingBox: object expected"); - message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.fromObject(object.boundingBox); + var message = new $root.google.cloud.automl.v1beta1.ModelExportOutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelExportOutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.fromObject(object.gcsDestination); + } + if (object.gcrDestination != null) { + if (typeof object.gcrDestination !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelExportOutputConfig.gcrDestination: object expected"); + message.gcrDestination = $root.google.cloud.automl.v1beta1.GcrDestination.fromObject(object.gcrDestination); + } + if (object.modelFormat != null) + message.modelFormat = String(object.modelFormat); + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelExportOutputConfig.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); } - if (object.score != null) - message.score = Number(object.score); return message; }; /** - * Creates a plain object from an ImageObjectDetectionAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @static - * @param {google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} message ImageObjectDetectionAnnotation + * @param {google.cloud.automl.v1beta1.ModelExportOutputConfig} message ModelExportOutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageObjectDetectionAnnotation.toObject = function toObject(message, options) { + ModelExportOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.boundingBox = null; - object.score = 0; + if (options.objects || options.defaults) + object.params = {}; + if (options.defaults) + object.modelFormat = ""; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; } - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) - object.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.toObject(message.boundingBox, options); - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; + } + if (message.gcrDestination != null && message.hasOwnProperty("gcrDestination")) { + object.gcrDestination = $root.google.cloud.automl.v1beta1.GcrDestination.toObject(message.gcrDestination, options); + if (options.oneofs) + object.destination = "gcrDestination"; + } + if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) + object.modelFormat = message.modelFormat; return object; }; /** - * Converts this ImageObjectDetectionAnnotation to JSON. + * Converts this ModelExportOutputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig * @instance * @returns {Object.} JSON object */ - ImageObjectDetectionAnnotation.prototype.toJSON = function toJSON() { + ModelExportOutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageObjectDetectionAnnotation; + return ModelExportOutputConfig; })(); - v1beta1.VideoObjectTrackingAnnotation = (function() { + v1beta1.ExportEvaluatedExamplesOutputConfig = (function() { /** - * Properties of a VideoObjectTrackingAnnotation. + * Properties of an ExportEvaluatedExamplesOutputConfig. * @memberof google.cloud.automl.v1beta1 - * @interface IVideoObjectTrackingAnnotation - * @property {string|null} [instanceId] VideoObjectTrackingAnnotation instanceId - * @property {google.protobuf.IDuration|null} [timeOffset] VideoObjectTrackingAnnotation timeOffset - * @property {google.cloud.automl.v1beta1.IBoundingPoly|null} [boundingBox] VideoObjectTrackingAnnotation boundingBox - * @property {number|null} [score] VideoObjectTrackingAnnotation score + * @interface IExportEvaluatedExamplesOutputConfig + * @property {google.cloud.automl.v1beta1.IBigQueryDestination|null} [bigqueryDestination] ExportEvaluatedExamplesOutputConfig bigqueryDestination */ /** - * Constructs a new VideoObjectTrackingAnnotation. + * Constructs a new ExportEvaluatedExamplesOutputConfig. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a VideoObjectTrackingAnnotation. - * @implements IVideoObjectTrackingAnnotation + * @classdesc Represents an ExportEvaluatedExamplesOutputConfig. + * @implements IExportEvaluatedExamplesOutputConfig * @constructor - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig=} [properties] Properties to set */ - function VideoObjectTrackingAnnotation(properties) { + function ExportEvaluatedExamplesOutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32780,114 +36163,89 @@ } /** - * VideoObjectTrackingAnnotation instanceId. - * @member {string} instanceId - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation - * @instance - */ - VideoObjectTrackingAnnotation.prototype.instanceId = ""; - - /** - * VideoObjectTrackingAnnotation timeOffset. - * @member {google.protobuf.IDuration|null|undefined} timeOffset - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * ExportEvaluatedExamplesOutputConfig bigqueryDestination. + * @member {google.cloud.automl.v1beta1.IBigQueryDestination|null|undefined} bigqueryDestination + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @instance */ - VideoObjectTrackingAnnotation.prototype.timeOffset = null; + ExportEvaluatedExamplesOutputConfig.prototype.bigqueryDestination = null; - /** - * VideoObjectTrackingAnnotation boundingBox. - * @member {google.cloud.automl.v1beta1.IBoundingPoly|null|undefined} boundingBox - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation - * @instance - */ - VideoObjectTrackingAnnotation.prototype.boundingBox = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * VideoObjectTrackingAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * ExportEvaluatedExamplesOutputConfig destination. + * @member {"bigqueryDestination"|undefined} destination + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @instance */ - VideoObjectTrackingAnnotation.prototype.score = 0; + Object.defineProperty(ExportEvaluatedExamplesOutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. + * Creates a new ExportEvaluatedExamplesOutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation instance + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig instance */ - VideoObjectTrackingAnnotation.create = function create(properties) { - return new VideoObjectTrackingAnnotation(properties); + ExportEvaluatedExamplesOutputConfig.create = function create(properties) { + return new ExportEvaluatedExamplesOutputConfig(properties); }; /** - * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * Encodes the specified ExportEvaluatedExamplesOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig} message ExportEvaluatedExamplesOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingAnnotation.encode = function encode(message, writer) { + ExportEvaluatedExamplesOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceId); - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - $root.google.protobuf.Duration.encode(message.timeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) - $root.google.cloud.automl.v1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.score); + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) + $root.google.cloud.automl.v1beta1.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * Encodes the specified ExportEvaluatedExamplesOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig} message ExportEvaluatedExamplesOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + ExportEvaluatedExamplesOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. + * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingAnnotation.decode = function decode(reader, length) { + ExportEvaluatedExamplesOutputConfig.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.automl.v1beta1.VideoObjectTrackingAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.instanceId = reader.string(); - break; case 2: - message.timeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.decode(reader, reader.uint32()); - break; - case 4: - message.score = reader.float(); + message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -32898,145 +36256,118 @@ }; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. + * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingAnnotation.decodeDelimited = function decodeDelimited(reader) { + ExportEvaluatedExamplesOutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoObjectTrackingAnnotation message. + * Verifies an ExportEvaluatedExamplesOutputConfig message. * @function verify - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoObjectTrackingAnnotation.verify = function verify(message) { + ExportEvaluatedExamplesOutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.timeOffset); - if (error) - return "timeOffset." + error; - } - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) { - var error = $root.google.cloud.automl.v1beta1.BoundingPoly.verify(message.boundingBox); - if (error) - return "boundingBox." + error; + var properties = {}; + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.automl.v1beta1.BigQueryDestination.verify(message.bigqueryDestination); + if (error) + return "bigqueryDestination." + error; + } } - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; return null; }; /** - * Creates a VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEvaluatedExamplesOutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig */ - VideoObjectTrackingAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) + ExportEvaluatedExamplesOutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) return object; - var message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation(); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.timeOffset != null) { - if (typeof object.timeOffset !== "object") - throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.timeOffset: object expected"); - message.timeOffset = $root.google.protobuf.Duration.fromObject(object.timeOffset); - } - if (object.boundingBox != null) { - if (typeof object.boundingBox !== "object") - throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.boundingBox: object expected"); - message.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.fromObject(object.boundingBox); + var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig(); + if (object.bigqueryDestination != null) { + if (typeof object.bigqueryDestination !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.bigqueryDestination: object expected"); + message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.fromObject(object.bigqueryDestination); } - if (object.score != null) - message.score = Number(object.score); return message; }; /** - * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. + * Creates a plain object from an ExportEvaluatedExamplesOutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @static - * @param {google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} message ExportEvaluatedExamplesOutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoObjectTrackingAnnotation.toObject = function toObject(message, options) { + ExportEvaluatedExamplesOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.instanceId = ""; - object.timeOffset = null; - object.boundingBox = null; - object.score = 0; + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + object.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.toObject(message.bigqueryDestination, options); + if (options.oneofs) + object.destination = "bigqueryDestination"; } - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - object.timeOffset = $root.google.protobuf.Duration.toObject(message.timeOffset, options); - if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) - object.boundingBox = $root.google.cloud.automl.v1beta1.BoundingPoly.toObject(message.boundingBox, options); - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; return object; }; /** - * Converts this VideoObjectTrackingAnnotation to JSON. + * Converts this ExportEvaluatedExamplesOutputConfig to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig * @instance * @returns {Object.} JSON object */ - VideoObjectTrackingAnnotation.prototype.toJSON = function toJSON() { + ExportEvaluatedExamplesOutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoObjectTrackingAnnotation; + return ExportEvaluatedExamplesOutputConfig; })(); - v1beta1.BoundingBoxMetricsEntry = (function() { + v1beta1.GcsSource = (function() { /** - * Properties of a BoundingBoxMetricsEntry. + * Properties of a GcsSource. * @memberof google.cloud.automl.v1beta1 - * @interface IBoundingBoxMetricsEntry - * @property {number|null} [iouThreshold] BoundingBoxMetricsEntry iouThreshold - * @property {number|null} [meanAveragePrecision] BoundingBoxMetricsEntry meanAveragePrecision - * @property {Array.|null} [confidenceMetricsEntries] BoundingBoxMetricsEntry confidenceMetricsEntries + * @interface IGcsSource + * @property {Array.|null} [inputUris] GcsSource inputUris */ /** - * Constructs a new BoundingBoxMetricsEntry. + * Constructs a new GcsSource. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BoundingBoxMetricsEntry. - * @implements IBoundingBoxMetricsEntry + * @classdesc Represents a GcsSource. + * @implements IGcsSource * @constructor - * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGcsSource=} [properties] Properties to set */ - function BoundingBoxMetricsEntry(properties) { - this.confidenceMetricsEntries = []; + function GcsSource(properties) { + this.inputUris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33044,104 +36375,78 @@ } /** - * BoundingBoxMetricsEntry iouThreshold. - * @member {number} iouThreshold - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - * @instance - */ - BoundingBoxMetricsEntry.prototype.iouThreshold = 0; - - /** - * BoundingBoxMetricsEntry meanAveragePrecision. - * @member {number} meanAveragePrecision - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - * @instance - */ - BoundingBoxMetricsEntry.prototype.meanAveragePrecision = 0; - - /** - * BoundingBoxMetricsEntry confidenceMetricsEntries. - * @member {Array.} confidenceMetricsEntries - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * GcsSource inputUris. + * @member {Array.} inputUris + * @memberof google.cloud.automl.v1beta1.GcsSource * @instance */ - BoundingBoxMetricsEntry.prototype.confidenceMetricsEntries = $util.emptyArray; + GcsSource.prototype.inputUris = $util.emptyArray; /** - * Creates a new BoundingBoxMetricsEntry instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static - * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry instance + * @param {google.cloud.automl.v1beta1.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource instance */ - BoundingBoxMetricsEntry.create = function create(properties) { - return new BoundingBoxMetricsEntry(properties); + GcsSource.create = function create(properties) { + return new GcsSource(properties); }; /** - * Encodes the specified BoundingBoxMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static - * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingBoxMetricsEntry.encode = function encode(message, writer) { + GcsSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.iouThreshold); - if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.meanAveragePrecision); - if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) - $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.inputUris != null && message.inputUris.length) + for (var i = 0; i < message.inputUris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); return writer; }; /** - * Encodes the specified BoundingBoxMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify|verify} messages. + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static - * @param {google.cloud.automl.v1beta1.IBoundingBoxMetricsEntry} message BoundingBoxMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingBoxMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry + * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingBoxMetricsEntry.decode = function decode(reader, length) { + GcsSource.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.automl.v1beta1.BoundingBoxMetricsEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GcsSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.iouThreshold = reader.float(); - break; - case 2: - message.meanAveragePrecision = reader.float(); - break; - case 3: - if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) - message.confidenceMetricsEntries = []; - message.confidenceMetricsEntries.push($root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.decode(reader, reader.uint32())); + if (!(message.inputUris && message.inputUris.length)) + message.inputUris = []; + message.inputUris.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -33152,399 +36457,119 @@ }; /** - * Decodes a BoundingBoxMetricsEntry message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry + * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingBoxMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + GcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoundingBoxMetricsEntry message. + * Verifies a GcsSource message. * @function verify - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoundingBoxMetricsEntry.verify = function verify(message) { + GcsSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) - if (typeof message.iouThreshold !== "number") - return "iouThreshold: number expected"; - if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) - if (typeof message.meanAveragePrecision !== "number") - return "meanAveragePrecision: number expected"; - if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { - if (!Array.isArray(message.confidenceMetricsEntries)) - return "confidenceMetricsEntries: array expected"; - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); - if (error) - return "confidenceMetricsEntries." + error; - } + if (message.inputUris != null && message.hasOwnProperty("inputUris")) { + if (!Array.isArray(message.inputUris)) + return "inputUris: array expected"; + for (var i = 0; i < message.inputUris.length; ++i) + if (!$util.isString(message.inputUris[i])) + return "inputUris: string[] expected"; } return null; }; /** - * Creates a BoundingBoxMetricsEntry message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} BoundingBoxMetricsEntry + * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource */ - BoundingBoxMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GcsSource) return object; - var message = new $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry(); - if (object.iouThreshold != null) - message.iouThreshold = Number(object.iouThreshold); - if (object.meanAveragePrecision != null) - message.meanAveragePrecision = Number(object.meanAveragePrecision); - if (object.confidenceMetricsEntries) { - if (!Array.isArray(object.confidenceMetricsEntries)) - throw TypeError(".google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.confidenceMetricsEntries: array expected"); - message.confidenceMetricsEntries = []; - for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { - if (typeof object.confidenceMetricsEntries[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.confidenceMetricsEntries: object expected"); - message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); - } + var message = new $root.google.cloud.automl.v1beta1.GcsSource(); + if (object.inputUris) { + if (!Array.isArray(object.inputUris)) + throw TypeError(".google.cloud.automl.v1beta1.GcsSource.inputUris: array expected"); + message.inputUris = []; + for (var i = 0; i < object.inputUris.length; ++i) + message.inputUris[i] = String(object.inputUris[i]); } return message; }; /** - * Creates a plain object from a BoundingBoxMetricsEntry message. Also converts values to other types if specified. + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @static - * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} message BoundingBoxMetricsEntry + * @param {google.cloud.automl.v1beta1.GcsSource} message GcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoundingBoxMetricsEntry.toObject = function toObject(message, options) { + GcsSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.confidenceMetricsEntries = []; - if (options.defaults) { - object.iouThreshold = 0; - object.meanAveragePrecision = 0; - } - if (message.iouThreshold != null && message.hasOwnProperty("iouThreshold")) - object.iouThreshold = options.json && !isFinite(message.iouThreshold) ? String(message.iouThreshold) : message.iouThreshold; - if (message.meanAveragePrecision != null && message.hasOwnProperty("meanAveragePrecision")) - object.meanAveragePrecision = options.json && !isFinite(message.meanAveragePrecision) ? String(message.meanAveragePrecision) : message.meanAveragePrecision; - if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { - object.confidenceMetricsEntries = []; - for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) - object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); + object.inputUris = []; + if (message.inputUris && message.inputUris.length) { + object.inputUris = []; + for (var j = 0; j < message.inputUris.length; ++j) + object.inputUris[j] = message.inputUris[j]; } return object; }; /** - * Converts this BoundingBoxMetricsEntry to JSON. + * Converts this GcsSource to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + * @memberof google.cloud.automl.v1beta1.GcsSource * @instance * @returns {Object.} JSON object */ - BoundingBoxMetricsEntry.prototype.toJSON = function toJSON() { + GcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BoundingBoxMetricsEntry.ConfidenceMetricsEntry = (function() { - - /** - * Properties of a ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - * @interface IConfidenceMetricsEntry - * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold - * @property {number|null} [recall] ConfidenceMetricsEntry recall - * @property {number|null} [precision] ConfidenceMetricsEntry precision - * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score - */ - - /** - * Constructs a new ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - * @classdesc Represents a ConfidenceMetricsEntry. - * @implements IConfidenceMetricsEntry - * @constructor - * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set - */ - function ConfidenceMetricsEntry(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]]; - } - - /** - * ConfidenceMetricsEntry confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; - - /** - * ConfidenceMetricsEntry recall. - * @member {number} recall - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.recall = 0; - - /** - * ConfidenceMetricsEntry precision. - * @member {number} precision - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precision = 0; - - /** - * ConfidenceMetricsEntry f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.f1Score = 0; - - /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance - */ - ConfidenceMetricsEntry.create = function create(properties) { - return new ConfidenceMetricsEntry(properties); - }; - - /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.precision); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.f1Score); - return writer; - }; - - /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.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.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.confidenceThreshold = reader.float(); - break; - case 2: - message.recall = reader.float(); - break; - case 3: - message.precision = reader.float(); - break; - case 4: - message.f1Score = reader.float(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfidenceMetricsEntry message. - * @function verify - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidenceMetricsEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; - return null; - }; - - /** - * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} ConfidenceMetricsEntry - */ - ConfidenceMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - return object; - var message = new $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.recall != null) - message.recall = Number(object.recall); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); - return message; - }; - - /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @static - * @param {google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} message ConfidenceMetricsEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidenceMetricsEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.confidenceThreshold = 0; - object.recall = 0; - object.precision = 0; - object.f1Score = 0; - } - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; - return object; - }; - - /** - * Converts this ConfidenceMetricsEntry to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - * @instance - * @returns {Object.} JSON object - */ - ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConfidenceMetricsEntry; - })(); - - return BoundingBoxMetricsEntry; + return GcsSource; })(); - v1beta1.ImageObjectDetectionEvaluationMetrics = (function() { + v1beta1.BigQuerySource = (function() { /** - * Properties of an ImageObjectDetectionEvaluationMetrics. + * Properties of a BigQuerySource. * @memberof google.cloud.automl.v1beta1 - * @interface IImageObjectDetectionEvaluationMetrics - * @property {number|null} [evaluatedBoundingBoxCount] ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount - * @property {Array.|null} [boundingBoxMetricsEntries] ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries - * @property {number|null} [boundingBoxMeanAveragePrecision] ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision + * @interface IBigQuerySource + * @property {string|null} [inputUri] BigQuerySource inputUri */ /** - * Constructs a new ImageObjectDetectionEvaluationMetrics. + * Constructs a new BigQuerySource. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageObjectDetectionEvaluationMetrics. - * @implements IImageObjectDetectionEvaluationMetrics + * @classdesc Represents a BigQuerySource. + * @implements IBigQuerySource * @constructor - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBigQuerySource=} [properties] Properties to set */ - function ImageObjectDetectionEvaluationMetrics(properties) { - this.boundingBoxMetricsEntries = []; + function BigQuerySource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33552,104 +36577,75 @@ } /** - * ImageObjectDetectionEvaluationMetrics evaluatedBoundingBoxCount. - * @member {number} evaluatedBoundingBoxCount - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - * @instance - */ - ImageObjectDetectionEvaluationMetrics.prototype.evaluatedBoundingBoxCount = 0; - - /** - * ImageObjectDetectionEvaluationMetrics boundingBoxMetricsEntries. - * @member {Array.} boundingBoxMetricsEntries - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - * @instance - */ - ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMetricsEntries = $util.emptyArray; - - /** - * ImageObjectDetectionEvaluationMetrics boundingBoxMeanAveragePrecision. - * @member {number} boundingBoxMeanAveragePrecision - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * BigQuerySource inputUri. + * @member {string} inputUri + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @instance */ - ImageObjectDetectionEvaluationMetrics.prototype.boundingBoxMeanAveragePrecision = 0; + BigQuerySource.prototype.inputUri = ""; /** - * Creates a new ImageObjectDetectionEvaluationMetrics instance using the specified properties. + * Creates a new BigQuerySource instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics instance + * @param {google.cloud.automl.v1beta1.IBigQuerySource=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource instance */ - ImageObjectDetectionEvaluationMetrics.create = function create(properties) { - return new ImageObjectDetectionEvaluationMetrics(properties); + BigQuerySource.create = function create(properties) { + return new BigQuerySource(properties); }; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionEvaluationMetrics.encode = function encode(message, writer) { + BigQuerySource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.evaluatedBoundingBoxCount); - if (message.boundingBoxMetricsEntries != null && message.boundingBoxMetricsEntries.length) - for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) - $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.encode(message.boundingBoxMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.boundingBoxMeanAveragePrecision); + if (message.inputUri != null && message.hasOwnProperty("inputUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUri); return writer; }; /** - * Encodes the specified ImageObjectDetectionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify|verify} messages. + * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer. + * Decodes a BigQuerySource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionEvaluationMetrics.decode = function decode(reader, length) { + BigQuerySource.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.automl.v1beta1.ImageObjectDetectionEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BigQuerySource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.evaluatedBoundingBoxCount = reader.int32(); - break; - case 2: - if (!(message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length)) - message.boundingBoxMetricsEntries = []; - message.boundingBoxMetricsEntries.push($root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.decode(reader, reader.uint32())); - break; - case 3: - message.boundingBoxMeanAveragePrecision = reader.float(); + message.inputUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -33660,146 +36656,107 @@ }; /** - * Decodes an ImageObjectDetectionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + BigQuerySource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImageObjectDetectionEvaluationMetrics message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImageObjectDetectionEvaluationMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - if (!$util.isInteger(message.evaluatedBoundingBoxCount)) - return "evaluatedBoundingBoxCount: integer expected"; - if (message.boundingBoxMetricsEntries != null && message.hasOwnProperty("boundingBoxMetricsEntries")) { - if (!Array.isArray(message.boundingBoxMetricsEntries)) - return "boundingBoxMetricsEntries: array expected"; - for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify(message.boundingBoxMetricsEntries[i]); - if (error) - return "boundingBoxMetricsEntries." + error; - } - } - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - if (typeof message.boundingBoxMeanAveragePrecision !== "number") - return "boundingBoxMeanAveragePrecision: number expected"; + }; + + /** + * Verifies a BigQuerySource message. + * @function verify + * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQuerySource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputUri != null && message.hasOwnProperty("inputUri")) + if (!$util.isString(message.inputUri)) + return "inputUri: string expected"; return null; }; /** - * Creates an ImageObjectDetectionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} ImageObjectDetectionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource */ - ImageObjectDetectionEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) + BigQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BigQuerySource) return object; - var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics(); - if (object.evaluatedBoundingBoxCount != null) - message.evaluatedBoundingBoxCount = object.evaluatedBoundingBoxCount | 0; - if (object.boundingBoxMetricsEntries) { - if (!Array.isArray(object.boundingBoxMetricsEntries)) - throw TypeError(".google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: array expected"); - message.boundingBoxMetricsEntries = []; - for (var i = 0; i < object.boundingBoxMetricsEntries.length; ++i) { - if (typeof object.boundingBoxMetricsEntries[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.boundingBoxMetricsEntries: object expected"); - message.boundingBoxMetricsEntries[i] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.fromObject(object.boundingBoxMetricsEntries[i]); - } - } - if (object.boundingBoxMeanAveragePrecision != null) - message.boundingBoxMeanAveragePrecision = Number(object.boundingBoxMeanAveragePrecision); + var message = new $root.google.cloud.automl.v1beta1.BigQuerySource(); + if (object.inputUri != null) + message.inputUri = String(object.inputUri); return message; }; /** - * Creates a plain object from an ImageObjectDetectionEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @static - * @param {google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} message ImageObjectDetectionEvaluationMetrics + * @param {google.cloud.automl.v1beta1.BigQuerySource} message BigQuerySource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageObjectDetectionEvaluationMetrics.toObject = function toObject(message, options) { + BigQuerySource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.boundingBoxMetricsEntries = []; - if (options.defaults) { - object.evaluatedBoundingBoxCount = 0; - object.boundingBoxMeanAveragePrecision = 0; - } - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - object.evaluatedBoundingBoxCount = message.evaluatedBoundingBoxCount; - if (message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length) { - object.boundingBoxMetricsEntries = []; - for (var j = 0; j < message.boundingBoxMetricsEntries.length; ++j) - object.boundingBoxMetricsEntries[j] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.toObject(message.boundingBoxMetricsEntries[j], options); - } - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - object.boundingBoxMeanAveragePrecision = options.json && !isFinite(message.boundingBoxMeanAveragePrecision) ? String(message.boundingBoxMeanAveragePrecision) : message.boundingBoxMeanAveragePrecision; + if (options.defaults) + object.inputUri = ""; + if (message.inputUri != null && message.hasOwnProperty("inputUri")) + object.inputUri = message.inputUri; return object; }; /** - * Converts this ImageObjectDetectionEvaluationMetrics to JSON. + * Converts this BigQuerySource to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BigQuerySource * @instance * @returns {Object.} JSON object */ - ImageObjectDetectionEvaluationMetrics.prototype.toJSON = function toJSON() { + BigQuerySource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageObjectDetectionEvaluationMetrics; + return BigQuerySource; })(); - v1beta1.VideoObjectTrackingEvaluationMetrics = (function() { + v1beta1.GcsDestination = (function() { /** - * Properties of a VideoObjectTrackingEvaluationMetrics. + * Properties of a GcsDestination. * @memberof google.cloud.automl.v1beta1 - * @interface IVideoObjectTrackingEvaluationMetrics - * @property {number|null} [evaluatedFrameCount] VideoObjectTrackingEvaluationMetrics evaluatedFrameCount - * @property {number|null} [evaluatedBoundingBoxCount] VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount - * @property {Array.|null} [boundingBoxMetricsEntries] VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries - * @property {number|null} [boundingBoxMeanAveragePrecision] VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision + * @interface IGcsDestination + * @property {string|null} [outputUriPrefix] GcsDestination outputUriPrefix */ /** - * Constructs a new VideoObjectTrackingEvaluationMetrics. + * Constructs a new GcsDestination. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a VideoObjectTrackingEvaluationMetrics. - * @implements IVideoObjectTrackingEvaluationMetrics + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination * @constructor - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGcsDestination=} [properties] Properties to set */ - function VideoObjectTrackingEvaluationMetrics(properties) { - this.boundingBoxMetricsEntries = []; + function GcsDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33807,117 +36764,75 @@ } /** - * VideoObjectTrackingEvaluationMetrics evaluatedFrameCount. - * @member {number} evaluatedFrameCount - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - * @instance - */ - VideoObjectTrackingEvaluationMetrics.prototype.evaluatedFrameCount = 0; - - /** - * VideoObjectTrackingEvaluationMetrics evaluatedBoundingBoxCount. - * @member {number} evaluatedBoundingBoxCount - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - * @instance - */ - VideoObjectTrackingEvaluationMetrics.prototype.evaluatedBoundingBoxCount = 0; - - /** - * VideoObjectTrackingEvaluationMetrics boundingBoxMetricsEntries. - * @member {Array.} boundingBoxMetricsEntries - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - * @instance - */ - VideoObjectTrackingEvaluationMetrics.prototype.boundingBoxMetricsEntries = $util.emptyArray; - - /** - * VideoObjectTrackingEvaluationMetrics boundingBoxMeanAveragePrecision. - * @member {number} boundingBoxMeanAveragePrecision - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * GcsDestination outputUriPrefix. + * @member {string} outputUriPrefix + * @memberof google.cloud.automl.v1beta1.GcsDestination * @instance */ - VideoObjectTrackingEvaluationMetrics.prototype.boundingBoxMeanAveragePrecision = 0; + GcsDestination.prototype.outputUriPrefix = ""; /** - * Creates a new VideoObjectTrackingEvaluationMetrics instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics instance + * @param {google.cloud.automl.v1beta1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination instance */ - VideoObjectTrackingEvaluationMetrics.create = function create(properties) { - return new VideoObjectTrackingEvaluationMetrics(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified VideoObjectTrackingEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics} message VideoObjectTrackingEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingEvaluationMetrics.encode = function encode(message, writer) { + GcsDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.evaluatedFrameCount != null && message.hasOwnProperty("evaluatedFrameCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.evaluatedFrameCount); - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluatedBoundingBoxCount); - if (message.boundingBoxMetricsEntries != null && message.boundingBoxMetricsEntries.length) - for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) - $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.encode(message.boundingBoxMetricsEntries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.boundingBoxMeanAveragePrecision); + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUriPrefix); return writer; }; /** - * Encodes the specified VideoObjectTrackingEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics} message VideoObjectTrackingEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingEvaluationMetrics.decode = function decode(reader, length) { + GcsDestination.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.automl.v1beta1.VideoObjectTrackingEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.evaluatedFrameCount = reader.int32(); - break; - case 2: - message.evaluatedBoundingBoxCount = reader.int32(); - break; - case 4: - if (!(message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length)) - message.boundingBoxMetricsEntries = []; - message.boundingBoxMetricsEntries.push($root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.decode(reader, reader.uint32())); - break; - case 6: - message.boundingBoxMeanAveragePrecision = reader.float(); + message.outputUriPrefix = reader.string(); break; default: reader.skipType(tag & 7); @@ -33928,151 +36843,107 @@ }; /** - * Decodes a VideoObjectTrackingEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoObjectTrackingEvaluationMetrics message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoObjectTrackingEvaluationMetrics.verify = function verify(message) { + GcsDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.evaluatedFrameCount != null && message.hasOwnProperty("evaluatedFrameCount")) - if (!$util.isInteger(message.evaluatedFrameCount)) - return "evaluatedFrameCount: integer expected"; - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - if (!$util.isInteger(message.evaluatedBoundingBoxCount)) - return "evaluatedBoundingBoxCount: integer expected"; - if (message.boundingBoxMetricsEntries != null && message.hasOwnProperty("boundingBoxMetricsEntries")) { - if (!Array.isArray(message.boundingBoxMetricsEntries)) - return "boundingBoxMetricsEntries: array expected"; - for (var i = 0; i < message.boundingBoxMetricsEntries.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.verify(message.boundingBoxMetricsEntries[i]); - if (error) - return "boundingBoxMetricsEntries." + error; - } - } - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - if (typeof message.boundingBoxMeanAveragePrecision !== "number") - return "boundingBoxMeanAveragePrecision: number expected"; + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + if (!$util.isString(message.outputUriPrefix)) + return "outputUriPrefix: string expected"; return null; }; /** - * Creates a VideoObjectTrackingEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} VideoObjectTrackingEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination */ - VideoObjectTrackingEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GcsDestination) return object; - var message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics(); - if (object.evaluatedFrameCount != null) - message.evaluatedFrameCount = object.evaluatedFrameCount | 0; - if (object.evaluatedBoundingBoxCount != null) - message.evaluatedBoundingBoxCount = object.evaluatedBoundingBoxCount | 0; - if (object.boundingBoxMetricsEntries) { - if (!Array.isArray(object.boundingBoxMetricsEntries)) - throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.boundingBoxMetricsEntries: array expected"); - message.boundingBoxMetricsEntries = []; - for (var i = 0; i < object.boundingBoxMetricsEntries.length; ++i) { - if (typeof object.boundingBoxMetricsEntries[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.boundingBoxMetricsEntries: object expected"); - message.boundingBoxMetricsEntries[i] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.fromObject(object.boundingBoxMetricsEntries[i]); - } - } - if (object.boundingBoxMeanAveragePrecision != null) - message.boundingBoxMeanAveragePrecision = Number(object.boundingBoxMeanAveragePrecision); + var message = new $root.google.cloud.automl.v1beta1.GcsDestination(); + if (object.outputUriPrefix != null) + message.outputUriPrefix = String(object.outputUriPrefix); return message; }; /** - * Creates a plain object from a VideoObjectTrackingEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @static - * @param {google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} message VideoObjectTrackingEvaluationMetrics + * @param {google.cloud.automl.v1beta1.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoObjectTrackingEvaluationMetrics.toObject = function toObject(message, options) { + GcsDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.boundingBoxMetricsEntries = []; - if (options.defaults) { - object.evaluatedFrameCount = 0; - object.evaluatedBoundingBoxCount = 0; - object.boundingBoxMeanAveragePrecision = 0; - } - if (message.evaluatedFrameCount != null && message.hasOwnProperty("evaluatedFrameCount")) - object.evaluatedFrameCount = message.evaluatedFrameCount; - if (message.evaluatedBoundingBoxCount != null && message.hasOwnProperty("evaluatedBoundingBoxCount")) - object.evaluatedBoundingBoxCount = message.evaluatedBoundingBoxCount; - if (message.boundingBoxMetricsEntries && message.boundingBoxMetricsEntries.length) { - object.boundingBoxMetricsEntries = []; - for (var j = 0; j < message.boundingBoxMetricsEntries.length; ++j) - object.boundingBoxMetricsEntries[j] = $root.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.toObject(message.boundingBoxMetricsEntries[j], options); - } - if (message.boundingBoxMeanAveragePrecision != null && message.hasOwnProperty("boundingBoxMeanAveragePrecision")) - object.boundingBoxMeanAveragePrecision = options.json && !isFinite(message.boundingBoxMeanAveragePrecision) ? String(message.boundingBoxMeanAveragePrecision) : message.boundingBoxMeanAveragePrecision; + if (options.defaults) + object.outputUriPrefix = ""; + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + object.outputUriPrefix = message.outputUriPrefix; return object; }; /** - * Converts this VideoObjectTrackingEvaluationMetrics to JSON. + * Converts this GcsDestination to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.GcsDestination * @instance * @returns {Object.} JSON object */ - VideoObjectTrackingEvaluationMetrics.prototype.toJSON = function toJSON() { + GcsDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoObjectTrackingEvaluationMetrics; + return GcsDestination; })(); - v1beta1.NormalizedVertex = (function() { + v1beta1.BigQueryDestination = (function() { /** - * Properties of a NormalizedVertex. + * Properties of a BigQueryDestination. * @memberof google.cloud.automl.v1beta1 - * @interface INormalizedVertex - * @property {number|null} [x] NormalizedVertex x - * @property {number|null} [y] NormalizedVertex y + * @interface IBigQueryDestination + * @property {string|null} [outputUri] BigQueryDestination outputUri */ /** - * Constructs a new NormalizedVertex. + * Constructs a new BigQueryDestination. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a NormalizedVertex. - * @implements INormalizedVertex + * @classdesc Represents a BigQueryDestination. + * @implements IBigQueryDestination * @constructor - * @param {google.cloud.automl.v1beta1.INormalizedVertex=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBigQueryDestination=} [properties] Properties to set */ - function NormalizedVertex(properties) { + function BigQueryDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34080,88 +36951,75 @@ } /** - * NormalizedVertex x. - * @member {number} x - * @memberof google.cloud.automl.v1beta1.NormalizedVertex - * @instance - */ - NormalizedVertex.prototype.x = 0; - - /** - * NormalizedVertex y. - * @member {number} y - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * BigQueryDestination outputUri. + * @member {string} outputUri + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @instance */ - NormalizedVertex.prototype.y = 0; + BigQueryDestination.prototype.outputUri = ""; /** - * Creates a new NormalizedVertex instance using the specified properties. + * Creates a new BigQueryDestination instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static - * @param {google.cloud.automl.v1beta1.INormalizedVertex=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex instance + * @param {google.cloud.automl.v1beta1.IBigQueryDestination=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination instance */ - NormalizedVertex.create = function create(properties) { - return new NormalizedVertex(properties); + BigQueryDestination.create = function create(properties) { + return new BigQueryDestination(properties); }; /** - * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static - * @param {google.cloud.automl.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBigQueryDestination} message BigQueryDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedVertex.encode = function encode(message, writer) { + BigQueryDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.x != null && message.hasOwnProperty("x")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); - if (message.y != null && message.hasOwnProperty("y")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUri); return writer; }; /** - * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.NormalizedVertex.verify|verify} messages. + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static - * @param {google.cloud.automl.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBigQueryDestination} message BigQueryDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NormalizedVertex message from the specified reader or buffer. + * Decodes a BigQueryDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedVertex.decode = function decode(reader, length) { + BigQueryDestination.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.automl.v1beta1.NormalizedVertex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BigQueryDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.x = reader.float(); - break; - case 2: - message.y = reader.float(); + message.outputUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -34172,117 +37030,107 @@ }; /** - * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedVertex.decodeDelimited = function decodeDelimited(reader) { + BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NormalizedVertex message. + * Verifies a BigQueryDestination message. * @function verify - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NormalizedVertex.verify = function verify(message) { + BigQueryDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.x != null && message.hasOwnProperty("x")) - if (typeof message.x !== "number") - return "x: number expected"; - if (message.y != null && message.hasOwnProperty("y")) - if (typeof message.y !== "number") - return "y: number expected"; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + if (!$util.isString(message.outputUri)) + return "outputUri: string expected"; return null; }; /** - * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination */ - NormalizedVertex.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.NormalizedVertex) + BigQueryDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BigQueryDestination) return object; - var message = new $root.google.cloud.automl.v1beta1.NormalizedVertex(); - if (object.x != null) - message.x = Number(object.x); - if (object.y != null) - message.y = Number(object.y); + var message = new $root.google.cloud.automl.v1beta1.BigQueryDestination(); + if (object.outputUri != null) + message.outputUri = String(object.outputUri); return message; }; /** - * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @static - * @param {google.cloud.automl.v1beta1.NormalizedVertex} message NormalizedVertex + * @param {google.cloud.automl.v1beta1.BigQueryDestination} message BigQueryDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NormalizedVertex.toObject = function toObject(message, options) { + BigQueryDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.x = 0; - object.y = 0; - } - if (message.x != null && message.hasOwnProperty("x")) - object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; - if (message.y != null && message.hasOwnProperty("y")) - object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; + if (options.defaults) + object.outputUri = ""; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + object.outputUri = message.outputUri; return object; }; /** - * Converts this NormalizedVertex to JSON. + * Converts this BigQueryDestination to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.NormalizedVertex + * @memberof google.cloud.automl.v1beta1.BigQueryDestination * @instance * @returns {Object.} JSON object */ - NormalizedVertex.prototype.toJSON = function toJSON() { + BigQueryDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NormalizedVertex; + return BigQueryDestination; })(); - v1beta1.BoundingPoly = (function() { + v1beta1.GcrDestination = (function() { /** - * Properties of a BoundingPoly. + * Properties of a GcrDestination. * @memberof google.cloud.automl.v1beta1 - * @interface IBoundingPoly - * @property {Array.|null} [normalizedVertices] BoundingPoly normalizedVertices + * @interface IGcrDestination + * @property {string|null} [outputUri] GcrDestination outputUri */ /** - * Constructs a new BoundingPoly. + * Constructs a new GcrDestination. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BoundingPoly. - * @implements IBoundingPoly + * @classdesc Represents a GcrDestination. + * @implements IGcrDestination * @constructor - * @param {google.cloud.automl.v1beta1.IBoundingPoly=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGcrDestination=} [properties] Properties to set */ - function BoundingPoly(properties) { - this.normalizedVertices = []; + function GcrDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34290,78 +37138,75 @@ } /** - * BoundingPoly normalizedVertices. - * @member {Array.} normalizedVertices - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * GcrDestination outputUri. + * @member {string} outputUri + * @memberof google.cloud.automl.v1beta1.GcrDestination * @instance */ - BoundingPoly.prototype.normalizedVertices = $util.emptyArray; + GcrDestination.prototype.outputUri = ""; /** - * Creates a new BoundingPoly instance using the specified properties. + * Creates a new GcrDestination instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static - * @param {google.cloud.automl.v1beta1.IBoundingPoly=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly instance + * @param {google.cloud.automl.v1beta1.IGcrDestination=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination instance */ - BoundingPoly.create = function create(properties) { - return new BoundingPoly(properties); + GcrDestination.create = function create(properties) { + return new GcrDestination(properties); }; /** - * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. + * Encodes the specified GcrDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static - * @param {google.cloud.automl.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGcrDestination} message GcrDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingPoly.encode = function encode(message, writer) { + GcrDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.normalizedVertices != null && message.normalizedVertices.length) - for (var i = 0; i < message.normalizedVertices.length; ++i) - $root.google.cloud.automl.v1beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUri); return writer; }; /** - * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BoundingPoly.verify|verify} messages. + * Encodes the specified GcrDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static - * @param {google.cloud.automl.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGcrDestination} message GcrDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { + GcrDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoundingPoly message from the specified reader or buffer. + * Decodes a GcrDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly + * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingPoly.decode = function decode(reader, length) { + GcrDestination.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.automl.v1beta1.BoundingPoly(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GcrDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.normalizedVertices && message.normalizedVertices.length)) - message.normalizedVertices = []; - message.normalizedVertices.push($root.google.cloud.automl.v1beta1.NormalizedVertex.decode(reader, reader.uint32())); + case 1: + message.outputUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -34372,130 +37217,109 @@ }; /** - * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. + * Decodes a GcrDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly + * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingPoly.decodeDelimited = function decodeDelimited(reader) { + GcrDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoundingPoly message. + * Verifies a GcrDestination message. * @function verify - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoundingPoly.verify = function verify(message) { + GcrDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { - if (!Array.isArray(message.normalizedVertices)) - return "normalizedVertices: array expected"; - for (var i = 0; i < message.normalizedVertices.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.NormalizedVertex.verify(message.normalizedVertices[i]); - if (error) - return "normalizedVertices." + error; - } - } + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + if (!$util.isString(message.outputUri)) + return "outputUri: string expected"; return null; }; /** - * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates a GcrDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BoundingPoly} BoundingPoly + * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination */ - BoundingPoly.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BoundingPoly) + GcrDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GcrDestination) return object; - var message = new $root.google.cloud.automl.v1beta1.BoundingPoly(); - if (object.normalizedVertices) { - if (!Array.isArray(object.normalizedVertices)) - throw TypeError(".google.cloud.automl.v1beta1.BoundingPoly.normalizedVertices: array expected"); - message.normalizedVertices = []; - for (var i = 0; i < object.normalizedVertices.length; ++i) { - if (typeof object.normalizedVertices[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BoundingPoly.normalizedVertices: object expected"); - message.normalizedVertices[i] = $root.google.cloud.automl.v1beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]); - } - } + var message = new $root.google.cloud.automl.v1beta1.GcrDestination(); + if (object.outputUri != null) + message.outputUri = String(object.outputUri); return message; }; /** - * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. + * Creates a plain object from a GcrDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @static - * @param {google.cloud.automl.v1beta1.BoundingPoly} message BoundingPoly + * @param {google.cloud.automl.v1beta1.GcrDestination} message GcrDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoundingPoly.toObject = function toObject(message, options) { + GcrDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.normalizedVertices = []; - if (message.normalizedVertices && message.normalizedVertices.length) { - object.normalizedVertices = []; - for (var j = 0; j < message.normalizedVertices.length; ++j) - object.normalizedVertices[j] = $root.google.cloud.automl.v1beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options); - } + if (options.defaults) + object.outputUri = ""; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + object.outputUri = message.outputUri; return object; }; /** - * Converts this BoundingPoly to JSON. + * Converts this GcrDestination to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BoundingPoly + * @memberof google.cloud.automl.v1beta1.GcrDestination * @instance * @returns {Object.} JSON object */ - BoundingPoly.prototype.toJSON = function toJSON() { + GcrDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BoundingPoly; + return GcrDestination; })(); - v1beta1.TablesDatasetMetadata = (function() { + v1beta1.TextSegment = (function() { /** - * Properties of a TablesDatasetMetadata. + * Properties of a TextSegment. * @memberof google.cloud.automl.v1beta1 - * @interface ITablesDatasetMetadata - * @property {string|null} [primaryTableSpecId] TablesDatasetMetadata primaryTableSpecId - * @property {string|null} [targetColumnSpecId] TablesDatasetMetadata targetColumnSpecId - * @property {string|null} [weightColumnSpecId] TablesDatasetMetadata weightColumnSpecId - * @property {string|null} [mlUseColumnSpecId] TablesDatasetMetadata mlUseColumnSpecId - * @property {Object.|null} [targetColumnCorrelations] TablesDatasetMetadata targetColumnCorrelations - * @property {google.protobuf.ITimestamp|null} [statsUpdateTime] TablesDatasetMetadata statsUpdateTime + * @interface ITextSegment + * @property {string|null} [content] TextSegment content + * @property {number|Long|null} [startOffset] TextSegment startOffset + * @property {number|Long|null} [endOffset] TextSegment endOffset */ /** - * Constructs a new TablesDatasetMetadata. + * Constructs a new TextSegment. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TablesDatasetMetadata. - * @implements ITablesDatasetMetadata + * @classdesc Represents a TextSegment. + * @implements ITextSegment * @constructor - * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextSegment=} [properties] Properties to set */ - function TablesDatasetMetadata(properties) { - this.targetColumnCorrelations = {}; + function TextSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34503,148 +37327,101 @@ } /** - * TablesDatasetMetadata primaryTableSpecId. - * @member {string} primaryTableSpecId - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata - * @instance - */ - TablesDatasetMetadata.prototype.primaryTableSpecId = ""; - - /** - * TablesDatasetMetadata targetColumnSpecId. - * @member {string} targetColumnSpecId - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata - * @instance - */ - TablesDatasetMetadata.prototype.targetColumnSpecId = ""; - - /** - * TablesDatasetMetadata weightColumnSpecId. - * @member {string} weightColumnSpecId - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata - * @instance - */ - TablesDatasetMetadata.prototype.weightColumnSpecId = ""; - - /** - * TablesDatasetMetadata mlUseColumnSpecId. - * @member {string} mlUseColumnSpecId - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * TextSegment content. + * @member {string} content + * @memberof google.cloud.automl.v1beta1.TextSegment * @instance */ - TablesDatasetMetadata.prototype.mlUseColumnSpecId = ""; + TextSegment.prototype.content = ""; /** - * TablesDatasetMetadata targetColumnCorrelations. - * @member {Object.} targetColumnCorrelations - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * TextSegment startOffset. + * @member {number|Long} startOffset + * @memberof google.cloud.automl.v1beta1.TextSegment * @instance */ - TablesDatasetMetadata.prototype.targetColumnCorrelations = $util.emptyObject; + TextSegment.prototype.startOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * TablesDatasetMetadata statsUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} statsUpdateTime - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * TextSegment endOffset. + * @member {number|Long} endOffset + * @memberof google.cloud.automl.v1beta1.TextSegment * @instance */ - TablesDatasetMetadata.prototype.statsUpdateTime = null; + TextSegment.prototype.endOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new TablesDatasetMetadata instance using the specified properties. + * Creates a new TextSegment instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static - * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.ITextSegment=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment instance */ - TablesDatasetMetadata.create = function create(properties) { - return new TablesDatasetMetadata(properties); + TextSegment.create = function create(properties) { + return new TextSegment(properties); }; /** - * Encodes the specified TablesDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. + * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static - * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata} message TablesDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSegment} message TextSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesDatasetMetadata.encode = function encode(message, writer) { + TextSegment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.primaryTableSpecId != null && message.hasOwnProperty("primaryTableSpecId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.primaryTableSpecId); - if (message.targetColumnSpecId != null && message.hasOwnProperty("targetColumnSpecId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetColumnSpecId); - if (message.weightColumnSpecId != null && message.hasOwnProperty("weightColumnSpecId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.weightColumnSpecId); - if (message.mlUseColumnSpecId != null && message.hasOwnProperty("mlUseColumnSpecId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.mlUseColumnSpecId); - if (message.targetColumnCorrelations != null && message.hasOwnProperty("targetColumnCorrelations")) - for (var keys = Object.keys(message.targetColumnCorrelations), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.automl.v1beta1.CorrelationStats.encode(message.targetColumnCorrelations[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.statsUpdateTime != null && message.hasOwnProperty("statsUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.statsUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.startOffset); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.endOffset); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.content); return writer; }; /** - * Encodes the specified TablesDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesDatasetMetadata.verify|verify} messages. + * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static - * @param {google.cloud.automl.v1beta1.ITablesDatasetMetadata} message TablesDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSegment} message TextSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + TextSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TablesDatasetMetadata message from the specified reader or buffer. + * Decodes a TextSegment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata + * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesDatasetMetadata.decode = function decode(reader, length) { + TextSegment.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.automl.v1beta1.TablesDatasetMetadata(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextSegment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.primaryTableSpecId = reader.string(); - break; - case 2: - message.targetColumnSpecId = reader.string(); - break; case 3: - message.weightColumnSpecId = reader.string(); - break; - case 4: - message.mlUseColumnSpecId = reader.string(); + message.content = reader.string(); break; - case 6: - reader.skip().pos++; - if (message.targetColumnCorrelations === $util.emptyObject) - message.targetColumnCorrelations = {}; - key = reader.string(); - reader.pos++; - message.targetColumnCorrelations[key] = $root.google.cloud.automl.v1beta1.CorrelationStats.decode(reader, reader.uint32()); + case 1: + message.startOffset = reader.int64(); break; - case 7: - message.statsUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 2: + message.endOffset = reader.int64(); break; default: reader.skipType(tag & 7); @@ -34655,383 +37432,242 @@ }; /** - * Decodes a TablesDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a TextSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata + * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + TextSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TablesDatasetMetadata message. + * Verifies a TextSegment message. * @function verify - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TablesDatasetMetadata.verify = function verify(message) { + TextSegment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.primaryTableSpecId != null && message.hasOwnProperty("primaryTableSpecId")) - if (!$util.isString(message.primaryTableSpecId)) - return "primaryTableSpecId: string expected"; - if (message.targetColumnSpecId != null && message.hasOwnProperty("targetColumnSpecId")) - if (!$util.isString(message.targetColumnSpecId)) - return "targetColumnSpecId: string expected"; - if (message.weightColumnSpecId != null && message.hasOwnProperty("weightColumnSpecId")) - if (!$util.isString(message.weightColumnSpecId)) - return "weightColumnSpecId: string expected"; - if (message.mlUseColumnSpecId != null && message.hasOwnProperty("mlUseColumnSpecId")) - if (!$util.isString(message.mlUseColumnSpecId)) - return "mlUseColumnSpecId: string expected"; - if (message.targetColumnCorrelations != null && message.hasOwnProperty("targetColumnCorrelations")) { - if (!$util.isObject(message.targetColumnCorrelations)) - return "targetColumnCorrelations: object expected"; - var key = Object.keys(message.targetColumnCorrelations); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.CorrelationStats.verify(message.targetColumnCorrelations[key[i]]); - if (error) - return "targetColumnCorrelations." + error; - } - } - if (message.statsUpdateTime != null && message.hasOwnProperty("statsUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.statsUpdateTime); - if (error) - return "statsUpdateTime." + error; - } + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset) && !(message.startOffset && $util.isInteger(message.startOffset.low) && $util.isInteger(message.startOffset.high))) + return "startOffset: integer|Long expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset) && !(message.endOffset && $util.isInteger(message.endOffset.low) && $util.isInteger(message.endOffset.high))) + return "endOffset: integer|Long expected"; return null; }; /** - * Creates a TablesDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TextSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TablesDatasetMetadata} TablesDatasetMetadata + * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment */ - TablesDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TablesDatasetMetadata) + TextSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextSegment) return object; - var message = new $root.google.cloud.automl.v1beta1.TablesDatasetMetadata(); - if (object.primaryTableSpecId != null) - message.primaryTableSpecId = String(object.primaryTableSpecId); - if (object.targetColumnSpecId != null) - message.targetColumnSpecId = String(object.targetColumnSpecId); - if (object.weightColumnSpecId != null) - message.weightColumnSpecId = String(object.weightColumnSpecId); - if (object.mlUseColumnSpecId != null) - message.mlUseColumnSpecId = String(object.mlUseColumnSpecId); - if (object.targetColumnCorrelations) { - if (typeof object.targetColumnCorrelations !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesDatasetMetadata.targetColumnCorrelations: object expected"); - message.targetColumnCorrelations = {}; - for (var keys = Object.keys(object.targetColumnCorrelations), i = 0; i < keys.length; ++i) { - if (typeof object.targetColumnCorrelations[keys[i]] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesDatasetMetadata.targetColumnCorrelations: object expected"); - message.targetColumnCorrelations[keys[i]] = $root.google.cloud.automl.v1beta1.CorrelationStats.fromObject(object.targetColumnCorrelations[keys[i]]); - } - } - if (object.statsUpdateTime != null) { - if (typeof object.statsUpdateTime !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesDatasetMetadata.statsUpdateTime: object expected"); - message.statsUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.statsUpdateTime); - } + var message = new $root.google.cloud.automl.v1beta1.TextSegment(); + if (object.content != null) + message.content = String(object.content); + if (object.startOffset != null) + if ($util.Long) + (message.startOffset = $util.Long.fromValue(object.startOffset)).unsigned = false; + else if (typeof object.startOffset === "string") + message.startOffset = parseInt(object.startOffset, 10); + else if (typeof object.startOffset === "number") + message.startOffset = object.startOffset; + else if (typeof object.startOffset === "object") + message.startOffset = new $util.LongBits(object.startOffset.low >>> 0, object.startOffset.high >>> 0).toNumber(); + if (object.endOffset != null) + if ($util.Long) + (message.endOffset = $util.Long.fromValue(object.endOffset)).unsigned = false; + else if (typeof object.endOffset === "string") + message.endOffset = parseInt(object.endOffset, 10); + else if (typeof object.endOffset === "number") + message.endOffset = object.endOffset; + else if (typeof object.endOffset === "object") + message.endOffset = new $util.LongBits(object.endOffset.low >>> 0, object.endOffset.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a TablesDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a TextSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @static - * @param {google.cloud.automl.v1beta1.TablesDatasetMetadata} message TablesDatasetMetadata + * @param {google.cloud.automl.v1beta1.TextSegment} message TextSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TablesDatasetMetadata.toObject = function toObject(message, options) { + TextSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.targetColumnCorrelations = {}; if (options.defaults) { - object.primaryTableSpecId = ""; - object.targetColumnSpecId = ""; - object.weightColumnSpecId = ""; - object.mlUseColumnSpecId = ""; - object.statsUpdateTime = null; - } - if (message.primaryTableSpecId != null && message.hasOwnProperty("primaryTableSpecId")) - object.primaryTableSpecId = message.primaryTableSpecId; - if (message.targetColumnSpecId != null && message.hasOwnProperty("targetColumnSpecId")) - object.targetColumnSpecId = message.targetColumnSpecId; - if (message.weightColumnSpecId != null && message.hasOwnProperty("weightColumnSpecId")) - object.weightColumnSpecId = message.weightColumnSpecId; - if (message.mlUseColumnSpecId != null && message.hasOwnProperty("mlUseColumnSpecId")) - object.mlUseColumnSpecId = message.mlUseColumnSpecId; - var keys2; - if (message.targetColumnCorrelations && (keys2 = Object.keys(message.targetColumnCorrelations)).length) { - object.targetColumnCorrelations = {}; - for (var j = 0; j < keys2.length; ++j) - object.targetColumnCorrelations[keys2[j]] = $root.google.cloud.automl.v1beta1.CorrelationStats.toObject(message.targetColumnCorrelations[keys2[j]], options); + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startOffset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endOffset = options.longs === String ? "0" : 0; + object.content = ""; } - if (message.statsUpdateTime != null && message.hasOwnProperty("statsUpdateTime")) - object.statsUpdateTime = $root.google.protobuf.Timestamp.toObject(message.statsUpdateTime, options); + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (typeof message.startOffset === "number") + object.startOffset = options.longs === String ? String(message.startOffset) : message.startOffset; + else + object.startOffset = options.longs === String ? $util.Long.prototype.toString.call(message.startOffset) : options.longs === Number ? new $util.LongBits(message.startOffset.low >>> 0, message.startOffset.high >>> 0).toNumber() : message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (typeof message.endOffset === "number") + object.endOffset = options.longs === String ? String(message.endOffset) : message.endOffset; + else + object.endOffset = options.longs === String ? $util.Long.prototype.toString.call(message.endOffset) : options.longs === Number ? new $util.LongBits(message.endOffset.low >>> 0, message.endOffset.high >>> 0).toNumber() : message.endOffset; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; return object; }; /** - * Converts this TablesDatasetMetadata to JSON. + * Converts this TextSegment to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.TextSegment * @instance * @returns {Object.} JSON object */ - TablesDatasetMetadata.prototype.toJSON = function toJSON() { + TextSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TablesDatasetMetadata; + return TextSegment; })(); - v1beta1.TablesModelMetadata = (function() { + v1beta1.DoubleRange = (function() { /** - * Properties of a TablesModelMetadata. + * Properties of a DoubleRange. * @memberof google.cloud.automl.v1beta1 - * @interface ITablesModelMetadata - * @property {number|null} [optimizationObjectiveRecallValue] TablesModelMetadata optimizationObjectiveRecallValue - * @property {number|null} [optimizationObjectivePrecisionValue] TablesModelMetadata optimizationObjectivePrecisionValue - * @property {google.cloud.automl.v1beta1.IColumnSpec|null} [targetColumnSpec] TablesModelMetadata targetColumnSpec - * @property {Array.|null} [inputFeatureColumnSpecs] TablesModelMetadata inputFeatureColumnSpecs - * @property {string|null} [optimizationObjective] TablesModelMetadata optimizationObjective - * @property {Array.|null} [tablesModelColumnInfo] TablesModelMetadata tablesModelColumnInfo - * @property {number|Long|null} [trainBudgetMilliNodeHours] TablesModelMetadata trainBudgetMilliNodeHours - * @property {number|Long|null} [trainCostMilliNodeHours] TablesModelMetadata trainCostMilliNodeHours - * @property {boolean|null} [disableEarlyStopping] TablesModelMetadata disableEarlyStopping + * @interface IDoubleRange + * @property {number|null} [start] DoubleRange start + * @property {number|null} [end] DoubleRange end */ /** - * Constructs a new TablesModelMetadata. + * Constructs a new DoubleRange. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TablesModelMetadata. - * @implements ITablesModelMetadata + * @classdesc Represents a DoubleRange. + * @implements IDoubleRange * @constructor - * @param {google.cloud.automl.v1beta1.ITablesModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDoubleRange=} [properties] Properties to set */ - function TablesModelMetadata(properties) { - this.inputFeatureColumnSpecs = []; - this.tablesModelColumnInfo = []; + function DoubleRange(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]]; - } - - /** - * TablesModelMetadata optimizationObjectiveRecallValue. - * @member {number} optimizationObjectiveRecallValue - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.optimizationObjectiveRecallValue = 0; - - /** - * TablesModelMetadata optimizationObjectivePrecisionValue. - * @member {number} optimizationObjectivePrecisionValue - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.optimizationObjectivePrecisionValue = 0; - - /** - * TablesModelMetadata targetColumnSpec. - * @member {google.cloud.automl.v1beta1.IColumnSpec|null|undefined} targetColumnSpec - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.targetColumnSpec = null; - - /** - * TablesModelMetadata inputFeatureColumnSpecs. - * @member {Array.} inputFeatureColumnSpecs - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.inputFeatureColumnSpecs = $util.emptyArray; - - /** - * TablesModelMetadata optimizationObjective. - * @member {string} optimizationObjective - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.optimizationObjective = ""; - - /** - * TablesModelMetadata tablesModelColumnInfo. - * @member {Array.} tablesModelColumnInfo - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.tablesModelColumnInfo = $util.emptyArray; - - /** - * TablesModelMetadata trainBudgetMilliNodeHours. - * @member {number|Long} trainBudgetMilliNodeHours - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TablesModelMetadata trainCostMilliNodeHours. - * @member {number|Long} trainCostMilliNodeHours - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata - * @instance - */ - TablesModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * TablesModelMetadata disableEarlyStopping. - * @member {boolean} disableEarlyStopping - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * DoubleRange start. + * @member {number} start + * @memberof google.cloud.automl.v1beta1.DoubleRange * @instance */ - TablesModelMetadata.prototype.disableEarlyStopping = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DoubleRange.prototype.start = 0; /** - * TablesModelMetadata additionalOptimizationObjectiveConfig. - * @member {"optimizationObjectiveRecallValue"|"optimizationObjectivePrecisionValue"|undefined} additionalOptimizationObjectiveConfig - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * DoubleRange end. + * @member {number} end + * @memberof google.cloud.automl.v1beta1.DoubleRange * @instance */ - Object.defineProperty(TablesModelMetadata.prototype, "additionalOptimizationObjectiveConfig", { - get: $util.oneOfGetter($oneOfFields = ["optimizationObjectiveRecallValue", "optimizationObjectivePrecisionValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + DoubleRange.prototype.end = 0; /** - * Creates a new TablesModelMetadata instance using the specified properties. + * Creates a new DoubleRange instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static - * @param {google.cloud.automl.v1beta1.ITablesModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata instance + * @param {google.cloud.automl.v1beta1.IDoubleRange=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange instance */ - TablesModelMetadata.create = function create(properties) { - return new TablesModelMetadata(properties); + DoubleRange.create = function create(properties) { + return new DoubleRange(properties); }; /** - * Encodes the specified TablesModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. + * Encodes the specified DoubleRange message. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static - * @param {google.cloud.automl.v1beta1.ITablesModelMetadata} message TablesModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDoubleRange} message DoubleRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesModelMetadata.encode = function encode(message, writer) { + DoubleRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetColumnSpec != null && message.hasOwnProperty("targetColumnSpec")) - $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.targetColumnSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inputFeatureColumnSpecs != null && message.inputFeatureColumnSpecs.length) - for (var i = 0; i < message.inputFeatureColumnSpecs.length; ++i) - $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.inputFeatureColumnSpecs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.optimizationObjective != null && message.hasOwnProperty("optimizationObjective")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.optimizationObjective); - if (message.tablesModelColumnInfo != null && message.tablesModelColumnInfo.length) - for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) - $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.encode(message.tablesModelColumnInfo[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.trainBudgetMilliNodeHours); - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.trainCostMilliNodeHours); - if (message.disableEarlyStopping != null && message.hasOwnProperty("disableEarlyStopping")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.disableEarlyStopping); - if (message.optimizationObjectiveRecallValue != null && message.hasOwnProperty("optimizationObjectiveRecallValue")) - writer.uint32(/* id 17, wireType 5 =*/141).float(message.optimizationObjectiveRecallValue); - if (message.optimizationObjectivePrecisionValue != null && message.hasOwnProperty("optimizationObjectivePrecisionValue")) - writer.uint32(/* id 18, wireType 5 =*/149).float(message.optimizationObjectivePrecisionValue); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.end); return writer; }; /** - * Encodes the specified TablesModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelMetadata.verify|verify} messages. + * Encodes the specified DoubleRange message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static - * @param {google.cloud.automl.v1beta1.ITablesModelMetadata} message TablesModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDoubleRange} message DoubleRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DoubleRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TablesModelMetadata message from the specified reader or buffer. + * Decodes a DoubleRange message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata + * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesModelMetadata.decode = function decode(reader, length) { + DoubleRange.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.automl.v1beta1.TablesModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DoubleRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 17: - message.optimizationObjectiveRecallValue = reader.float(); - break; - case 18: - message.optimizationObjectivePrecisionValue = reader.float(); + case 1: + message.start = reader.double(); break; case 2: - message.targetColumnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.inputFeatureColumnSpecs && message.inputFeatureColumnSpecs.length)) - message.inputFeatureColumnSpecs = []; - message.inputFeatureColumnSpecs.push($root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32())); - break; - case 4: - message.optimizationObjective = reader.string(); - break; - case 5: - if (!(message.tablesModelColumnInfo && message.tablesModelColumnInfo.length)) - message.tablesModelColumnInfo = []; - message.tablesModelColumnInfo.push($root.google.cloud.automl.v1beta1.TablesModelColumnInfo.decode(reader, reader.uint32())); - break; - case 6: - message.trainBudgetMilliNodeHours = reader.int64(); - break; - case 7: - message.trainCostMilliNodeHours = reader.int64(); - break; - case 12: - message.disableEarlyStopping = reader.bool(); + message.end = reader.double(); break; default: reader.skipType(tag & 7); @@ -35042,257 +37678,120 @@ }; /** - * Decodes a TablesModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a DoubleRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata + * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesModelMetadata.decodeDelimited = function decodeDelimited(reader) { + DoubleRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TablesModelMetadata message. + * Verifies a DoubleRange message. * @function verify - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TablesModelMetadata.verify = function verify(message) { + DoubleRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.optimizationObjectiveRecallValue != null && message.hasOwnProperty("optimizationObjectiveRecallValue")) { - properties.additionalOptimizationObjectiveConfig = 1; - if (typeof message.optimizationObjectiveRecallValue !== "number") - return "optimizationObjectiveRecallValue: number expected"; - } - if (message.optimizationObjectivePrecisionValue != null && message.hasOwnProperty("optimizationObjectivePrecisionValue")) { - if (properties.additionalOptimizationObjectiveConfig === 1) - return "additionalOptimizationObjectiveConfig: multiple values"; - properties.additionalOptimizationObjectiveConfig = 1; - if (typeof message.optimizationObjectivePrecisionValue !== "number") - return "optimizationObjectivePrecisionValue: number expected"; - } - if (message.targetColumnSpec != null && message.hasOwnProperty("targetColumnSpec")) { - var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.targetColumnSpec); - if (error) - return "targetColumnSpec." + error; - } - if (message.inputFeatureColumnSpecs != null && message.hasOwnProperty("inputFeatureColumnSpecs")) { - if (!Array.isArray(message.inputFeatureColumnSpecs)) - return "inputFeatureColumnSpecs: array expected"; - for (var i = 0; i < message.inputFeatureColumnSpecs.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.inputFeatureColumnSpecs[i]); - if (error) - return "inputFeatureColumnSpecs." + error; - } - } - if (message.optimizationObjective != null && message.hasOwnProperty("optimizationObjective")) - if (!$util.isString(message.optimizationObjective)) - return "optimizationObjective: string expected"; - if (message.tablesModelColumnInfo != null && message.hasOwnProperty("tablesModelColumnInfo")) { - if (!Array.isArray(message.tablesModelColumnInfo)) - return "tablesModelColumnInfo: array expected"; - for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.verify(message.tablesModelColumnInfo[i]); - if (error) - return "tablesModelColumnInfo." + error; - } - } - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) - return "trainBudgetMilliNodeHours: integer|Long expected"; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) - return "trainCostMilliNodeHours: integer|Long expected"; - if (message.disableEarlyStopping != null && message.hasOwnProperty("disableEarlyStopping")) - if (typeof message.disableEarlyStopping !== "boolean") - return "disableEarlyStopping: boolean expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (typeof message.start !== "number") + return "start: number expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (typeof message.end !== "number") + return "end: number expected"; return null; }; /** - * Creates a TablesModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DoubleRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TablesModelMetadata} TablesModelMetadata + * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange */ - TablesModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TablesModelMetadata) + DoubleRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DoubleRange) return object; - var message = new $root.google.cloud.automl.v1beta1.TablesModelMetadata(); - if (object.optimizationObjectiveRecallValue != null) - message.optimizationObjectiveRecallValue = Number(object.optimizationObjectiveRecallValue); - if (object.optimizationObjectivePrecisionValue != null) - message.optimizationObjectivePrecisionValue = Number(object.optimizationObjectivePrecisionValue); - if (object.targetColumnSpec != null) { - if (typeof object.targetColumnSpec !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.targetColumnSpec: object expected"); - message.targetColumnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.targetColumnSpec); - } - if (object.inputFeatureColumnSpecs) { - if (!Array.isArray(object.inputFeatureColumnSpecs)) - throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.inputFeatureColumnSpecs: array expected"); - message.inputFeatureColumnSpecs = []; - for (var i = 0; i < object.inputFeatureColumnSpecs.length; ++i) { - if (typeof object.inputFeatureColumnSpecs[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.inputFeatureColumnSpecs: object expected"); - message.inputFeatureColumnSpecs[i] = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.inputFeatureColumnSpecs[i]); - } - } - if (object.optimizationObjective != null) - message.optimizationObjective = String(object.optimizationObjective); - if (object.tablesModelColumnInfo) { - if (!Array.isArray(object.tablesModelColumnInfo)) - throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.tablesModelColumnInfo: array expected"); - message.tablesModelColumnInfo = []; - for (var i = 0; i < object.tablesModelColumnInfo.length; ++i) { - if (typeof object.tablesModelColumnInfo[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesModelMetadata.tablesModelColumnInfo: object expected"); - message.tablesModelColumnInfo[i] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.fromObject(object.tablesModelColumnInfo[i]); - } - } - if (object.trainBudgetMilliNodeHours != null) - if ($util.Long) - (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; - else if (typeof object.trainBudgetMilliNodeHours === "string") - message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); - else if (typeof object.trainBudgetMilliNodeHours === "number") - message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; - else if (typeof object.trainBudgetMilliNodeHours === "object") - message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); - if (object.trainCostMilliNodeHours != null) - if ($util.Long) - (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; - else if (typeof object.trainCostMilliNodeHours === "string") - message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); - else if (typeof object.trainCostMilliNodeHours === "number") - message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; - else if (typeof object.trainCostMilliNodeHours === "object") - message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); - if (object.disableEarlyStopping != null) - message.disableEarlyStopping = Boolean(object.disableEarlyStopping); + var message = new $root.google.cloud.automl.v1beta1.DoubleRange(); + if (object.start != null) + message.start = Number(object.start); + if (object.end != null) + message.end = Number(object.end); return message; }; /** - * Creates a plain object from a TablesModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DoubleRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @static - * @param {google.cloud.automl.v1beta1.TablesModelMetadata} message TablesModelMetadata + * @param {google.cloud.automl.v1beta1.DoubleRange} message DoubleRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TablesModelMetadata.toObject = function toObject(message, options) { + DoubleRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.inputFeatureColumnSpecs = []; - object.tablesModelColumnInfo = []; - } if (options.defaults) { - object.targetColumnSpec = null; - object.optimizationObjective = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; - object.disableEarlyStopping = false; - } - if (message.targetColumnSpec != null && message.hasOwnProperty("targetColumnSpec")) - object.targetColumnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.targetColumnSpec, options); - if (message.inputFeatureColumnSpecs && message.inputFeatureColumnSpecs.length) { - object.inputFeatureColumnSpecs = []; - for (var j = 0; j < message.inputFeatureColumnSpecs.length; ++j) - object.inputFeatureColumnSpecs[j] = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.inputFeatureColumnSpecs[j], options); - } - if (message.optimizationObjective != null && message.hasOwnProperty("optimizationObjective")) - object.optimizationObjective = message.optimizationObjective; - if (message.tablesModelColumnInfo && message.tablesModelColumnInfo.length) { - object.tablesModelColumnInfo = []; - for (var j = 0; j < message.tablesModelColumnInfo.length; ++j) - object.tablesModelColumnInfo[j] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.toObject(message.tablesModelColumnInfo[j], options); - } - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (typeof message.trainBudgetMilliNodeHours === "number") - object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; - else - object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (typeof message.trainCostMilliNodeHours === "number") - object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; - else - object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; - if (message.disableEarlyStopping != null && message.hasOwnProperty("disableEarlyStopping")) - object.disableEarlyStopping = message.disableEarlyStopping; - if (message.optimizationObjectiveRecallValue != null && message.hasOwnProperty("optimizationObjectiveRecallValue")) { - object.optimizationObjectiveRecallValue = options.json && !isFinite(message.optimizationObjectiveRecallValue) ? String(message.optimizationObjectiveRecallValue) : message.optimizationObjectiveRecallValue; - if (options.oneofs) - object.additionalOptimizationObjectiveConfig = "optimizationObjectiveRecallValue"; - } - if (message.optimizationObjectivePrecisionValue != null && message.hasOwnProperty("optimizationObjectivePrecisionValue")) { - object.optimizationObjectivePrecisionValue = options.json && !isFinite(message.optimizationObjectivePrecisionValue) ? String(message.optimizationObjectivePrecisionValue) : message.optimizationObjectivePrecisionValue; - if (options.oneofs) - object.additionalOptimizationObjectiveConfig = "optimizationObjectivePrecisionValue"; + object.start = 0; + object.end = 0; } + if (message.start != null && message.hasOwnProperty("start")) + object.start = options.json && !isFinite(message.start) ? String(message.start) : message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = options.json && !isFinite(message.end) ? String(message.end) : message.end; return object; }; /** - * Converts this TablesModelMetadata to JSON. + * Converts this DoubleRange to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TablesModelMetadata + * @memberof google.cloud.automl.v1beta1.DoubleRange * @instance * @returns {Object.} JSON object */ - TablesModelMetadata.prototype.toJSON = function toJSON() { + DoubleRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TablesModelMetadata; + return DoubleRange; })(); - v1beta1.TablesAnnotation = (function() { + v1beta1.RegressionEvaluationMetrics = (function() { /** - * Properties of a TablesAnnotation. + * Properties of a RegressionEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @interface ITablesAnnotation - * @property {number|null} [score] TablesAnnotation score - * @property {google.cloud.automl.v1beta1.IDoubleRange|null} [predictionInterval] TablesAnnotation predictionInterval - * @property {google.protobuf.IValue|null} [value] TablesAnnotation value - * @property {Array.|null} [tablesModelColumnInfo] TablesAnnotation tablesModelColumnInfo - * @property {number|null} [baselineScore] TablesAnnotation baselineScore + * @interface IRegressionEvaluationMetrics + * @property {number|null} [rootMeanSquaredError] RegressionEvaluationMetrics rootMeanSquaredError + * @property {number|null} [meanAbsoluteError] RegressionEvaluationMetrics meanAbsoluteError + * @property {number|null} [meanAbsolutePercentageError] RegressionEvaluationMetrics meanAbsolutePercentageError + * @property {number|null} [rSquared] RegressionEvaluationMetrics rSquared + * @property {number|null} [rootMeanSquaredLogError] RegressionEvaluationMetrics rootMeanSquaredLogError */ /** - * Constructs a new TablesAnnotation. + * Constructs a new RegressionEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TablesAnnotation. - * @implements ITablesAnnotation + * @classdesc Represents a RegressionEvaluationMetrics. + * @implements IRegressionEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1beta1.ITablesAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics=} [properties] Properties to set */ - function TablesAnnotation(properties) { - this.tablesModelColumnInfo = []; + function RegressionEvaluationMetrics(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35300,130 +37799,127 @@ } /** - * TablesAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * RegressionEvaluationMetrics rootMeanSquaredError. + * @member {number} rootMeanSquaredError + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @instance */ - TablesAnnotation.prototype.score = 0; + RegressionEvaluationMetrics.prototype.rootMeanSquaredError = 0; /** - * TablesAnnotation predictionInterval. - * @member {google.cloud.automl.v1beta1.IDoubleRange|null|undefined} predictionInterval - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * RegressionEvaluationMetrics meanAbsoluteError. + * @member {number} meanAbsoluteError + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @instance */ - TablesAnnotation.prototype.predictionInterval = null; + RegressionEvaluationMetrics.prototype.meanAbsoluteError = 0; /** - * TablesAnnotation value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * RegressionEvaluationMetrics meanAbsolutePercentageError. + * @member {number} meanAbsolutePercentageError + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @instance */ - TablesAnnotation.prototype.value = null; + RegressionEvaluationMetrics.prototype.meanAbsolutePercentageError = 0; /** - * TablesAnnotation tablesModelColumnInfo. - * @member {Array.} tablesModelColumnInfo - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * RegressionEvaluationMetrics rSquared. + * @member {number} rSquared + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @instance */ - TablesAnnotation.prototype.tablesModelColumnInfo = $util.emptyArray; + RegressionEvaluationMetrics.prototype.rSquared = 0; /** - * TablesAnnotation baselineScore. - * @member {number} baselineScore - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * RegressionEvaluationMetrics rootMeanSquaredLogError. + * @member {number} rootMeanSquaredLogError + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @instance */ - TablesAnnotation.prototype.baselineScore = 0; + RegressionEvaluationMetrics.prototype.rootMeanSquaredLogError = 0; /** - * Creates a new TablesAnnotation instance using the specified properties. + * Creates a new RegressionEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.ITablesAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation instance + * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics instance */ - TablesAnnotation.create = function create(properties) { - return new TablesAnnotation(properties); + RegressionEvaluationMetrics.create = function create(properties) { + return new RegressionEvaluationMetrics(properties); }; /** - * Encodes the specified TablesAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. + * Encodes the specified RegressionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.ITablesAnnotation} message TablesAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics} message RegressionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesAnnotation.encode = function encode(message, writer) { + RegressionEvaluationMetrics.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); - if (message.value != null && message.hasOwnProperty("value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tablesModelColumnInfo != null && message.tablesModelColumnInfo.length) - for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) - $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.encode(message.tablesModelColumnInfo[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.predictionInterval != null && message.hasOwnProperty("predictionInterval")) - $root.google.cloud.automl.v1beta1.DoubleRange.encode(message.predictionInterval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.baselineScore != null && message.hasOwnProperty("baselineScore")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.baselineScore); + if (message.rootMeanSquaredError != null && message.hasOwnProperty("rootMeanSquaredError")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.rootMeanSquaredError); + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.meanAbsoluteError); + if (message.meanAbsolutePercentageError != null && message.hasOwnProperty("meanAbsolutePercentageError")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.meanAbsolutePercentageError); + if (message.rSquared != null && message.hasOwnProperty("rSquared")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.rSquared); + if (message.rootMeanSquaredLogError != null && message.hasOwnProperty("rootMeanSquaredLogError")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.rootMeanSquaredLogError); return writer; }; /** - * Encodes the specified TablesAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesAnnotation.verify|verify} messages. + * Encodes the specified RegressionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.ITablesAnnotation} message TablesAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics} message RegressionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + RegressionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TablesAnnotation message from the specified reader or buffer. + * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation + * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesAnnotation.decode = function decode(reader, length) { + RegressionEvaluationMetrics.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.automl.v1beta1.TablesAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.score = reader.float(); - break; - case 4: - message.predictionInterval = $root.google.cloud.automl.v1beta1.DoubleRange.decode(reader, reader.uint32()); + message.rootMeanSquaredError = reader.float(); break; case 2: - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + message.meanAbsoluteError = reader.float(); break; case 3: - if (!(message.tablesModelColumnInfo && message.tablesModelColumnInfo.length)) - message.tablesModelColumnInfo = []; - message.tablesModelColumnInfo.push($root.google.cloud.automl.v1beta1.TablesModelColumnInfo.decode(reader, reader.uint32())); + message.meanAbsolutePercentageError = reader.float(); + break; + case 4: + message.rSquared = reader.float(); break; case 5: - message.baselineScore = reader.float(); + message.rootMeanSquaredLogError = reader.float(); break; default: reader.skipType(tag & 7); @@ -35434,170 +37930,141 @@ }; /** - * Decodes a TablesAnnotation message from the specified reader or buffer, length delimited. + * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation + * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesAnnotation.decodeDelimited = function decodeDelimited(reader) { + RegressionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TablesAnnotation message. + * Verifies a RegressionEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TablesAnnotation.verify = function verify(message) { + RegressionEvaluationMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; - if (message.predictionInterval != null && message.hasOwnProperty("predictionInterval")) { - var error = $root.google.cloud.automl.v1beta1.DoubleRange.verify(message.predictionInterval); - if (error) - return "predictionInterval." + error; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); - if (error) - return "value." + error; - } - if (message.tablesModelColumnInfo != null && message.hasOwnProperty("tablesModelColumnInfo")) { - if (!Array.isArray(message.tablesModelColumnInfo)) - return "tablesModelColumnInfo: array expected"; - for (var i = 0; i < message.tablesModelColumnInfo.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.verify(message.tablesModelColumnInfo[i]); - if (error) - return "tablesModelColumnInfo." + error; - } - } - if (message.baselineScore != null && message.hasOwnProperty("baselineScore")) - if (typeof message.baselineScore !== "number") - return "baselineScore: number expected"; + if (message.rootMeanSquaredError != null && message.hasOwnProperty("rootMeanSquaredError")) + if (typeof message.rootMeanSquaredError !== "number") + return "rootMeanSquaredError: number expected"; + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + if (typeof message.meanAbsoluteError !== "number") + return "meanAbsoluteError: number expected"; + if (message.meanAbsolutePercentageError != null && message.hasOwnProperty("meanAbsolutePercentageError")) + if (typeof message.meanAbsolutePercentageError !== "number") + return "meanAbsolutePercentageError: number expected"; + if (message.rSquared != null && message.hasOwnProperty("rSquared")) + if (typeof message.rSquared !== "number") + return "rSquared: number expected"; + if (message.rootMeanSquaredLogError != null && message.hasOwnProperty("rootMeanSquaredLogError")) + if (typeof message.rootMeanSquaredLogError !== "number") + return "rootMeanSquaredLogError: number expected"; return null; }; /** - * Creates a TablesAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a RegressionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TablesAnnotation} TablesAnnotation + * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics */ - TablesAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TablesAnnotation) + RegressionEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1beta1.TablesAnnotation(); - if (object.score != null) - message.score = Number(object.score); - if (object.predictionInterval != null) { - if (typeof object.predictionInterval !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.predictionInterval: object expected"); - message.predictionInterval = $root.google.cloud.automl.v1beta1.DoubleRange.fromObject(object.predictionInterval); - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); - } - if (object.tablesModelColumnInfo) { - if (!Array.isArray(object.tablesModelColumnInfo)) - throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.tablesModelColumnInfo: array expected"); - message.tablesModelColumnInfo = []; - for (var i = 0; i < object.tablesModelColumnInfo.length; ++i) { - if (typeof object.tablesModelColumnInfo[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TablesAnnotation.tablesModelColumnInfo: object expected"); - message.tablesModelColumnInfo[i] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.fromObject(object.tablesModelColumnInfo[i]); - } - } - if (object.baselineScore != null) - message.baselineScore = Number(object.baselineScore); + var message = new $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics(); + if (object.rootMeanSquaredError != null) + message.rootMeanSquaredError = Number(object.rootMeanSquaredError); + if (object.meanAbsoluteError != null) + message.meanAbsoluteError = Number(object.meanAbsoluteError); + if (object.meanAbsolutePercentageError != null) + message.meanAbsolutePercentageError = Number(object.meanAbsolutePercentageError); + if (object.rSquared != null) + message.rSquared = Number(object.rSquared); + if (object.rootMeanSquaredLogError != null) + message.rootMeanSquaredLogError = Number(object.rootMeanSquaredLogError); return message; }; /** - * Creates a plain object from a TablesAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a RegressionEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.TablesAnnotation} message TablesAnnotation + * @param {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} message RegressionEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TablesAnnotation.toObject = function toObject(message, options) { + RegressionEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tablesModelColumnInfo = []; if (options.defaults) { - object.score = 0; - object.value = null; - object.predictionInterval = null; - object.baselineScore = 0; - } - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); - if (message.tablesModelColumnInfo && message.tablesModelColumnInfo.length) { - object.tablesModelColumnInfo = []; - for (var j = 0; j < message.tablesModelColumnInfo.length; ++j) - object.tablesModelColumnInfo[j] = $root.google.cloud.automl.v1beta1.TablesModelColumnInfo.toObject(message.tablesModelColumnInfo[j], options); + object.rootMeanSquaredError = 0; + object.meanAbsoluteError = 0; + object.meanAbsolutePercentageError = 0; + object.rSquared = 0; + object.rootMeanSquaredLogError = 0; } - if (message.predictionInterval != null && message.hasOwnProperty("predictionInterval")) - object.predictionInterval = $root.google.cloud.automl.v1beta1.DoubleRange.toObject(message.predictionInterval, options); - if (message.baselineScore != null && message.hasOwnProperty("baselineScore")) - object.baselineScore = options.json && !isFinite(message.baselineScore) ? String(message.baselineScore) : message.baselineScore; + if (message.rootMeanSquaredError != null && message.hasOwnProperty("rootMeanSquaredError")) + object.rootMeanSquaredError = options.json && !isFinite(message.rootMeanSquaredError) ? String(message.rootMeanSquaredError) : message.rootMeanSquaredError; + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + object.meanAbsoluteError = options.json && !isFinite(message.meanAbsoluteError) ? String(message.meanAbsoluteError) : message.meanAbsoluteError; + if (message.meanAbsolutePercentageError != null && message.hasOwnProperty("meanAbsolutePercentageError")) + object.meanAbsolutePercentageError = options.json && !isFinite(message.meanAbsolutePercentageError) ? String(message.meanAbsolutePercentageError) : message.meanAbsolutePercentageError; + if (message.rSquared != null && message.hasOwnProperty("rSquared")) + object.rSquared = options.json && !isFinite(message.rSquared) ? String(message.rSquared) : message.rSquared; + if (message.rootMeanSquaredLogError != null && message.hasOwnProperty("rootMeanSquaredLogError")) + object.rootMeanSquaredLogError = options.json && !isFinite(message.rootMeanSquaredLogError) ? String(message.rootMeanSquaredLogError) : message.rootMeanSquaredLogError; return object; }; /** - * Converts this TablesAnnotation to JSON. + * Converts this RegressionEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TablesAnnotation + * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics * @instance * @returns {Object.} JSON object */ - TablesAnnotation.prototype.toJSON = function toJSON() { + RegressionEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TablesAnnotation; + return RegressionEvaluationMetrics; })(); - v1beta1.TablesModelColumnInfo = (function() { + v1beta1.TextExtractionAnnotation = (function() { /** - * Properties of a TablesModelColumnInfo. + * Properties of a TextExtractionAnnotation. * @memberof google.cloud.automl.v1beta1 - * @interface ITablesModelColumnInfo - * @property {string|null} [columnSpecName] TablesModelColumnInfo columnSpecName - * @property {string|null} [columnDisplayName] TablesModelColumnInfo columnDisplayName - * @property {number|null} [featureImportance] TablesModelColumnInfo featureImportance + * @interface ITextExtractionAnnotation + * @property {google.cloud.automl.v1beta1.ITextSegment|null} [textSegment] TextExtractionAnnotation textSegment + * @property {number|null} [score] TextExtractionAnnotation score */ /** - * Constructs a new TablesModelColumnInfo. + * Constructs a new TextExtractionAnnotation. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TablesModelColumnInfo. - * @implements ITablesModelColumnInfo + * @classdesc Represents a TextExtractionAnnotation. + * @implements ITextExtractionAnnotation * @constructor - * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation=} [properties] Properties to set */ - function TablesModelColumnInfo(properties) { + function TextExtractionAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35605,101 +38072,102 @@ } /** - * TablesModelColumnInfo columnSpecName. - * @member {string} columnSpecName - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * TextExtractionAnnotation textSegment. + * @member {google.cloud.automl.v1beta1.ITextSegment|null|undefined} textSegment + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @instance */ - TablesModelColumnInfo.prototype.columnSpecName = ""; + TextExtractionAnnotation.prototype.textSegment = null; /** - * TablesModelColumnInfo columnDisplayName. - * @member {string} columnDisplayName - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * TextExtractionAnnotation score. + * @member {number} score + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @instance */ - TablesModelColumnInfo.prototype.columnDisplayName = ""; + TextExtractionAnnotation.prototype.score = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TablesModelColumnInfo featureImportance. - * @member {number} featureImportance - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * TextExtractionAnnotation annotation. + * @member {"textSegment"|undefined} annotation + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @instance */ - TablesModelColumnInfo.prototype.featureImportance = 0; + Object.defineProperty(TextExtractionAnnotation.prototype, "annotation", { + get: $util.oneOfGetter($oneOfFields = ["textSegment"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TablesModelColumnInfo instance using the specified properties. + * Creates a new TextExtractionAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo instance + * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation instance */ - TablesModelColumnInfo.create = function create(properties) { - return new TablesModelColumnInfo(properties); + TextExtractionAnnotation.create = function create(properties) { + return new TextExtractionAnnotation(properties); }; /** - * Encodes the specified TablesModelColumnInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. + * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo} message TablesModelColumnInfo message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesModelColumnInfo.encode = function encode(message, writer) { + TextExtractionAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columnSpecName != null && message.hasOwnProperty("columnSpecName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.columnSpecName); - if (message.columnDisplayName != null && message.hasOwnProperty("columnDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.columnDisplayName); - if (message.featureImportance != null && message.hasOwnProperty("featureImportance")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.featureImportance); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.textSegment != null && message.hasOwnProperty("textSegment")) + $root.google.cloud.automl.v1beta1.TextSegment.encode(message.textSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified TablesModelColumnInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TablesModelColumnInfo.verify|verify} messages. + * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1beta1.ITablesModelColumnInfo} message TablesModelColumnInfo message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TablesModelColumnInfo.encodeDelimited = function encodeDelimited(message, writer) { + TextExtractionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TablesModelColumnInfo message from the specified reader or buffer. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo + * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesModelColumnInfo.decode = function decode(reader, length) { + TextExtractionAnnotation.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.automl.v1beta1.TablesModelColumnInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextExtractionAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.columnSpecName = reader.string(); - break; - case 2: - message.columnDisplayName = reader.string(); - break; case 3: - message.featureImportance = reader.float(); + message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.decode(reader, reader.uint32()); + break; + case 1: + message.score = reader.float(); break; default: reader.skipType(tag & 7); @@ -35710,130 +38178,128 @@ }; /** - * Decodes a TablesModelColumnInfo message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo + * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TablesModelColumnInfo.decodeDelimited = function decodeDelimited(reader) { + TextExtractionAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TablesModelColumnInfo message. + * Verifies a TextExtractionAnnotation message. * @function verify - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TablesModelColumnInfo.verify = function verify(message) { + TextExtractionAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columnSpecName != null && message.hasOwnProperty("columnSpecName")) - if (!$util.isString(message.columnSpecName)) - return "columnSpecName: string expected"; - if (message.columnDisplayName != null && message.hasOwnProperty("columnDisplayName")) - if (!$util.isString(message.columnDisplayName)) - return "columnDisplayName: string expected"; - if (message.featureImportance != null && message.hasOwnProperty("featureImportance")) - if (typeof message.featureImportance !== "number") - return "featureImportance: number expected"; + var properties = {}; + if (message.textSegment != null && message.hasOwnProperty("textSegment")) { + properties.annotation = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextSegment.verify(message.textSegment); + if (error) + return "textSegment." + error; + } + } + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; return null; }; /** - * Creates a TablesModelColumnInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TablesModelColumnInfo} TablesModelColumnInfo + * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation */ - TablesModelColumnInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TablesModelColumnInfo) + TextExtractionAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionAnnotation) return object; - var message = new $root.google.cloud.automl.v1beta1.TablesModelColumnInfo(); - if (object.columnSpecName != null) - message.columnSpecName = String(object.columnSpecName); - if (object.columnDisplayName != null) - message.columnDisplayName = String(object.columnDisplayName); - if (object.featureImportance != null) - message.featureImportance = Number(object.featureImportance); + var message = new $root.google.cloud.automl.v1beta1.TextExtractionAnnotation(); + if (object.textSegment != null) { + if (typeof object.textSegment !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TextExtractionAnnotation.textSegment: object expected"); + message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.fromObject(object.textSegment); + } + if (object.score != null) + message.score = Number(object.score); return message; }; /** - * Creates a plain object from a TablesModelColumnInfo message. Also converts values to other types if specified. + * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @static - * @param {google.cloud.automl.v1beta1.TablesModelColumnInfo} message TablesModelColumnInfo + * @param {google.cloud.automl.v1beta1.TextExtractionAnnotation} message TextExtractionAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TablesModelColumnInfo.toObject = function toObject(message, options) { + TextExtractionAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.columnSpecName = ""; - object.columnDisplayName = ""; - object.featureImportance = 0; + if (options.defaults) + object.score = 0; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.textSegment != null && message.hasOwnProperty("textSegment")) { + object.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.toObject(message.textSegment, options); + if (options.oneofs) + object.annotation = "textSegment"; } - if (message.columnSpecName != null && message.hasOwnProperty("columnSpecName")) - object.columnSpecName = message.columnSpecName; - if (message.columnDisplayName != null && message.hasOwnProperty("columnDisplayName")) - object.columnDisplayName = message.columnDisplayName; - if (message.featureImportance != null && message.hasOwnProperty("featureImportance")) - object.featureImportance = options.json && !isFinite(message.featureImportance) ? String(message.featureImportance) : message.featureImportance; return object; }; /** - * Converts this TablesModelColumnInfo to JSON. + * Converts this TextExtractionAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TablesModelColumnInfo + * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation * @instance * @returns {Object.} JSON object */ - TablesModelColumnInfo.prototype.toJSON = function toJSON() { + TextExtractionAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TablesModelColumnInfo; + return TextExtractionAnnotation; })(); - v1beta1.ColumnSpec = (function() { + v1beta1.TextExtractionEvaluationMetrics = (function() { /** - * Properties of a ColumnSpec. + * Properties of a TextExtractionEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @interface IColumnSpec - * @property {string|null} [name] ColumnSpec name - * @property {google.cloud.automl.v1beta1.IDataType|null} [dataType] ColumnSpec dataType - * @property {string|null} [displayName] ColumnSpec displayName - * @property {google.cloud.automl.v1beta1.IDataStats|null} [dataStats] ColumnSpec dataStats - * @property {Array.|null} [topCorrelatedColumns] ColumnSpec topCorrelatedColumns - * @property {string|null} [etag] ColumnSpec etag + * @interface ITextExtractionEvaluationMetrics + * @property {number|null} [auPrc] TextExtractionEvaluationMetrics auPrc + * @property {Array.|null} [confidenceMetricsEntries] TextExtractionEvaluationMetrics confidenceMetricsEntries */ /** - * Constructs a new ColumnSpec. + * Constructs a new TextExtractionEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ColumnSpec. - * @implements IColumnSpec + * @classdesc Represents a TextExtractionEvaluationMetrics. + * @implements ITextExtractionEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1beta1.IColumnSpec=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics=} [properties] Properties to set */ - function ColumnSpec(properties) { - this.topCorrelatedColumns = []; + function TextExtractionEvaluationMetrics(properties) { + this.confidenceMetricsEntries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35841,143 +38307,91 @@ } /** - * ColumnSpec name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.ColumnSpec - * @instance - */ - ColumnSpec.prototype.name = ""; - - /** - * ColumnSpec dataType. - * @member {google.cloud.automl.v1beta1.IDataType|null|undefined} dataType - * @memberof google.cloud.automl.v1beta1.ColumnSpec - * @instance - */ - ColumnSpec.prototype.dataType = null; - - /** - * ColumnSpec displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1beta1.ColumnSpec - * @instance - */ - ColumnSpec.prototype.displayName = ""; - - /** - * ColumnSpec dataStats. - * @member {google.cloud.automl.v1beta1.IDataStats|null|undefined} dataStats - * @memberof google.cloud.automl.v1beta1.ColumnSpec - * @instance - */ - ColumnSpec.prototype.dataStats = null; - - /** - * ColumnSpec topCorrelatedColumns. - * @member {Array.} topCorrelatedColumns - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * TextExtractionEvaluationMetrics auPrc. + * @member {number} auPrc + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @instance */ - ColumnSpec.prototype.topCorrelatedColumns = $util.emptyArray; + TextExtractionEvaluationMetrics.prototype.auPrc = 0; /** - * ColumnSpec etag. - * @member {string} etag - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * TextExtractionEvaluationMetrics confidenceMetricsEntries. + * @member {Array.} confidenceMetricsEntries + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @instance */ - ColumnSpec.prototype.etag = ""; + TextExtractionEvaluationMetrics.prototype.confidenceMetricsEntries = $util.emptyArray; /** - * Creates a new ColumnSpec instance using the specified properties. + * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IColumnSpec=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec instance + * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics instance */ - ColumnSpec.create = function create(properties) { - return new ColumnSpec(properties); + TextExtractionEvaluationMetrics.create = function create(properties) { + return new TextExtractionEvaluationMetrics(properties); }; /** - * Encodes the specified ColumnSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. + * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IColumnSpec} message ColumnSpec message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnSpec.encode = function encode(message, writer) { + TextExtractionEvaluationMetrics.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.dataType != null && message.hasOwnProperty("dataType")) - $root.google.cloud.automl.v1beta1.DataType.encode(message.dataType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.dataStats != null && message.hasOwnProperty("dataStats")) - $root.google.cloud.automl.v1beta1.DataStats.encode(message.dataStats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.topCorrelatedColumns != null && message.topCorrelatedColumns.length) - for (var i = 0; i < message.topCorrelatedColumns.length; ++i) - $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.encode(message.topCorrelatedColumns[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.etag != null && message.hasOwnProperty("etag")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.etag); + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); + if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) + $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ColumnSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.verify|verify} messages. + * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IColumnSpec} message ColumnSpec message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnSpec.encodeDelimited = function encodeDelimited(message, writer) { + TextExtractionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ColumnSpec message from the specified reader or buffer. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnSpec.decode = function decode(reader, length) { + TextExtractionEvaluationMetrics.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.automl.v1beta1.ColumnSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.auPrc = reader.float(); break; case 2: - message.dataType = $root.google.cloud.automl.v1beta1.DataType.decode(reader, reader.uint32()); - break; - case 3: - message.displayName = reader.string(); - break; - case 4: - message.dataStats = $root.google.cloud.automl.v1beta1.DataStats.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.topCorrelatedColumns && message.topCorrelatedColumns.length)) - message.topCorrelatedColumns = []; - message.topCorrelatedColumns.push($root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.decode(reader, reader.uint32())); - break; - case 6: - message.etag = reader.string(); + if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) + message.confidenceMetricsEntries = []; + message.confidenceMetricsEntries.push($root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -35988,174 +38402,133 @@ }; /** - * Decodes a ColumnSpec message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnSpec.decodeDelimited = function decodeDelimited(reader) { + TextExtractionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ColumnSpec message. + * Verifies a TextExtractionEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ColumnSpec.verify = function verify(message) { + TextExtractionEvaluationMetrics.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.dataType != null && message.hasOwnProperty("dataType")) { - var error = $root.google.cloud.automl.v1beta1.DataType.verify(message.dataType); - if (error) - return "dataType." + error; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.dataStats != null && message.hasOwnProperty("dataStats")) { - var error = $root.google.cloud.automl.v1beta1.DataStats.verify(message.dataStats); - if (error) - return "dataStats." + error; - } - if (message.topCorrelatedColumns != null && message.hasOwnProperty("topCorrelatedColumns")) { - if (!Array.isArray(message.topCorrelatedColumns)) - return "topCorrelatedColumns: array expected"; - for (var i = 0; i < message.topCorrelatedColumns.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify(message.topCorrelatedColumns[i]); + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + if (typeof message.auPrc !== "number") + return "auPrc: number expected"; + if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { + if (!Array.isArray(message.confidenceMetricsEntries)) + return "confidenceMetricsEntries: array expected"; + for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); if (error) - return "topCorrelatedColumns." + error; + return "confidenceMetricsEntries." + error; } } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates a ColumnSpec message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ColumnSpec} ColumnSpec + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics */ - ColumnSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ColumnSpec) + TextExtractionEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1beta1.ColumnSpec(); - if (object.name != null) - message.name = String(object.name); - if (object.dataType != null) { - if (typeof object.dataType !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.dataType: object expected"); - message.dataType = $root.google.cloud.automl.v1beta1.DataType.fromObject(object.dataType); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.dataStats != null) { - if (typeof object.dataStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.dataStats: object expected"); - message.dataStats = $root.google.cloud.automl.v1beta1.DataStats.fromObject(object.dataStats); - } - if (object.topCorrelatedColumns) { - if (!Array.isArray(object.topCorrelatedColumns)) - throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.topCorrelatedColumns: array expected"); - message.topCorrelatedColumns = []; - for (var i = 0; i < object.topCorrelatedColumns.length; ++i) { - if (typeof object.topCorrelatedColumns[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.topCorrelatedColumns: object expected"); - message.topCorrelatedColumns[i] = $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.fromObject(object.topCorrelatedColumns[i]); + var message = new $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics(); + if (object.auPrc != null) + message.auPrc = Number(object.auPrc); + if (object.confidenceMetricsEntries) { + if (!Array.isArray(object.confidenceMetricsEntries)) + throw TypeError(".google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: array expected"); + message.confidenceMetricsEntries = []; + for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { + if (typeof object.confidenceMetricsEntries[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: object expected"); + message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); } } - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a ColumnSpec message. Also converts values to other types if specified. + * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.ColumnSpec} message ColumnSpec + * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnSpec.toObject = function toObject(message, options) { + TextExtractionEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.topCorrelatedColumns = []; - if (options.defaults) { - object.name = ""; - object.dataType = null; - object.displayName = ""; - object.dataStats = null; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = $root.google.cloud.automl.v1beta1.DataType.toObject(message.dataType, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.dataStats != null && message.hasOwnProperty("dataStats")) - object.dataStats = $root.google.cloud.automl.v1beta1.DataStats.toObject(message.dataStats, options); - if (message.topCorrelatedColumns && message.topCorrelatedColumns.length) { - object.topCorrelatedColumns = []; - for (var j = 0; j < message.topCorrelatedColumns.length; ++j) - object.topCorrelatedColumns[j] = $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.toObject(message.topCorrelatedColumns[j], options); + object.confidenceMetricsEntries = []; + if (options.defaults) + object.auPrc = 0; + if (message.auPrc != null && message.hasOwnProperty("auPrc")) + object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; + if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { + object.confidenceMetricsEntries = []; + for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) + object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); } - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this ColumnSpec to JSON. + * Converts this TextExtractionEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ColumnSpec + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics * @instance * @returns {Object.} JSON object */ - ColumnSpec.prototype.toJSON = function toJSON() { + TextExtractionEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ColumnSpec.CorrelatedColumn = (function() { + TextExtractionEvaluationMetrics.ConfidenceMetricsEntry = (function() { /** - * Properties of a CorrelatedColumn. - * @memberof google.cloud.automl.v1beta1.ColumnSpec - * @interface ICorrelatedColumn - * @property {string|null} [columnSpecId] CorrelatedColumn columnSpecId - * @property {google.cloud.automl.v1beta1.ICorrelationStats|null} [correlationStats] CorrelatedColumn correlationStats + * Properties of a ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @interface IConfidenceMetricsEntry + * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold + * @property {number|null} [recall] ConfidenceMetricsEntry recall + * @property {number|null} [precision] ConfidenceMetricsEntry precision + * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score */ /** - * Constructs a new CorrelatedColumn. - * @memberof google.cloud.automl.v1beta1.ColumnSpec - * @classdesc Represents a CorrelatedColumn. - * @implements ICorrelatedColumn + * Constructs a new ConfidenceMetricsEntry. + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @classdesc Represents a ConfidenceMetricsEntry. + * @implements IConfidenceMetricsEntry * @constructor - * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set */ - function CorrelatedColumn(properties) { + function ConfidenceMetricsEntry(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36163,88 +38536,114 @@ } /** - * CorrelatedColumn columnSpecId. - * @member {string} columnSpecId - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * ConfidenceMetricsEntry confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @instance */ - CorrelatedColumn.prototype.columnSpecId = ""; + ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; /** - * CorrelatedColumn correlationStats. - * @member {google.cloud.automl.v1beta1.ICorrelationStats|null|undefined} correlationStats - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * ConfidenceMetricsEntry recall. + * @member {number} recall + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @instance */ - CorrelatedColumn.prototype.correlationStats = null; + ConfidenceMetricsEntry.prototype.recall = 0; /** - * Creates a new CorrelatedColumn instance using the specified properties. + * ConfidenceMetricsEntry precision. + * @member {number} precision + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.precision = 0; + + /** + * ConfidenceMetricsEntry f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @instance + */ + ConfidenceMetricsEntry.prototype.f1Score = 0; + + /** + * Creates a new ConfidenceMetricsEntry instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn instance + * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance */ - CorrelatedColumn.create = function create(properties) { - return new CorrelatedColumn(properties); + ConfidenceMetricsEntry.create = function create(properties) { + return new ConfidenceMetricsEntry(properties); }; /** - * Encodes the specified CorrelatedColumn message. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. + * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn} message CorrelatedColumn message or plain object to encode + * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CorrelatedColumn.encode = function encode(message, writer) { + ConfidenceMetricsEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columnSpecId != null && message.hasOwnProperty("columnSpecId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.columnSpecId); - if (message.correlationStats != null && message.hasOwnProperty("correlationStats")) - $root.google.cloud.automl.v1beta1.CorrelationStats.encode(message.correlationStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.recall); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.precision); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.f1Score); return writer; }; /** - * Encodes the specified CorrelatedColumn message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.verify|verify} messages. + * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.ColumnSpec.ICorrelatedColumn} message CorrelatedColumn message or plain object to encode + * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CorrelatedColumn.encodeDelimited = function encodeDelimited(message, writer) { + ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CorrelatedColumn message from the specified reader or buffer. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CorrelatedColumn.decode = function decode(reader, length) { + ConfidenceMetricsEntry.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.automl.v1beta1.ColumnSpec.CorrelatedColumn(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.columnSpecId = reader.string(); + message.confidenceThreshold = reader.float(); break; - case 2: - message.correlationStats = $root.google.cloud.automl.v1beta1.CorrelationStats.decode(reader, reader.uint32()); + case 3: + message.recall = reader.float(); + break; + case 4: + message.precision = reader.float(); + break; + case 5: + message.f1Score = reader.float(); break; default: reader.skipType(tag & 7); @@ -36255,132 +38654,331 @@ }; /** - * Decodes a CorrelatedColumn message from the specified reader or buffer, length delimited. + * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CorrelatedColumn.decodeDelimited = function decodeDelimited(reader) { + ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CorrelatedColumn message. + * Verifies a ConfidenceMetricsEntry message. * @function verify - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CorrelatedColumn.verify = function verify(message) { + ConfidenceMetricsEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columnSpecId != null && message.hasOwnProperty("columnSpecId")) - if (!$util.isString(message.columnSpecId)) - return "columnSpecId: string expected"; - if (message.correlationStats != null && message.hasOwnProperty("correlationStats")) { - var error = $root.google.cloud.automl.v1beta1.CorrelationStats.verify(message.correlationStats); - if (error) - return "correlationStats." + error; - } + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; return null; }; /** - * Creates a CorrelatedColumn message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} CorrelatedColumn + * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry */ - CorrelatedColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) + ConfidenceMetricsEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) return object; - var message = new $root.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn(); - if (object.columnSpecId != null) - message.columnSpecId = String(object.columnSpecId); - if (object.correlationStats != null) { - if (typeof object.correlationStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.correlationStats: object expected"); - message.correlationStats = $root.google.cloud.automl.v1beta1.CorrelationStats.fromObject(object.correlationStats); - } + var message = new $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.recall != null) + message.recall = Number(object.recall); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); return message; }; /** - * Creates a plain object from a CorrelatedColumn message. Also converts values to other types if specified. + * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @static - * @param {google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} message CorrelatedColumn + * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CorrelatedColumn.toObject = function toObject(message, options) { + ConfidenceMetricsEntry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.columnSpecId = ""; - object.correlationStats = null; + object.confidenceThreshold = 0; + object.recall = 0; + object.precision = 0; + object.f1Score = 0; } - if (message.columnSpecId != null && message.hasOwnProperty("columnSpecId")) - object.columnSpecId = message.columnSpecId; - if (message.correlationStats != null && message.hasOwnProperty("correlationStats")) - object.correlationStats = $root.google.cloud.automl.v1beta1.CorrelationStats.toObject(message.correlationStats, options); + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; return object; }; /** - * Converts this CorrelatedColumn to JSON. + * Converts this ConfidenceMetricsEntry to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry * @instance * @returns {Object.} JSON object */ - CorrelatedColumn.prototype.toJSON = function toJSON() { + ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CorrelatedColumn; + return ConfidenceMetricsEntry; })(); - return ColumnSpec; + return TextExtractionEvaluationMetrics; })(); - v1beta1.DataStats = (function() { + v1beta1.TextSentimentAnnotation = (function() { /** - * Properties of a DataStats. + * Properties of a TextSentimentAnnotation. * @memberof google.cloud.automl.v1beta1 - * @interface IDataStats - * @property {google.cloud.automl.v1beta1.IFloat64Stats|null} [float64Stats] DataStats float64Stats - * @property {google.cloud.automl.v1beta1.IStringStats|null} [stringStats] DataStats stringStats - * @property {google.cloud.automl.v1beta1.ITimestampStats|null} [timestampStats] DataStats timestampStats - * @property {google.cloud.automl.v1beta1.IArrayStats|null} [arrayStats] DataStats arrayStats - * @property {google.cloud.automl.v1beta1.IStructStats|null} [structStats] DataStats structStats - * @property {google.cloud.automl.v1beta1.ICategoryStats|null} [categoryStats] DataStats categoryStats - * @property {number|Long|null} [distinctValueCount] DataStats distinctValueCount - * @property {number|Long|null} [nullValueCount] DataStats nullValueCount - * @property {number|Long|null} [validValueCount] DataStats validValueCount + * @interface ITextSentimentAnnotation + * @property {number|null} [sentiment] TextSentimentAnnotation sentiment + */ + + /** + * Constructs a new TextSentimentAnnotation. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a TextSentimentAnnotation. + * @implements ITextSentimentAnnotation + * @constructor + * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation=} [properties] Properties to set + */ + function TextSentimentAnnotation(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]]; + } + + /** + * TextSentimentAnnotation sentiment. + * @member {number} sentiment + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @instance + */ + TextSentimentAnnotation.prototype.sentiment = 0; + + /** + * Creates a new TextSentimentAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation instance + */ + TextSentimentAnnotation.create = function create(properties) { + return new TextSentimentAnnotation(properties); + }; + + /** + * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSentimentAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentiment); + return writer; + }; + + /** + * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSentimentAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextSentimentAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSentimentAnnotation.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.automl.v1beta1.TextSentimentAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sentiment = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSentimentAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextSentimentAnnotation message. + * @function verify + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextSentimentAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (!$util.isInteger(message.sentiment)) + return "sentiment: integer expected"; + return null; + }; + + /** + * Creates a TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation + */ + TextSentimentAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentAnnotation) + return object; + var message = new $root.google.cloud.automl.v1beta1.TextSentimentAnnotation(); + if (object.sentiment != null) + message.sentiment = object.sentiment | 0; + return message; + }; + + /** + * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @static + * @param {google.cloud.automl.v1beta1.TextSentimentAnnotation} message TextSentimentAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextSentimentAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sentiment = 0; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = message.sentiment; + return object; + }; + + /** + * Converts this TextSentimentAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation + * @instance + * @returns {Object.} JSON object + */ + TextSentimentAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextSentimentAnnotation; + })(); + + v1beta1.TextSentimentEvaluationMetrics = (function() { + + /** + * Properties of a TextSentimentEvaluationMetrics. + * @memberof google.cloud.automl.v1beta1 + * @interface ITextSentimentEvaluationMetrics + * @property {number|null} [precision] TextSentimentEvaluationMetrics precision + * @property {number|null} [recall] TextSentimentEvaluationMetrics recall + * @property {number|null} [f1Score] TextSentimentEvaluationMetrics f1Score + * @property {number|null} [meanAbsoluteError] TextSentimentEvaluationMetrics meanAbsoluteError + * @property {number|null} [meanSquaredError] TextSentimentEvaluationMetrics meanSquaredError + * @property {number|null} [linearKappa] TextSentimentEvaluationMetrics linearKappa + * @property {number|null} [quadraticKappa] TextSentimentEvaluationMetrics quadraticKappa + * @property {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] TextSentimentEvaluationMetrics confusionMatrix + * @property {Array.|null} [annotationSpecId] TextSentimentEvaluationMetrics annotationSpecId */ /** - * Constructs a new DataStats. + * Constructs a new TextSentimentEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DataStats. - * @implements IDataStats + * @classdesc Represents a TextSentimentEvaluationMetrics. + * @implements ITextSentimentEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1beta1.IDataStats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics=} [properties] Properties to set */ - function DataStats(properties) { + function TextSentimentEvaluationMetrics(properties) { + this.annotationSpecId = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36388,193 +38986,182 @@ } /** - * DataStats float64Stats. - * @member {google.cloud.automl.v1beta1.IFloat64Stats|null|undefined} float64Stats - * @memberof google.cloud.automl.v1beta1.DataStats - * @instance - */ - DataStats.prototype.float64Stats = null; - - /** - * DataStats stringStats. - * @member {google.cloud.automl.v1beta1.IStringStats|null|undefined} stringStats - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics precision. + * @member {number} precision + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.stringStats = null; + TextSentimentEvaluationMetrics.prototype.precision = 0; /** - * DataStats timestampStats. - * @member {google.cloud.automl.v1beta1.ITimestampStats|null|undefined} timestampStats - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics recall. + * @member {number} recall + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.timestampStats = null; + TextSentimentEvaluationMetrics.prototype.recall = 0; /** - * DataStats arrayStats. - * @member {google.cloud.automl.v1beta1.IArrayStats|null|undefined} arrayStats - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics f1Score. + * @member {number} f1Score + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.arrayStats = null; + TextSentimentEvaluationMetrics.prototype.f1Score = 0; /** - * DataStats structStats. - * @member {google.cloud.automl.v1beta1.IStructStats|null|undefined} structStats - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics meanAbsoluteError. + * @member {number} meanAbsoluteError + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.structStats = null; + TextSentimentEvaluationMetrics.prototype.meanAbsoluteError = 0; /** - * DataStats categoryStats. - * @member {google.cloud.automl.v1beta1.ICategoryStats|null|undefined} categoryStats - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics meanSquaredError. + * @member {number} meanSquaredError + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.categoryStats = null; + TextSentimentEvaluationMetrics.prototype.meanSquaredError = 0; /** - * DataStats distinctValueCount. - * @member {number|Long} distinctValueCount - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics linearKappa. + * @member {number} linearKappa + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.distinctValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TextSentimentEvaluationMetrics.prototype.linearKappa = 0; /** - * DataStats nullValueCount. - * @member {number|Long} nullValueCount - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics quadraticKappa. + * @member {number} quadraticKappa + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.nullValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TextSentimentEvaluationMetrics.prototype.quadraticKappa = 0; /** - * DataStats validValueCount. - * @member {number|Long} validValueCount - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics confusionMatrix. + * @member {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - DataStats.prototype.validValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TextSentimentEvaluationMetrics.prototype.confusionMatrix = null; /** - * DataStats stats. - * @member {"float64Stats"|"stringStats"|"timestampStats"|"arrayStats"|"structStats"|"categoryStats"|undefined} stats - * @memberof google.cloud.automl.v1beta1.DataStats + * TextSentimentEvaluationMetrics annotationSpecId. + * @member {Array.} annotationSpecId + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance */ - Object.defineProperty(DataStats.prototype, "stats", { - get: $util.oneOfGetter($oneOfFields = ["float64Stats", "stringStats", "timestampStats", "arrayStats", "structStats", "categoryStats"]), - set: $util.oneOfSetter($oneOfFields) - }); + TextSentimentEvaluationMetrics.prototype.annotationSpecId = $util.emptyArray; /** - * Creates a new DataStats instance using the specified properties. + * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IDataStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DataStats} DataStats instance + * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics instance */ - DataStats.create = function create(properties) { - return new DataStats(properties); + TextSentimentEvaluationMetrics.create = function create(properties) { + return new TextSentimentEvaluationMetrics(properties); }; /** - * Encodes the specified DataStats message. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. + * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IDataStats} message DataStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataStats.encode = function encode(message, writer) { + TextSentimentEvaluationMetrics.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.distinctValueCount != null && message.hasOwnProperty("distinctValueCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.distinctValueCount); - if (message.nullValueCount != null && message.hasOwnProperty("nullValueCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.nullValueCount); - if (message.float64Stats != null && message.hasOwnProperty("float64Stats")) - $root.google.cloud.automl.v1beta1.Float64Stats.encode(message.float64Stats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.stringStats != null && message.hasOwnProperty("stringStats")) - $root.google.cloud.automl.v1beta1.StringStats.encode(message.stringStats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.timestampStats != null && message.hasOwnProperty("timestampStats")) - $root.google.cloud.automl.v1beta1.TimestampStats.encode(message.timestampStats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.arrayStats != null && message.hasOwnProperty("arrayStats")) - $root.google.cloud.automl.v1beta1.ArrayStats.encode(message.arrayStats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.structStats != null && message.hasOwnProperty("structStats")) - $root.google.cloud.automl.v1beta1.StructStats.encode(message.structStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.categoryStats != null && message.hasOwnProperty("categoryStats")) - $root.google.cloud.automl.v1beta1.CategoryStats.encode(message.categoryStats, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.validValueCount != null && message.hasOwnProperty("validValueCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.validValueCount); + if (message.precision != null && message.hasOwnProperty("precision")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.precision); + if (message.recall != null && message.hasOwnProperty("recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.f1Score); + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.meanAbsoluteError); + if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.meanSquaredError); + if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.linearKappa); + if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.quadraticKappa); + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.annotationSpecId != null && message.annotationSpecId.length) + for (var i = 0; i < message.annotationSpecId.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.annotationSpecId[i]); return writer; }; /** - * Encodes the specified DataStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataStats.verify|verify} messages. + * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IDataStats} message DataStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataStats.encodeDelimited = function encodeDelimited(message, writer) { + TextSentimentEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataStats message from the specified reader or buffer. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DataStats} DataStats + * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataStats.decode = function decode(reader, length) { + TextSentimentEvaluationMetrics.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.automl.v1beta1.DataStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.precision = reader.float(); + break; + case 2: + message.recall = reader.float(); + break; case 3: - message.float64Stats = $root.google.cloud.automl.v1beta1.Float64Stats.decode(reader, reader.uint32()); + message.f1Score = reader.float(); break; case 4: - message.stringStats = $root.google.cloud.automl.v1beta1.StringStats.decode(reader, reader.uint32()); + message.meanAbsoluteError = reader.float(); break; case 5: - message.timestampStats = $root.google.cloud.automl.v1beta1.TimestampStats.decode(reader, reader.uint32()); + message.meanSquaredError = reader.float(); break; case 6: - message.arrayStats = $root.google.cloud.automl.v1beta1.ArrayStats.decode(reader, reader.uint32()); + message.linearKappa = reader.float(); break; case 7: - message.structStats = $root.google.cloud.automl.v1beta1.StructStats.decode(reader, reader.uint32()); + message.quadraticKappa = reader.float(); break; case 8: - message.categoryStats = $root.google.cloud.automl.v1beta1.CategoryStats.decode(reader, reader.uint32()); - break; - case 1: - message.distinctValueCount = reader.int64(); - break; - case 2: - message.nullValueCount = reader.int64(); + message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); break; case 9: - message.validValueCount = reader.int64(); + if (!(message.annotationSpecId && message.annotationSpecId.length)) + message.annotationSpecId = []; + message.annotationSpecId.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -36585,290 +39172,191 @@ }; /** - * Decodes a DataStats message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DataStats} DataStats + * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataStats.decodeDelimited = function decodeDelimited(reader) { + TextSentimentEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataStats message. + * Verifies a TextSentimentEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataStats.verify = function verify(message) { + TextSentimentEvaluationMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.float64Stats != null && message.hasOwnProperty("float64Stats")) { - properties.stats = 1; - { - var error = $root.google.cloud.automl.v1beta1.Float64Stats.verify(message.float64Stats); - if (error) - return "float64Stats." + error; - } - } - if (message.stringStats != null && message.hasOwnProperty("stringStats")) { - if (properties.stats === 1) - return "stats: multiple values"; - properties.stats = 1; - { - var error = $root.google.cloud.automl.v1beta1.StringStats.verify(message.stringStats); - if (error) - return "stringStats." + error; - } - } - if (message.timestampStats != null && message.hasOwnProperty("timestampStats")) { - if (properties.stats === 1) - return "stats: multiple values"; - properties.stats = 1; - { - var error = $root.google.cloud.automl.v1beta1.TimestampStats.verify(message.timestampStats); - if (error) - return "timestampStats." + error; - } - } - if (message.arrayStats != null && message.hasOwnProperty("arrayStats")) { - if (properties.stats === 1) - return "stats: multiple values"; - properties.stats = 1; - { - var error = $root.google.cloud.automl.v1beta1.ArrayStats.verify(message.arrayStats); - if (error) - return "arrayStats." + error; - } - } - if (message.structStats != null && message.hasOwnProperty("structStats")) { - if (properties.stats === 1) - return "stats: multiple values"; - properties.stats = 1; - { - var error = $root.google.cloud.automl.v1beta1.StructStats.verify(message.structStats); - if (error) - return "structStats." + error; - } + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + if (typeof message.meanAbsoluteError !== "number") + return "meanAbsoluteError: number expected"; + if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) + if (typeof message.meanSquaredError !== "number") + return "meanSquaredError: number expected"; + if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) + if (typeof message.linearKappa !== "number") + return "linearKappa: number expected"; + if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) + if (typeof message.quadraticKappa !== "number") + return "quadraticKappa: number expected"; + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { + var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); + if (error) + return "confusionMatrix." + error; } - if (message.categoryStats != null && message.hasOwnProperty("categoryStats")) { - if (properties.stats === 1) - return "stats: multiple values"; - properties.stats = 1; - { - var error = $root.google.cloud.automl.v1beta1.CategoryStats.verify(message.categoryStats); - if (error) - return "categoryStats." + error; - } + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { + if (!Array.isArray(message.annotationSpecId)) + return "annotationSpecId: array expected"; + for (var i = 0; i < message.annotationSpecId.length; ++i) + if (!$util.isString(message.annotationSpecId[i])) + return "annotationSpecId: string[] expected"; } - if (message.distinctValueCount != null && message.hasOwnProperty("distinctValueCount")) - if (!$util.isInteger(message.distinctValueCount) && !(message.distinctValueCount && $util.isInteger(message.distinctValueCount.low) && $util.isInteger(message.distinctValueCount.high))) - return "distinctValueCount: integer|Long expected"; - if (message.nullValueCount != null && message.hasOwnProperty("nullValueCount")) - if (!$util.isInteger(message.nullValueCount) && !(message.nullValueCount && $util.isInteger(message.nullValueCount.low) && $util.isInteger(message.nullValueCount.high))) - return "nullValueCount: integer|Long expected"; - if (message.validValueCount != null && message.hasOwnProperty("validValueCount")) - if (!$util.isInteger(message.validValueCount) && !(message.validValueCount && $util.isInteger(message.validValueCount.low) && $util.isInteger(message.validValueCount.high))) - return "validValueCount: integer|Long expected"; return null; }; /** - * Creates a DataStats message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DataStats} DataStats + * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics */ - DataStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DataStats) + TextSentimentEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1beta1.DataStats(); - if (object.float64Stats != null) { - if (typeof object.float64Stats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataStats.float64Stats: object expected"); - message.float64Stats = $root.google.cloud.automl.v1beta1.Float64Stats.fromObject(object.float64Stats); - } - if (object.stringStats != null) { - if (typeof object.stringStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataStats.stringStats: object expected"); - message.stringStats = $root.google.cloud.automl.v1beta1.StringStats.fromObject(object.stringStats); - } - if (object.timestampStats != null) { - if (typeof object.timestampStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataStats.timestampStats: object expected"); - message.timestampStats = $root.google.cloud.automl.v1beta1.TimestampStats.fromObject(object.timestampStats); - } - if (object.arrayStats != null) { - if (typeof object.arrayStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataStats.arrayStats: object expected"); - message.arrayStats = $root.google.cloud.automl.v1beta1.ArrayStats.fromObject(object.arrayStats); - } - if (object.structStats != null) { - if (typeof object.structStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataStats.structStats: object expected"); - message.structStats = $root.google.cloud.automl.v1beta1.StructStats.fromObject(object.structStats); + var message = new $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics(); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.recall != null) + message.recall = Number(object.recall); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); + if (object.meanAbsoluteError != null) + message.meanAbsoluteError = Number(object.meanAbsoluteError); + if (object.meanSquaredError != null) + message.meanSquaredError = Number(object.meanSquaredError); + if (object.linearKappa != null) + message.linearKappa = Number(object.linearKappa); + if (object.quadraticKappa != null) + message.quadraticKappa = Number(object.quadraticKappa); + if (object.confusionMatrix != null) { + if (typeof object.confusionMatrix !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.confusionMatrix: object expected"); + message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); } - if (object.categoryStats != null) { - if (typeof object.categoryStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataStats.categoryStats: object expected"); - message.categoryStats = $root.google.cloud.automl.v1beta1.CategoryStats.fromObject(object.categoryStats); + if (object.annotationSpecId) { + if (!Array.isArray(object.annotationSpecId)) + throw TypeError(".google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotationSpecId: array expected"); + message.annotationSpecId = []; + for (var i = 0; i < object.annotationSpecId.length; ++i) + message.annotationSpecId[i] = String(object.annotationSpecId[i]); } - if (object.distinctValueCount != null) - if ($util.Long) - (message.distinctValueCount = $util.Long.fromValue(object.distinctValueCount)).unsigned = false; - else if (typeof object.distinctValueCount === "string") - message.distinctValueCount = parseInt(object.distinctValueCount, 10); - else if (typeof object.distinctValueCount === "number") - message.distinctValueCount = object.distinctValueCount; - else if (typeof object.distinctValueCount === "object") - message.distinctValueCount = new $util.LongBits(object.distinctValueCount.low >>> 0, object.distinctValueCount.high >>> 0).toNumber(); - if (object.nullValueCount != null) - if ($util.Long) - (message.nullValueCount = $util.Long.fromValue(object.nullValueCount)).unsigned = false; - else if (typeof object.nullValueCount === "string") - message.nullValueCount = parseInt(object.nullValueCount, 10); - else if (typeof object.nullValueCount === "number") - message.nullValueCount = object.nullValueCount; - else if (typeof object.nullValueCount === "object") - message.nullValueCount = new $util.LongBits(object.nullValueCount.low >>> 0, object.nullValueCount.high >>> 0).toNumber(); - if (object.validValueCount != null) - if ($util.Long) - (message.validValueCount = $util.Long.fromValue(object.validValueCount)).unsigned = false; - else if (typeof object.validValueCount === "string") - message.validValueCount = parseInt(object.validValueCount, 10); - else if (typeof object.validValueCount === "number") - message.validValueCount = object.validValueCount; - else if (typeof object.validValueCount === "object") - message.validValueCount = new $util.LongBits(object.validValueCount.low >>> 0, object.validValueCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DataStats message. Also converts values to other types if specified. + * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.DataStats} message DataStats + * @param {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataStats.toObject = function toObject(message, options) { + TextSentimentEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.annotationSpecId = []; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.distinctValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.distinctValueCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nullValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nullValueCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.validValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.validValueCount = options.longs === String ? "0" : 0; - } - if (message.distinctValueCount != null && message.hasOwnProperty("distinctValueCount")) - if (typeof message.distinctValueCount === "number") - object.distinctValueCount = options.longs === String ? String(message.distinctValueCount) : message.distinctValueCount; - else - object.distinctValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.distinctValueCount) : options.longs === Number ? new $util.LongBits(message.distinctValueCount.low >>> 0, message.distinctValueCount.high >>> 0).toNumber() : message.distinctValueCount; - if (message.nullValueCount != null && message.hasOwnProperty("nullValueCount")) - if (typeof message.nullValueCount === "number") - object.nullValueCount = options.longs === String ? String(message.nullValueCount) : message.nullValueCount; - else - object.nullValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.nullValueCount) : options.longs === Number ? new $util.LongBits(message.nullValueCount.low >>> 0, message.nullValueCount.high >>> 0).toNumber() : message.nullValueCount; - if (message.float64Stats != null && message.hasOwnProperty("float64Stats")) { - object.float64Stats = $root.google.cloud.automl.v1beta1.Float64Stats.toObject(message.float64Stats, options); - if (options.oneofs) - object.stats = "float64Stats"; - } - if (message.stringStats != null && message.hasOwnProperty("stringStats")) { - object.stringStats = $root.google.cloud.automl.v1beta1.StringStats.toObject(message.stringStats, options); - if (options.oneofs) - object.stats = "stringStats"; - } - if (message.timestampStats != null && message.hasOwnProperty("timestampStats")) { - object.timestampStats = $root.google.cloud.automl.v1beta1.TimestampStats.toObject(message.timestampStats, options); - if (options.oneofs) - object.stats = "timestampStats"; - } - if (message.arrayStats != null && message.hasOwnProperty("arrayStats")) { - object.arrayStats = $root.google.cloud.automl.v1beta1.ArrayStats.toObject(message.arrayStats, options); - if (options.oneofs) - object.stats = "arrayStats"; - } - if (message.structStats != null && message.hasOwnProperty("structStats")) { - object.structStats = $root.google.cloud.automl.v1beta1.StructStats.toObject(message.structStats, options); - if (options.oneofs) - object.stats = "structStats"; + object.precision = 0; + object.recall = 0; + object.f1Score = 0; + object.meanAbsoluteError = 0; + object.meanSquaredError = 0; + object.linearKappa = 0; + object.quadraticKappa = 0; + object.confusionMatrix = null; } - if (message.categoryStats != null && message.hasOwnProperty("categoryStats")) { - object.categoryStats = $root.google.cloud.automl.v1beta1.CategoryStats.toObject(message.categoryStats, options); - if (options.oneofs) - object.stats = "categoryStats"; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) + object.meanAbsoluteError = options.json && !isFinite(message.meanAbsoluteError) ? String(message.meanAbsoluteError) : message.meanAbsoluteError; + if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) + object.meanSquaredError = options.json && !isFinite(message.meanSquaredError) ? String(message.meanSquaredError) : message.meanSquaredError; + if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) + object.linearKappa = options.json && !isFinite(message.linearKappa) ? String(message.linearKappa) : message.linearKappa; + if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) + object.quadraticKappa = options.json && !isFinite(message.quadraticKappa) ? String(message.quadraticKappa) : message.quadraticKappa; + if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) + object.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); + if (message.annotationSpecId && message.annotationSpecId.length) { + object.annotationSpecId = []; + for (var j = 0; j < message.annotationSpecId.length; ++j) + object.annotationSpecId[j] = message.annotationSpecId[j]; } - if (message.validValueCount != null && message.hasOwnProperty("validValueCount")) - if (typeof message.validValueCount === "number") - object.validValueCount = options.longs === String ? String(message.validValueCount) : message.validValueCount; - else - object.validValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.validValueCount) : options.longs === Number ? new $util.LongBits(message.validValueCount.low >>> 0, message.validValueCount.high >>> 0).toNumber() : message.validValueCount; return object; }; /** - * Converts this DataStats to JSON. + * Converts this TextSentimentEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DataStats + * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics * @instance * @returns {Object.} JSON object */ - DataStats.prototype.toJSON = function toJSON() { + TextSentimentEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DataStats; + return TextSentimentEvaluationMetrics; })(); - v1beta1.Float64Stats = (function() { + v1beta1.TranslationDatasetMetadata = (function() { /** - * Properties of a Float64Stats. + * Properties of a TranslationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IFloat64Stats - * @property {number|null} [mean] Float64Stats mean - * @property {number|null} [standardDeviation] Float64Stats standardDeviation - * @property {Array.|null} [quantiles] Float64Stats quantiles - * @property {Array.|null} [histogramBuckets] Float64Stats histogramBuckets + * @interface ITranslationDatasetMetadata + * @property {string|null} [sourceLanguageCode] TranslationDatasetMetadata sourceLanguageCode + * @property {string|null} [targetLanguageCode] TranslationDatasetMetadata targetLanguageCode */ /** - * Constructs a new Float64Stats. + * Constructs a new TranslationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a Float64Stats. - * @implements IFloat64Stats + * @classdesc Represents a TranslationDatasetMetadata. + * @implements ITranslationDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IFloat64Stats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata=} [properties] Properties to set */ - function Float64Stats(properties) { - this.quantiles = []; - this.histogramBuckets = []; + function TranslationDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36876,128 +39364,88 @@ } /** - * Float64Stats mean. - * @member {number} mean - * @memberof google.cloud.automl.v1beta1.Float64Stats - * @instance - */ - Float64Stats.prototype.mean = 0; - - /** - * Float64Stats standardDeviation. - * @member {number} standardDeviation - * @memberof google.cloud.automl.v1beta1.Float64Stats - * @instance - */ - Float64Stats.prototype.standardDeviation = 0; - - /** - * Float64Stats quantiles. - * @member {Array.} quantiles - * @memberof google.cloud.automl.v1beta1.Float64Stats + * TranslationDatasetMetadata sourceLanguageCode. + * @member {string} sourceLanguageCode + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @instance */ - Float64Stats.prototype.quantiles = $util.emptyArray; + TranslationDatasetMetadata.prototype.sourceLanguageCode = ""; /** - * Float64Stats histogramBuckets. - * @member {Array.} histogramBuckets - * @memberof google.cloud.automl.v1beta1.Float64Stats + * TranslationDatasetMetadata targetLanguageCode. + * @member {string} targetLanguageCode + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @instance */ - Float64Stats.prototype.histogramBuckets = $util.emptyArray; + TranslationDatasetMetadata.prototype.targetLanguageCode = ""; /** - * Creates a new Float64Stats instance using the specified properties. + * Creates a new TranslationDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IFloat64Stats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats instance + * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata instance */ - Float64Stats.create = function create(properties) { - return new Float64Stats(properties); + TranslationDatasetMetadata.create = function create(properties) { + return new TranslationDatasetMetadata(properties); }; /** - * Encodes the specified Float64Stats message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. + * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IFloat64Stats} message Float64Stats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Float64Stats.encode = function encode(message, writer) { + TranslationDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mean != null && message.hasOwnProperty("mean")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.mean); - if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.standardDeviation); - if (message.quantiles != null && message.quantiles.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.quantiles.length; ++i) - writer.double(message.quantiles[i]); - writer.ldelim(); - } - if (message.histogramBuckets != null && message.histogramBuckets.length) - for (var i = 0; i < message.histogramBuckets.length; ++i) - $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.encode(message.histogramBuckets[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceLanguageCode); + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetLanguageCode); return writer; }; /** - * Encodes the specified Float64Stats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.verify|verify} messages. + * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IFloat64Stats} message Float64Stats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Float64Stats.encodeDelimited = function encodeDelimited(message, writer) { + TranslationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Float64Stats message from the specified reader or buffer. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats + * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Float64Stats.decode = function decode(reader, length) { + TranslationDatasetMetadata.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.automl.v1beta1.Float64Stats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mean = reader.double(); + message.sourceLanguageCode = reader.string(); break; case 2: - message.standardDeviation = reader.double(); - break; - case 3: - if (!(message.quantiles && message.quantiles.length)) - message.quantiles = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.quantiles.push(reader.double()); - } else - message.quantiles.push(reader.double()); - break; - case 4: - if (!(message.histogramBuckets && message.histogramBuckets.length)) - message.histogramBuckets = []; - message.histogramBuckets.push($root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.decode(reader, reader.uint32())); + message.targetLanguageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -37008,410 +39456,117 @@ }; /** - * Decodes a Float64Stats message from the specified reader or buffer, length delimited. + * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats + * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Float64Stats.decodeDelimited = function decodeDelimited(reader) { + TranslationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Float64Stats message. + * Verifies a TranslationDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Float64Stats.verify = function verify(message) { + TranslationDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) - if (typeof message.standardDeviation !== "number") - return "standardDeviation: number expected"; - if (message.quantiles != null && message.hasOwnProperty("quantiles")) { - if (!Array.isArray(message.quantiles)) - return "quantiles: array expected"; - for (var i = 0; i < message.quantiles.length; ++i) - if (typeof message.quantiles[i] !== "number") - return "quantiles: number[] expected"; - } - if (message.histogramBuckets != null && message.hasOwnProperty("histogramBuckets")) { - if (!Array.isArray(message.histogramBuckets)) - return "histogramBuckets: array expected"; - for (var i = 0; i < message.histogramBuckets.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify(message.histogramBuckets[i]); - if (error) - return "histogramBuckets." + error; - } - } + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + if (!$util.isString(message.sourceLanguageCode)) + return "sourceLanguageCode: string expected"; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + if (!$util.isString(message.targetLanguageCode)) + return "targetLanguageCode: string expected"; return null; }; /** - * Creates a Float64Stats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Float64Stats} Float64Stats + * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata */ - Float64Stats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Float64Stats) + TranslationDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.Float64Stats(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.standardDeviation != null) - message.standardDeviation = Number(object.standardDeviation); - if (object.quantiles) { - if (!Array.isArray(object.quantiles)) - throw TypeError(".google.cloud.automl.v1beta1.Float64Stats.quantiles: array expected"); - message.quantiles = []; - for (var i = 0; i < object.quantiles.length; ++i) - message.quantiles[i] = Number(object.quantiles[i]); - } - if (object.histogramBuckets) { - if (!Array.isArray(object.histogramBuckets)) - throw TypeError(".google.cloud.automl.v1beta1.Float64Stats.histogramBuckets: array expected"); - message.histogramBuckets = []; - for (var i = 0; i < object.histogramBuckets.length; ++i) { - if (typeof object.histogramBuckets[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Float64Stats.histogramBuckets: object expected"); - message.histogramBuckets[i] = $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.fromObject(object.histogramBuckets[i]); - } - } + var message = new $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata(); + if (object.sourceLanguageCode != null) + message.sourceLanguageCode = String(object.sourceLanguageCode); + if (object.targetLanguageCode != null) + message.targetLanguageCode = String(object.targetLanguageCode); return message; }; /** - * Creates a plain object from a Float64Stats message. Also converts values to other types if specified. + * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.Float64Stats} message Float64Stats + * @param {google.cloud.automl.v1beta1.TranslationDatasetMetadata} message TranslationDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Float64Stats.toObject = function toObject(message, options) { + TranslationDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.quantiles = []; - object.histogramBuckets = []; - } if (options.defaults) { - object.mean = 0; - object.standardDeviation = 0; - } - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) - object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; - if (message.quantiles && message.quantiles.length) { - object.quantiles = []; - for (var j = 0; j < message.quantiles.length; ++j) - object.quantiles[j] = options.json && !isFinite(message.quantiles[j]) ? String(message.quantiles[j]) : message.quantiles[j]; - } - if (message.histogramBuckets && message.histogramBuckets.length) { - object.histogramBuckets = []; - for (var j = 0; j < message.histogramBuckets.length; ++j) - object.histogramBuckets[j] = $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.toObject(message.histogramBuckets[j], options); + object.sourceLanguageCode = ""; + object.targetLanguageCode = ""; } + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + object.sourceLanguageCode = message.sourceLanguageCode; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + object.targetLanguageCode = message.targetLanguageCode; return object; }; /** - * Converts this Float64Stats to JSON. + * Converts this TranslationDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.Float64Stats + * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata * @instance * @returns {Object.} JSON object */ - Float64Stats.prototype.toJSON = function toJSON() { + TranslationDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Float64Stats.HistogramBucket = (function() { - - /** - * Properties of a HistogramBucket. - * @memberof google.cloud.automl.v1beta1.Float64Stats - * @interface IHistogramBucket - * @property {number|null} [min] HistogramBucket min - * @property {number|null} [max] HistogramBucket max - * @property {number|Long|null} [count] HistogramBucket count - */ - - /** - * Constructs a new HistogramBucket. - * @memberof google.cloud.automl.v1beta1.Float64Stats - * @classdesc Represents a HistogramBucket. - * @implements IHistogramBucket - * @constructor - * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket=} [properties] Properties to set - */ - function HistogramBucket(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]]; - } - - /** - * HistogramBucket min. - * @member {number} min - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @instance - */ - HistogramBucket.prototype.min = 0; - - /** - * HistogramBucket max. - * @member {number} max - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @instance - */ - HistogramBucket.prototype.max = 0; - - /** - * HistogramBucket count. - * @member {number|Long} count - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @instance - */ - HistogramBucket.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new HistogramBucket instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket instance - */ - HistogramBucket.create = function create(properties) { - return new HistogramBucket(properties); - }; - - /** - * Encodes the specified HistogramBucket message. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket} message HistogramBucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistogramBucket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min != null && message.hasOwnProperty("min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && message.hasOwnProperty("max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); - if (message.count != null && message.hasOwnProperty("count")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.count); - return writer; - }; - - /** - * Encodes the specified HistogramBucket message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {google.cloud.automl.v1beta1.Float64Stats.IHistogramBucket} message HistogramBucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistogramBucket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HistogramBucket message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistogramBucket.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.automl.v1beta1.Float64Stats.HistogramBucket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.min = reader.double(); - break; - case 2: - message.max = reader.double(); - break; - case 3: - message.count = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HistogramBucket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistogramBucket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HistogramBucket message. - * @function verify - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HistogramBucket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; - - /** - * Creates a HistogramBucket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} HistogramBucket - */ - HistogramBucket.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) - return object; - var message = new $root.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket(); - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a HistogramBucket message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @static - * @param {google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} message HistogramBucket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HistogramBucket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.min = 0; - object.max = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - } - if (message.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; - - /** - * Converts this HistogramBucket to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - * @instance - * @returns {Object.} JSON object - */ - HistogramBucket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HistogramBucket; - })(); - - return Float64Stats; + return TranslationDatasetMetadata; })(); - v1beta1.StringStats = (function() { + v1beta1.TranslationEvaluationMetrics = (function() { /** - * Properties of a StringStats. + * Properties of a TranslationEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @interface IStringStats - * @property {Array.|null} [topUnigramStats] StringStats topUnigramStats + * @interface ITranslationEvaluationMetrics + * @property {number|null} [bleuScore] TranslationEvaluationMetrics bleuScore + * @property {number|null} [baseBleuScore] TranslationEvaluationMetrics baseBleuScore */ /** - * Constructs a new StringStats. + * Constructs a new TranslationEvaluationMetrics. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a StringStats. - * @implements IStringStats + * @classdesc Represents a TranslationEvaluationMetrics. + * @implements ITranslationEvaluationMetrics * @constructor - * @param {google.cloud.automl.v1beta1.IStringStats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics=} [properties] Properties to set */ - function StringStats(properties) { - this.topUnigramStats = []; + function TranslationEvaluationMetrics(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37419,78 +39574,88 @@ } /** - * StringStats topUnigramStats. - * @member {Array.} topUnigramStats - * @memberof google.cloud.automl.v1beta1.StringStats + * TranslationEvaluationMetrics bleuScore. + * @member {number} bleuScore + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @instance */ - StringStats.prototype.topUnigramStats = $util.emptyArray; + TranslationEvaluationMetrics.prototype.bleuScore = 0; /** - * Creates a new StringStats instance using the specified properties. + * TranslationEvaluationMetrics baseBleuScore. + * @member {number} baseBleuScore + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics + * @instance + */ + TranslationEvaluationMetrics.prototype.baseBleuScore = 0; + + /** + * Creates a new TranslationEvaluationMetrics instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IStringStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.StringStats} StringStats instance + * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics instance */ - StringStats.create = function create(properties) { - return new StringStats(properties); + TranslationEvaluationMetrics.create = function create(properties) { + return new TranslationEvaluationMetrics(properties); }; /** - * Encodes the specified StringStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. + * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IStringStats} message StringStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringStats.encode = function encode(message, writer) { + TranslationEvaluationMetrics.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.topUnigramStats != null && message.topUnigramStats.length) - for (var i = 0; i < message.topUnigramStats.length; ++i) - $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.encode(message.topUnigramStats[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.bleuScore); + if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.baseBleuScore); return writer; }; /** - * Encodes the specified StringStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.verify|verify} messages. + * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.IStringStats} message StringStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringStats.encodeDelimited = function encodeDelimited(message, writer) { + TranslationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StringStats message from the specified reader or buffer. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.StringStats} StringStats + * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StringStats.decode = function decode(reader, length) { + TranslationEvaluationMetrics.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.automl.v1beta1.StringStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.topUnigramStats && message.topUnigramStats.length)) - message.topUnigramStats = []; - message.topUnigramStats.push($root.google.cloud.automl.v1beta1.StringStats.UnigramStats.decode(reader, reader.uint32())); + message.bleuScore = reader.double(); + break; + case 2: + message.baseBleuScore = reader.double(); break; default: reader.skipType(tag & 7); @@ -37501,349 +39666,118 @@ }; /** - * Decodes a StringStats message from the specified reader or buffer, length delimited. + * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.StringStats} StringStats + * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StringStats.decodeDelimited = function decodeDelimited(reader) { + TranslationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StringStats message. + * Verifies a TranslationEvaluationMetrics message. * @function verify - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StringStats.verify = function verify(message) { + TranslationEvaluationMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.topUnigramStats != null && message.hasOwnProperty("topUnigramStats")) { - if (!Array.isArray(message.topUnigramStats)) - return "topUnigramStats: array expected"; - for (var i = 0; i < message.topUnigramStats.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.verify(message.topUnigramStats[i]); - if (error) - return "topUnigramStats." + error; - } - } + if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) + if (typeof message.bleuScore !== "number") + return "bleuScore: number expected"; + if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) + if (typeof message.baseBleuScore !== "number") + return "baseBleuScore: number expected"; return null; }; /** - * Creates a StringStats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.StringStats} StringStats + * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics */ - StringStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.StringStats) + TranslationEvaluationMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) return object; - var message = new $root.google.cloud.automl.v1beta1.StringStats(); - if (object.topUnigramStats) { - if (!Array.isArray(object.topUnigramStats)) - throw TypeError(".google.cloud.automl.v1beta1.StringStats.topUnigramStats: array expected"); - message.topUnigramStats = []; - for (var i = 0; i < object.topUnigramStats.length; ++i) { - if (typeof object.topUnigramStats[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.StringStats.topUnigramStats: object expected"); - message.topUnigramStats[i] = $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.fromObject(object.topUnigramStats[i]); - } - } + var message = new $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics(); + if (object.bleuScore != null) + message.bleuScore = Number(object.bleuScore); + if (object.baseBleuScore != null) + message.baseBleuScore = Number(object.baseBleuScore); return message; }; /** - * Creates a plain object from a StringStats message. Also converts values to other types if specified. + * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @static - * @param {google.cloud.automl.v1beta1.StringStats} message StringStats + * @param {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} message TranslationEvaluationMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringStats.toObject = function toObject(message, options) { + TranslationEvaluationMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.topUnigramStats = []; - if (message.topUnigramStats && message.topUnigramStats.length) { - object.topUnigramStats = []; - for (var j = 0; j < message.topUnigramStats.length; ++j) - object.topUnigramStats[j] = $root.google.cloud.automl.v1beta1.StringStats.UnigramStats.toObject(message.topUnigramStats[j], options); + if (options.defaults) { + object.bleuScore = 0; + object.baseBleuScore = 0; } + if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) + object.bleuScore = options.json && !isFinite(message.bleuScore) ? String(message.bleuScore) : message.bleuScore; + if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) + object.baseBleuScore = options.json && !isFinite(message.baseBleuScore) ? String(message.baseBleuScore) : message.baseBleuScore; return object; }; /** - * Converts this StringStats to JSON. + * Converts this TranslationEvaluationMetrics to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.StringStats + * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics * @instance * @returns {Object.} JSON object */ - StringStats.prototype.toJSON = function toJSON() { + TranslationEvaluationMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - StringStats.UnigramStats = (function() { - - /** - * Properties of an UnigramStats. - * @memberof google.cloud.automl.v1beta1.StringStats - * @interface IUnigramStats - * @property {string|null} [value] UnigramStats value - * @property {number|Long|null} [count] UnigramStats count - */ - - /** - * Constructs a new UnigramStats. - * @memberof google.cloud.automl.v1beta1.StringStats - * @classdesc Represents an UnigramStats. - * @implements IUnigramStats - * @constructor - * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats=} [properties] Properties to set - */ - function UnigramStats(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]]; - } - - /** - * UnigramStats value. - * @member {string} value - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @instance - */ - UnigramStats.prototype.value = ""; - - /** - * UnigramStats count. - * @member {number|Long} count - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @instance - */ - UnigramStats.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new UnigramStats instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats instance - */ - UnigramStats.create = function create(properties) { - return new UnigramStats(properties); - }; - - /** - * Encodes the specified UnigramStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats} message UnigramStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnigramStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.count != null && message.hasOwnProperty("count")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); - return writer; - }; - - /** - * Encodes the specified UnigramStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StringStats.UnigramStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {google.cloud.automl.v1beta1.StringStats.IUnigramStats} message UnigramStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnigramStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnigramStats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnigramStats.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.automl.v1beta1.StringStats.UnigramStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; - case 2: - message.count = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UnigramStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnigramStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnigramStats message. - * @function verify - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnigramStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; - - /** - * Creates an UnigramStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.StringStats.UnigramStats} UnigramStats - */ - UnigramStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.StringStats.UnigramStats) - return object; - var message = new $root.google.cloud.automl.v1beta1.StringStats.UnigramStats(); - if (object.value != null) - message.value = String(object.value); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an UnigramStats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @static - * @param {google.cloud.automl.v1beta1.StringStats.UnigramStats} message UnigramStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnigramStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; - - /** - * Converts this UnigramStats to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.StringStats.UnigramStats - * @instance - * @returns {Object.} JSON object - */ - UnigramStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UnigramStats; - })(); - - return StringStats; + return TranslationEvaluationMetrics; })(); - v1beta1.TimestampStats = (function() { + v1beta1.TranslationModelMetadata = (function() { /** - * Properties of a TimestampStats. + * Properties of a TranslationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ITimestampStats - * @property {Object.|null} [granularStats] TimestampStats granularStats + * @interface ITranslationModelMetadata + * @property {string|null} [baseModel] TranslationModelMetadata baseModel + * @property {string|null} [sourceLanguageCode] TranslationModelMetadata sourceLanguageCode + * @property {string|null} [targetLanguageCode] TranslationModelMetadata targetLanguageCode */ /** - * Constructs a new TimestampStats. + * Constructs a new TranslationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TimestampStats. - * @implements ITimestampStats + * @classdesc Represents a TranslationModelMetadata. + * @implements ITranslationModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITimestampStats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata=} [properties] Properties to set */ - function TimestampStats(properties) { - this.granularStats = {}; + function TranslationModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37851,83 +39785,101 @@ } /** - * TimestampStats granularStats. - * @member {Object.} granularStats - * @memberof google.cloud.automl.v1beta1.TimestampStats + * TranslationModelMetadata baseModel. + * @member {string} baseModel + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @instance */ - TimestampStats.prototype.granularStats = $util.emptyObject; + TranslationModelMetadata.prototype.baseModel = ""; /** - * Creates a new TimestampStats instance using the specified properties. + * TranslationModelMetadata sourceLanguageCode. + * @member {string} sourceLanguageCode + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @instance + */ + TranslationModelMetadata.prototype.sourceLanguageCode = ""; + + /** + * TranslationModelMetadata targetLanguageCode. + * @member {string} targetLanguageCode + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @instance + */ + TranslationModelMetadata.prototype.targetLanguageCode = ""; + + /** + * Creates a new TranslationModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.ITimestampStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats instance + * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata instance */ - TimestampStats.create = function create(properties) { - return new TimestampStats(properties); + TranslationModelMetadata.create = function create(properties) { + return new TranslationModelMetadata(properties); }; /** - * Encodes the specified TimestampStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. + * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.ITimestampStats} message TimestampStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimestampStats.encode = function encode(message, writer) { + TranslationModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.granularStats != null && message.hasOwnProperty("granularStats")) - for (var keys = Object.keys(message.granularStats), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.encode(message.granularStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModel); + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceLanguageCode); + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetLanguageCode); return writer; }; /** - * Encodes the specified TimestampStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.verify|verify} messages. + * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.ITimestampStats} message TimestampStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimestampStats.encodeDelimited = function encodeDelimited(message, writer) { + TranslationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimestampStats message from the specified reader or buffer. + * Decodes a TranslationModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats + * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimestampStats.decode = function decode(reader, length) { + TranslationModelMetadata.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.automl.v1beta1.TimestampStats(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TranslationModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.granularStats === $util.emptyObject) - message.granularStats = {}; - key = reader.string(); - reader.pos++; - message.granularStats[key] = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.decode(reader, reader.uint32()); + message.baseModel = reader.string(); + break; + case 2: + message.sourceLanguageCode = reader.string(); + break; + case 3: + message.targetLanguageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -37938,347 +39890,124 @@ }; /** - * Decodes a TimestampStats message from the specified reader or buffer, length delimited. + * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats + * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimestampStats.decodeDelimited = function decodeDelimited(reader) { + TranslationModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimestampStats message. + * Verifies a TranslationModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimestampStats.verify = function verify(message) { + TranslationModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.granularStats != null && message.hasOwnProperty("granularStats")) { - if (!$util.isObject(message.granularStats)) - return "granularStats: object expected"; - var key = Object.keys(message.granularStats); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify(message.granularStats[key[i]]); - if (error) - return "granularStats." + error; - } - } + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + if (!$util.isString(message.baseModel)) + return "baseModel: string expected"; + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + if (!$util.isString(message.sourceLanguageCode)) + return "sourceLanguageCode: string expected"; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + if (!$util.isString(message.targetLanguageCode)) + return "targetLanguageCode: string expected"; return null; }; /** - * Creates a TimestampStats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TimestampStats} TimestampStats + * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata */ - TimestampStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TimestampStats) + TranslationModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TranslationModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TimestampStats(); - if (object.granularStats) { - if (typeof object.granularStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TimestampStats.granularStats: object expected"); - message.granularStats = {}; - for (var keys = Object.keys(object.granularStats), i = 0; i < keys.length; ++i) { - if (typeof object.granularStats[keys[i]] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TimestampStats.granularStats: object expected"); - message.granularStats[keys[i]] = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.fromObject(object.granularStats[keys[i]]); - } - } + var message = new $root.google.cloud.automl.v1beta1.TranslationModelMetadata(); + if (object.baseModel != null) + message.baseModel = String(object.baseModel); + if (object.sourceLanguageCode != null) + message.sourceLanguageCode = String(object.sourceLanguageCode); + if (object.targetLanguageCode != null) + message.targetLanguageCode = String(object.targetLanguageCode); return message; }; /** - * Creates a plain object from a TimestampStats message. Also converts values to other types if specified. + * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.TimestampStats} message TimestampStats + * @param {google.cloud.automl.v1beta1.TranslationModelMetadata} message TranslationModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimestampStats.toObject = function toObject(message, options) { + TranslationModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.granularStats = {}; - var keys2; - if (message.granularStats && (keys2 = Object.keys(message.granularStats)).length) { - object.granularStats = {}; - for (var j = 0; j < keys2.length; ++j) - object.granularStats[keys2[j]] = $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats.toObject(message.granularStats[keys2[j]], options); + if (options.defaults) { + object.baseModel = ""; + object.sourceLanguageCode = ""; + object.targetLanguageCode = ""; } + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + object.baseModel = message.baseModel; + if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) + object.sourceLanguageCode = message.sourceLanguageCode; + if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) + object.targetLanguageCode = message.targetLanguageCode; return object; }; /** - * Converts this TimestampStats to JSON. + * Converts this TranslationModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TimestampStats + * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata * @instance * @returns {Object.} JSON object */ - TimestampStats.prototype.toJSON = function toJSON() { + TranslationModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TimestampStats.GranularStats = (function() { - - /** - * Properties of a GranularStats. - * @memberof google.cloud.automl.v1beta1.TimestampStats - * @interface IGranularStats - * @property {Object.|null} [buckets] GranularStats buckets - */ - - /** - * Constructs a new GranularStats. - * @memberof google.cloud.automl.v1beta1.TimestampStats - * @classdesc Represents a GranularStats. - * @implements IGranularStats - * @constructor - * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats=} [properties] Properties to set - */ - function GranularStats(properties) { - this.buckets = {}; - 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]]; - } - - /** - * GranularStats buckets. - * @member {Object.} buckets - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @instance - */ - GranularStats.prototype.buckets = $util.emptyObject; - - /** - * Creates a new GranularStats instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats instance - */ - GranularStats.create = function create(properties) { - return new GranularStats(properties); - }; - - /** - * Encodes the specified GranularStats message. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats} message GranularStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GranularStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buckets != null && message.hasOwnProperty("buckets")) - for (var keys = Object.keys(message.buckets), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.buckets[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified GranularStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TimestampStats.GranularStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {google.cloud.automl.v1beta1.TimestampStats.IGranularStats} message GranularStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GranularStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GranularStats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GranularStats.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.automl.v1beta1.TimestampStats.GranularStats(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - reader.skip().pos++; - if (message.buckets === $util.emptyObject) - message.buckets = {}; - key = reader.int32(); - reader.pos++; - message.buckets[key] = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GranularStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GranularStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GranularStats message. - * @function verify - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GranularStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buckets != null && message.hasOwnProperty("buckets")) { - if (!$util.isObject(message.buckets)) - return "buckets: object expected"; - var key = Object.keys(message.buckets); - for (var i = 0; i < key.length; ++i) { - if (!$util.key32Re.test(key[i])) - return "buckets: integer key{k:int32} expected"; - if (!$util.isInteger(message.buckets[key[i]]) && !(message.buckets[key[i]] && $util.isInteger(message.buckets[key[i]].low) && $util.isInteger(message.buckets[key[i]].high))) - return "buckets: integer|Long{k:int32} expected"; - } - } - return null; - }; - - /** - * Creates a GranularStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TimestampStats.GranularStats} GranularStats - */ - GranularStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats) - return object; - var message = new $root.google.cloud.automl.v1beta1.TimestampStats.GranularStats(); - if (object.buckets) { - if (typeof object.buckets !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TimestampStats.GranularStats.buckets: object expected"); - message.buckets = {}; - for (var keys = Object.keys(object.buckets), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.buckets[keys[i]] = $util.Long.fromValue(object.buckets[keys[i]])).unsigned = false; - else if (typeof object.buckets[keys[i]] === "string") - message.buckets[keys[i]] = parseInt(object.buckets[keys[i]], 10); - else if (typeof object.buckets[keys[i]] === "number") - message.buckets[keys[i]] = object.buckets[keys[i]]; - else if (typeof object.buckets[keys[i]] === "object") - message.buckets[keys[i]] = new $util.LongBits(object.buckets[keys[i]].low >>> 0, object.buckets[keys[i]].high >>> 0).toNumber(); - } - return message; - }; - - /** - * Creates a plain object from a GranularStats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @static - * @param {google.cloud.automl.v1beta1.TimestampStats.GranularStats} message GranularStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GranularStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.buckets = {}; - var keys2; - if (message.buckets && (keys2 = Object.keys(message.buckets)).length) { - object.buckets = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.buckets[keys2[j]] === "number") - object.buckets[keys2[j]] = options.longs === String ? String(message.buckets[keys2[j]]) : message.buckets[keys2[j]]; - else - object.buckets[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.buckets[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.buckets[keys2[j]].low >>> 0, message.buckets[keys2[j]].high >>> 0).toNumber() : message.buckets[keys2[j]]; - } - return object; - }; - - /** - * Converts this GranularStats to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.TimestampStats.GranularStats - * @instance - * @returns {Object.} JSON object - */ - GranularStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GranularStats; - })(); - - return TimestampStats; + return TranslationModelMetadata; })(); - v1beta1.ArrayStats = (function() { + v1beta1.TranslationAnnotation = (function() { /** - * Properties of an ArrayStats. + * Properties of a TranslationAnnotation. * @memberof google.cloud.automl.v1beta1 - * @interface IArrayStats - * @property {google.cloud.automl.v1beta1.IDataStats|null} [memberStats] ArrayStats memberStats + * @interface ITranslationAnnotation + * @property {google.cloud.automl.v1beta1.ITextSnippet|null} [translatedContent] TranslationAnnotation translatedContent */ /** - * Constructs a new ArrayStats. + * Constructs a new TranslationAnnotation. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ArrayStats. - * @implements IArrayStats + * @classdesc Represents a TranslationAnnotation. + * @implements ITranslationAnnotation * @constructor - * @param {google.cloud.automl.v1beta1.IArrayStats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITranslationAnnotation=} [properties] Properties to set */ - function ArrayStats(properties) { + function TranslationAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38286,75 +40015,75 @@ } /** - * ArrayStats memberStats. - * @member {google.cloud.automl.v1beta1.IDataStats|null|undefined} memberStats - * @memberof google.cloud.automl.v1beta1.ArrayStats + * TranslationAnnotation translatedContent. + * @member {google.cloud.automl.v1beta1.ITextSnippet|null|undefined} translatedContent + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @instance */ - ArrayStats.prototype.memberStats = null; + TranslationAnnotation.prototype.translatedContent = null; /** - * Creates a new ArrayStats instance using the specified properties. + * Creates a new TranslationAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static - * @param {google.cloud.automl.v1beta1.IArrayStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats instance + * @param {google.cloud.automl.v1beta1.ITranslationAnnotation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation instance */ - ArrayStats.create = function create(properties) { - return new ArrayStats(properties); + TranslationAnnotation.create = function create(properties) { + return new TranslationAnnotation(properties); }; /** - * Encodes the specified ArrayStats message. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. + * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static - * @param {google.cloud.automl.v1beta1.IArrayStats} message ArrayStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArrayStats.encode = function encode(message, writer) { + TranslationAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.memberStats != null && message.hasOwnProperty("memberStats")) - $root.google.cloud.automl.v1beta1.DataStats.encode(message.memberStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) + $root.google.cloud.automl.v1beta1.TextSnippet.encode(message.translatedContent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ArrayStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ArrayStats.verify|verify} messages. + * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static - * @param {google.cloud.automl.v1beta1.IArrayStats} message ArrayStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArrayStats.encodeDelimited = function encodeDelimited(message, writer) { + TranslationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ArrayStats message from the specified reader or buffer. + * Decodes a TranslationAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats + * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArrayStats.decode = function decode(reader, length) { + TranslationAnnotation.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.automl.v1beta1.ArrayStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TranslationAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.memberStats = $root.google.cloud.automl.v1beta1.DataStats.decode(reader, reader.uint32()); + case 1: + message.translatedContent = $root.google.cloud.automl.v1beta1.TextSnippet.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -38365,113 +40094,114 @@ }; /** - * Decodes an ArrayStats message from the specified reader or buffer, length delimited. + * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats + * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArrayStats.decodeDelimited = function decodeDelimited(reader) { + TranslationAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ArrayStats message. + * Verifies a TranslationAnnotation message. * @function verify - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ArrayStats.verify = function verify(message) { + TranslationAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.memberStats != null && message.hasOwnProperty("memberStats")) { - var error = $root.google.cloud.automl.v1beta1.DataStats.verify(message.memberStats); + if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) { + var error = $root.google.cloud.automl.v1beta1.TextSnippet.verify(message.translatedContent); if (error) - return "memberStats." + error; + return "translatedContent." + error; } return null; }; /** - * Creates an ArrayStats message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ArrayStats} ArrayStats + * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation */ - ArrayStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ArrayStats) + TranslationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TranslationAnnotation) return object; - var message = new $root.google.cloud.automl.v1beta1.ArrayStats(); - if (object.memberStats != null) { - if (typeof object.memberStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ArrayStats.memberStats: object expected"); - message.memberStats = $root.google.cloud.automl.v1beta1.DataStats.fromObject(object.memberStats); + var message = new $root.google.cloud.automl.v1beta1.TranslationAnnotation(); + if (object.translatedContent != null) { + if (typeof object.translatedContent !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TranslationAnnotation.translatedContent: object expected"); + message.translatedContent = $root.google.cloud.automl.v1beta1.TextSnippet.fromObject(object.translatedContent); } return message; }; /** - * Creates a plain object from an ArrayStats message. Also converts values to other types if specified. + * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @static - * @param {google.cloud.automl.v1beta1.ArrayStats} message ArrayStats + * @param {google.cloud.automl.v1beta1.TranslationAnnotation} message TranslationAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArrayStats.toObject = function toObject(message, options) { + TranslationAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.memberStats = null; - if (message.memberStats != null && message.hasOwnProperty("memberStats")) - object.memberStats = $root.google.cloud.automl.v1beta1.DataStats.toObject(message.memberStats, options); + object.translatedContent = null; + if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) + object.translatedContent = $root.google.cloud.automl.v1beta1.TextSnippet.toObject(message.translatedContent, options); return object; }; /** - * Converts this ArrayStats to JSON. + * Converts this TranslationAnnotation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ArrayStats + * @memberof google.cloud.automl.v1beta1.TranslationAnnotation * @instance * @returns {Object.} JSON object */ - ArrayStats.prototype.toJSON = function toJSON() { + TranslationAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ArrayStats; + return TranslationAnnotation; })(); - v1beta1.StructStats = (function() { + v1beta1.AnnotationSpec = (function() { /** - * Properties of a StructStats. + * Properties of an AnnotationSpec. * @memberof google.cloud.automl.v1beta1 - * @interface IStructStats - * @property {Object.|null} [fieldStats] StructStats fieldStats + * @interface IAnnotationSpec + * @property {string|null} [name] AnnotationSpec name + * @property {string|null} [displayName] AnnotationSpec displayName + * @property {number|null} [exampleCount] AnnotationSpec exampleCount */ /** - * Constructs a new StructStats. + * Constructs a new AnnotationSpec. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a StructStats. - * @implements IStructStats + * @classdesc Represents an AnnotationSpec. + * @implements IAnnotationSpec * @constructor - * @param {google.cloud.automl.v1beta1.IStructStats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IAnnotationSpec=} [properties] Properties to set */ - function StructStats(properties) { - this.fieldStats = {}; + function AnnotationSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38479,83 +40209,101 @@ } /** - * StructStats fieldStats. - * @member {Object.} fieldStats - * @memberof google.cloud.automl.v1beta1.StructStats + * AnnotationSpec name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @instance */ - StructStats.prototype.fieldStats = $util.emptyObject; + AnnotationSpec.prototype.name = ""; /** - * Creates a new StructStats instance using the specified properties. + * AnnotationSpec displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @instance + */ + AnnotationSpec.prototype.displayName = ""; + + /** + * AnnotationSpec exampleCount. + * @member {number} exampleCount + * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @instance + */ + AnnotationSpec.prototype.exampleCount = 0; + + /** + * Creates a new AnnotationSpec instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static - * @param {google.cloud.automl.v1beta1.IStructStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.StructStats} StructStats instance + * @param {google.cloud.automl.v1beta1.IAnnotationSpec=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec instance */ - StructStats.create = function create(properties) { - return new StructStats(properties); + AnnotationSpec.create = function create(properties) { + return new AnnotationSpec(properties); }; /** - * Encodes the specified StructStats message. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. + * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static - * @param {google.cloud.automl.v1beta1.IStructStats} message StructStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StructStats.encode = function encode(message, writer) { + AnnotationSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldStats != null && message.hasOwnProperty("fieldStats")) - for (var keys = Object.keys(message.fieldStats), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.automl.v1beta1.DataStats.encode(message.fieldStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().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.exampleCount != null && message.hasOwnProperty("exampleCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.exampleCount); return writer; }; /** - * Encodes the specified StructStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructStats.verify|verify} messages. + * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static - * @param {google.cloud.automl.v1beta1.IStructStats} message StructStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StructStats.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StructStats message from the specified reader or buffer. + * Decodes an AnnotationSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.StructStats} StructStats + * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StructStats.decode = function decode(reader, length) { + AnnotationSpec.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.automl.v1beta1.StructStats(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.AnnotationSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.fieldStats === $util.emptyObject) - message.fieldStats = {}; - key = reader.string(); - reader.pos++; - message.fieldStats[key] = $root.google.cloud.automl.v1beta1.DataStats.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 9: + message.exampleCount = reader.int32(); break; default: reader.skipType(tag & 7); @@ -38566,127 +40314,138 @@ }; /** - * Decodes a StructStats message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.StructStats} StructStats + * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StructStats.decodeDelimited = function decodeDelimited(reader) { + AnnotationSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StructStats message. + * Verifies an AnnotationSpec message. * @function verify - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StructStats.verify = function verify(message) { + AnnotationSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fieldStats != null && message.hasOwnProperty("fieldStats")) { - if (!$util.isObject(message.fieldStats)) - return "fieldStats: object expected"; - var key = Object.keys(message.fieldStats); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.DataStats.verify(message.fieldStats[key[i]]); - if (error) - return "fieldStats." + error; - } - } + 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.exampleCount != null && message.hasOwnProperty("exampleCount")) + if (!$util.isInteger(message.exampleCount)) + return "exampleCount: integer expected"; return null; }; /** - * Creates a StructStats message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.StructStats} StructStats + * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec */ - StructStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.StructStats) + AnnotationSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.AnnotationSpec) return object; - var message = new $root.google.cloud.automl.v1beta1.StructStats(); - if (object.fieldStats) { - if (typeof object.fieldStats !== "object") - throw TypeError(".google.cloud.automl.v1beta1.StructStats.fieldStats: object expected"); - message.fieldStats = {}; - for (var keys = Object.keys(object.fieldStats), i = 0; i < keys.length; ++i) { - if (typeof object.fieldStats[keys[i]] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.StructStats.fieldStats: object expected"); - message.fieldStats[keys[i]] = $root.google.cloud.automl.v1beta1.DataStats.fromObject(object.fieldStats[keys[i]]); - } - } + var message = new $root.google.cloud.automl.v1beta1.AnnotationSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.exampleCount != null) + message.exampleCount = object.exampleCount | 0; return message; }; /** - * Creates a plain object from a StructStats message. Also converts values to other types if specified. + * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @static - * @param {google.cloud.automl.v1beta1.StructStats} message StructStats + * @param {google.cloud.automl.v1beta1.AnnotationSpec} message AnnotationSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StructStats.toObject = function toObject(message, options) { + AnnotationSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fieldStats = {}; - var keys2; - if (message.fieldStats && (keys2 = Object.keys(message.fieldStats)).length) { - object.fieldStats = {}; - for (var j = 0; j < keys2.length; ++j) - object.fieldStats[keys2[j]] = $root.google.cloud.automl.v1beta1.DataStats.toObject(message.fieldStats[keys2[j]], options); + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.exampleCount = 0; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) + object.exampleCount = message.exampleCount; return object; }; /** - * Converts this StructStats to JSON. + * Converts this AnnotationSpec to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.StructStats + * @memberof google.cloud.automl.v1beta1.AnnotationSpec * @instance * @returns {Object.} JSON object */ - StructStats.prototype.toJSON = function toJSON() { + AnnotationSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StructStats; + return AnnotationSpec; })(); - v1beta1.CategoryStats = (function() { + v1beta1.Dataset = (function() { /** - * Properties of a CategoryStats. + * Properties of a Dataset. * @memberof google.cloud.automl.v1beta1 - * @interface ICategoryStats - * @property {Array.|null} [topCategoryStats] CategoryStats topCategoryStats + * @interface IDataset + * @property {google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null} [translationDatasetMetadata] Dataset translationDatasetMetadata + * @property {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null} [imageClassificationDatasetMetadata] Dataset imageClassificationDatasetMetadata + * @property {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null} [textClassificationDatasetMetadata] Dataset textClassificationDatasetMetadata + * @property {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null} [imageObjectDetectionDatasetMetadata] Dataset imageObjectDetectionDatasetMetadata + * @property {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null} [videoClassificationDatasetMetadata] Dataset videoClassificationDatasetMetadata + * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null} [videoObjectTrackingDatasetMetadata] Dataset videoObjectTrackingDatasetMetadata + * @property {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null} [textExtractionDatasetMetadata] Dataset textExtractionDatasetMetadata + * @property {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null} [textSentimentDatasetMetadata] Dataset textSentimentDatasetMetadata + * @property {google.cloud.automl.v1beta1.ITablesDatasetMetadata|null} [tablesDatasetMetadata] Dataset tablesDatasetMetadata + * @property {string|null} [name] Dataset name + * @property {string|null} [displayName] Dataset displayName + * @property {string|null} [description] Dataset description + * @property {number|null} [exampleCount] Dataset exampleCount + * @property {google.protobuf.ITimestamp|null} [createTime] Dataset createTime + * @property {string|null} [etag] Dataset etag */ /** - * Constructs a new CategoryStats. + * Constructs a new Dataset. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a CategoryStats. - * @implements ICategoryStats + * @classdesc Represents a Dataset. + * @implements IDataset * @constructor - * @param {google.cloud.automl.v1beta1.ICategoryStats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDataset=} [properties] Properties to set */ - function CategoryStats(properties) { - this.topCategoryStats = []; + function Dataset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38694,78 +40453,271 @@ } /** - * CategoryStats topCategoryStats. - * @member {Array.} topCategoryStats - * @memberof google.cloud.automl.v1beta1.CategoryStats + * Dataset translationDatasetMetadata. + * @member {google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null|undefined} translationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset * @instance */ - CategoryStats.prototype.topCategoryStats = $util.emptyArray; + Dataset.prototype.translationDatasetMetadata = null; /** - * Creates a new CategoryStats instance using the specified properties. + * Dataset imageClassificationDatasetMetadata. + * @member {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null|undefined} imageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.imageClassificationDatasetMetadata = null; + + /** + * Dataset textClassificationDatasetMetadata. + * @member {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null|undefined} textClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.textClassificationDatasetMetadata = null; + + /** + * Dataset imageObjectDetectionDatasetMetadata. + * @member {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null|undefined} imageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.imageObjectDetectionDatasetMetadata = null; + + /** + * Dataset videoClassificationDatasetMetadata. + * @member {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null|undefined} videoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.videoClassificationDatasetMetadata = null; + + /** + * Dataset videoObjectTrackingDatasetMetadata. + * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null|undefined} videoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.videoObjectTrackingDatasetMetadata = null; + + /** + * Dataset textExtractionDatasetMetadata. + * @member {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null|undefined} textExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.textExtractionDatasetMetadata = null; + + /** + * Dataset textSentimentDatasetMetadata. + * @member {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null|undefined} textSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.textSentimentDatasetMetadata = null; + + /** + * Dataset tablesDatasetMetadata. + * @member {google.cloud.automl.v1beta1.ITablesDatasetMetadata|null|undefined} tablesDatasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.tablesDatasetMetadata = null; + + /** + * Dataset name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.name = ""; + + /** + * Dataset displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.displayName = ""; + + /** + * Dataset description. + * @member {string} description + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.description = ""; + + /** + * Dataset exampleCount. + * @member {number} exampleCount + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.exampleCount = 0; + + /** + * Dataset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.createTime = null; + + /** + * Dataset etag. + * @member {string} etag + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Dataset.prototype.etag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Dataset datasetMetadata. + * @member {"translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"videoClassificationDatasetMetadata"|"videoObjectTrackingDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"|"tablesDatasetMetadata"|undefined} datasetMetadata + * @memberof google.cloud.automl.v1beta1.Dataset + * @instance + */ + Object.defineProperty(Dataset.prototype, "datasetMetadata", { + get: $util.oneOfGetter($oneOfFields = ["translationDatasetMetadata", "imageClassificationDatasetMetadata", "textClassificationDatasetMetadata", "imageObjectDetectionDatasetMetadata", "videoClassificationDatasetMetadata", "videoObjectTrackingDatasetMetadata", "textExtractionDatasetMetadata", "textSentimentDatasetMetadata", "tablesDatasetMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Dataset instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static - * @param {google.cloud.automl.v1beta1.ICategoryStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats instance + * @param {google.cloud.automl.v1beta1.IDataset=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Dataset} Dataset instance */ - CategoryStats.create = function create(properties) { - return new CategoryStats(properties); + Dataset.create = function create(properties) { + return new Dataset(properties); }; /** - * Encodes the specified CategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. + * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static - * @param {google.cloud.automl.v1beta1.ICategoryStats} message CategoryStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDataset} message Dataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CategoryStats.encode = function encode(message, writer) { + Dataset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.topCategoryStats != null && message.topCategoryStats.length) - for (var i = 0; i < message.topCategoryStats.length; ++i) - $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.encode(message.topCategoryStats[i], writer.uint32(/* id 1, wireType 2 =*/10).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.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.etag); + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.exampleCount); + if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) + $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.encode(message.translationDatasetMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) + $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.encode(message.imageClassificationDatasetMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) + $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.encode(message.textClassificationDatasetMetadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) + $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.encode(message.imageObjectDetectionDatasetMetadata, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) + $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.encode(message.textExtractionDatasetMetadata, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.videoObjectTrackingDatasetMetadata != null && message.hasOwnProperty("videoObjectTrackingDatasetMetadata")) + $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.encode(message.videoObjectTrackingDatasetMetadata, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) + $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.encode(message.textSentimentDatasetMetadata, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.videoClassificationDatasetMetadata != null && message.hasOwnProperty("videoClassificationDatasetMetadata")) + $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.encode(message.videoClassificationDatasetMetadata, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.tablesDatasetMetadata != null && message.hasOwnProperty("tablesDatasetMetadata")) + $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.encode(message.tablesDatasetMetadata, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); return writer; }; /** - * Encodes the specified CategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.verify|verify} messages. + * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static - * @param {google.cloud.automl.v1beta1.ICategoryStats} message CategoryStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDataset} message Dataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CategoryStats.encodeDelimited = function encodeDelimited(message, writer) { + Dataset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CategoryStats message from the specified reader or buffer. + * Decodes a Dataset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats + * @returns {google.cloud.automl.v1beta1.Dataset} Dataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CategoryStats.decode = function decode(reader, length) { + Dataset.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.automl.v1beta1.CategoryStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.Dataset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 23: + message.translationDatasetMetadata = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.decode(reader, reader.uint32()); + break; + case 24: + message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.decode(reader, reader.uint32()); + break; + case 25: + message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.decode(reader, reader.uint32()); + break; + case 26: + message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.decode(reader, reader.uint32()); + break; + case 31: + message.videoClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.decode(reader, reader.uint32()); + break; + case 29: + message.videoObjectTrackingDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.decode(reader, reader.uint32()); + break; + case 28: + message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.decode(reader, reader.uint32()); + break; + case 30: + message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.decode(reader, reader.uint32()); + break; + case 33: + message.tablesDatasetMetadata = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.decode(reader, reader.uint32()); + break; case 1: - if (!(message.topCategoryStats && message.topCategoryStats.length)) - message.topCategoryStats = []; - message.topCategoryStats.push($root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 21: + message.exampleCount = reader.int32(); + break; + case 14: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 17: + message.etag = reader.string(); break; default: reader.skipType(tag & 7); @@ -38776,348 +40728,332 @@ }; /** - * Decodes a CategoryStats message from the specified reader or buffer, length delimited. + * Decodes a Dataset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats + * @returns {google.cloud.automl.v1beta1.Dataset} Dataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CategoryStats.decodeDelimited = function decodeDelimited(reader) { + Dataset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CategoryStats message. + * Verifies a Dataset message. * @function verify - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CategoryStats.verify = function verify(message) { + Dataset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.topCategoryStats != null && message.hasOwnProperty("topCategoryStats")) { - if (!Array.isArray(message.topCategoryStats)) - return "topCategoryStats: array expected"; - for (var i = 0; i < message.topCategoryStats.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify(message.topCategoryStats[i]); + var properties = {}; + if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify(message.translationDatasetMetadata); if (error) - return "topCategoryStats." + error; + return "translationDatasetMetadata." + error; + } + } + if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify(message.imageClassificationDatasetMetadata); + if (error) + return "imageClassificationDatasetMetadata." + error; + } + } + if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify(message.textClassificationDatasetMetadata); + if (error) + return "textClassificationDatasetMetadata." + error; + } + } + if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify(message.imageObjectDetectionDatasetMetadata); + if (error) + return "imageObjectDetectionDatasetMetadata." + error; + } + } + if (message.videoClassificationDatasetMetadata != null && message.hasOwnProperty("videoClassificationDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify(message.videoClassificationDatasetMetadata); + if (error) + return "videoClassificationDatasetMetadata." + error; + } + } + if (message.videoObjectTrackingDatasetMetadata != null && message.hasOwnProperty("videoObjectTrackingDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify(message.videoObjectTrackingDatasetMetadata); + if (error) + return "videoObjectTrackingDatasetMetadata." + error; + } + } + if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify(message.textExtractionDatasetMetadata); + if (error) + return "textExtractionDatasetMetadata." + error; + } + } + if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify(message.textSentimentDatasetMetadata); + if (error) + return "textSentimentDatasetMetadata." + error; + } + } + if (message.tablesDatasetMetadata != null && message.hasOwnProperty("tablesDatasetMetadata")) { + if (properties.datasetMetadata === 1) + return "datasetMetadata: multiple values"; + properties.datasetMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.verify(message.tablesDatasetMetadata); + if (error) + return "tablesDatasetMetadata." + error; } } + 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.exampleCount != null && message.hasOwnProperty("exampleCount")) + if (!$util.isInteger(message.exampleCount)) + return "exampleCount: integer expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates a CategoryStats message from a plain object. Also converts values to their respective internal types. + * Creates a Dataset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.CategoryStats} CategoryStats + * @returns {google.cloud.automl.v1beta1.Dataset} Dataset */ - CategoryStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.CategoryStats) + Dataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Dataset) return object; - var message = new $root.google.cloud.automl.v1beta1.CategoryStats(); - if (object.topCategoryStats) { - if (!Array.isArray(object.topCategoryStats)) - throw TypeError(".google.cloud.automl.v1beta1.CategoryStats.topCategoryStats: array expected"); - message.topCategoryStats = []; - for (var i = 0; i < object.topCategoryStats.length; ++i) { - if (typeof object.topCategoryStats[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.CategoryStats.topCategoryStats: object expected"); - message.topCategoryStats[i] = $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.fromObject(object.topCategoryStats[i]); - } + var message = new $root.google.cloud.automl.v1beta1.Dataset(); + if (object.translationDatasetMetadata != null) { + if (typeof object.translationDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.translationDatasetMetadata: object expected"); + message.translationDatasetMetadata = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.fromObject(object.translationDatasetMetadata); + } + if (object.imageClassificationDatasetMetadata != null) { + if (typeof object.imageClassificationDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.imageClassificationDatasetMetadata: object expected"); + message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.fromObject(object.imageClassificationDatasetMetadata); + } + if (object.textClassificationDatasetMetadata != null) { + if (typeof object.textClassificationDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.textClassificationDatasetMetadata: object expected"); + message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.fromObject(object.textClassificationDatasetMetadata); + } + if (object.imageObjectDetectionDatasetMetadata != null) { + if (typeof object.imageObjectDetectionDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.imageObjectDetectionDatasetMetadata: object expected"); + message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.fromObject(object.imageObjectDetectionDatasetMetadata); + } + if (object.videoClassificationDatasetMetadata != null) { + if (typeof object.videoClassificationDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.videoClassificationDatasetMetadata: object expected"); + message.videoClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.fromObject(object.videoClassificationDatasetMetadata); + } + if (object.videoObjectTrackingDatasetMetadata != null) { + if (typeof object.videoObjectTrackingDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.videoObjectTrackingDatasetMetadata: object expected"); + message.videoObjectTrackingDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.fromObject(object.videoObjectTrackingDatasetMetadata); + } + if (object.textExtractionDatasetMetadata != null) { + if (typeof object.textExtractionDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.textExtractionDatasetMetadata: object expected"); + message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.fromObject(object.textExtractionDatasetMetadata); + } + if (object.textSentimentDatasetMetadata != null) { + if (typeof object.textSentimentDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.textSentimentDatasetMetadata: object expected"); + message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.fromObject(object.textSentimentDatasetMetadata); + } + if (object.tablesDatasetMetadata != null) { + if (typeof object.tablesDatasetMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.tablesDatasetMetadata: object expected"); + message.tablesDatasetMetadata = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.fromObject(object.tablesDatasetMetadata); + } + 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.exampleCount != null) + message.exampleCount = object.exampleCount | 0; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Dataset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a CategoryStats message. Also converts values to other types if specified. + * Creates a plain object from a Dataset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @static - * @param {google.cloud.automl.v1beta1.CategoryStats} message CategoryStats + * @param {google.cloud.automl.v1beta1.Dataset} message Dataset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CategoryStats.toObject = function toObject(message, options) { + Dataset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.topCategoryStats = []; - if (message.topCategoryStats && message.topCategoryStats.length) { - object.topCategoryStats = []; - for (var j = 0; j < message.topCategoryStats.length; ++j) - object.topCategoryStats[j] = $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.toObject(message.topCategoryStats[j], options); + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.etag = ""; + object.exampleCount = 0; + } + 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.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) + object.exampleCount = message.exampleCount; + if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { + object.translationDatasetMetadata = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.toObject(message.translationDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "translationDatasetMetadata"; + } + if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { + object.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.toObject(message.imageClassificationDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "imageClassificationDatasetMetadata"; + } + if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { + object.textClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.toObject(message.textClassificationDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "textClassificationDatasetMetadata"; + } + if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { + object.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.toObject(message.imageObjectDetectionDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "imageObjectDetectionDatasetMetadata"; + } + if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { + object.textExtractionDatasetMetadata = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.toObject(message.textExtractionDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "textExtractionDatasetMetadata"; + } + if (message.videoObjectTrackingDatasetMetadata != null && message.hasOwnProperty("videoObjectTrackingDatasetMetadata")) { + object.videoObjectTrackingDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.toObject(message.videoObjectTrackingDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "videoObjectTrackingDatasetMetadata"; + } + if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { + object.textSentimentDatasetMetadata = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.toObject(message.textSentimentDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "textSentimentDatasetMetadata"; + } + if (message.videoClassificationDatasetMetadata != null && message.hasOwnProperty("videoClassificationDatasetMetadata")) { + object.videoClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.toObject(message.videoClassificationDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "videoClassificationDatasetMetadata"; + } + if (message.tablesDatasetMetadata != null && message.hasOwnProperty("tablesDatasetMetadata")) { + object.tablesDatasetMetadata = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.toObject(message.tablesDatasetMetadata, options); + if (options.oneofs) + object.datasetMetadata = "tablesDatasetMetadata"; } return object; }; /** - * Converts this CategoryStats to JSON. + * Converts this Dataset to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.CategoryStats + * @memberof google.cloud.automl.v1beta1.Dataset * @instance * @returns {Object.} JSON object */ - CategoryStats.prototype.toJSON = function toJSON() { + Dataset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - CategoryStats.SingleCategoryStats = (function() { - - /** - * Properties of a SingleCategoryStats. - * @memberof google.cloud.automl.v1beta1.CategoryStats - * @interface ISingleCategoryStats - * @property {string|null} [value] SingleCategoryStats value - * @property {number|Long|null} [count] SingleCategoryStats count - */ - - /** - * Constructs a new SingleCategoryStats. - * @memberof google.cloud.automl.v1beta1.CategoryStats - * @classdesc Represents a SingleCategoryStats. - * @implements ISingleCategoryStats - * @constructor - * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats=} [properties] Properties to set - */ - function SingleCategoryStats(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]]; - } - - /** - * SingleCategoryStats value. - * @member {string} value - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @instance - */ - SingleCategoryStats.prototype.value = ""; - - /** - * SingleCategoryStats count. - * @member {number|Long} count - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @instance - */ - SingleCategoryStats.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new SingleCategoryStats instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats instance - */ - SingleCategoryStats.create = function create(properties) { - return new SingleCategoryStats(properties); - }; - - /** - * Encodes the specified SingleCategoryStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats} message SingleCategoryStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleCategoryStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.count != null && message.hasOwnProperty("count")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); - return writer; - }; - - /** - * Encodes the specified SingleCategoryStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {google.cloud.automl.v1beta1.CategoryStats.ISingleCategoryStats} message SingleCategoryStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleCategoryStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SingleCategoryStats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleCategoryStats.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.automl.v1beta1.CategoryStats.SingleCategoryStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; - case 2: - message.count = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SingleCategoryStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleCategoryStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SingleCategoryStats message. - * @function verify - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SingleCategoryStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; - - /** - * Creates a SingleCategoryStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} SingleCategoryStats - */ - SingleCategoryStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) - return object; - var message = new $root.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats(); - if (object.value != null) - message.value = String(object.value); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SingleCategoryStats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @static - * @param {google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} message SingleCategoryStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SingleCategoryStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; - - /** - * Converts this SingleCategoryStats to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - * @instance - * @returns {Object.} JSON object - */ - SingleCategoryStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SingleCategoryStats; - })(); - - return CategoryStats; + return Dataset; })(); - v1beta1.CorrelationStats = (function() { + v1beta1.ImageClassificationDatasetMetadata = (function() { /** - * Properties of a CorrelationStats. + * Properties of an ImageClassificationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ICorrelationStats - * @property {number|null} [cramersV] CorrelationStats cramersV + * @interface IImageClassificationDatasetMetadata + * @property {google.cloud.automl.v1beta1.ClassificationType|null} [classificationType] ImageClassificationDatasetMetadata classificationType */ /** - * Constructs a new CorrelationStats. + * Constructs a new ImageClassificationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a CorrelationStats. - * @implements ICorrelationStats + * @classdesc Represents an ImageClassificationDatasetMetadata. + * @implements IImageClassificationDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ICorrelationStats=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata=} [properties] Properties to set */ - function CorrelationStats(properties) { + function ImageClassificationDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39125,75 +41061,75 @@ } /** - * CorrelationStats cramersV. - * @member {number} cramersV - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * ImageClassificationDatasetMetadata classificationType. + * @member {google.cloud.automl.v1beta1.ClassificationType} classificationType + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @instance */ - CorrelationStats.prototype.cramersV = 0; + ImageClassificationDatasetMetadata.prototype.classificationType = 0; /** - * Creates a new CorrelationStats instance using the specified properties. + * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.ICorrelationStats=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats instance + * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata instance */ - CorrelationStats.create = function create(properties) { - return new CorrelationStats(properties); + ImageClassificationDatasetMetadata.create = function create(properties) { + return new ImageClassificationDatasetMetadata(properties); }; /** - * Encodes the specified CorrelationStats message. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. + * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.ICorrelationStats} message CorrelationStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CorrelationStats.encode = function encode(message, writer) { + ImageClassificationDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cramersV != null && message.hasOwnProperty("cramersV")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.cramersV); + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); return writer; }; /** - * Encodes the specified CorrelationStats message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CorrelationStats.verify|verify} messages. + * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.ICorrelationStats} message CorrelationStats message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CorrelationStats.encodeDelimited = function encodeDelimited(message, writer) { + ImageClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CorrelationStats message from the specified reader or buffer. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats + * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CorrelationStats.decode = function decode(reader, length) { + ImageClassificationDatasetMetadata.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.automl.v1beta1.CorrelationStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cramersV = reader.double(); + message.classificationType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -39204,135 +41140,124 @@ }; /** - * Decodes a CorrelationStats message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats + * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CorrelationStats.decodeDelimited = function decodeDelimited(reader) { + ImageClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CorrelationStats message. + * Verifies an ImageClassificationDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CorrelationStats.verify = function verify(message) { + ImageClassificationDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cramersV != null && message.hasOwnProperty("cramersV")) - if (typeof message.cramersV !== "number") - return "cramersV: number expected"; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + switch (message.classificationType) { + default: + return "classificationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a CorrelationStats message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.CorrelationStats} CorrelationStats + * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata */ - CorrelationStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.CorrelationStats) + ImageClassificationDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.CorrelationStats(); - if (object.cramersV != null) - message.cramersV = Number(object.cramersV); + var message = new $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata(); + switch (object.classificationType) { + case "CLASSIFICATION_TYPE_UNSPECIFIED": + case 0: + message.classificationType = 0; + break; + case "MULTICLASS": + case 1: + message.classificationType = 1; + break; + case "MULTILABEL": + case 2: + message.classificationType = 2; + break; + } return message; }; /** - * Creates a plain object from a CorrelationStats message. Also converts values to other types if specified. + * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.CorrelationStats} message CorrelationStats + * @param {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CorrelationStats.toObject = function toObject(message, options) { + ImageClassificationDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.cramersV = 0; - if (message.cramersV != null && message.hasOwnProperty("cramersV")) - object.cramersV = options.json && !isFinite(message.cramersV) ? String(message.cramersV) : message.cramersV; + object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; return object; }; /** - * Converts this CorrelationStats to JSON. + * Converts this ImageClassificationDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.CorrelationStats + * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata * @instance * @returns {Object.} JSON object */ - CorrelationStats.prototype.toJSON = function toJSON() { + ImageClassificationDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CorrelationStats; - })(); - - /** - * TypeCode enum. - * @name google.cloud.automl.v1beta1.TypeCode - * @enum {string} - * @property {number} TYPE_CODE_UNSPECIFIED=0 TYPE_CODE_UNSPECIFIED value - * @property {number} FLOAT64=3 FLOAT64 value - * @property {number} TIMESTAMP=4 TIMESTAMP value - * @property {number} STRING=6 STRING value - * @property {number} ARRAY=8 ARRAY value - * @property {number} STRUCT=9 STRUCT value - * @property {number} CATEGORY=10 CATEGORY value - */ - v1beta1.TypeCode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_CODE_UNSPECIFIED"] = 0; - values[valuesById[3] = "FLOAT64"] = 3; - values[valuesById[4] = "TIMESTAMP"] = 4; - values[valuesById[6] = "STRING"] = 6; - values[valuesById[8] = "ARRAY"] = 8; - values[valuesById[9] = "STRUCT"] = 9; - values[valuesById[10] = "CATEGORY"] = 10; - return values; + return ImageClassificationDatasetMetadata; })(); - v1beta1.DataType = (function() { + v1beta1.ImageObjectDetectionDatasetMetadata = (function() { /** - * Properties of a DataType. + * Properties of an ImageObjectDetectionDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IDataType - * @property {google.cloud.automl.v1beta1.IDataType|null} [listElementType] DataType listElementType - * @property {google.cloud.automl.v1beta1.IStructType|null} [structType] DataType structType - * @property {string|null} [timeFormat] DataType timeFormat - * @property {google.cloud.automl.v1beta1.TypeCode|null} [typeCode] DataType typeCode - * @property {boolean|null} [nullable] DataType nullable + * @interface IImageObjectDetectionDatasetMetadata */ /** - * Constructs a new DataType. + * Constructs a new ImageObjectDetectionDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DataType. - * @implements IDataType + * @classdesc Represents an ImageObjectDetectionDatasetMetadata. + * @implements IImageObjectDetectionDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IDataType=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set */ - function DataType(properties) { + function ImageObjectDetectionDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39340,142 +41265,63 @@ } /** - * DataType listElementType. - * @member {google.cloud.automl.v1beta1.IDataType|null|undefined} listElementType - * @memberof google.cloud.automl.v1beta1.DataType - * @instance - */ - DataType.prototype.listElementType = null; - - /** - * DataType structType. - * @member {google.cloud.automl.v1beta1.IStructType|null|undefined} structType - * @memberof google.cloud.automl.v1beta1.DataType - * @instance - */ - DataType.prototype.structType = null; - - /** - * DataType timeFormat. - * @member {string} timeFormat - * @memberof google.cloud.automl.v1beta1.DataType - * @instance - */ - DataType.prototype.timeFormat = ""; - - /** - * DataType typeCode. - * @member {google.cloud.automl.v1beta1.TypeCode} typeCode - * @memberof google.cloud.automl.v1beta1.DataType - * @instance - */ - DataType.prototype.typeCode = 0; - - /** - * DataType nullable. - * @member {boolean} nullable - * @memberof google.cloud.automl.v1beta1.DataType - * @instance - */ - DataType.prototype.nullable = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataType details. - * @member {"listElementType"|"structType"|"timeFormat"|undefined} details - * @memberof google.cloud.automl.v1beta1.DataType - * @instance - */ - Object.defineProperty(DataType.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["listElementType", "structType", "timeFormat"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataType instance using the specified properties. + * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDataType=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DataType} DataType instance + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata instance */ - DataType.create = function create(properties) { - return new DataType(properties); + ImageObjectDetectionDatasetMetadata.create = function create(properties) { + return new ImageObjectDetectionDatasetMetadata(properties); }; /** - * Encodes the specified DataType message. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. + * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDataType} message DataType message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataType.encode = function encode(message, writer) { + ImageObjectDetectionDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.typeCode != null && message.hasOwnProperty("typeCode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.typeCode); - if (message.listElementType != null && message.hasOwnProperty("listElementType")) - $root.google.cloud.automl.v1beta1.DataType.encode(message.listElementType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.structType != null && message.hasOwnProperty("structType")) - $root.google.cloud.automl.v1beta1.StructType.encode(message.structType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.nullable != null && message.hasOwnProperty("nullable")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nullable); - if (message.timeFormat != null && message.hasOwnProperty("timeFormat")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeFormat); return writer; }; /** - * Encodes the specified DataType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DataType.verify|verify} messages. + * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDataType} message DataType message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataType.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataType message from the specified reader or buffer. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DataType} DataType + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataType.decode = function decode(reader, length) { + ImageObjectDetectionDatasetMetadata.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.automl.v1beta1.DataType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.listElementType = $root.google.cloud.automl.v1beta1.DataType.decode(reader, reader.uint32()); - break; - case 3: - message.structType = $root.google.cloud.automl.v1beta1.StructType.decode(reader, reader.uint32()); - break; - case 5: - message.timeFormat = reader.string(); - break; - case 1: - message.typeCode = reader.int32(); - break; - case 4: - message.nullable = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -39485,208 +41331,100 @@ }; /** - * Decodes a DataType message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DataType} DataType + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataType.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataType message. + * Verifies an ImageObjectDetectionDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataType.verify = function verify(message) { + ImageObjectDetectionDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.listElementType != null && message.hasOwnProperty("listElementType")) { - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.DataType.verify(message.listElementType); - if (error) - return "listElementType." + error; - } - } - if (message.structType != null && message.hasOwnProperty("structType")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.StructType.verify(message.structType); - if (error) - return "structType." + error; - } - } - if (message.timeFormat != null && message.hasOwnProperty("timeFormat")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - if (!$util.isString(message.timeFormat)) - return "timeFormat: string expected"; - } - if (message.typeCode != null && message.hasOwnProperty("typeCode")) - switch (message.typeCode) { - default: - return "typeCode: enum value expected"; - case 0: - case 3: - case 4: - case 6: - case 8: - case 9: - case 10: - break; - } - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; return null; }; /** - * Creates a DataType message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DataType} DataType + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata */ - DataType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DataType) + ImageObjectDetectionDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.DataType(); - if (object.listElementType != null) { - if (typeof object.listElementType !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataType.listElementType: object expected"); - message.listElementType = $root.google.cloud.automl.v1beta1.DataType.fromObject(object.listElementType); - } - if (object.structType != null) { - if (typeof object.structType !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DataType.structType: object expected"); - message.structType = $root.google.cloud.automl.v1beta1.StructType.fromObject(object.structType); - } - if (object.timeFormat != null) - message.timeFormat = String(object.timeFormat); - switch (object.typeCode) { - case "TYPE_CODE_UNSPECIFIED": - case 0: - message.typeCode = 0; - break; - case "FLOAT64": - case 3: - message.typeCode = 3; - break; - case "TIMESTAMP": - case 4: - message.typeCode = 4; - break; - case "STRING": - case 6: - message.typeCode = 6; - break; - case "ARRAY": - case 8: - message.typeCode = 8; - break; - case "STRUCT": - case 9: - message.typeCode = 9; - break; - case "CATEGORY": - case 10: - message.typeCode = 10; - break; - } - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - return message; + return new $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata(); }; /** - * Creates a plain object from a DataType message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.DataType} message DataType + * @param {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.typeCode = options.enums === String ? "TYPE_CODE_UNSPECIFIED" : 0; - object.nullable = false; - } - if (message.typeCode != null && message.hasOwnProperty("typeCode")) - object.typeCode = options.enums === String ? $root.google.cloud.automl.v1beta1.TypeCode[message.typeCode] : message.typeCode; - if (message.listElementType != null && message.hasOwnProperty("listElementType")) { - object.listElementType = $root.google.cloud.automl.v1beta1.DataType.toObject(message.listElementType, options); - if (options.oneofs) - object.details = "listElementType"; - } - if (message.structType != null && message.hasOwnProperty("structType")) { - object.structType = $root.google.cloud.automl.v1beta1.StructType.toObject(message.structType, options); - if (options.oneofs) - object.details = "structType"; - } - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.timeFormat != null && message.hasOwnProperty("timeFormat")) { - object.timeFormat = message.timeFormat; - if (options.oneofs) - object.details = "timeFormat"; - } - return object; + ImageObjectDetectionDatasetMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this DataType to JSON. + * Converts this ImageObjectDetectionDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DataType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata * @instance * @returns {Object.} JSON object */ - DataType.prototype.toJSON = function toJSON() { + ImageObjectDetectionDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DataType; + return ImageObjectDetectionDatasetMetadata; })(); - v1beta1.StructType = (function() { + v1beta1.ImageClassificationModelMetadata = (function() { /** - * Properties of a StructType. + * Properties of an ImageClassificationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IStructType - * @property {Object.|null} [fields] StructType fields + * @interface IImageClassificationModelMetadata + * @property {string|null} [baseModelId] ImageClassificationModelMetadata baseModelId + * @property {number|Long|null} [trainBudget] ImageClassificationModelMetadata trainBudget + * @property {number|Long|null} [trainCost] ImageClassificationModelMetadata trainCost + * @property {string|null} [stopReason] ImageClassificationModelMetadata stopReason + * @property {string|null} [modelType] ImageClassificationModelMetadata modelType + * @property {number|null} [nodeQps] ImageClassificationModelMetadata nodeQps + * @property {number|Long|null} [nodeCount] ImageClassificationModelMetadata nodeCount */ /** - * Constructs a new StructType. + * Constructs a new ImageClassificationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a StructType. - * @implements IStructType + * @classdesc Represents an ImageClassificationModelMetadata. + * @implements IImageClassificationModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IStructType=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata=} [properties] Properties to set */ - function StructType(properties) { - this.fields = {}; + function ImageClassificationModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39694,83 +41432,153 @@ } /** - * StructType fields. - * @member {Object.} fields - * @memberof google.cloud.automl.v1beta1.StructType + * ImageClassificationModelMetadata baseModelId. + * @member {string} baseModelId + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @instance */ - StructType.prototype.fields = $util.emptyObject; + ImageClassificationModelMetadata.prototype.baseModelId = ""; /** - * Creates a new StructType instance using the specified properties. + * ImageClassificationModelMetadata trainBudget. + * @member {number|Long} trainBudget + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.trainBudget = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImageClassificationModelMetadata trainCost. + * @member {number|Long} trainCost + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.trainCost = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImageClassificationModelMetadata stopReason. + * @member {string} stopReason + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.stopReason = ""; + + /** + * ImageClassificationModelMetadata modelType. + * @member {string} modelType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.modelType = ""; + + /** + * ImageClassificationModelMetadata nodeQps. + * @member {number} nodeQps + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.nodeQps = 0; + + /** + * ImageClassificationModelMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * @instance + */ + ImageClassificationModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImageClassificationModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IStructType=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.StructType} StructType instance + * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata instance */ - StructType.create = function create(properties) { - return new StructType(properties); + ImageClassificationModelMetadata.create = function create(properties) { + return new ImageClassificationModelMetadata(properties); }; /** - * Encodes the specified StructType message. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. + * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IStructType} message StructType message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StructType.encode = function encode(message, writer) { + ImageClassificationModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.hasOwnProperty("fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.automl.v1beta1.DataType.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModelId); + if (message.trainBudget != null && message.hasOwnProperty("trainBudget")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.trainBudget); + if (message.trainCost != null && message.hasOwnProperty("trainCost")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.trainCost); + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); + if (message.modelType != null && message.hasOwnProperty("modelType")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.modelType); + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + writer.uint32(/* id 13, wireType 1 =*/105).double(message.nodeQps); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 14, wireType 0 =*/112).int64(message.nodeCount); return writer; }; /** - * Encodes the specified StructType message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.StructType.verify|verify} messages. + * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IStructType} message StructType message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StructType.encodeDelimited = function encodeDelimited(message, writer) { + ImageClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StructType message from the specified reader or buffer. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.StructType} StructType + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StructType.decode = function decode(reader, length) { + ImageClassificationModelMetadata.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.automl.v1beta1.StructType(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.fields === $util.emptyObject) - message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.cloud.automl.v1beta1.DataType.decode(reader, reader.uint32()); + message.baseModelId = reader.string(); + break; + case 2: + message.trainBudget = reader.int64(); + break; + case 3: + message.trainCost = reader.int64(); + break; + case 5: + message.stopReason = reader.string(); + break; + case 7: + message.modelType = reader.string(); + break; + case 13: + message.nodeQps = reader.double(); + break; + case 14: + message.nodeCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -39781,128 +41589,203 @@ }; /** - * Decodes a StructType message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.StructType} StructType + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StructType.decodeDelimited = function decodeDelimited(reader) { + ImageClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StructType message. + * Verifies an ImageClassificationModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StructType.verify = function verify(message) { + ImageClassificationModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.automl.v1beta1.DataType.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + if (!$util.isString(message.baseModelId)) + return "baseModelId: string expected"; + if (message.trainBudget != null && message.hasOwnProperty("trainBudget")) + if (!$util.isInteger(message.trainBudget) && !(message.trainBudget && $util.isInteger(message.trainBudget.low) && $util.isInteger(message.trainBudget.high))) + return "trainBudget: integer|Long expected"; + if (message.trainCost != null && message.hasOwnProperty("trainCost")) + if (!$util.isInteger(message.trainCost) && !(message.trainCost && $util.isInteger(message.trainCost.low) && $util.isInteger(message.trainCost.high))) + return "trainCost: integer|Long expected"; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + if (!$util.isString(message.stopReason)) + return "stopReason: string expected"; + if (message.modelType != null && message.hasOwnProperty("modelType")) + if (!$util.isString(message.modelType)) + return "modelType: string expected"; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + if (typeof message.nodeQps !== "number") + return "nodeQps: number expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; return null; }; /** - * Creates a StructType message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.StructType} StructType + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata */ - StructType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.StructType) + ImageClassificationModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.StructType(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.cloud.automl.v1beta1.StructType.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.automl.v1beta1.StructType.fields: object expected"); - message.fields[keys[i]] = $root.google.cloud.automl.v1beta1.DataType.fromObject(object.fields[keys[i]]); - } - } + var message = new $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata(); + if (object.baseModelId != null) + message.baseModelId = String(object.baseModelId); + if (object.trainBudget != null) + if ($util.Long) + (message.trainBudget = $util.Long.fromValue(object.trainBudget)).unsigned = false; + else if (typeof object.trainBudget === "string") + message.trainBudget = parseInt(object.trainBudget, 10); + else if (typeof object.trainBudget === "number") + message.trainBudget = object.trainBudget; + else if (typeof object.trainBudget === "object") + message.trainBudget = new $util.LongBits(object.trainBudget.low >>> 0, object.trainBudget.high >>> 0).toNumber(); + if (object.trainCost != null) + if ($util.Long) + (message.trainCost = $util.Long.fromValue(object.trainCost)).unsigned = false; + else if (typeof object.trainCost === "string") + message.trainCost = parseInt(object.trainCost, 10); + else if (typeof object.trainCost === "number") + message.trainCost = object.trainCost; + else if (typeof object.trainCost === "object") + message.trainCost = new $util.LongBits(object.trainCost.low >>> 0, object.trainCost.high >>> 0).toNumber(); + if (object.stopReason != null) + message.stopReason = String(object.stopReason); + if (object.modelType != null) + message.modelType = String(object.modelType); + if (object.nodeQps != null) + message.nodeQps = Number(object.nodeQps); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a StructType message. Also converts values to other types if specified. + * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.StructType} message StructType + * @param {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} message ImageClassificationModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StructType.toObject = function toObject(message, options) { + ImageClassificationModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - 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.automl.v1beta1.DataType.toObject(message.fields[keys2[j]], options); + if (options.defaults) { + object.baseModelId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainBudget = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainBudget = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainCost = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainCost = options.longs === String ? "0" : 0; + object.stopReason = ""; + object.modelType = ""; + object.nodeQps = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; } + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + object.baseModelId = message.baseModelId; + if (message.trainBudget != null && message.hasOwnProperty("trainBudget")) + if (typeof message.trainBudget === "number") + object.trainBudget = options.longs === String ? String(message.trainBudget) : message.trainBudget; + else + object.trainBudget = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudget) : options.longs === Number ? new $util.LongBits(message.trainBudget.low >>> 0, message.trainBudget.high >>> 0).toNumber() : message.trainBudget; + if (message.trainCost != null && message.hasOwnProperty("trainCost")) + if (typeof message.trainCost === "number") + object.trainCost = options.longs === String ? String(message.trainCost) : message.trainCost; + else + object.trainCost = options.longs === String ? $util.Long.prototype.toString.call(message.trainCost) : options.longs === Number ? new $util.LongBits(message.trainCost.low >>> 0, message.trainCost.high >>> 0).toNumber() : message.trainCost; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + object.stopReason = message.stopReason; + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = message.modelType; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; return object; }; /** - * Converts this StructType to JSON. + * Converts this ImageClassificationModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.StructType + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata * @instance * @returns {Object.} JSON object */ - StructType.prototype.toJSON = function toJSON() { + ImageClassificationModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StructType; + return ImageClassificationModelMetadata; })(); - v1beta1.Image = (function() { + v1beta1.ImageObjectDetectionModelMetadata = (function() { /** - * Properties of an Image. + * Properties of an ImageObjectDetectionModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IImage - * @property {Uint8Array|null} [imageBytes] Image imageBytes - * @property {google.cloud.automl.v1beta1.IInputConfig|null} [inputConfig] Image inputConfig - * @property {string|null} [thumbnailUri] Image thumbnailUri + * @interface IImageObjectDetectionModelMetadata + * @property {string|null} [modelType] ImageObjectDetectionModelMetadata modelType + * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelMetadata nodeCount + * @property {number|null} [nodeQps] ImageObjectDetectionModelMetadata nodeQps + * @property {string|null} [stopReason] ImageObjectDetectionModelMetadata stopReason + * @property {number|Long|null} [trainBudgetMilliNodeHours] ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours + * @property {number|Long|null} [trainCostMilliNodeHours] ImageObjectDetectionModelMetadata trainCostMilliNodeHours */ /** - * Constructs a new Image. + * Constructs a new ImageObjectDetectionModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an Image. - * @implements IImage + * @classdesc Represents an ImageObjectDetectionModelMetadata. + * @implements IImageObjectDetectionModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IImage=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata=} [properties] Properties to set */ - function Image(properties) { + function ImageObjectDetectionModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39910,115 +41793,140 @@ } /** - * Image imageBytes. - * @member {Uint8Array} imageBytes - * @memberof google.cloud.automl.v1beta1.Image + * ImageObjectDetectionModelMetadata modelType. + * @member {string} modelType + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @instance */ - Image.prototype.imageBytes = $util.newBuffer([]); + ImageObjectDetectionModelMetadata.prototype.modelType = ""; /** - * Image inputConfig. - * @member {google.cloud.automl.v1beta1.IInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1beta1.Image + * ImageObjectDetectionModelMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @instance */ - Image.prototype.inputConfig = null; + ImageObjectDetectionModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Image thumbnailUri. - * @member {string} thumbnailUri - * @memberof google.cloud.automl.v1beta1.Image + * ImageObjectDetectionModelMetadata nodeQps. + * @member {number} nodeQps + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @instance */ - Image.prototype.thumbnailUri = ""; + ImageObjectDetectionModelMetadata.prototype.nodeQps = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ImageObjectDetectionModelMetadata stopReason. + * @member {string} stopReason + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * @instance + */ + ImageObjectDetectionModelMetadata.prototype.stopReason = ""; /** - * Image data. - * @member {"imageBytes"|"inputConfig"|undefined} data - * @memberof google.cloud.automl.v1beta1.Image + * ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. + * @member {number|Long} trainBudgetMilliNodeHours + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @instance */ - Object.defineProperty(Image.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["imageBytes", "inputConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImageObjectDetectionModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Image instance using the specified properties. + * ImageObjectDetectionModelMetadata trainCostMilliNodeHours. + * @member {number|Long} trainCostMilliNodeHours + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * @instance + */ + ImageObjectDetectionModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IImage=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Image} Image instance + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata instance */ - Image.create = function create(properties) { - return new Image(properties); + ImageObjectDetectionModelMetadata.create = function create(properties) { + return new ImageObjectDetectionModelMetadata(properties); }; /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IImage} message Image message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Image.encode = function encode(message, writer) { + ImageObjectDetectionModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.imageBytes); - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUri); - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.modelType != null && message.hasOwnProperty("modelType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.modelType); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.nodeCount); + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.nodeQps); + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.trainBudgetMilliNodeHours); + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.trainCostMilliNodeHours); return writer; }; /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Image.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IImage} message Image message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Image.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Image message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Image} Image + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Image.decode = function decode(reader, length) { + ImageObjectDetectionModelMetadata.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.automl.v1beta1.Image(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.imageBytes = reader.bytes(); + message.modelType = reader.string(); break; - case 6: - message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.decode(reader, reader.uint32()); + case 3: + message.nodeCount = reader.int64(); break; case 4: - message.thumbnailUri = reader.string(); + message.nodeQps = reader.double(); + break; + case 5: + message.stopReason = reader.string(); + break; + case 6: + message.trainBudgetMilliNodeHours = reader.int64(); + break; + case 7: + message.trainCostMilliNodeHours = reader.int64(); break; default: reader.skipType(tag & 7); @@ -40029,145 +41937,190 @@ }; /** - * Decodes an Image message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Image} Image + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Image.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Image message. + * Verifies an ImageObjectDetectionModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Image.verify = function verify(message) { + ImageObjectDetectionModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) { - properties.data = 1; - if (!(message.imageBytes && typeof message.imageBytes.length === "number" || $util.isString(message.imageBytes))) - return "imageBytes: buffer expected"; - } - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.automl.v1beta1.InputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } - } - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - if (!$util.isString(message.thumbnailUri)) - return "thumbnailUri: string expected"; + if (message.modelType != null && message.hasOwnProperty("modelType")) + if (!$util.isString(message.modelType)) + return "modelType: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + if (typeof message.nodeQps !== "number") + return "nodeQps: number expected"; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + if (!$util.isString(message.stopReason)) + return "stopReason: string expected"; + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) + return "trainBudgetMilliNodeHours: integer|Long expected"; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) + return "trainCostMilliNodeHours: integer|Long expected"; return null; }; /** - * Creates an Image message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Image} Image + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata */ - Image.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Image) + ImageObjectDetectionModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.Image(); - if (object.imageBytes != null) - if (typeof object.imageBytes === "string") - $util.base64.decode(object.imageBytes, message.imageBytes = $util.newBuffer($util.base64.length(object.imageBytes)), 0); - else if (object.imageBytes.length) - message.imageBytes = object.imageBytes; - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Image.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.fromObject(object.inputConfig); - } - if (object.thumbnailUri != null) - message.thumbnailUri = String(object.thumbnailUri); + var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata(); + if (object.modelType != null) + message.modelType = String(object.modelType); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); + if (object.nodeQps != null) + message.nodeQps = Number(object.nodeQps); + if (object.stopReason != null) + message.stopReason = String(object.stopReason); + if (object.trainBudgetMilliNodeHours != null) + if ($util.Long) + (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; + else if (typeof object.trainBudgetMilliNodeHours === "string") + message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); + else if (typeof object.trainBudgetMilliNodeHours === "number") + message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; + else if (typeof object.trainBudgetMilliNodeHours === "object") + message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); + if (object.trainCostMilliNodeHours != null) + if ($util.Long) + (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; + else if (typeof object.trainCostMilliNodeHours === "string") + message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); + else if (typeof object.trainCostMilliNodeHours === "number") + message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; + else if (typeof object.trainCostMilliNodeHours === "object") + message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an Image message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @static - * @param {google.cloud.automl.v1beta1.Image} message Image + * @param {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Image.toObject = function toObject(message, options) { + ImageObjectDetectionModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.thumbnailUri = ""; - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) { - object.imageBytes = options.bytes === String ? $util.base64.encode(message.imageBytes, 0, message.imageBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageBytes) : message.imageBytes; - if (options.oneofs) - object.data = "imageBytes"; - } - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - object.thumbnailUri = message.thumbnailUri; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { - object.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.toObject(message.inputConfig, options); - if (options.oneofs) - object.data = "inputConfig"; + if (options.defaults) { + object.modelType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + object.nodeQps = 0; + object.stopReason = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; } + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = message.modelType; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; + if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) + object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + object.stopReason = message.stopReason; + if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) + if (typeof message.trainBudgetMilliNodeHours === "number") + object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; + else + object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; + if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) + if (typeof message.trainCostMilliNodeHours === "number") + object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; + else + object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; return object; }; /** - * Converts this Image to JSON. + * Converts this ImageObjectDetectionModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.Image + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata * @instance * @returns {Object.} JSON object */ - Image.prototype.toJSON = function toJSON() { + ImageObjectDetectionModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Image; + return ImageObjectDetectionModelMetadata; })(); - v1beta1.TextSnippet = (function() { + v1beta1.ImageClassificationModelDeploymentMetadata = (function() { /** - * Properties of a TextSnippet. + * Properties of an ImageClassificationModelDeploymentMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ITextSnippet - * @property {string|null} [content] TextSnippet content - * @property {string|null} [mimeType] TextSnippet mimeType - * @property {string|null} [contentUri] TextSnippet contentUri + * @interface IImageClassificationModelDeploymentMetadata + * @property {number|Long|null} [nodeCount] ImageClassificationModelDeploymentMetadata nodeCount */ /** - * Constructs a new TextSnippet. + * Constructs a new ImageClassificationModelDeploymentMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextSnippet. - * @implements ITextSnippet + * @classdesc Represents an ImageClassificationModelDeploymentMetadata. + * @implements IImageClassificationModelDeploymentMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITextSnippet=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set */ - function TextSnippet(properties) { + function ImageClassificationModelDeploymentMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40175,101 +42128,75 @@ } /** - * TextSnippet content. - * @member {string} content - * @memberof google.cloud.automl.v1beta1.TextSnippet - * @instance - */ - TextSnippet.prototype.content = ""; - - /** - * TextSnippet mimeType. - * @member {string} mimeType - * @memberof google.cloud.automl.v1beta1.TextSnippet - * @instance - */ - TextSnippet.prototype.mimeType = ""; - - /** - * TextSnippet contentUri. - * @member {string} contentUri - * @memberof google.cloud.automl.v1beta1.TextSnippet + * ImageClassificationModelDeploymentMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @instance */ - TextSnippet.prototype.contentUri = ""; + ImageClassificationModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new TextSnippet instance using the specified properties. + * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSnippet=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet instance + * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata instance */ - TextSnippet.create = function create(properties) { - return new TextSnippet(properties); + ImageClassificationModelDeploymentMetadata.create = function create(properties) { + return new ImageClassificationModelDeploymentMetadata(properties); }; /** - * Encodes the specified TextSnippet message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. + * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSnippet} message TextSnippet message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSnippet.encode = function encode(message, writer) { + ImageClassificationModelDeploymentMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); - if (message.contentUri != null && message.hasOwnProperty("contentUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.contentUri); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); return writer; }; /** - * Encodes the specified TextSnippet message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSnippet.verify|verify} messages. + * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSnippet} message TextSnippet message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSnippet.encodeDelimited = function encodeDelimited(message, writer) { + ImageClassificationModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSnippet message from the specified reader or buffer. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSnippet.decode = function decode(reader, length) { + ImageClassificationModelDeploymentMetadata.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.automl.v1beta1.TextSnippet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.content = reader.string(); - break; - case 2: - message.mimeType = reader.string(); - break; - case 4: - message.contentUri = reader.string(); + message.nodeCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -40280,126 +42207,121 @@ }; /** - * Decodes a TextSnippet message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSnippet.decodeDelimited = function decodeDelimited(reader) { + ImageClassificationModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSnippet message. + * Verifies an ImageClassificationModelDeploymentMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSnippet.verify = function verify(message) { + ImageClassificationModelDeploymentMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.contentUri != null && message.hasOwnProperty("contentUri")) - if (!$util.isString(message.contentUri)) - return "contentUri: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; return null; }; /** - * Creates a TextSnippet message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextSnippet} TextSnippet + * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata */ - TextSnippet.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextSnippet) + ImageClassificationModelDeploymentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TextSnippet(); - if (object.content != null) - message.content = String(object.content); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.contentUri != null) - message.contentUri = String(object.contentUri); + var message = new $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata(); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a TextSnippet message. Also converts values to other types if specified. + * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.TextSnippet} message TextSnippet + * @param {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSnippet.toObject = function toObject(message, options) { + ImageClassificationModelDeploymentMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.content = ""; - object.mimeType = ""; - object.contentUri = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.contentUri != null && message.hasOwnProperty("contentUri")) - object.contentUri = message.contentUri; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; return object; }; /** - * Converts this TextSnippet to JSON. + * Converts this ImageClassificationModelDeploymentMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextSnippet + * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata * @instance * @returns {Object.} JSON object */ - TextSnippet.prototype.toJSON = function toJSON() { + ImageClassificationModelDeploymentMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSnippet; + return ImageClassificationModelDeploymentMetadata; })(); - v1beta1.DocumentDimensions = (function() { + v1beta1.ImageObjectDetectionModelDeploymentMetadata = (function() { /** - * Properties of a DocumentDimensions. + * Properties of an ImageObjectDetectionModelDeploymentMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IDocumentDimensions - * @property {google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit|null} [unit] DocumentDimensions unit - * @property {number|null} [width] DocumentDimensions width - * @property {number|null} [height] DocumentDimensions height + * @interface IImageObjectDetectionModelDeploymentMetadata + * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelDeploymentMetadata nodeCount */ /** - * Constructs a new DocumentDimensions. + * Constructs a new ImageObjectDetectionModelDeploymentMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DocumentDimensions. - * @implements IDocumentDimensions + * @classdesc Represents an ImageObjectDetectionModelDeploymentMetadata. + * @implements IImageObjectDetectionModelDeploymentMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IDocumentDimensions=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set */ - function DocumentDimensions(properties) { + function ImageObjectDetectionModelDeploymentMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40407,101 +42329,75 @@ } /** - * DocumentDimensions unit. - * @member {google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit} unit - * @memberof google.cloud.automl.v1beta1.DocumentDimensions - * @instance - */ - DocumentDimensions.prototype.unit = 0; - - /** - * DocumentDimensions width. - * @member {number} width - * @memberof google.cloud.automl.v1beta1.DocumentDimensions - * @instance - */ - DocumentDimensions.prototype.width = 0; - - /** - * DocumentDimensions height. - * @member {number} height - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * ImageObjectDetectionModelDeploymentMetadata nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @instance */ - DocumentDimensions.prototype.height = 0; + ImageObjectDetectionModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new DocumentDimensions instance using the specified properties. + * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocumentDimensions=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions instance + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata instance */ - DocumentDimensions.create = function create(properties) { - return new DocumentDimensions(properties); + ImageObjectDetectionModelDeploymentMetadata.create = function create(properties) { + return new ImageObjectDetectionModelDeploymentMetadata(properties); }; /** - * Encodes the specified DocumentDimensions message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocumentDimensions} message DocumentDimensions message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentDimensions.encode = function encode(message, writer) { + ImageObjectDetectionModelDeploymentMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.unit != null && message.hasOwnProperty("unit")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.unit); - if (message.width != null && message.hasOwnProperty("width")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.width); - if (message.height != null && message.hasOwnProperty("height")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.height); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); return writer; }; /** - * Encodes the specified DocumentDimensions message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentDimensions.verify|verify} messages. + * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocumentDimensions} message DocumentDimensions message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentDimensions.encodeDelimited = function encodeDelimited(message, writer) { + ImageObjectDetectionModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentDimensions message from the specified reader or buffer. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentDimensions.decode = function decode(reader, length) { + ImageObjectDetectionModelDeploymentMetadata.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.automl.v1beta1.DocumentDimensions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.unit = reader.int32(); - break; - case 2: - message.width = reader.float(); - break; - case 3: - message.height = reader.float(); + message.nodeCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -40512,170 +42408,121 @@ }; /** - * Decodes a DocumentDimensions message from the specified reader or buffer, length delimited. + * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentDimensions.decodeDelimited = function decodeDelimited(reader) { + ImageObjectDetectionModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentDimensions message. + * Verifies an ImageObjectDetectionModelDeploymentMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentDimensions.verify = function verify(message) { + ImageObjectDetectionModelDeploymentMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.unit != null && message.hasOwnProperty("unit")) - switch (message.unit) { - default: - return "unit: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height !== "number") - return "height: number expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; return null; }; /** - * Creates a DocumentDimensions message from a plain object. Also converts values to their respective internal types. + * Creates an ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DocumentDimensions} DocumentDimensions + * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata */ - DocumentDimensions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DocumentDimensions) + ImageObjectDetectionModelDeploymentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.DocumentDimensions(); - switch (object.unit) { - case "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": - case 0: - message.unit = 0; - break; - case "INCH": - case 1: - message.unit = 1; - break; - case "CENTIMETER": - case 2: - message.unit = 2; - break; - case "POINT": - case 3: - message.unit = 3; - break; - } - if (object.width != null) - message.width = Number(object.width); - if (object.height != null) - message.height = Number(object.height); + var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata(); + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DocumentDimensions message. Also converts values to other types if specified. + * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @static - * @param {google.cloud.automl.v1beta1.DocumentDimensions} message DocumentDimensions + * @param {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentDimensions.toObject = function toObject(message, options) { + ImageObjectDetectionModelDeploymentMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.unit = options.enums === String ? "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED" : 0; - object.width = 0; - object.height = 0; - } - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = options.enums === String ? $root.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.height != null && message.hasOwnProperty("height")) - object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; return object; }; /** - * Converts this DocumentDimensions to JSON. + * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DocumentDimensions + * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata * @instance * @returns {Object.} JSON object */ - DocumentDimensions.prototype.toJSON = function toJSON() { + ImageObjectDetectionModelDeploymentMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * DocumentDimensionUnit enum. - * @name google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit - * @enum {string} - * @property {number} DOCUMENT_DIMENSION_UNIT_UNSPECIFIED=0 DOCUMENT_DIMENSION_UNIT_UNSPECIFIED value - * @property {number} INCH=1 INCH value - * @property {number} CENTIMETER=2 CENTIMETER value - * @property {number} POINT=3 POINT value - */ - DocumentDimensions.DocumentDimensionUnit = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCH"] = 1; - values[valuesById[2] = "CENTIMETER"] = 2; - values[valuesById[3] = "POINT"] = 3; - return values; - })(); - - return DocumentDimensions; + return ImageObjectDetectionModelDeploymentMetadata; })(); - v1beta1.Document = (function() { + v1beta1.TextClassificationDatasetMetadata = (function() { /** - * Properties of a Document. + * Properties of a TextClassificationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IDocument - * @property {google.cloud.automl.v1beta1.IDocumentInputConfig|null} [inputConfig] Document inputConfig - * @property {google.cloud.automl.v1beta1.ITextSnippet|null} [documentText] Document documentText - * @property {Array.|null} [layout] Document layout - * @property {google.cloud.automl.v1beta1.IDocumentDimensions|null} [documentDimensions] Document documentDimensions - * @property {number|null} [pageCount] Document pageCount + * @interface ITextClassificationDatasetMetadata + * @property {google.cloud.automl.v1beta1.ClassificationType|null} [classificationType] TextClassificationDatasetMetadata classificationType */ /** - * Constructs a new Document. + * Constructs a new TextClassificationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a Document. - * @implements IDocument + * @classdesc Represents a TextClassificationDatasetMetadata. + * @implements ITextClassificationDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IDocument=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata=} [properties] Properties to set */ - function Document(properties) { - this.layout = []; + function TextClassificationDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40683,130 +42530,75 @@ } /** - * Document inputConfig. - * @member {google.cloud.automl.v1beta1.IDocumentInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1beta1.Document - * @instance - */ - Document.prototype.inputConfig = null; - - /** - * Document documentText. - * @member {google.cloud.automl.v1beta1.ITextSnippet|null|undefined} documentText - * @memberof google.cloud.automl.v1beta1.Document - * @instance - */ - Document.prototype.documentText = null; - - /** - * Document layout. - * @member {Array.} layout - * @memberof google.cloud.automl.v1beta1.Document - * @instance - */ - Document.prototype.layout = $util.emptyArray; - - /** - * Document documentDimensions. - * @member {google.cloud.automl.v1beta1.IDocumentDimensions|null|undefined} documentDimensions - * @memberof google.cloud.automl.v1beta1.Document - * @instance - */ - Document.prototype.documentDimensions = null; - - /** - * Document pageCount. - * @member {number} pageCount - * @memberof google.cloud.automl.v1beta1.Document + * TextClassificationDatasetMetadata classificationType. + * @member {google.cloud.automl.v1beta1.ClassificationType} classificationType + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @instance */ - Document.prototype.pageCount = 0; + TextClassificationDatasetMetadata.prototype.classificationType = 0; /** - * Creates a new Document instance using the specified properties. + * Creates a new TextClassificationDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocument=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Document} Document instance + * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata instance */ - Document.create = function create(properties) { - return new Document(properties); + TextClassificationDatasetMetadata.create = function create(properties) { + return new TextClassificationDatasetMetadata(properties); }; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. + * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocument} message Document message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encode = function encode(message, writer) { + TextClassificationDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1beta1.DocumentInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.documentText != null && message.hasOwnProperty("documentText")) - $root.google.cloud.automl.v1beta1.TextSnippet.encode(message.documentText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.layout != null && message.layout.length) - for (var i = 0; i < message.layout.length; ++i) - $root.google.cloud.automl.v1beta1.Document.Layout.encode(message.layout[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) - $root.google.cloud.automl.v1beta1.DocumentDimensions.encode(message.documentDimensions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageCount); + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); return writer; }; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.verify|verify} messages. + * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocument} message Document message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encodeDelimited = function encodeDelimited(message, writer) { + TextClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Document} Document + * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decode = function decode(reader, length) { + TextClassificationDatasetMetadata.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.automl.v1beta1.Document(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.inputConfig = $root.google.cloud.automl.v1beta1.DocumentInputConfig.decode(reader, reader.uint32()); - break; - case 2: - message.documentText = $root.google.cloud.automl.v1beta1.TextSnippet.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.layout && message.layout.length)) - message.layout = []; - message.layout.push($root.google.cloud.automl.v1beta1.Document.Layout.decode(reader, reader.uint32())); - break; - case 4: - message.documentDimensions = $root.google.cloud.automl.v1beta1.DocumentDimensions.decode(reader, reader.uint32()); - break; - case 5: - message.pageCount = reader.int32(); + message.classificationType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -40817,523 +42609,125 @@ }; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Document} Document + * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decodeDelimited = function decodeDelimited(reader) { + TextClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Document message. + * Verifies a TextClassificationDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Document.verify = function verify(message) { + TextClassificationDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.automl.v1beta1.DocumentInputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } - if (message.documentText != null && message.hasOwnProperty("documentText")) { - var error = $root.google.cloud.automl.v1beta1.TextSnippet.verify(message.documentText); - if (error) - return "documentText." + error; - } - if (message.layout != null && message.hasOwnProperty("layout")) { - if (!Array.isArray(message.layout)) - return "layout: array expected"; - for (var i = 0; i < message.layout.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.Document.Layout.verify(message.layout[i]); - if (error) - return "layout." + error; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + switch (message.classificationType) { + default: + return "classificationType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) { - var error = $root.google.cloud.automl.v1beta1.DocumentDimensions.verify(message.documentDimensions); - if (error) - return "documentDimensions." + error; - } - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - if (!$util.isInteger(message.pageCount)) - return "pageCount: integer expected"; return null; }; /** - * Creates a Document message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Document} Document + * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata */ - Document.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Document) + TextClassificationDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.Document(); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Document.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1beta1.DocumentInputConfig.fromObject(object.inputConfig); - } - if (object.documentText != null) { - if (typeof object.documentText !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Document.documentText: object expected"); - message.documentText = $root.google.cloud.automl.v1beta1.TextSnippet.fromObject(object.documentText); - } - if (object.layout) { - if (!Array.isArray(object.layout)) - throw TypeError(".google.cloud.automl.v1beta1.Document.layout: array expected"); - message.layout = []; - for (var i = 0; i < object.layout.length; ++i) { - if (typeof object.layout[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Document.layout: object expected"); - message.layout[i] = $root.google.cloud.automl.v1beta1.Document.Layout.fromObject(object.layout[i]); - } - } - if (object.documentDimensions != null) { - if (typeof object.documentDimensions !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Document.documentDimensions: object expected"); - message.documentDimensions = $root.google.cloud.automl.v1beta1.DocumentDimensions.fromObject(object.documentDimensions); + var message = new $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata(); + switch (object.classificationType) { + case "CLASSIFICATION_TYPE_UNSPECIFIED": + case 0: + message.classificationType = 0; + break; + case "MULTICLASS": + case 1: + message.classificationType = 1; + break; + case "MULTILABEL": + case 2: + message.classificationType = 2; + break; } - if (object.pageCount != null) - message.pageCount = object.pageCount | 0; return message; }; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. + * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.Document} message Document + * @param {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} message TextClassificationDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Document.toObject = function toObject(message, options) { + TextClassificationDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.layout = []; - if (options.defaults) { - object.inputConfig = null; - object.documentText = null; - object.documentDimensions = null; - object.pageCount = 0; - } - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.automl.v1beta1.DocumentInputConfig.toObject(message.inputConfig, options); - if (message.documentText != null && message.hasOwnProperty("documentText")) - object.documentText = $root.google.cloud.automl.v1beta1.TextSnippet.toObject(message.documentText, options); - if (message.layout && message.layout.length) { - object.layout = []; - for (var j = 0; j < message.layout.length; ++j) - object.layout[j] = $root.google.cloud.automl.v1beta1.Document.Layout.toObject(message.layout[j], options); - } - if (message.documentDimensions != null && message.hasOwnProperty("documentDimensions")) - object.documentDimensions = $root.google.cloud.automl.v1beta1.DocumentDimensions.toObject(message.documentDimensions, options); - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - object.pageCount = message.pageCount; + if (options.defaults) + object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; return object; }; /** - * Converts this Document to JSON. + * Converts this TextClassificationDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.Document + * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata * @instance * @returns {Object.} JSON object */ - Document.prototype.toJSON = function toJSON() { + TextClassificationDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Document.Layout = (function() { - - /** - * Properties of a Layout. - * @memberof google.cloud.automl.v1beta1.Document - * @interface ILayout - * @property {google.cloud.automl.v1beta1.ITextSegment|null} [textSegment] Layout textSegment - * @property {number|null} [pageNumber] Layout pageNumber - * @property {google.cloud.automl.v1beta1.IBoundingPoly|null} [boundingPoly] Layout boundingPoly - * @property {google.cloud.automl.v1beta1.Document.Layout.TextSegmentType|null} [textSegmentType] Layout textSegmentType - */ - - /** - * Constructs a new Layout. - * @memberof google.cloud.automl.v1beta1.Document - * @classdesc Represents a Layout. - * @implements ILayout - * @constructor - * @param {google.cloud.automl.v1beta1.Document.ILayout=} [properties] Properties to set - */ - function Layout(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]]; - } - - /** - * Layout textSegment. - * @member {google.cloud.automl.v1beta1.ITextSegment|null|undefined} textSegment - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @instance - */ - Layout.prototype.textSegment = null; - - /** - * Layout pageNumber. - * @member {number} pageNumber - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @instance - */ - Layout.prototype.pageNumber = 0; - - /** - * Layout boundingPoly. - * @member {google.cloud.automl.v1beta1.IBoundingPoly|null|undefined} boundingPoly - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @instance - */ - Layout.prototype.boundingPoly = null; - - /** - * Layout textSegmentType. - * @member {google.cloud.automl.v1beta1.Document.Layout.TextSegmentType} textSegmentType - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @instance - */ - Layout.prototype.textSegmentType = 0; - - /** - * Creates a new Layout instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {google.cloud.automl.v1beta1.Document.ILayout=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout instance - */ - Layout.create = function create(properties) { - return new Layout(properties); - }; - - /** - * Encodes the specified Layout message. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {google.cloud.automl.v1beta1.Document.ILayout} message Layout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Layout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.textSegment != null && message.hasOwnProperty("textSegment")) - $root.google.cloud.automl.v1beta1.TextSegment.encode(message.textSegment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber); - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) - $root.google.cloud.automl.v1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.textSegmentType); - return writer; - }; - - /** - * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Document.Layout.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {google.cloud.automl.v1beta1.Document.ILayout} message Layout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Layout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Layout message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Layout.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.automl.v1beta1.Document.Layout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.decode(reader, reader.uint32()); - break; - case 2: - message.pageNumber = reader.int32(); - break; - case 3: - message.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.decode(reader, reader.uint32()); - break; - case 4: - message.textSegmentType = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Layout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Layout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Layout message. - * @function verify - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Layout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.textSegment != null && message.hasOwnProperty("textSegment")) { - var error = $root.google.cloud.automl.v1beta1.TextSegment.verify(message.textSegment); - if (error) - return "textSegment." + error; - } - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - if (!$util.isInteger(message.pageNumber)) - return "pageNumber: integer expected"; - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { - var error = $root.google.cloud.automl.v1beta1.BoundingPoly.verify(message.boundingPoly); - if (error) - return "boundingPoly." + error; - } - if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - switch (message.textSegmentType) { - default: - return "textSegmentType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - return null; - }; - - /** - * Creates a Layout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Document.Layout} Layout - */ - Layout.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Document.Layout) - return object; - var message = new $root.google.cloud.automl.v1beta1.Document.Layout(); - if (object.textSegment != null) { - if (typeof object.textSegment !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Document.Layout.textSegment: object expected"); - message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.fromObject(object.textSegment); - } - if (object.pageNumber != null) - message.pageNumber = object.pageNumber | 0; - if (object.boundingPoly != null) { - if (typeof object.boundingPoly !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Document.Layout.boundingPoly: object expected"); - message.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.fromObject(object.boundingPoly); - } - switch (object.textSegmentType) { - case "TEXT_SEGMENT_TYPE_UNSPECIFIED": - case 0: - message.textSegmentType = 0; - break; - case "TOKEN": - case 1: - message.textSegmentType = 1; - break; - case "PARAGRAPH": - case 2: - message.textSegmentType = 2; - break; - case "FORM_FIELD": - case 3: - message.textSegmentType = 3; - break; - case "FORM_FIELD_NAME": - case 4: - message.textSegmentType = 4; - break; - case "FORM_FIELD_CONTENTS": - case 5: - message.textSegmentType = 5; - break; - case "TABLE": - case 6: - message.textSegmentType = 6; - break; - case "TABLE_HEADER": - case 7: - message.textSegmentType = 7; - break; - case "TABLE_ROW": - case 8: - message.textSegmentType = 8; - break; - case "TABLE_CELL": - case 9: - message.textSegmentType = 9; - break; - } - return message; - }; - - /** - * Creates a plain object from a Layout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @static - * @param {google.cloud.automl.v1beta1.Document.Layout} message Layout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Layout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.textSegment = null; - object.pageNumber = 0; - object.boundingPoly = null; - object.textSegmentType = options.enums === String ? "TEXT_SEGMENT_TYPE_UNSPECIFIED" : 0; - } - if (message.textSegment != null && message.hasOwnProperty("textSegment")) - object.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.toObject(message.textSegment, options); - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - object.pageNumber = message.pageNumber; - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) - object.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.toObject(message.boundingPoly, options); - if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; - return object; - }; - - /** - * Converts this Layout to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.Document.Layout - * @instance - * @returns {Object.} JSON object - */ - Layout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * TextSegmentType enum. - * @name google.cloud.automl.v1beta1.Document.Layout.TextSegmentType - * @enum {string} - * @property {number} TEXT_SEGMENT_TYPE_UNSPECIFIED=0 TEXT_SEGMENT_TYPE_UNSPECIFIED value - * @property {number} TOKEN=1 TOKEN value - * @property {number} PARAGRAPH=2 PARAGRAPH value - * @property {number} FORM_FIELD=3 FORM_FIELD value - * @property {number} FORM_FIELD_NAME=4 FORM_FIELD_NAME value - * @property {number} FORM_FIELD_CONTENTS=5 FORM_FIELD_CONTENTS value - * @property {number} TABLE=6 TABLE value - * @property {number} TABLE_HEADER=7 TABLE_HEADER value - * @property {number} TABLE_ROW=8 TABLE_ROW value - * @property {number} TABLE_CELL=9 TABLE_CELL value - */ - Layout.TextSegmentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TEXT_SEGMENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOKEN"] = 1; - values[valuesById[2] = "PARAGRAPH"] = 2; - values[valuesById[3] = "FORM_FIELD"] = 3; - values[valuesById[4] = "FORM_FIELD_NAME"] = 4; - values[valuesById[5] = "FORM_FIELD_CONTENTS"] = 5; - values[valuesById[6] = "TABLE"] = 6; - values[valuesById[7] = "TABLE_HEADER"] = 7; - values[valuesById[8] = "TABLE_ROW"] = 8; - values[valuesById[9] = "TABLE_CELL"] = 9; - return values; - })(); - - return Layout; - })(); + }; - return Document; + return TextClassificationDatasetMetadata; })(); - v1beta1.Row = (function() { + v1beta1.TextClassificationModelMetadata = (function() { /** - * Properties of a Row. + * Properties of a TextClassificationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IRow - * @property {Array.|null} [columnSpecIds] Row columnSpecIds - * @property {Array.|null} [values] Row values + * @interface ITextClassificationModelMetadata + * @property {google.cloud.automl.v1beta1.ClassificationType|null} [classificationType] TextClassificationModelMetadata classificationType */ /** - * Constructs a new Row. + * Constructs a new TextClassificationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a Row. - * @implements IRow + * @classdesc Represents a TextClassificationModelMetadata. + * @implements ITextClassificationModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IRow=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata=} [properties] Properties to set */ - function Row(properties) { - this.columnSpecIds = []; - this.values = []; + function TextClassificationModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41341,94 +42735,75 @@ } /** - * Row columnSpecIds. - * @member {Array.} columnSpecIds - * @memberof google.cloud.automl.v1beta1.Row - * @instance - */ - Row.prototype.columnSpecIds = $util.emptyArray; - - /** - * Row values. - * @member {Array.} values - * @memberof google.cloud.automl.v1beta1.Row + * TextClassificationModelMetadata classificationType. + * @member {google.cloud.automl.v1beta1.ClassificationType} classificationType + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @instance */ - Row.prototype.values = $util.emptyArray; + TextClassificationModelMetadata.prototype.classificationType = 0; /** - * Creates a new Row instance using the specified properties. + * Creates a new TextClassificationModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IRow=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Row} Row instance + * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata instance */ - Row.create = function create(properties) { - return new Row(properties); + TextClassificationModelMetadata.create = function create(properties) { + return new TextClassificationModelMetadata(properties); }; /** - * Encodes the specified Row message. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. + * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IRow} message Row message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encode = function encode(message, writer) { + TextClassificationModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columnSpecIds != null && message.columnSpecIds.length) - for (var i = 0; i < message.columnSpecIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.columnSpecIds[i]); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.classificationType); return writer; }; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Row.verify|verify} messages. + * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IRow} message Row message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encodeDelimited = function encodeDelimited(message, writer) { + TextClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Row} Row + * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decode = function decode(reader, length) { + TextClassificationModelMetadata.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.automl.v1beta1.Row(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.columnSpecIds && message.columnSpecIds.length)) - message.columnSpecIds = []; - message.columnSpecIds.push(reader.string()); - break; case 3: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + message.classificationType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -41439,148 +42814,124 @@ }; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Row} Row + * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decodeDelimited = function decodeDelimited(reader) { + TextClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Row message. + * Verifies a TextClassificationModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Row.verify = function verify(message) { + TextClassificationModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columnSpecIds != null && message.hasOwnProperty("columnSpecIds")) { - if (!Array.isArray(message.columnSpecIds)) - return "columnSpecIds: array expected"; - for (var i = 0; i < message.columnSpecIds.length; ++i) - if (!$util.isString(message.columnSpecIds[i])) - return "columnSpecIds: string[] expected"; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + switch (message.classificationType) { + default: + return "classificationType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Row} Row + * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Row) + TextClassificationModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.Row(); - if (object.columnSpecIds) { - if (!Array.isArray(object.columnSpecIds)) - throw TypeError(".google.cloud.automl.v1beta1.Row.columnSpecIds: array expected"); - message.columnSpecIds = []; - for (var i = 0; i < object.columnSpecIds.length; ++i) - message.columnSpecIds[i] = String(object.columnSpecIds[i]); - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.automl.v1beta1.Row.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Row.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } + var message = new $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata(); + switch (object.classificationType) { + case "CLASSIFICATION_TYPE_UNSPECIFIED": + case 0: + message.classificationType = 0; + break; + case "MULTICLASS": + case 1: + message.classificationType = 1; + break; + case "MULTILABEL": + case 2: + message.classificationType = 2; + break; } return message; }; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. + * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.Row} message Row + * @param {google.cloud.automl.v1beta1.TextClassificationModelMetadata} message TextClassificationModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Row.toObject = function toObject(message, options) { + TextClassificationModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.columnSpecIds = []; - object.values = []; - } - if (message.columnSpecIds && message.columnSpecIds.length) { - object.columnSpecIds = []; - for (var j = 0; j < message.columnSpecIds.length; ++j) - object.columnSpecIds[j] = message.columnSpecIds[j]; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } + if (options.defaults) + object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; + if (message.classificationType != null && message.hasOwnProperty("classificationType")) + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; return object; }; /** - * Converts this Row to JSON. + * Converts this TextClassificationModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.Row + * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata * @instance * @returns {Object.} JSON object */ - Row.prototype.toJSON = function toJSON() { + TextClassificationModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Row; + return TextClassificationModelMetadata; })(); - v1beta1.ExamplePayload = (function() { + v1beta1.TextExtractionDatasetMetadata = (function() { /** - * Properties of an ExamplePayload. + * Properties of a TextExtractionDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IExamplePayload - * @property {google.cloud.automl.v1beta1.IImage|null} [image] ExamplePayload image - * @property {google.cloud.automl.v1beta1.ITextSnippet|null} [textSnippet] ExamplePayload textSnippet - * @property {google.cloud.automl.v1beta1.IDocument|null} [document] ExamplePayload document - * @property {google.cloud.automl.v1beta1.IRow|null} [row] ExamplePayload row + * @interface ITextExtractionDatasetMetadata */ /** - * Constructs a new ExamplePayload. + * Constructs a new TextExtractionDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExamplePayload. - * @implements IExamplePayload + * @classdesc Represents a TextExtractionDatasetMetadata. + * @implements ITextExtractionDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IExamplePayload=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata=} [properties] Properties to set */ - function ExamplePayload(properties) { + function TextExtractionDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41588,129 +42939,63 @@ } /** - * ExamplePayload image. - * @member {google.cloud.automl.v1beta1.IImage|null|undefined} image - * @memberof google.cloud.automl.v1beta1.ExamplePayload - * @instance - */ - ExamplePayload.prototype.image = null; - - /** - * ExamplePayload textSnippet. - * @member {google.cloud.automl.v1beta1.ITextSnippet|null|undefined} textSnippet - * @memberof google.cloud.automl.v1beta1.ExamplePayload - * @instance - */ - ExamplePayload.prototype.textSnippet = null; - - /** - * ExamplePayload document. - * @member {google.cloud.automl.v1beta1.IDocument|null|undefined} document - * @memberof google.cloud.automl.v1beta1.ExamplePayload - * @instance - */ - ExamplePayload.prototype.document = null; - - /** - * ExamplePayload row. - * @member {google.cloud.automl.v1beta1.IRow|null|undefined} row - * @memberof google.cloud.automl.v1beta1.ExamplePayload - * @instance - */ - ExamplePayload.prototype.row = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExamplePayload payload. - * @member {"image"|"textSnippet"|"document"|"row"|undefined} payload - * @memberof google.cloud.automl.v1beta1.ExamplePayload - * @instance - */ - Object.defineProperty(ExamplePayload.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["image", "textSnippet", "document", "row"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExamplePayload instance using the specified properties. + * Creates a new TextExtractionDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IExamplePayload=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload instance + * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata instance */ - ExamplePayload.create = function create(properties) { - return new ExamplePayload(properties); + TextExtractionDatasetMetadata.create = function create(properties) { + return new TextExtractionDatasetMetadata(properties); }; /** - * Encodes the specified ExamplePayload message. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. + * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IExamplePayload} message ExamplePayload message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExamplePayload.encode = function encode(message, writer) { + TextExtractionDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.image != null && message.hasOwnProperty("image")) - $root.google.cloud.automl.v1beta1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) - $root.google.cloud.automl.v1beta1.TextSnippet.encode(message.textSnippet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.row != null && message.hasOwnProperty("row")) - $root.google.cloud.automl.v1beta1.Row.encode(message.row, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.document != null && message.hasOwnProperty("document")) - $root.google.cloud.automl.v1beta1.Document.encode(message.document, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExamplePayload message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExamplePayload.verify|verify} messages. + * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IExamplePayload} message ExamplePayload message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExamplePayload.encodeDelimited = function encodeDelimited(message, writer) { + TextExtractionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExamplePayload message from the specified reader or buffer. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload + * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExamplePayload.decode = function decode(reader, length) { + TextExtractionDatasetMetadata.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.automl.v1beta1.ExamplePayload(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.image = $root.google.cloud.automl.v1beta1.Image.decode(reader, reader.uint32()); - break; - case 2: - message.textSnippet = $root.google.cloud.automl.v1beta1.TextSnippet.decode(reader, reader.uint32()); - break; - case 4: - message.document = $root.google.cloud.automl.v1beta1.Document.decode(reader, reader.uint32()); - break; - case 3: - message.row = $root.google.cloud.automl.v1beta1.Row.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -41720,180 +43005,254 @@ }; /** - * Decodes an ExamplePayload message from the specified reader or buffer, length delimited. + * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload + * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExamplePayload.decodeDelimited = function decodeDelimited(reader) { + TextExtractionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExamplePayload message. + * Verifies a TextExtractionDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExamplePayload.verify = function verify(message) { + TextExtractionDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.image != null && message.hasOwnProperty("image")) { - properties.payload = 1; - { - var error = $root.google.cloud.automl.v1beta1.Image.verify(message.image); - if (error) - return "image." + error; - } - } - if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextSnippet.verify(message.textSnippet); - if (error) - return "textSnippet." + error; - } - } - if (message.document != null && message.hasOwnProperty("document")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.cloud.automl.v1beta1.Document.verify(message.document); - if (error) - return "document." + error; - } - } - if (message.row != null && message.hasOwnProperty("row")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.cloud.automl.v1beta1.Row.verify(message.row); - if (error) - return "row." + error; + return null; + }; + + /** + * Creates a TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata + */ + TextExtractionDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) + return object; + return new $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata(); + }; + + /** + * Creates a plain object from a TextExtractionDatasetMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @static + * @param {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} message TextExtractionDatasetMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextExtractionDatasetMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this TextExtractionDatasetMetadata to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @instance + * @returns {Object.} JSON object + */ + TextExtractionDatasetMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextExtractionDatasetMetadata; + })(); + + v1beta1.TextExtractionModelMetadata = (function() { + + /** + * Properties of a TextExtractionModelMetadata. + * @memberof google.cloud.automl.v1beta1 + * @interface ITextExtractionModelMetadata + */ + + /** + * Constructs a new TextExtractionModelMetadata. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a TextExtractionModelMetadata. + * @implements ITextExtractionModelMetadata + * @constructor + * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata=} [properties] Properties to set + */ + function TextExtractionModelMetadata(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 new TextExtractionModelMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @static + * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata instance + */ + TextExtractionModelMetadata.create = function create(properties) { + return new TextExtractionModelMetadata(properties); + }; + + /** + * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @static + * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextExtractionModelMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @static + * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextExtractionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextExtractionModelMetadata.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.automl.v1beta1.TextExtractionModelMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } } + return message; + }; + + /** + * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextExtractionModelMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextExtractionModelMetadata message. + * @function verify + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextExtractionModelMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; return null; }; /** - * Creates an ExamplePayload message from a plain object. Also converts values to their respective internal types. + * Creates a TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExamplePayload} ExamplePayload + * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata */ - ExamplePayload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExamplePayload) + TextExtractionModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.ExamplePayload(); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.image: object expected"); - message.image = $root.google.cloud.automl.v1beta1.Image.fromObject(object.image); - } - if (object.textSnippet != null) { - if (typeof object.textSnippet !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.textSnippet: object expected"); - message.textSnippet = $root.google.cloud.automl.v1beta1.TextSnippet.fromObject(object.textSnippet); - } - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.document: object expected"); - message.document = $root.google.cloud.automl.v1beta1.Document.fromObject(object.document); - } - if (object.row != null) { - if (typeof object.row !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExamplePayload.row: object expected"); - message.row = $root.google.cloud.automl.v1beta1.Row.fromObject(object.row); - } - return message; + return new $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata(); }; /** - * Creates a plain object from an ExamplePayload message. Also converts values to other types if specified. + * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata * @static - * @param {google.cloud.automl.v1beta1.ExamplePayload} message ExamplePayload + * @param {google.cloud.automl.v1beta1.TextExtractionModelMetadata} message TextExtractionModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExamplePayload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.image != null && message.hasOwnProperty("image")) { - object.image = $root.google.cloud.automl.v1beta1.Image.toObject(message.image, options); - if (options.oneofs) - object.payload = "image"; - } - if (message.textSnippet != null && message.hasOwnProperty("textSnippet")) { - object.textSnippet = $root.google.cloud.automl.v1beta1.TextSnippet.toObject(message.textSnippet, options); - if (options.oneofs) - object.payload = "textSnippet"; - } - if (message.row != null && message.hasOwnProperty("row")) { - object.row = $root.google.cloud.automl.v1beta1.Row.toObject(message.row, options); - if (options.oneofs) - object.payload = "row"; - } - if (message.document != null && message.hasOwnProperty("document")) { - object.document = $root.google.cloud.automl.v1beta1.Document.toObject(message.document, options); - if (options.oneofs) - object.payload = "document"; - } - return object; + TextExtractionModelMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this ExamplePayload to JSON. + * Converts this TextExtractionModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExamplePayload + * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata * @instance * @returns {Object.} JSON object */ - ExamplePayload.prototype.toJSON = function toJSON() { + TextExtractionModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExamplePayload; + return TextExtractionModelMetadata; })(); - v1beta1.InputConfig = (function() { + v1beta1.TextSentimentDatasetMetadata = (function() { /** - * Properties of an InputConfig. + * Properties of a TextSentimentDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IInputConfig - * @property {google.cloud.automl.v1beta1.IGcsSource|null} [gcsSource] InputConfig gcsSource - * @property {google.cloud.automl.v1beta1.IBigQuerySource|null} [bigquerySource] InputConfig bigquerySource - * @property {Object.|null} [params] InputConfig params + * @interface ITextSentimentDatasetMetadata + * @property {number|null} [sentimentMax] TextSentimentDatasetMetadata sentimentMax */ /** - * Constructs a new InputConfig. + * Constructs a new TextSentimentDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an InputConfig. - * @implements IInputConfig + * @classdesc Represents a TextSentimentDatasetMetadata. + * @implements ITextSentimentDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IInputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata=} [properties] Properties to set */ - function InputConfig(properties) { - this.params = {}; + function TextSentimentDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41901,121 +43260,75 @@ } /** - * InputConfig gcsSource. - * @member {google.cloud.automl.v1beta1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.automl.v1beta1.InputConfig - * @instance - */ - InputConfig.prototype.gcsSource = null; - - /** - * InputConfig bigquerySource. - * @member {google.cloud.automl.v1beta1.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.automl.v1beta1.InputConfig - * @instance - */ - InputConfig.prototype.bigquerySource = null; - - /** - * InputConfig params. - * @member {Object.} params - * @memberof google.cloud.automl.v1beta1.InputConfig - * @instance - */ - InputConfig.prototype.params = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InputConfig source. - * @member {"gcsSource"|"bigquerySource"|undefined} source - * @memberof google.cloud.automl.v1beta1.InputConfig + * TextSentimentDatasetMetadata sentimentMax. + * @member {number} sentimentMax + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @instance */ - Object.defineProperty(InputConfig.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource", "bigquerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + TextSentimentDatasetMetadata.prototype.sentimentMax = 0; /** - * Creates a new InputConfig instance using the specified properties. + * Creates a new TextSentimentDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IInputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig instance + * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata instance */ - InputConfig.create = function create(properties) { - return new InputConfig(properties); + TextSentimentDatasetMetadata.create = function create(properties) { + return new TextSentimentDatasetMetadata(properties); }; /** - * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. + * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IInputConfig} message InputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputConfig.encode = function encode(message, writer) { + TextSentimentDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - $root.google.cloud.automl.v1beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.params != null && message.hasOwnProperty("params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) - $root.google.cloud.automl.v1beta1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentimentMax); return writer; }; /** - * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.InputConfig.verify|verify} messages. + * Encodes the specified TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IInputConfig} message InputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputConfig.encodeDelimited = function encodeDelimited(message, writer) { + TextSentimentDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputConfig message from the specified reader or buffer. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig + * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputConfig.decode = function decode(reader, length) { + TextSentimentDatasetMetadata.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.automl.v1beta1.InputConfig(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.decode(reader, reader.uint32()); - break; - case 3: - message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.decode(reader, reader.uint32()); - break; - case 2: - reader.skip().pos++; - if (message.params === $util.emptyObject) - message.params = {}; - key = reader.string(); - reader.pos++; - message.params[key] = reader.string(); + message.sentimentMax = reader.int32(); break; default: reader.skipType(tag & 7); @@ -42026,161 +43339,106 @@ }; /** - * Decodes an InputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig + * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputConfig.decodeDelimited = function decodeDelimited(reader) { + TextSentimentDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputConfig message. + * Verifies a TextSentimentDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputConfig.verify = function verify(message) { + TextSentimentDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.automl.v1beta1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.automl.v1beta1.BigQuerySource.verify(message.bigquerySource); - if (error) - return "bigquerySource." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; - } + if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) + if (!$util.isInteger(message.sentimentMax)) + return "sentimentMax: integer expected"; return null; }; /** - * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.InputConfig} InputConfig + * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata */ - InputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.InputConfig) + TextSentimentDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.InputConfig(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.automl.v1beta1.InputConfig.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.fromObject(object.gcsSource); - } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.automl.v1beta1.InputConfig.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.fromObject(object.bigquerySource); - } - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1beta1.InputConfig.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); - } + var message = new $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata(); + if (object.sentimentMax != null) + message.sentimentMax = object.sentimentMax | 0; return message; }; /** - * Creates a plain object from an InputConfig message. Also converts values to other types if specified. + * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.InputConfig} message InputConfig + * @param {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} message TextSentimentDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputConfig.toObject = function toObject(message, options) { + TextSentimentDatasetMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.params = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; - } + if (options.defaults) + object.sentimentMax = 0; + if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) + object.sentimentMax = message.sentimentMax; return object; }; /** - * Converts this InputConfig to JSON. + * Converts this TextSentimentDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.InputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata * @instance * @returns {Object.} JSON object */ - InputConfig.prototype.toJSON = function toJSON() { + TextSentimentDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InputConfig; + return TextSentimentDatasetMetadata; })(); - v1beta1.BatchPredictInputConfig = (function() { + v1beta1.TextSentimentModelMetadata = (function() { /** - * Properties of a BatchPredictInputConfig. + * Properties of a TextSentimentModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IBatchPredictInputConfig - * @property {google.cloud.automl.v1beta1.IGcsSource|null} [gcsSource] BatchPredictInputConfig gcsSource - * @property {google.cloud.automl.v1beta1.IBigQuerySource|null} [bigquerySource] BatchPredictInputConfig bigquerySource + * @interface ITextSentimentModelMetadata */ /** - * Constructs a new BatchPredictInputConfig. + * Constructs a new TextSentimentModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BatchPredictInputConfig. - * @implements IBatchPredictInputConfig + * @classdesc Represents a TextSentimentModelMetadata. + * @implements ITextSentimentModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata=} [properties] Properties to set */ - function BatchPredictInputConfig(properties) { + function TextSentimentModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42188,103 +43446,63 @@ } /** - * BatchPredictInputConfig gcsSource. - * @member {google.cloud.automl.v1beta1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig - * @instance - */ - BatchPredictInputConfig.prototype.gcsSource = null; - - /** - * BatchPredictInputConfig bigquerySource. - * @member {google.cloud.automl.v1beta1.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig - * @instance - */ - BatchPredictInputConfig.prototype.bigquerySource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BatchPredictInputConfig source. - * @member {"gcsSource"|"bigquerySource"|undefined} source - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig - * @instance - */ - Object.defineProperty(BatchPredictInputConfig.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource", "bigquerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BatchPredictInputConfig instance using the specified properties. + * Creates a new TextSentimentModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig instance + * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata instance */ - BatchPredictInputConfig.create = function create(properties) { - return new BatchPredictInputConfig(properties); + TextSentimentModelMetadata.create = function create(properties) { + return new TextSentimentModelMetadata(properties); }; /** - * Encodes the specified BatchPredictInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. + * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictInputConfig.encode = function encode(message, writer) { + TextSentimentModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - $root.google.cloud.automl.v1beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) - $root.google.cloud.automl.v1beta1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchPredictInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictInputConfig.verify|verify} messages. + * Encodes the specified TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictInputConfig} message BatchPredictInputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictInputConfig.encodeDelimited = function encodeDelimited(message, writer) { + TextSentimentModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig + * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictInputConfig.decode = function decode(reader, length) { + TextSentimentModelMetadata.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.automl.v1beta1.BatchPredictInputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.decode(reader, reader.uint32()); - break; - case 2: - message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -42294,137 +43512,93 @@ }; /** - * Decodes a BatchPredictInputConfig message from the specified reader or buffer, length delimited. + * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig + * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictInputConfig.decodeDelimited = function decodeDelimited(reader) { + TextSentimentModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictInputConfig message. + * Verifies a TextSentimentModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchPredictInputConfig.verify = function verify(message) { + TextSentimentModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.automl.v1beta1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.automl.v1beta1.BigQuerySource.verify(message.bigquerySource); - if (error) - return "bigquerySource." + error; - } - } return null; }; /** - * Creates a BatchPredictInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BatchPredictInputConfig} BatchPredictInputConfig - */ - BatchPredictInputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictInputConfig) - return object; - var message = new $root.google.cloud.automl.v1beta1.BatchPredictInputConfig(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictInputConfig.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.fromObject(object.gcsSource); - } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictInputConfig.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.fromObject(object.bigquerySource); - } - return message; - }; - - /** - * Creates a plain object from a BatchPredictInputConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig - * @static - * @param {google.cloud.automl.v1beta1.BatchPredictInputConfig} message BatchPredictInputConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata */ - BatchPredictInputConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.automl.v1beta1.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; - } - return object; + TextSentimentModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata) + return object; + return new $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata(); }; /** - * Converts this BatchPredictInputConfig to JSON. + * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @static + * @param {google.cloud.automl.v1beta1.TextSentimentModelMetadata} message TextSentimentModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextSentimentModelMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this TextSentimentModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BatchPredictInputConfig + * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata * @instance * @returns {Object.} JSON object */ - BatchPredictInputConfig.prototype.toJSON = function toJSON() { + TextSentimentModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchPredictInputConfig; + return TextSentimentModelMetadata; })(); - v1beta1.DocumentInputConfig = (function() { + v1beta1.VideoClassificationDatasetMetadata = (function() { /** - * Properties of a DocumentInputConfig. + * Properties of a VideoClassificationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IDocumentInputConfig - * @property {google.cloud.automl.v1beta1.IGcsSource|null} [gcsSource] DocumentInputConfig gcsSource + * @interface IVideoClassificationDatasetMetadata */ /** - * Constructs a new DocumentInputConfig. + * Constructs a new VideoClassificationDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DocumentInputConfig. - * @implements IDocumentInputConfig + * @classdesc Represents a VideoClassificationDatasetMetadata. + * @implements IVideoClassificationDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IDocumentInputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata=} [properties] Properties to set */ - function DocumentInputConfig(properties) { + function VideoClassificationDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42432,76 +43606,63 @@ } /** - * DocumentInputConfig gcsSource. - * @member {google.cloud.automl.v1beta1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig - * @instance - */ - DocumentInputConfig.prototype.gcsSource = null; - - /** - * Creates a new DocumentInputConfig instance using the specified properties. + * Creates a new VideoClassificationDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocumentInputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig instance + * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata instance */ - DocumentInputConfig.create = function create(properties) { - return new DocumentInputConfig(properties); + VideoClassificationDatasetMetadata.create = function create(properties) { + return new VideoClassificationDatasetMetadata(properties); }; /** - * Encodes the specified DocumentInputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. + * Encodes the specified VideoClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata} message VideoClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInputConfig.encode = function encode(message, writer) { + VideoClassificationDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - $root.google.cloud.automl.v1beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DocumentInputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DocumentInputConfig.verify|verify} messages. + * Encodes the specified VideoClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IDocumentInputConfig} message DocumentInputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata} message VideoClassificationDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInputConfig.encodeDelimited = function encodeDelimited(message, writer) { + VideoClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer. + * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig + * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInputConfig.decode = function decode(reader, length) { + VideoClassificationDatasetMetadata.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.automl.v1beta1.DocumentInputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -42511,113 +43672,93 @@ }; /** - * Decodes a DocumentInputConfig message from the specified reader or buffer, length delimited. + * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig + * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInputConfig.decodeDelimited = function decodeDelimited(reader) { + VideoClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentInputConfig message. + * Verifies a VideoClassificationDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentInputConfig.verify = function verify(message) { + VideoClassificationDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - var error = $root.google.cloud.automl.v1beta1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } return null; }; /** - * Creates a DocumentInputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a VideoClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DocumentInputConfig} DocumentInputConfig + * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata */ - DocumentInputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DocumentInputConfig) + VideoClassificationDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.DocumentInputConfig(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.automl.v1beta1.DocumentInputConfig.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.fromObject(object.gcsSource); - } - return message; + return new $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata(); }; /** - * Creates a plain object from a DocumentInputConfig message. Also converts values to other types if specified. + * Creates a plain object from a VideoClassificationDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.DocumentInputConfig} message DocumentInputConfig + * @param {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} message VideoClassificationDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentInputConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.gcsSource = null; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) - object.gcsSource = $root.google.cloud.automl.v1beta1.GcsSource.toObject(message.gcsSource, options); - return object; + VideoClassificationDatasetMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this DocumentInputConfig to JSON. + * Converts this VideoClassificationDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DocumentInputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata * @instance * @returns {Object.} JSON object */ - DocumentInputConfig.prototype.toJSON = function toJSON() { + VideoClassificationDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DocumentInputConfig; + return VideoClassificationDatasetMetadata; })(); - v1beta1.OutputConfig = (function() { + v1beta1.VideoObjectTrackingDatasetMetadata = (function() { /** - * Properties of an OutputConfig. + * Properties of a VideoObjectTrackingDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IOutputConfig - * @property {google.cloud.automl.v1beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination - * @property {google.cloud.automl.v1beta1.IBigQueryDestination|null} [bigqueryDestination] OutputConfig bigqueryDestination + * @interface IVideoObjectTrackingDatasetMetadata */ /** - * Constructs a new OutputConfig. + * Constructs a new VideoObjectTrackingDatasetMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an OutputConfig. - * @implements IOutputConfig + * @classdesc Represents a VideoObjectTrackingDatasetMetadata. + * @implements IVideoObjectTrackingDatasetMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IOutputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata=} [properties] Properties to set */ - function OutputConfig(properties) { + function VideoObjectTrackingDatasetMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42625,103 +43766,63 @@ } /** - * OutputConfig gcsDestination. - * @member {google.cloud.automl.v1beta1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.automl.v1beta1.OutputConfig - * @instance - */ - OutputConfig.prototype.gcsDestination = null; - - /** - * OutputConfig bigqueryDestination. - * @member {google.cloud.automl.v1beta1.IBigQueryDestination|null|undefined} bigqueryDestination - * @memberof google.cloud.automl.v1beta1.OutputConfig - * @instance - */ - OutputConfig.prototype.bigqueryDestination = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OutputConfig destination. - * @member {"gcsDestination"|"bigqueryDestination"|undefined} destination - * @memberof google.cloud.automl.v1beta1.OutputConfig - * @instance - */ - Object.defineProperty(OutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "bigqueryDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OutputConfig instance using the specified properties. + * Creates a new VideoObjectTrackingDatasetMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IOutputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig instance + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata instance */ - OutputConfig.create = function create(properties) { - return new OutputConfig(properties); + VideoObjectTrackingDatasetMetadata.create = function create(properties) { + return new VideoObjectTrackingDatasetMetadata(properties); }; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. + * Encodes the specified VideoObjectTrackingDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata} message VideoObjectTrackingDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encode = function encode(message, writer) { + VideoObjectTrackingDatasetMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.automl.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) - $root.google.cloud.automl.v1beta1.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OutputConfig.verify|verify} messages. + * Encodes the specified VideoObjectTrackingDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata} message VideoObjectTrackingDatasetMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + VideoObjectTrackingDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decode = function decode(reader, length) { + VideoObjectTrackingDatasetMetadata.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.automl.v1beta1.OutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.decode(reader, reader.uint32()); - break; - case 2: - message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -42731,138 +43832,93 @@ }; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decodeDelimited = function decodeDelimited(reader) { + VideoObjectTrackingDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputConfig message. + * Verifies a VideoObjectTrackingDatasetMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputConfig.verify = function verify(message) { + VideoObjectTrackingDatasetMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1beta1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; - } - } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - if (properties.destination === 1) - return "destination: multiple values"; - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1beta1.BigQueryDestination.verify(message.bigqueryDestination); - if (error) - return "bigqueryDestination." + error; - } - } return null; }; /** - * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingDatasetMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.OutputConfig} OutputConfig + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata */ - OutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.OutputConfig) + VideoObjectTrackingDatasetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.OutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.fromObject(object.gcsDestination); - } - if (object.bigqueryDestination != null) { - if (typeof object.bigqueryDestination !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OutputConfig.bigqueryDestination: object expected"); - message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.fromObject(object.bigqueryDestination); - } - return message; + return new $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata(); }; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a VideoObjectTrackingDatasetMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @static - * @param {google.cloud.automl.v1beta1.OutputConfig} message OutputConfig + * @param {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} message VideoObjectTrackingDatasetMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; - } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - object.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.toObject(message.bigqueryDestination, options); - if (options.oneofs) - object.destination = "bigqueryDestination"; - } - return object; + VideoObjectTrackingDatasetMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this OutputConfig to JSON. + * Converts this VideoObjectTrackingDatasetMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.OutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata * @instance * @returns {Object.} JSON object */ - OutputConfig.prototype.toJSON = function toJSON() { + VideoObjectTrackingDatasetMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputConfig; + return VideoObjectTrackingDatasetMetadata; })(); - v1beta1.BatchPredictOutputConfig = (function() { + v1beta1.VideoClassificationModelMetadata = (function() { /** - * Properties of a BatchPredictOutputConfig. + * Properties of a VideoClassificationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IBatchPredictOutputConfig - * @property {google.cloud.automl.v1beta1.IGcsDestination|null} [gcsDestination] BatchPredictOutputConfig gcsDestination - * @property {google.cloud.automl.v1beta1.IBigQueryDestination|null} [bigqueryDestination] BatchPredictOutputConfig bigqueryDestination + * @interface IVideoClassificationModelMetadata */ /** - * Constructs a new BatchPredictOutputConfig. + * Constructs a new VideoClassificationModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BatchPredictOutputConfig. - * @implements IBatchPredictOutputConfig + * @classdesc Represents a VideoClassificationModelMetadata. + * @implements IVideoClassificationModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata=} [properties] Properties to set */ - function BatchPredictOutputConfig(properties) { + function VideoClassificationModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42870,103 +43926,63 @@ } /** - * BatchPredictOutputConfig gcsDestination. - * @member {google.cloud.automl.v1beta1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig - * @instance - */ - BatchPredictOutputConfig.prototype.gcsDestination = null; - - /** - * BatchPredictOutputConfig bigqueryDestination. - * @member {google.cloud.automl.v1beta1.IBigQueryDestination|null|undefined} bigqueryDestination - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig - * @instance - */ - BatchPredictOutputConfig.prototype.bigqueryDestination = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BatchPredictOutputConfig destination. - * @member {"gcsDestination"|"bigqueryDestination"|undefined} destination - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig - * @instance - */ - Object.defineProperty(BatchPredictOutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "bigqueryDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BatchPredictOutputConfig instance using the specified properties. + * Creates a new VideoClassificationModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig instance + * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata instance */ - BatchPredictOutputConfig.create = function create(properties) { - return new BatchPredictOutputConfig(properties); + VideoClassificationModelMetadata.create = function create(properties) { + return new VideoClassificationModelMetadata(properties); }; /** - * Encodes the specified BatchPredictOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. + * Encodes the specified VideoClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata} message VideoClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOutputConfig.encode = function encode(message, writer) { + VideoClassificationModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.automl.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) - $root.google.cloud.automl.v1beta1.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchPredictOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify|verify} messages. + * Encodes the specified VideoClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictOutputConfig} message BatchPredictOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata} message VideoClassificationModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + VideoClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer. + * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig + * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictOutputConfig.decode = function decode(reader, length) { + VideoClassificationModelMetadata.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.automl.v1beta1.BatchPredictOutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.decode(reader, reader.uint32()); - break; - case 2: - message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -42976,141 +43992,93 @@ }; /** - * Decodes a BatchPredictOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig + * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictOutputConfig.decodeDelimited = function decodeDelimited(reader) { + VideoClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictOutputConfig message. + * Verifies a VideoClassificationModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchPredictOutputConfig.verify = function verify(message) { + VideoClassificationModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1beta1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; - } - } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - if (properties.destination === 1) - return "destination: multiple values"; - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1beta1.BigQueryDestination.verify(message.bigqueryDestination); - if (error) - return "bigqueryDestination." + error; - } - } return null; }; /** - * Creates a BatchPredictOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a VideoClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BatchPredictOutputConfig} BatchPredictOutputConfig + * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata */ - BatchPredictOutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig) + VideoClassificationModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.fromObject(object.gcsDestination); - } - if (object.bigqueryDestination != null) { - if (typeof object.bigqueryDestination !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigqueryDestination: object expected"); - message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.fromObject(object.bigqueryDestination); - } - return message; + return new $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata(); }; - /** - * Creates a plain object from a BatchPredictOutputConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig - * @static - * @param {google.cloud.automl.v1beta1.BatchPredictOutputConfig} message BatchPredictOutputConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchPredictOutputConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; - } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - object.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.toObject(message.bigqueryDestination, options); - if (options.oneofs) - object.destination = "bigqueryDestination"; - } - return object; + /** + * Creates a plain object from a VideoClassificationModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @static + * @param {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} message VideoClassificationModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VideoClassificationModelMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this BatchPredictOutputConfig to JSON. + * Converts this VideoClassificationModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BatchPredictOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata * @instance * @returns {Object.} JSON object */ - BatchPredictOutputConfig.prototype.toJSON = function toJSON() { + VideoClassificationModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchPredictOutputConfig; + return VideoClassificationModelMetadata; })(); - v1beta1.ModelExportOutputConfig = (function() { + v1beta1.VideoObjectTrackingModelMetadata = (function() { /** - * Properties of a ModelExportOutputConfig. + * Properties of a VideoObjectTrackingModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IModelExportOutputConfig - * @property {google.cloud.automl.v1beta1.IGcsDestination|null} [gcsDestination] ModelExportOutputConfig gcsDestination - * @property {google.cloud.automl.v1beta1.IGcrDestination|null} [gcrDestination] ModelExportOutputConfig gcrDestination - * @property {string|null} [modelFormat] ModelExportOutputConfig modelFormat - * @property {Object.|null} [params] ModelExportOutputConfig params + * @interface IVideoObjectTrackingModelMetadata */ /** - * Constructs a new ModelExportOutputConfig. + * Constructs a new VideoObjectTrackingModelMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ModelExportOutputConfig. - * @implements IModelExportOutputConfig + * @classdesc Represents a VideoObjectTrackingModelMetadata. + * @implements IVideoObjectTrackingModelMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata=} [properties] Properties to set */ - function ModelExportOutputConfig(properties) { - this.params = {}; + function VideoObjectTrackingModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43118,135 +44086,63 @@ } /** - * ModelExportOutputConfig gcsDestination. - * @member {google.cloud.automl.v1beta1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig - * @instance - */ - ModelExportOutputConfig.prototype.gcsDestination = null; - - /** - * ModelExportOutputConfig gcrDestination. - * @member {google.cloud.automl.v1beta1.IGcrDestination|null|undefined} gcrDestination - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig - * @instance - */ - ModelExportOutputConfig.prototype.gcrDestination = null; - - /** - * ModelExportOutputConfig modelFormat. - * @member {string} modelFormat - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig - * @instance - */ - ModelExportOutputConfig.prototype.modelFormat = ""; - - /** - * ModelExportOutputConfig params. - * @member {Object.} params - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig - * @instance - */ - ModelExportOutputConfig.prototype.params = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ModelExportOutputConfig destination. - * @member {"gcsDestination"|"gcrDestination"|undefined} destination - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig - * @instance - */ - Object.defineProperty(ModelExportOutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "gcrDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ModelExportOutputConfig instance using the specified properties. + * Creates a new VideoObjectTrackingModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig instance + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata instance */ - ModelExportOutputConfig.create = function create(properties) { - return new ModelExportOutputConfig(properties); + VideoObjectTrackingModelMetadata.create = function create(properties) { + return new VideoObjectTrackingModelMetadata(properties); }; /** - * Encodes the specified ModelExportOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. + * Encodes the specified VideoObjectTrackingModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata} message VideoObjectTrackingModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelExportOutputConfig.encode = function encode(message, writer) { + VideoObjectTrackingModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.automl.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.params != null && message.hasOwnProperty("params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); - if (message.gcrDestination != null && message.hasOwnProperty("gcrDestination")) - $root.google.cloud.automl.v1beta1.GcrDestination.encode(message.gcrDestination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.modelFormat); return writer; }; /** - * Encodes the specified ModelExportOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelExportOutputConfig.verify|verify} messages. + * Encodes the specified VideoObjectTrackingModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static - * @param {google.cloud.automl.v1beta1.IModelExportOutputConfig} message ModelExportOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata} message VideoObjectTrackingModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelExportOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + VideoObjectTrackingModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer. + * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelExportOutputConfig.decode = function decode(reader, length) { + VideoObjectTrackingModelMetadata.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.automl.v1beta1.ModelExportOutputConfig(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.decode(reader, reader.uint32()); - break; - case 3: - message.gcrDestination = $root.google.cloud.automl.v1beta1.GcrDestination.decode(reader, reader.uint32()); - break; - case 4: - message.modelFormat = reader.string(); - break; - case 2: - reader.skip().pos++; - if (message.params === $util.emptyObject) - message.params = {}; - key = reader.string(); - reader.pos++; - message.params[key] = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -43256,169 +44152,108 @@ }; /** - * Decodes a ModelExportOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelExportOutputConfig.decodeDelimited = function decodeDelimited(reader) { + VideoObjectTrackingModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModelExportOutputConfig message. + * Verifies a VideoObjectTrackingModelMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelExportOutputConfig.verify = function verify(message) { + VideoObjectTrackingModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1beta1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; - } - } - if (message.gcrDestination != null && message.hasOwnProperty("gcrDestination")) { - if (properties.destination === 1) - return "destination: multiple values"; - properties.destination = 1; - { - var error = $root.google.cloud.automl.v1beta1.GcrDestination.verify(message.gcrDestination); - if (error) - return "gcrDestination." + error; - } - } - if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) - if (!$util.isString(message.modelFormat)) - return "modelFormat: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; - } return null; }; /** - * Creates a ModelExportOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ModelExportOutputConfig} ModelExportOutputConfig + * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata */ - ModelExportOutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ModelExportOutputConfig) + VideoObjectTrackingModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.ModelExportOutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelExportOutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.fromObject(object.gcsDestination); - } - if (object.gcrDestination != null) { - if (typeof object.gcrDestination !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelExportOutputConfig.gcrDestination: object expected"); - message.gcrDestination = $root.google.cloud.automl.v1beta1.GcrDestination.fromObject(object.gcrDestination); - } - if (object.modelFormat != null) - message.modelFormat = String(object.modelFormat); - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelExportOutputConfig.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); - } - return message; + return new $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata(); }; /** - * Creates a plain object from a ModelExportOutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a VideoObjectTrackingModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @static - * @param {google.cloud.automl.v1beta1.ModelExportOutputConfig} message ModelExportOutputConfig + * @param {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} message VideoObjectTrackingModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelExportOutputConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.params = {}; - if (options.defaults) - object.modelFormat = ""; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.automl.v1beta1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; - } - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; - } - if (message.gcrDestination != null && message.hasOwnProperty("gcrDestination")) { - object.gcrDestination = $root.google.cloud.automl.v1beta1.GcrDestination.toObject(message.gcrDestination, options); - if (options.oneofs) - object.destination = "gcrDestination"; - } - if (message.modelFormat != null && message.hasOwnProperty("modelFormat")) - object.modelFormat = message.modelFormat; - return object; + VideoObjectTrackingModelMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this ModelExportOutputConfig to JSON. + * Converts this VideoObjectTrackingModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ModelExportOutputConfig + * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata * @instance * @returns {Object.} JSON object */ - ModelExportOutputConfig.prototype.toJSON = function toJSON() { + VideoObjectTrackingModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ModelExportOutputConfig; + return VideoObjectTrackingModelMetadata; })(); - v1beta1.ExportEvaluatedExamplesOutputConfig = (function() { + v1beta1.Model = (function() { /** - * Properties of an ExportEvaluatedExamplesOutputConfig. + * Properties of a Model. * @memberof google.cloud.automl.v1beta1 - * @interface IExportEvaluatedExamplesOutputConfig - * @property {google.cloud.automl.v1beta1.IBigQueryDestination|null} [bigqueryDestination] ExportEvaluatedExamplesOutputConfig bigqueryDestination + * @interface IModel + * @property {google.cloud.automl.v1beta1.ITranslationModelMetadata|null} [translationModelMetadata] Model translationModelMetadata + * @property {google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null} [imageClassificationModelMetadata] Model imageClassificationModelMetadata + * @property {google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null} [textClassificationModelMetadata] Model textClassificationModelMetadata + * @property {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null} [imageObjectDetectionModelMetadata] Model imageObjectDetectionModelMetadata + * @property {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null} [videoClassificationModelMetadata] Model videoClassificationModelMetadata + * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null} [videoObjectTrackingModelMetadata] Model videoObjectTrackingModelMetadata + * @property {google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null} [textExtractionModelMetadata] Model textExtractionModelMetadata + * @property {google.cloud.automl.v1beta1.ITablesModelMetadata|null} [tablesModelMetadata] Model tablesModelMetadata + * @property {google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null} [textSentimentModelMetadata] Model textSentimentModelMetadata + * @property {string|null} [name] Model name + * @property {string|null} [displayName] Model displayName + * @property {string|null} [datasetId] Model datasetId + * @property {google.protobuf.ITimestamp|null} [createTime] Model createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Model updateTime + * @property {google.cloud.automl.v1beta1.Model.DeploymentState|null} [deploymentState] Model deploymentState */ /** - * Constructs a new ExportEvaluatedExamplesOutputConfig. + * Constructs a new Model. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExportEvaluatedExamplesOutputConfig. - * @implements IExportEvaluatedExamplesOutputConfig + * @classdesc Represents a Model. + * @implements IModel * @constructor - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IModel=} [properties] Properties to set */ - function ExportEvaluatedExamplesOutputConfig(properties) { + function Model(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43426,89 +44261,271 @@ } /** - * ExportEvaluatedExamplesOutputConfig bigqueryDestination. - * @member {google.cloud.automl.v1beta1.IBigQueryDestination|null|undefined} bigqueryDestination - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * Model translationModelMetadata. + * @member {google.cloud.automl.v1beta1.ITranslationModelMetadata|null|undefined} translationModelMetadata + * @memberof google.cloud.automl.v1beta1.Model * @instance */ - ExportEvaluatedExamplesOutputConfig.prototype.bigqueryDestination = null; + Model.prototype.translationModelMetadata = null; + + /** + * Model imageClassificationModelMetadata. + * @member {google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null|undefined} imageClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.imageClassificationModelMetadata = null; + + /** + * Model textClassificationModelMetadata. + * @member {google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null|undefined} textClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.textClassificationModelMetadata = null; + + /** + * Model imageObjectDetectionModelMetadata. + * @member {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null|undefined} imageObjectDetectionModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.imageObjectDetectionModelMetadata = null; + + /** + * Model videoClassificationModelMetadata. + * @member {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null|undefined} videoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.videoClassificationModelMetadata = null; + + /** + * Model videoObjectTrackingModelMetadata. + * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null|undefined} videoObjectTrackingModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.videoObjectTrackingModelMetadata = null; + + /** + * Model textExtractionModelMetadata. + * @member {google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null|undefined} textExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.textExtractionModelMetadata = null; + + /** + * Model tablesModelMetadata. + * @member {google.cloud.automl.v1beta1.ITablesModelMetadata|null|undefined} tablesModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.tablesModelMetadata = null; + + /** + * Model textSentimentModelMetadata. + * @member {google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null|undefined} textSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.textSentimentModelMetadata = null; + + /** + * Model name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.name = ""; + + /** + * Model displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.displayName = ""; + + /** + * Model datasetId. + * @member {string} datasetId + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.datasetId = ""; + + /** + * Model createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.createTime = null; + + /** + * Model updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.updateTime = null; + + /** + * Model deploymentState. + * @member {google.cloud.automl.v1beta1.Model.DeploymentState} deploymentState + * @memberof google.cloud.automl.v1beta1.Model + * @instance + */ + Model.prototype.deploymentState = 0; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ExportEvaluatedExamplesOutputConfig destination. - * @member {"bigqueryDestination"|undefined} destination - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * Model modelMetadata. + * @member {"translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"videoClassificationModelMetadata"|"videoObjectTrackingModelMetadata"|"textExtractionModelMetadata"|"tablesModelMetadata"|"textSentimentModelMetadata"|undefined} modelMetadata + * @memberof google.cloud.automl.v1beta1.Model * @instance */ - Object.defineProperty(ExportEvaluatedExamplesOutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryDestination"]), + Object.defineProperty(Model.prototype, "modelMetadata", { + get: $util.oneOfGetter($oneOfFields = ["translationModelMetadata", "imageClassificationModelMetadata", "textClassificationModelMetadata", "imageObjectDetectionModelMetadata", "videoClassificationModelMetadata", "videoObjectTrackingModelMetadata", "textExtractionModelMetadata", "tablesModelMetadata", "textSentimentModelMetadata"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ExportEvaluatedExamplesOutputConfig instance using the specified properties. + * Creates a new Model instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig instance + * @param {google.cloud.automl.v1beta1.IModel=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.Model} Model instance */ - ExportEvaluatedExamplesOutputConfig.create = function create(properties) { - return new ExportEvaluatedExamplesOutputConfig(properties); + Model.create = function create(properties) { + return new Model(properties); }; /** - * Encodes the specified ExportEvaluatedExamplesOutputConfig message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. + * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig} message ExportEvaluatedExamplesOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IModel} message Model message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEvaluatedExamplesOutputConfig.encode = function encode(message, writer) { + Model.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) - $root.google.cloud.automl.v1beta1.BigQueryDestination.encode(message.bigqueryDestination, 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.datasetId != null && message.hasOwnProperty("datasetId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.datasetId); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.deploymentState); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) + $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.encode(message.imageClassificationModelMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) + $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.encode(message.textClassificationModelMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) + $root.google.cloud.automl.v1beta1.TranslationModelMetadata.encode(message.translationModelMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) + $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.encode(message.textExtractionModelMetadata, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) + $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.encode(message.imageObjectDetectionModelMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.videoObjectTrackingModelMetadata != null && message.hasOwnProperty("videoObjectTrackingModelMetadata")) + $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.encode(message.videoObjectTrackingModelMetadata, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) + $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.encode(message.textSentimentModelMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.videoClassificationModelMetadata != null && message.hasOwnProperty("videoClassificationModelMetadata")) + $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.encode(message.videoClassificationModelMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.tablesModelMetadata != null && message.hasOwnProperty("tablesModelMetadata")) + $root.google.cloud.automl.v1beta1.TablesModelMetadata.encode(message.tablesModelMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportEvaluatedExamplesOutputConfig message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify|verify} messages. + * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig} message ExportEvaluatedExamplesOutputConfig message or plain object to encode + * @param {google.cloud.automl.v1beta1.IModel} message Model message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEvaluatedExamplesOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + Model.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer. + * Decodes a Model message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig + * @returns {google.cloud.automl.v1beta1.Model} Model * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEvaluatedExamplesOutputConfig.decode = function decode(reader, length) { + Model.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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.Model(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 15: + message.translationModelMetadata = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.decode(reader, reader.uint32()); + break; + case 13: + message.imageClassificationModelMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.decode(reader, reader.uint32()); + break; + case 14: + message.textClassificationModelMetadata = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.decode(reader, reader.uint32()); + break; + case 20: + message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.decode(reader, reader.uint32()); + break; + case 23: + message.videoClassificationModelMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.decode(reader, reader.uint32()); + break; + case 21: + message.videoObjectTrackingModelMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.decode(reader, reader.uint32()); + break; + case 19: + message.textExtractionModelMetadata = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.decode(reader, reader.uint32()); + break; + case 24: + message.tablesModelMetadata = $root.google.cloud.automl.v1beta1.TablesModelMetadata.decode(reader, reader.uint32()); + break; + case 22: + message.textSentimentModelMetadata = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.decode(reader, reader.uint32()); + break; + case 1: + message.name = reader.string(); + break; case 2: - message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + case 3: + message.datasetId = reader.string(); + break; + case 7: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.deploymentState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -43519,118 +44536,382 @@ }; /** - * Decodes an ExportEvaluatedExamplesOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a Model message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig + * @returns {google.cloud.automl.v1beta1.Model} Model * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEvaluatedExamplesOutputConfig.decodeDelimited = function decodeDelimited(reader) { + Model.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportEvaluatedExamplesOutputConfig message. + * Verifies a Model message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportEvaluatedExamplesOutputConfig.verify = function verify(message) { + Model.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - properties.destination = 1; + if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { + properties.modelMetadata = 1; { - var error = $root.google.cloud.automl.v1beta1.BigQueryDestination.verify(message.bigqueryDestination); + var error = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.verify(message.translationModelMetadata); if (error) - return "bigqueryDestination." + error; + return "translationModelMetadata." + error; + } + } + if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify(message.imageClassificationModelMetadata); + if (error) + return "imageClassificationModelMetadata." + error; + } + } + if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify(message.textClassificationModelMetadata); + if (error) + return "textClassificationModelMetadata." + error; + } + } + if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify(message.imageObjectDetectionModelMetadata); + if (error) + return "imageObjectDetectionModelMetadata." + error; + } + } + if (message.videoClassificationModelMetadata != null && message.hasOwnProperty("videoClassificationModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify(message.videoClassificationModelMetadata); + if (error) + return "videoClassificationModelMetadata." + error; + } + } + if (message.videoObjectTrackingModelMetadata != null && message.hasOwnProperty("videoObjectTrackingModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify(message.videoObjectTrackingModelMetadata); + if (error) + return "videoObjectTrackingModelMetadata." + error; + } + } + if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify(message.textExtractionModelMetadata); + if (error) + return "textExtractionModelMetadata." + error; + } + } + if (message.tablesModelMetadata != null && message.hasOwnProperty("tablesModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TablesModelMetadata.verify(message.tablesModelMetadata); + if (error) + return "tablesModelMetadata." + error; + } + } + if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify(message.textSentimentModelMetadata); + if (error) + return "textSentimentModelMetadata." + error; } } + 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.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string 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.deploymentState != null && message.hasOwnProperty("deploymentState")) + switch (message.deploymentState) { + default: + return "deploymentState: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates an ExportEvaluatedExamplesOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Model message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} ExportEvaluatedExamplesOutputConfig + * @returns {google.cloud.automl.v1beta1.Model} Model */ - ExportEvaluatedExamplesOutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) + Model.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.Model) return object; - var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig(); - if (object.bigqueryDestination != null) { - if (typeof object.bigqueryDestination !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.bigqueryDestination: object expected"); - message.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.fromObject(object.bigqueryDestination); + var message = new $root.google.cloud.automl.v1beta1.Model(); + if (object.translationModelMetadata != null) { + if (typeof object.translationModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.translationModelMetadata: object expected"); + message.translationModelMetadata = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.fromObject(object.translationModelMetadata); + } + if (object.imageClassificationModelMetadata != null) { + if (typeof object.imageClassificationModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.imageClassificationModelMetadata: object expected"); + message.imageClassificationModelMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.fromObject(object.imageClassificationModelMetadata); + } + if (object.textClassificationModelMetadata != null) { + if (typeof object.textClassificationModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.textClassificationModelMetadata: object expected"); + message.textClassificationModelMetadata = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.fromObject(object.textClassificationModelMetadata); + } + if (object.imageObjectDetectionModelMetadata != null) { + if (typeof object.imageObjectDetectionModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.imageObjectDetectionModelMetadata: object expected"); + message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.fromObject(object.imageObjectDetectionModelMetadata); + } + if (object.videoClassificationModelMetadata != null) { + if (typeof object.videoClassificationModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.videoClassificationModelMetadata: object expected"); + message.videoClassificationModelMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.fromObject(object.videoClassificationModelMetadata); + } + if (object.videoObjectTrackingModelMetadata != null) { + if (typeof object.videoObjectTrackingModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.videoObjectTrackingModelMetadata: object expected"); + message.videoObjectTrackingModelMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.fromObject(object.videoObjectTrackingModelMetadata); + } + if (object.textExtractionModelMetadata != null) { + if (typeof object.textExtractionModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.textExtractionModelMetadata: object expected"); + message.textExtractionModelMetadata = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.fromObject(object.textExtractionModelMetadata); + } + if (object.tablesModelMetadata != null) { + if (typeof object.tablesModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.tablesModelMetadata: object expected"); + message.tablesModelMetadata = $root.google.cloud.automl.v1beta1.TablesModelMetadata.fromObject(object.tablesModelMetadata); + } + if (object.textSentimentModelMetadata != null) { + if (typeof object.textSentimentModelMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.textSentimentModelMetadata: object expected"); + message.textSentimentModelMetadata = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.fromObject(object.textSentimentModelMetadata); + } + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.automl.v1beta1.Model.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.automl.v1beta1.Model.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.deploymentState) { + case "DEPLOYMENT_STATE_UNSPECIFIED": + case 0: + message.deploymentState = 0; + break; + case "DEPLOYED": + case 1: + message.deploymentState = 1; + break; + case "UNDEPLOYED": + case 2: + message.deploymentState = 2; + break; } return message; }; /** - * Creates a plain object from an ExportEvaluatedExamplesOutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a Model message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @static - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} message ExportEvaluatedExamplesOutputConfig + * @param {google.cloud.automl.v1beta1.Model} message Model * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportEvaluatedExamplesOutputConfig.toObject = function toObject(message, options) { + Model.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - object.bigqueryDestination = $root.google.cloud.automl.v1beta1.BigQueryDestination.toObject(message.bigqueryDestination, options); + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.datasetId = ""; + object.createTime = null; + object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; + object.updateTime = 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.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1beta1.Model.DeploymentState[message.deploymentState] : message.deploymentState; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { + object.imageClassificationModelMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.toObject(message.imageClassificationModelMetadata, options); if (options.oneofs) - object.destination = "bigqueryDestination"; + object.modelMetadata = "imageClassificationModelMetadata"; + } + if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { + object.textClassificationModelMetadata = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.toObject(message.textClassificationModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "textClassificationModelMetadata"; + } + if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { + object.translationModelMetadata = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.toObject(message.translationModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "translationModelMetadata"; + } + if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { + object.textExtractionModelMetadata = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.toObject(message.textExtractionModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "textExtractionModelMetadata"; + } + if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { + object.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.toObject(message.imageObjectDetectionModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "imageObjectDetectionModelMetadata"; + } + if (message.videoObjectTrackingModelMetadata != null && message.hasOwnProperty("videoObjectTrackingModelMetadata")) { + object.videoObjectTrackingModelMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.toObject(message.videoObjectTrackingModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "videoObjectTrackingModelMetadata"; + } + if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { + object.textSentimentModelMetadata = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.toObject(message.textSentimentModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "textSentimentModelMetadata"; + } + if (message.videoClassificationModelMetadata != null && message.hasOwnProperty("videoClassificationModelMetadata")) { + object.videoClassificationModelMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.toObject(message.videoClassificationModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "videoClassificationModelMetadata"; + } + if (message.tablesModelMetadata != null && message.hasOwnProperty("tablesModelMetadata")) { + object.tablesModelMetadata = $root.google.cloud.automl.v1beta1.TablesModelMetadata.toObject(message.tablesModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "tablesModelMetadata"; } return object; }; /** - * Converts this ExportEvaluatedExamplesOutputConfig to JSON. + * Converts this Model to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + * @memberof google.cloud.automl.v1beta1.Model * @instance * @returns {Object.} JSON object */ - ExportEvaluatedExamplesOutputConfig.prototype.toJSON = function toJSON() { + Model.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportEvaluatedExamplesOutputConfig; + /** + * DeploymentState enum. + * @name google.cloud.automl.v1beta1.Model.DeploymentState + * @enum {string} + * @property {number} DEPLOYMENT_STATE_UNSPECIFIED=0 DEPLOYMENT_STATE_UNSPECIFIED value + * @property {number} DEPLOYED=1 DEPLOYED value + * @property {number} UNDEPLOYED=2 UNDEPLOYED value + */ + Model.DeploymentState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEPLOYMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEPLOYED"] = 1; + values[valuesById[2] = "UNDEPLOYED"] = 2; + return values; + })(); + + return Model; })(); - v1beta1.GcsSource = (function() { + v1beta1.ModelEvaluation = (function() { /** - * Properties of a GcsSource. + * Properties of a ModelEvaluation. * @memberof google.cloud.automl.v1beta1 - * @interface IGcsSource - * @property {Array.|null} [inputUris] GcsSource inputUris + * @interface IModelEvaluation + * @property {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null} [classificationEvaluationMetrics] ModelEvaluation classificationEvaluationMetrics + * @property {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null} [regressionEvaluationMetrics] ModelEvaluation regressionEvaluationMetrics + * @property {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null} [translationEvaluationMetrics] ModelEvaluation translationEvaluationMetrics + * @property {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null} [imageObjectDetectionEvaluationMetrics] ModelEvaluation imageObjectDetectionEvaluationMetrics + * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null} [videoObjectTrackingEvaluationMetrics] ModelEvaluation videoObjectTrackingEvaluationMetrics + * @property {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null} [textSentimentEvaluationMetrics] ModelEvaluation textSentimentEvaluationMetrics + * @property {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null} [textExtractionEvaluationMetrics] ModelEvaluation textExtractionEvaluationMetrics + * @property {string|null} [name] ModelEvaluation name + * @property {string|null} [annotationSpecId] ModelEvaluation annotationSpecId + * @property {string|null} [displayName] ModelEvaluation displayName + * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluation createTime + * @property {number|null} [evaluatedExampleCount] ModelEvaluation evaluatedExampleCount */ /** - * Constructs a new GcsSource. + * Constructs a new ModelEvaluation. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GcsSource. - * @implements IGcsSource + * @classdesc Represents a ModelEvaluation. + * @implements IModelEvaluation * @constructor - * @param {google.cloud.automl.v1beta1.IGcsSource=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IModelEvaluation=} [properties] Properties to set */ - function GcsSource(properties) { - this.inputUris = []; + function ModelEvaluation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43638,277 +44919,232 @@ } /** - * GcsSource inputUris. - * @member {Array.} inputUris - * @memberof google.cloud.automl.v1beta1.GcsSource + * ModelEvaluation classificationEvaluationMetrics. + * @member {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null|undefined} classificationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @instance */ - GcsSource.prototype.inputUris = $util.emptyArray; + ModelEvaluation.prototype.classificationEvaluationMetrics = null; /** - * Creates a new GcsSource instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {google.cloud.automl.v1beta1.IGcsSource=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource instance + * ModelEvaluation regressionEvaluationMetrics. + * @member {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null|undefined} regressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.create = function create(properties) { - return new GcsSource(properties); - }; + ModelEvaluation.prototype.regressionEvaluationMetrics = null; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {google.cloud.automl.v1beta1.IGcsSource} message GcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ModelEvaluation translationEvaluationMetrics. + * @member {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null|undefined} translationEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputUris != null && message.inputUris.length) - for (var i = 0; i < message.inputUris.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); - return writer; - }; + ModelEvaluation.prototype.translationEvaluationMetrics = null; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {google.cloud.automl.v1beta1.IGcsSource} message GcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ModelEvaluation imageObjectDetectionEvaluationMetrics. + * @member {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null|undefined} imageObjectDetectionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + ModelEvaluation.prototype.imageObjectDetectionEvaluationMetrics = null; /** - * Decodes a GcsSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ModelEvaluation videoObjectTrackingEvaluationMetrics. + * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null|undefined} videoObjectTrackingEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.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.automl.v1beta1.GcsSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.inputUris && message.inputUris.length)) - message.inputUris = []; - message.inputUris.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + ModelEvaluation.prototype.videoObjectTrackingEvaluationMetrics = null; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ModelEvaluation textSentimentEvaluationMetrics. + * @member {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null|undefined} textSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + ModelEvaluation.prototype.textSentimentEvaluationMetrics = null; /** - * Verifies a GcsSource message. - * @function verify - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * ModelEvaluation textExtractionEvaluationMetrics. + * @member {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null|undefined} textExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputUris != null && message.hasOwnProperty("inputUris")) { - if (!Array.isArray(message.inputUris)) - return "inputUris: array expected"; - for (var i = 0; i < message.inputUris.length; ++i) - if (!$util.isString(message.inputUris[i])) - return "inputUris: string[] expected"; - } - return null; - }; + ModelEvaluation.prototype.textExtractionEvaluationMetrics = null; /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GcsSource} GcsSource + * ModelEvaluation name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GcsSource) - return object; - var message = new $root.google.cloud.automl.v1beta1.GcsSource(); - if (object.inputUris) { - if (!Array.isArray(object.inputUris)) - throw TypeError(".google.cloud.automl.v1beta1.GcsSource.inputUris: array expected"); - message.inputUris = []; - for (var i = 0; i < object.inputUris.length; ++i) - message.inputUris[i] = String(object.inputUris[i]); - } - return message; - }; + ModelEvaluation.prototype.name = ""; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.GcsSource - * @static - * @param {google.cloud.automl.v1beta1.GcsSource} message GcsSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ModelEvaluation annotationSpecId. + * @member {string} annotationSpecId + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - GcsSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputUris = []; - if (message.inputUris && message.inputUris.length) { - object.inputUris = []; - for (var j = 0; j < message.inputUris.length; ++j) - object.inputUris[j] = message.inputUris[j]; - } - return object; - }; + ModelEvaluation.prototype.annotationSpecId = ""; /** - * Converts this GcsSource to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.GcsSource + * ModelEvaluation displayName. + * @member {string} displayName + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @instance - * @returns {Object.} JSON object */ - GcsSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GcsSource; - })(); - - v1beta1.BigQuerySource = (function() { + ModelEvaluation.prototype.displayName = ""; /** - * Properties of a BigQuerySource. - * @memberof google.cloud.automl.v1beta1 - * @interface IBigQuerySource - * @property {string|null} [inputUri] BigQuerySource inputUri + * ModelEvaluation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ + ModelEvaluation.prototype.createTime = null; /** - * Constructs a new BigQuerySource. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BigQuerySource. - * @implements IBigQuerySource - * @constructor - * @param {google.cloud.automl.v1beta1.IBigQuerySource=} [properties] Properties to set + * ModelEvaluation evaluatedExampleCount. + * @member {number} evaluatedExampleCount + * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @instance */ - function BigQuerySource(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]]; - } + ModelEvaluation.prototype.evaluatedExampleCount = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BigQuerySource inputUri. - * @member {string} inputUri - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * ModelEvaluation metrics. + * @member {"classificationEvaluationMetrics"|"regressionEvaluationMetrics"|"translationEvaluationMetrics"|"imageObjectDetectionEvaluationMetrics"|"videoObjectTrackingEvaluationMetrics"|"textSentimentEvaluationMetrics"|"textExtractionEvaluationMetrics"|undefined} metrics + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @instance */ - BigQuerySource.prototype.inputUri = ""; + Object.defineProperty(ModelEvaluation.prototype, "metrics", { + get: $util.oneOfGetter($oneOfFields = ["classificationEvaluationMetrics", "regressionEvaluationMetrics", "translationEvaluationMetrics", "imageObjectDetectionEvaluationMetrics", "videoObjectTrackingEvaluationMetrics", "textSentimentEvaluationMetrics", "textExtractionEvaluationMetrics"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new BigQuerySource instance using the specified properties. + * Creates a new ModelEvaluation instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static - * @param {google.cloud.automl.v1beta1.IBigQuerySource=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource instance + * @param {google.cloud.automl.v1beta1.IModelEvaluation=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation instance */ - BigQuerySource.create = function create(properties) { - return new BigQuerySource(properties); + ModelEvaluation.create = function create(properties) { + return new ModelEvaluation(properties); }; /** - * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. + * Encodes the specified ModelEvaluation message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static - * @param {google.cloud.automl.v1beta1.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.automl.v1beta1.IModelEvaluation} message ModelEvaluation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encode = function encode(message, writer) { + ModelEvaluation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputUri != null && message.hasOwnProperty("inputUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUri); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.annotationSpecId); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.evaluatedExampleCount); + if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) + $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.encode(message.classificationEvaluationMetrics, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) + $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.encode(message.translationEvaluationMetrics, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) + $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.encode(message.textSentimentEvaluationMetrics, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) + $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.encode(message.imageObjectDetectionEvaluationMetrics, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) + $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.encode(message.textExtractionEvaluationMetrics, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.videoObjectTrackingEvaluationMetrics != null && message.hasOwnProperty("videoObjectTrackingEvaluationMetrics")) + $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.encode(message.videoObjectTrackingEvaluationMetrics, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.displayName); + if (message.regressionEvaluationMetrics != null && message.hasOwnProperty("regressionEvaluationMetrics")) + $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.encode(message.regressionEvaluationMetrics, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQuerySource.verify|verify} messages. + * Encodes the specified ModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static - * @param {google.cloud.automl.v1beta1.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.automl.v1beta1.IModelEvaluation} message ModelEvaluation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + ModelEvaluation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQuerySource message from the specified reader or buffer. + * Decodes a ModelEvaluation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource + * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decode = function decode(reader, length) { + ModelEvaluation.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.automl.v1beta1.BigQuerySource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ModelEvaluation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 8: + message.classificationEvaluationMetrics = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 24: + message.regressionEvaluationMetrics = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 9: + message.translationEvaluationMetrics = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 12: + message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 14: + message.videoObjectTrackingEvaluationMetrics = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 11: + message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.decode(reader, reader.uint32()); + break; + case 13: + message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.decode(reader, reader.uint32()); + break; case 1: - message.inputUri = reader.string(); + message.name = reader.string(); + break; + case 2: + message.annotationSpecId = reader.string(); + break; + case 15: + message.displayName = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.evaluatedExampleCount = reader.int32(); break; default: reader.skipType(tag & 7); @@ -43919,107 +45155,297 @@ }; /** - * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. + * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource + * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decodeDelimited = function decodeDelimited(reader) { + ModelEvaluation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQuerySource message. + * Verifies a ModelEvaluation message. * @function verify - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQuerySource.verify = function verify(message) { + ModelEvaluation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputUri != null && message.hasOwnProperty("inputUri")) - if (!$util.isString(message.inputUri)) - return "inputUri: string expected"; + var properties = {}; + if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify(message.classificationEvaluationMetrics); + if (error) + return "classificationEvaluationMetrics." + error; + } + } + if (message.regressionEvaluationMetrics != null && message.hasOwnProperty("regressionEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify(message.regressionEvaluationMetrics); + if (error) + return "regressionEvaluationMetrics." + error; + } + } + if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify(message.translationEvaluationMetrics); + if (error) + return "translationEvaluationMetrics." + error; + } + } + if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify(message.imageObjectDetectionEvaluationMetrics); + if (error) + return "imageObjectDetectionEvaluationMetrics." + error; + } + } + if (message.videoObjectTrackingEvaluationMetrics != null && message.hasOwnProperty("videoObjectTrackingEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify(message.videoObjectTrackingEvaluationMetrics); + if (error) + return "videoObjectTrackingEvaluationMetrics." + error; + } + } + if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify(message.textSentimentEvaluationMetrics); + if (error) + return "textSentimentEvaluationMetrics." + error; + } + } + if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { + if (properties.metrics === 1) + return "metrics: multiple values"; + properties.metrics = 1; + { + var error = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify(message.textExtractionEvaluationMetrics); + if (error) + return "textExtractionEvaluationMetrics." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + if (!$util.isString(message.annotationSpecId)) + return "annotationSpecId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) + if (!$util.isInteger(message.evaluatedExampleCount)) + return "evaluatedExampleCount: integer expected"; return null; }; /** - * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. + * Creates a ModelEvaluation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BigQuerySource} BigQuerySource + * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation */ - BigQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BigQuerySource) + ModelEvaluation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ModelEvaluation) return object; - var message = new $root.google.cloud.automl.v1beta1.BigQuerySource(); - if (object.inputUri != null) - message.inputUri = String(object.inputUri); + var message = new $root.google.cloud.automl.v1beta1.ModelEvaluation(); + if (object.classificationEvaluationMetrics != null) { + if (typeof object.classificationEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.classificationEvaluationMetrics: object expected"); + message.classificationEvaluationMetrics = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.fromObject(object.classificationEvaluationMetrics); + } + if (object.regressionEvaluationMetrics != null) { + if (typeof object.regressionEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.regressionEvaluationMetrics: object expected"); + message.regressionEvaluationMetrics = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.fromObject(object.regressionEvaluationMetrics); + } + if (object.translationEvaluationMetrics != null) { + if (typeof object.translationEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.translationEvaluationMetrics: object expected"); + message.translationEvaluationMetrics = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.fromObject(object.translationEvaluationMetrics); + } + if (object.imageObjectDetectionEvaluationMetrics != null) { + if (typeof object.imageObjectDetectionEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.imageObjectDetectionEvaluationMetrics: object expected"); + message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.fromObject(object.imageObjectDetectionEvaluationMetrics); + } + if (object.videoObjectTrackingEvaluationMetrics != null) { + if (typeof object.videoObjectTrackingEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.videoObjectTrackingEvaluationMetrics: object expected"); + message.videoObjectTrackingEvaluationMetrics = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.fromObject(object.videoObjectTrackingEvaluationMetrics); + } + if (object.textSentimentEvaluationMetrics != null) { + if (typeof object.textSentimentEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.textSentimentEvaluationMetrics: object expected"); + message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.fromObject(object.textSentimentEvaluationMetrics); + } + if (object.textExtractionEvaluationMetrics != null) { + if (typeof object.textExtractionEvaluationMetrics !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.textExtractionEvaluationMetrics: object expected"); + message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.fromObject(object.textExtractionEvaluationMetrics); + } + if (object.name != null) + message.name = String(object.name); + if (object.annotationSpecId != null) + message.annotationSpecId = String(object.annotationSpecId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.evaluatedExampleCount != null) + message.evaluatedExampleCount = object.evaluatedExampleCount | 0; return message; }; /** - * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. + * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @static - * @param {google.cloud.automl.v1beta1.BigQuerySource} message BigQuerySource + * @param {google.cloud.automl.v1beta1.ModelEvaluation} message ModelEvaluation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQuerySource.toObject = function toObject(message, options) { + ModelEvaluation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.inputUri = ""; - if (message.inputUri != null && message.hasOwnProperty("inputUri")) - object.inputUri = message.inputUri; + if (options.defaults) { + object.name = ""; + object.annotationSpecId = ""; + object.createTime = null; + object.evaluatedExampleCount = 0; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) + object.annotationSpecId = message.annotationSpecId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) + object.evaluatedExampleCount = message.evaluatedExampleCount; + if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { + object.classificationEvaluationMetrics = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.toObject(message.classificationEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "classificationEvaluationMetrics"; + } + if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { + object.translationEvaluationMetrics = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.toObject(message.translationEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "translationEvaluationMetrics"; + } + if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { + object.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.toObject(message.textSentimentEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "textSentimentEvaluationMetrics"; + } + if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { + object.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.toObject(message.imageObjectDetectionEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "imageObjectDetectionEvaluationMetrics"; + } + if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { + object.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.toObject(message.textExtractionEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "textExtractionEvaluationMetrics"; + } + if (message.videoObjectTrackingEvaluationMetrics != null && message.hasOwnProperty("videoObjectTrackingEvaluationMetrics")) { + object.videoObjectTrackingEvaluationMetrics = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.toObject(message.videoObjectTrackingEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "videoObjectTrackingEvaluationMetrics"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.regressionEvaluationMetrics != null && message.hasOwnProperty("regressionEvaluationMetrics")) { + object.regressionEvaluationMetrics = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.toObject(message.regressionEvaluationMetrics, options); + if (options.oneofs) + object.metrics = "regressionEvaluationMetrics"; + } return object; }; /** - * Converts this BigQuerySource to JSON. + * Converts this ModelEvaluation to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BigQuerySource + * @memberof google.cloud.automl.v1beta1.ModelEvaluation * @instance * @returns {Object.} JSON object */ - BigQuerySource.prototype.toJSON = function toJSON() { + ModelEvaluation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQuerySource; + return ModelEvaluation; })(); - v1beta1.GcsDestination = (function() { + v1beta1.OperationMetadata = (function() { /** - * Properties of a GcsDestination. + * Properties of an OperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IGcsDestination - * @property {string|null} [outputUriPrefix] GcsDestination outputUriPrefix + * @interface IOperationMetadata + * @property {google.cloud.automl.v1beta1.IDeleteOperationMetadata|null} [deleteDetails] OperationMetadata deleteDetails + * @property {google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null} [deployModelDetails] OperationMetadata deployModelDetails + * @property {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null} [undeployModelDetails] OperationMetadata undeployModelDetails + * @property {google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null} [createModelDetails] OperationMetadata createModelDetails + * @property {google.cloud.automl.v1beta1.IImportDataOperationMetadata|null} [importDataDetails] OperationMetadata importDataDetails + * @property {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null} [batchPredictDetails] OperationMetadata batchPredictDetails + * @property {google.cloud.automl.v1beta1.IExportDataOperationMetadata|null} [exportDataDetails] OperationMetadata exportDataDetails + * @property {google.cloud.automl.v1beta1.IExportModelOperationMetadata|null} [exportModelDetails] OperationMetadata exportModelDetails + * @property {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null} [exportEvaluatedExamplesDetails] OperationMetadata exportEvaluatedExamplesDetails + * @property {number|null} [progressPercent] OperationMetadata progressPercent + * @property {Array.|null} [partialFailures] OperationMetadata partialFailures + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime */ /** - * Constructs a new GcsDestination. + * Constructs a new OperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GcsDestination. - * @implements IGcsDestination + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IGcsDestination=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IOperationMetadata=} [properties] Properties to set */ - function GcsDestination(properties) { + function OperationMetadata(properties) { + this.partialFailures = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44027,262 +45453,248 @@ } /** - * GcsDestination outputUriPrefix. - * @member {string} outputUriPrefix - * @memberof google.cloud.automl.v1beta1.GcsDestination + * OperationMetadata deleteDetails. + * @member {google.cloud.automl.v1beta1.IDeleteOperationMetadata|null|undefined} deleteDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @instance */ - GcsDestination.prototype.outputUriPrefix = ""; + OperationMetadata.prototype.deleteDetails = null; /** - * Creates a new GcsDestination instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {google.cloud.automl.v1beta1.IGcsDestination=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination instance + * OperationMetadata deployModelDetails. + * @member {google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null|undefined} deployModelDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - GcsDestination.create = function create(properties) { - return new GcsDestination(properties); - }; + OperationMetadata.prototype.deployModelDetails = null; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {google.cloud.automl.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUriPrefix); - return writer; - }; + * OperationMetadata undeployModelDetails. + * @member {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null|undefined} undeployModelDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.undeployModelDetails = null; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcsDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {google.cloud.automl.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * OperationMetadata createModelDetails. + * @member {google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null|undefined} createModelDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + OperationMetadata.prototype.createModelDetails = null; /** - * Decodes a GcsDestination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * OperationMetadata importDataDetails. + * @member {google.cloud.automl.v1beta1.IImportDataOperationMetadata|null|undefined} importDataDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - GcsDestination.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.automl.v1beta1.GcsDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.outputUriPrefix = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + OperationMetadata.prototype.importDataDetails = null; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * OperationMetadata batchPredictDetails. + * @member {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null|undefined} batchPredictDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - GcsDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + OperationMetadata.prototype.batchPredictDetails = null; /** - * Verifies a GcsDestination message. - * @function verify - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * OperationMetadata exportDataDetails. + * @member {google.cloud.automl.v1beta1.IExportDataOperationMetadata|null|undefined} exportDataDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - GcsDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - if (!$util.isString(message.outputUriPrefix)) - return "outputUriPrefix: string expected"; - return null; - }; + OperationMetadata.prototype.exportDataDetails = null; /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GcsDestination} GcsDestination + * OperationMetadata exportModelDetails. + * @member {google.cloud.automl.v1beta1.IExportModelOperationMetadata|null|undefined} exportModelDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - GcsDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GcsDestination) - return object; - var message = new $root.google.cloud.automl.v1beta1.GcsDestination(); - if (object.outputUriPrefix != null) - message.outputUriPrefix = String(object.outputUriPrefix); - return message; - }; + OperationMetadata.prototype.exportModelDetails = null; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.GcsDestination - * @static - * @param {google.cloud.automl.v1beta1.GcsDestination} message GcsDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * OperationMetadata exportEvaluatedExamplesDetails. + * @member {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null|undefined} exportEvaluatedExamplesDetails + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - GcsDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.outputUriPrefix = ""; - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - object.outputUriPrefix = message.outputUriPrefix; - return object; - }; + OperationMetadata.prototype.exportEvaluatedExamplesDetails = null; /** - * Converts this GcsDestination to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.GcsDestination + * OperationMetadata progressPercent. + * @member {number} progressPercent + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @instance - * @returns {Object.} JSON object */ - GcsDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GcsDestination; - })(); + OperationMetadata.prototype.progressPercent = 0; - v1beta1.BigQueryDestination = (function() { + /** + * OperationMetadata partialFailures. + * @member {Array.} partialFailures + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.partialFailures = $util.emptyArray; /** - * Properties of a BigQueryDestination. - * @memberof google.cloud.automl.v1beta1 - * @interface IBigQueryDestination - * @property {string|null} [outputUri] BigQueryDestination outputUri + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ + OperationMetadata.prototype.createTime = null; /** - * Constructs a new BigQueryDestination. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BigQueryDestination. - * @implements IBigQueryDestination - * @constructor - * @param {google.cloud.automl.v1beta1.IBigQueryDestination=} [properties] Properties to set + * OperationMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @instance */ - function BigQueryDestination(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]]; - } + OperationMetadata.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BigQueryDestination outputUri. - * @member {string} outputUri - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * OperationMetadata details. + * @member {"deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"|"exportEvaluatedExamplesDetails"|undefined} details + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @instance */ - BigQueryDestination.prototype.outputUri = ""; + Object.defineProperty(OperationMetadata.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["deleteDetails", "deployModelDetails", "undeployModelDetails", "createModelDetails", "importDataDetails", "batchPredictDetails", "exportDataDetails", "exportModelDetails", "exportEvaluatedExamplesDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new BigQueryDestination instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IBigQueryDestination=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination instance + * @param {google.cloud.automl.v1beta1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata instance */ - BigQueryDestination.create = function create(properties) { - return new BigQueryDestination(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {google.cloud.automl.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDestination.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUri); + if (message.partialFailures != null && message.partialFailures.length) + for (var i = 0; i < message.partialFailures.length; ++i) + $root.google.rpc.Status.encode(message.partialFailures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) + $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.encode(message.deleteDetails, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) + $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.encode(message.createModelDetails, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.progressPercent); + if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) + $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.encode(message.importDataDetails, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) + $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.encode(message.batchPredictDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) + $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.encode(message.exportDataDetails, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) + $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.encode(message.exportModelDetails, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) + $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.encode(message.deployModelDetails, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) + $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.encode(message.undeployModelDetails, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.exportEvaluatedExamplesDetails != null && message.hasOwnProperty("exportEvaluatedExamplesDetails")) + $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.encode(message.exportEvaluatedExamplesDetails, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BigQueryDestination.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {google.cloud.automl.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDestination message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination + * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDestination.decode = function decode(reader, length) { + OperationMetadata.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.automl.v1beta1.BigQueryDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.outputUri = reader.string(); + case 8: + message.deleteDetails = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.decode(reader, reader.uint32()); + break; + case 24: + message.deployModelDetails = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.decode(reader, reader.uint32()); + break; + case 25: + message.undeployModelDetails = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.decode(reader, reader.uint32()); + break; + case 10: + message.createModelDetails = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.decode(reader, reader.uint32()); + break; + case 15: + message.importDataDetails = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.decode(reader, reader.uint32()); + break; + case 16: + message.batchPredictDetails = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.decode(reader, reader.uint32()); + break; + case 21: + message.exportDataDetails = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.decode(reader, reader.uint32()); + break; + case 22: + message.exportModelDetails = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.decode(reader, reader.uint32()); + break; + case 26: + message.exportEvaluatedExamplesDetails = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.decode(reader, reader.uint32()); + break; + case 13: + message.progressPercent = reader.int32(); + break; + case 2: + if (!(message.partialFailures && message.partialFailures.length)) + message.partialFailures = []; + message.partialFailures.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + case 3: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -44293,107 +45705,338 @@ }; /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination + * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDestination message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryDestination.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - if (!$util.isString(message.outputUri)) - return "outputUri: string expected"; + var properties = {}; + if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.verify(message.deleteDetails); + if (error) + return "deleteDetails." + error; + } + } + if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify(message.deployModelDetails); + if (error) + return "deployModelDetails." + error; + } + } + if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify(message.undeployModelDetails); + if (error) + return "undeployModelDetails." + error; + } + } + if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify(message.createModelDetails); + if (error) + return "createModelDetails." + error; + } + } + if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify(message.importDataDetails); + if (error) + return "importDataDetails." + error; + } + } + if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify(message.batchPredictDetails); + if (error) + return "batchPredictDetails." + error; + } + } + if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify(message.exportDataDetails); + if (error) + return "exportDataDetails." + error; + } + } + if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify(message.exportModelDetails); + if (error) + return "exportModelDetails." + error; + } + } + if (message.exportEvaluatedExamplesDetails != null && message.hasOwnProperty("exportEvaluatedExamplesDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify(message.exportEvaluatedExamplesDetails); + if (error) + return "exportEvaluatedExamplesDetails." + error; + } + } + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (!$util.isInteger(message.progressPercent)) + return "progressPercent: integer expected"; + if (message.partialFailures != null && message.hasOwnProperty("partialFailures")) { + if (!Array.isArray(message.partialFailures)) + return "partialFailures: array expected"; + for (var i = 0; i < message.partialFailures.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialFailures[i]); + if (error) + return "partialFailures." + error; + } + } + 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; + } return null; }; /** - * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BigQueryDestination} BigQueryDestination + * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata */ - BigQueryDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BigQueryDestination) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.OperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.BigQueryDestination(); - if (object.outputUri != null) - message.outputUri = String(object.outputUri); + var message = new $root.google.cloud.automl.v1beta1.OperationMetadata(); + if (object.deleteDetails != null) { + if (typeof object.deleteDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.deleteDetails: object expected"); + message.deleteDetails = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.fromObject(object.deleteDetails); + } + if (object.deployModelDetails != null) { + if (typeof object.deployModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.deployModelDetails: object expected"); + message.deployModelDetails = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.fromObject(object.deployModelDetails); + } + if (object.undeployModelDetails != null) { + if (typeof object.undeployModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.undeployModelDetails: object expected"); + message.undeployModelDetails = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.fromObject(object.undeployModelDetails); + } + if (object.createModelDetails != null) { + if (typeof object.createModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.createModelDetails: object expected"); + message.createModelDetails = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.fromObject(object.createModelDetails); + } + if (object.importDataDetails != null) { + if (typeof object.importDataDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.importDataDetails: object expected"); + message.importDataDetails = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.fromObject(object.importDataDetails); + } + if (object.batchPredictDetails != null) { + if (typeof object.batchPredictDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.batchPredictDetails: object expected"); + message.batchPredictDetails = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.fromObject(object.batchPredictDetails); + } + if (object.exportDataDetails != null) { + if (typeof object.exportDataDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.exportDataDetails: object expected"); + message.exportDataDetails = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.fromObject(object.exportDataDetails); + } + if (object.exportModelDetails != null) { + if (typeof object.exportModelDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.exportModelDetails: object expected"); + message.exportModelDetails = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.fromObject(object.exportModelDetails); + } + if (object.exportEvaluatedExamplesDetails != null) { + if (typeof object.exportEvaluatedExamplesDetails !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.exportEvaluatedExamplesDetails: object expected"); + message.exportEvaluatedExamplesDetails = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.fromObject(object.exportEvaluatedExamplesDetails); + } + if (object.progressPercent != null) + message.progressPercent = object.progressPercent | 0; + if (object.partialFailures) { + if (!Array.isArray(object.partialFailures)) + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.partialFailures: array expected"); + message.partialFailures = []; + for (var i = 0; i < object.partialFailures.length; ++i) { + if (typeof object.partialFailures[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.partialFailures: object expected"); + message.partialFailures[i] = $root.google.rpc.Status.fromObject(object.partialFailures[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.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.automl.v1beta1.OperationMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @static - * @param {google.cloud.automl.v1beta1.BigQueryDestination} message BigQueryDestination + * @param {google.cloud.automl.v1beta1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDestination.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.outputUri = ""; - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - object.outputUri = message.outputUri; + if (options.arrays || options.defaults) + object.partialFailures = []; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + object.progressPercent = 0; + } + if (message.partialFailures && message.partialFailures.length) { + object.partialFailures = []; + for (var j = 0; j < message.partialFailures.length; ++j) + object.partialFailures[j] = $root.google.rpc.Status.toObject(message.partialFailures[j], options); + } + 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.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { + object.deleteDetails = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.toObject(message.deleteDetails, options); + if (options.oneofs) + object.details = "deleteDetails"; + } + if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { + object.createModelDetails = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.toObject(message.createModelDetails, options); + if (options.oneofs) + object.details = "createModelDetails"; + } + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + object.progressPercent = message.progressPercent; + if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { + object.importDataDetails = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.toObject(message.importDataDetails, options); + if (options.oneofs) + object.details = "importDataDetails"; + } + if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { + object.batchPredictDetails = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.toObject(message.batchPredictDetails, options); + if (options.oneofs) + object.details = "batchPredictDetails"; + } + if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { + object.exportDataDetails = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.toObject(message.exportDataDetails, options); + if (options.oneofs) + object.details = "exportDataDetails"; + } + if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { + object.exportModelDetails = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.toObject(message.exportModelDetails, options); + if (options.oneofs) + object.details = "exportModelDetails"; + } + if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { + object.deployModelDetails = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.toObject(message.deployModelDetails, options); + if (options.oneofs) + object.details = "deployModelDetails"; + } + if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { + object.undeployModelDetails = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.toObject(message.undeployModelDetails, options); + if (options.oneofs) + object.details = "undeployModelDetails"; + } + if (message.exportEvaluatedExamplesDetails != null && message.hasOwnProperty("exportEvaluatedExamplesDetails")) { + object.exportEvaluatedExamplesDetails = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.toObject(message.exportEvaluatedExamplesDetails, options); + if (options.oneofs) + object.details = "exportEvaluatedExamplesDetails"; + } return object; }; /** - * Converts this BigQueryDestination to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BigQueryDestination + * @memberof google.cloud.automl.v1beta1.OperationMetadata * @instance * @returns {Object.} JSON object */ - BigQueryDestination.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryDestination; + return OperationMetadata; })(); - v1beta1.GcrDestination = (function() { + v1beta1.DeleteOperationMetadata = (function() { /** - * Properties of a GcrDestination. + * Properties of a DeleteOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IGcrDestination - * @property {string|null} [outputUri] GcrDestination outputUri + * @interface IDeleteOperationMetadata */ /** - * Constructs a new GcrDestination. + * Constructs a new DeleteOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a GcrDestination. - * @implements IGcrDestination + * @classdesc Represents a DeleteOperationMetadata. + * @implements IDeleteOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IGcrDestination=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata=} [properties] Properties to set */ - function GcrDestination(properties) { + function DeleteOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44401,76 +46044,63 @@ } /** - * GcrDestination outputUri. - * @member {string} outputUri - * @memberof google.cloud.automl.v1beta1.GcrDestination - * @instance - */ - GcrDestination.prototype.outputUri = ""; - - /** - * Creates a new GcrDestination instance using the specified properties. + * Creates a new DeleteOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IGcrDestination=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination instance + * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata instance */ - GcrDestination.create = function create(properties) { - return new GcrDestination(properties); + DeleteOperationMetadata.create = function create(properties) { + return new DeleteOperationMetadata(properties); }; /** - * Encodes the specified GcrDestination message. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. + * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IGcrDestination} message GcrDestination message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcrDestination.encode = function encode(message, writer) { + DeleteOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUri); return writer; }; /** - * Encodes the specified GcrDestination message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GcrDestination.verify|verify} messages. + * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IGcrDestination} message GcrDestination message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcrDestination.encodeDelimited = function encodeDelimited(message, writer) { + DeleteOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcrDestination message from the specified reader or buffer. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination + * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcrDestination.decode = function decode(reader, length) { + DeleteOperationMetadata.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.automl.v1beta1.GcrDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DeleteOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.outputUri = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -44480,109 +46110,93 @@ }; /** - * Decodes a GcrDestination message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination + * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcrDestination.decodeDelimited = function decodeDelimited(reader) { + DeleteOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcrDestination message. + * Verifies a DeleteOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcrDestination.verify = function verify(message) { + DeleteOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - if (!$util.isString(message.outputUri)) - return "outputUri: string expected"; return null; }; /** - * Creates a GcrDestination message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.GcrDestination} GcrDestination + * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata */ - GcrDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.GcrDestination) + DeleteOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DeleteOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.GcrDestination(); - if (object.outputUri != null) - message.outputUri = String(object.outputUri); - return message; + return new $root.google.cloud.automl.v1beta1.DeleteOperationMetadata(); }; /** - * Creates a plain object from a GcrDestination message. Also converts values to other types if specified. + * Creates a plain object from a DeleteOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.GcrDestination} message GcrDestination + * @param {google.cloud.automl.v1beta1.DeleteOperationMetadata} message DeleteOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcrDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.outputUri = ""; - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - object.outputUri = message.outputUri; - return object; + DeleteOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this GcrDestination to JSON. + * Converts this DeleteOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.GcrDestination + * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata * @instance * @returns {Object.} JSON object */ - GcrDestination.prototype.toJSON = function toJSON() { + DeleteOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcrDestination; + return DeleteOperationMetadata; })(); - v1beta1.TextSegment = (function() { + v1beta1.DeployModelOperationMetadata = (function() { /** - * Properties of a TextSegment. + * Properties of a DeployModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ITextSegment - * @property {string|null} [content] TextSegment content - * @property {number|Long|null} [startOffset] TextSegment startOffset - * @property {number|Long|null} [endOffset] TextSegment endOffset + * @interface IDeployModelOperationMetadata */ /** - * Constructs a new TextSegment. + * Constructs a new DeployModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextSegment. - * @implements ITextSegment + * @classdesc Represents a DeployModelOperationMetadata. + * @implements IDeployModelOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITextSegment=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata=} [properties] Properties to set */ - function TextSegment(properties) { + function DeployModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44590,102 +46204,63 @@ } /** - * TextSegment content. - * @member {string} content - * @memberof google.cloud.automl.v1beta1.TextSegment - * @instance - */ - TextSegment.prototype.content = ""; - - /** - * TextSegment startOffset. - * @member {number|Long} startOffset - * @memberof google.cloud.automl.v1beta1.TextSegment - * @instance - */ - TextSegment.prototype.startOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TextSegment endOffset. - * @member {number|Long} endOffset - * @memberof google.cloud.automl.v1beta1.TextSegment - * @instance - */ - TextSegment.prototype.endOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new TextSegment instance using the specified properties. + * Creates a new DeployModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSegment=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment instance + * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata instance */ - TextSegment.create = function create(properties) { - return new TextSegment(properties); + DeployModelOperationMetadata.create = function create(properties) { + return new DeployModelOperationMetadata(properties); }; /** - * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. + * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSegment} message TextSegment message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSegment.encode = function encode(message, writer) { + DeployModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.startOffset); - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.endOffset); - if (message.content != null && message.hasOwnProperty("content")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.content); return writer; }; /** - * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSegment.verify|verify} messages. + * Encodes the specified DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSegment} message TextSegment message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSegment.encodeDelimited = function encodeDelimited(message, writer) { + DeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSegment message from the specified reader or buffer. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment + * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSegment.decode = function decode(reader, length) { + DeployModelOperationMetadata.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.automl.v1beta1.TextSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.content = reader.string(); - break; - case 1: - message.startOffset = reader.int64(); - break; - case 2: - message.endOffset = reader.int64(); - break; default: reader.skipType(tag & 7); break; @@ -44695,153 +46270,93 @@ }; /** - * Decodes a TextSegment message from the specified reader or buffer, length delimited. + * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment + * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSegment.decodeDelimited = function decodeDelimited(reader) { + DeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSegment message. + * Verifies a DeployModelOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSegment.verify = function verify(message) { + DeployModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (!$util.isInteger(message.startOffset) && !(message.startOffset && $util.isInteger(message.startOffset.low) && $util.isInteger(message.startOffset.high))) - return "startOffset: integer|Long expected"; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (!$util.isInteger(message.endOffset) && !(message.endOffset && $util.isInteger(message.endOffset.low) && $util.isInteger(message.endOffset.high))) - return "endOffset: integer|Long expected"; return null; }; /** - * Creates a TextSegment message from a plain object. Also converts values to their respective internal types. + * Creates a DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextSegment} TextSegment + * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata */ - TextSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextSegment) + DeployModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TextSegment(); - if (object.content != null) - message.content = String(object.content); - if (object.startOffset != null) - if ($util.Long) - (message.startOffset = $util.Long.fromValue(object.startOffset)).unsigned = false; - else if (typeof object.startOffset === "string") - message.startOffset = parseInt(object.startOffset, 10); - else if (typeof object.startOffset === "number") - message.startOffset = object.startOffset; - else if (typeof object.startOffset === "object") - message.startOffset = new $util.LongBits(object.startOffset.low >>> 0, object.startOffset.high >>> 0).toNumber(); - if (object.endOffset != null) - if ($util.Long) - (message.endOffset = $util.Long.fromValue(object.endOffset)).unsigned = false; - else if (typeof object.endOffset === "string") - message.endOffset = parseInt(object.endOffset, 10); - else if (typeof object.endOffset === "number") - message.endOffset = object.endOffset; - else if (typeof object.endOffset === "object") - message.endOffset = new $util.LongBits(object.endOffset.low >>> 0, object.endOffset.high >>> 0).toNumber(); - return message; + return new $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata(); }; /** - * Creates a plain object from a TextSegment message. Also converts values to other types if specified. + * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.TextSegment} message TextSegment + * @param {google.cloud.automl.v1beta1.DeployModelOperationMetadata} message DeployModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSegment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startOffset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.endOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.endOffset = options.longs === String ? "0" : 0; - object.content = ""; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (typeof message.startOffset === "number") - object.startOffset = options.longs === String ? String(message.startOffset) : message.startOffset; - else - object.startOffset = options.longs === String ? $util.Long.prototype.toString.call(message.startOffset) : options.longs === Number ? new $util.LongBits(message.startOffset.low >>> 0, message.startOffset.high >>> 0).toNumber() : message.startOffset; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (typeof message.endOffset === "number") - object.endOffset = options.longs === String ? String(message.endOffset) : message.endOffset; - else - object.endOffset = options.longs === String ? $util.Long.prototype.toString.call(message.endOffset) : options.longs === Number ? new $util.LongBits(message.endOffset.low >>> 0, message.endOffset.high >>> 0).toNumber() : message.endOffset; - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - return object; + DeployModelOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this TextSegment to JSON. + * Converts this DeployModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextSegment + * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata * @instance * @returns {Object.} JSON object */ - TextSegment.prototype.toJSON = function toJSON() { + DeployModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSegment; + return DeployModelOperationMetadata; })(); - v1beta1.DoubleRange = (function() { + v1beta1.UndeployModelOperationMetadata = (function() { /** - * Properties of a DoubleRange. + * Properties of an UndeployModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IDoubleRange - * @property {number|null} [start] DoubleRange start - * @property {number|null} [end] DoubleRange end + * @interface IUndeployModelOperationMetadata */ /** - * Constructs a new DoubleRange. + * Constructs a new UndeployModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DoubleRange. - * @implements IDoubleRange + * @classdesc Represents an UndeployModelOperationMetadata. + * @implements IUndeployModelOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IDoubleRange=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata=} [properties] Properties to set */ - function DoubleRange(properties) { + function UndeployModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44849,89 +46364,63 @@ } /** - * DoubleRange start. - * @member {number} start - * @memberof google.cloud.automl.v1beta1.DoubleRange - * @instance - */ - DoubleRange.prototype.start = 0; - - /** - * DoubleRange end. - * @member {number} end - * @memberof google.cloud.automl.v1beta1.DoubleRange - * @instance - */ - DoubleRange.prototype.end = 0; - - /** - * Creates a new DoubleRange instance using the specified properties. + * Creates a new UndeployModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IDoubleRange=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange instance + * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata instance */ - DoubleRange.create = function create(properties) { - return new DoubleRange(properties); + UndeployModelOperationMetadata.create = function create(properties) { + return new UndeployModelOperationMetadata(properties); }; /** - * Encodes the specified DoubleRange message. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. + * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IDoubleRange} message DoubleRange message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleRange.encode = function encode(message, writer) { + UndeployModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.start); - if (message.end != null && message.hasOwnProperty("end")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.end); return writer; }; /** - * Encodes the specified DoubleRange message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DoubleRange.verify|verify} messages. + * Encodes the specified UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IDoubleRange} message DoubleRange message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleRange.encodeDelimited = function encodeDelimited(message, writer) { + UndeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DoubleRange message from the specified reader or buffer. + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange + * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DoubleRange.decode = function decode(reader, length) { + UndeployModelOperationMetadata.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.automl.v1beta1.DoubleRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.double(); - break; - case 2: - message.end = reader.double(); - break; default: reader.skipType(tag & 7); break; @@ -44941,120 +46430,93 @@ }; /** - * Decodes a DoubleRange message from the specified reader or buffer, length delimited. + * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange + * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DoubleRange.decodeDelimited = function decodeDelimited(reader) { + UndeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DoubleRange message. + * Verifies an UndeployModelOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DoubleRange.verify = function verify(message) { + UndeployModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (typeof message.start !== "number") - return "start: number expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (typeof message.end !== "number") - return "end: number expected"; return null; }; /** - * Creates a DoubleRange message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DoubleRange} DoubleRange + * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata */ - DoubleRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DoubleRange) + UndeployModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.DoubleRange(); - if (object.start != null) - message.start = Number(object.start); - if (object.end != null) - message.end = Number(object.end); - return message; + return new $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata(); }; /** - * Creates a plain object from a DoubleRange message. Also converts values to other types if specified. + * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.DoubleRange} message DoubleRange + * @param {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} message UndeployModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = options.json && !isFinite(message.start) ? String(message.start) : message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = options.json && !isFinite(message.end) ? String(message.end) : message.end; - return object; + UndeployModelOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this DoubleRange to JSON. + * Converts this UndeployModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DoubleRange + * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata * @instance * @returns {Object.} JSON object */ - DoubleRange.prototype.toJSON = function toJSON() { + UndeployModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DoubleRange; + return UndeployModelOperationMetadata; })(); - v1beta1.RegressionEvaluationMetrics = (function() { + v1beta1.CreateModelOperationMetadata = (function() { /** - * Properties of a RegressionEvaluationMetrics. + * Properties of a CreateModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface IRegressionEvaluationMetrics - * @property {number|null} [rootMeanSquaredError] RegressionEvaluationMetrics rootMeanSquaredError - * @property {number|null} [meanAbsoluteError] RegressionEvaluationMetrics meanAbsoluteError - * @property {number|null} [meanAbsolutePercentageError] RegressionEvaluationMetrics meanAbsolutePercentageError - * @property {number|null} [rSquared] RegressionEvaluationMetrics rSquared - * @property {number|null} [rootMeanSquaredLogError] RegressionEvaluationMetrics rootMeanSquaredLogError + * @interface ICreateModelOperationMetadata */ /** - * Constructs a new RegressionEvaluationMetrics. + * Constructs a new CreateModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a RegressionEvaluationMetrics. - * @implements IRegressionEvaluationMetrics + * @classdesc Represents a CreateModelOperationMetadata. + * @implements ICreateModelOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata=} [properties] Properties to set */ - function RegressionEvaluationMetrics(properties) { + function CreateModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45062,128 +46524,63 @@ } /** - * RegressionEvaluationMetrics rootMeanSquaredError. - * @member {number} rootMeanSquaredError - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics - * @instance - */ - RegressionEvaluationMetrics.prototype.rootMeanSquaredError = 0; - - /** - * RegressionEvaluationMetrics meanAbsoluteError. - * @member {number} meanAbsoluteError - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics - * @instance - */ - RegressionEvaluationMetrics.prototype.meanAbsoluteError = 0; - - /** - * RegressionEvaluationMetrics meanAbsolutePercentageError. - * @member {number} meanAbsolutePercentageError - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics - * @instance - */ - RegressionEvaluationMetrics.prototype.meanAbsolutePercentageError = 0; - - /** - * RegressionEvaluationMetrics rSquared. - * @member {number} rSquared - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics - * @instance - */ - RegressionEvaluationMetrics.prototype.rSquared = 0; - - /** - * RegressionEvaluationMetrics rootMeanSquaredLogError. - * @member {number} rootMeanSquaredLogError - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics - * @instance - */ - RegressionEvaluationMetrics.prototype.rootMeanSquaredLogError = 0; - - /** - * Creates a new RegressionEvaluationMetrics instance using the specified properties. + * Creates a new CreateModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics instance + * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata instance */ - RegressionEvaluationMetrics.create = function create(properties) { - return new RegressionEvaluationMetrics(properties); + CreateModelOperationMetadata.create = function create(properties) { + return new CreateModelOperationMetadata(properties); }; /** - * Encodes the specified RegressionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. + * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics} message RegressionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegressionEvaluationMetrics.encode = function encode(message, writer) { + CreateModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rootMeanSquaredError != null && message.hasOwnProperty("rootMeanSquaredError")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.rootMeanSquaredError); - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.meanAbsoluteError); - if (message.meanAbsolutePercentageError != null && message.hasOwnProperty("meanAbsolutePercentageError")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.meanAbsolutePercentageError); - if (message.rSquared != null && message.hasOwnProperty("rSquared")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.rSquared); - if (message.rootMeanSquaredLogError != null && message.hasOwnProperty("rootMeanSquaredLogError")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.rootMeanSquaredLogError); return writer; }; /** - * Encodes the specified RegressionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify|verify} messages. + * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics} message RegressionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegressionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + CreateModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer. + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegressionEvaluationMetrics.decode = function decode(reader, length) { + CreateModelOperationMetadata.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.automl.v1beta1.RegressionEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rootMeanSquaredError = reader.float(); - break; - case 2: - message.meanAbsoluteError = reader.float(); - break; - case 3: - message.meanAbsolutePercentageError = reader.float(); - break; - case 4: - message.rSquared = reader.float(); - break; - case 5: - message.rootMeanSquaredLogError = reader.float(); - break; default: reader.skipType(tag & 7); break; @@ -45193,141 +46590,93 @@ }; /** - * Decodes a RegressionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegressionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + CreateModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RegressionEvaluationMetrics message. + * Verifies a CreateModelOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RegressionEvaluationMetrics.verify = function verify(message) { + CreateModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rootMeanSquaredError != null && message.hasOwnProperty("rootMeanSquaredError")) - if (typeof message.rootMeanSquaredError !== "number") - return "rootMeanSquaredError: number expected"; - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - if (typeof message.meanAbsoluteError !== "number") - return "meanAbsoluteError: number expected"; - if (message.meanAbsolutePercentageError != null && message.hasOwnProperty("meanAbsolutePercentageError")) - if (typeof message.meanAbsolutePercentageError !== "number") - return "meanAbsolutePercentageError: number expected"; - if (message.rSquared != null && message.hasOwnProperty("rSquared")) - if (typeof message.rSquared !== "number") - return "rSquared: number expected"; - if (message.rootMeanSquaredLogError != null && message.hasOwnProperty("rootMeanSquaredLogError")) - if (typeof message.rootMeanSquaredLogError !== "number") - return "rootMeanSquaredLogError: number expected"; return null; }; /** - * Creates a RegressionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} RegressionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata */ - RegressionEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics) + CreateModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics(); - if (object.rootMeanSquaredError != null) - message.rootMeanSquaredError = Number(object.rootMeanSquaredError); - if (object.meanAbsoluteError != null) - message.meanAbsoluteError = Number(object.meanAbsoluteError); - if (object.meanAbsolutePercentageError != null) - message.meanAbsolutePercentageError = Number(object.meanAbsolutePercentageError); - if (object.rSquared != null) - message.rSquared = Number(object.rSquared); - if (object.rootMeanSquaredLogError != null) - message.rootMeanSquaredLogError = Number(object.rootMeanSquaredLogError); - return message; + return new $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata(); }; /** - * Creates a plain object from a RegressionEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.RegressionEvaluationMetrics} message RegressionEvaluationMetrics + * @param {google.cloud.automl.v1beta1.CreateModelOperationMetadata} message CreateModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RegressionEvaluationMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rootMeanSquaredError = 0; - object.meanAbsoluteError = 0; - object.meanAbsolutePercentageError = 0; - object.rSquared = 0; - object.rootMeanSquaredLogError = 0; - } - if (message.rootMeanSquaredError != null && message.hasOwnProperty("rootMeanSquaredError")) - object.rootMeanSquaredError = options.json && !isFinite(message.rootMeanSquaredError) ? String(message.rootMeanSquaredError) : message.rootMeanSquaredError; - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - object.meanAbsoluteError = options.json && !isFinite(message.meanAbsoluteError) ? String(message.meanAbsoluteError) : message.meanAbsoluteError; - if (message.meanAbsolutePercentageError != null && message.hasOwnProperty("meanAbsolutePercentageError")) - object.meanAbsolutePercentageError = options.json && !isFinite(message.meanAbsolutePercentageError) ? String(message.meanAbsolutePercentageError) : message.meanAbsolutePercentageError; - if (message.rSquared != null && message.hasOwnProperty("rSquared")) - object.rSquared = options.json && !isFinite(message.rSquared) ? String(message.rSquared) : message.rSquared; - if (message.rootMeanSquaredLogError != null && message.hasOwnProperty("rootMeanSquaredLogError")) - object.rootMeanSquaredLogError = options.json && !isFinite(message.rootMeanSquaredLogError) ? String(message.rootMeanSquaredLogError) : message.rootMeanSquaredLogError; - return object; + CreateModelOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this RegressionEvaluationMetrics to JSON. + * Converts this CreateModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.RegressionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata * @instance * @returns {Object.} JSON object */ - RegressionEvaluationMetrics.prototype.toJSON = function toJSON() { + CreateModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RegressionEvaluationMetrics; + return CreateModelOperationMetadata; })(); - v1beta1.TextExtractionAnnotation = (function() { + v1beta1.ImportDataOperationMetadata = (function() { /** - * Properties of a TextExtractionAnnotation. + * Properties of an ImportDataOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ITextExtractionAnnotation - * @property {google.cloud.automl.v1beta1.ITextSegment|null} [textSegment] TextExtractionAnnotation textSegment - * @property {number|null} [score] TextExtractionAnnotation score + * @interface IImportDataOperationMetadata */ /** - * Constructs a new TextExtractionAnnotation. + * Constructs a new ImportDataOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextExtractionAnnotation. - * @implements ITextExtractionAnnotation + * @classdesc Represents an ImportDataOperationMetadata. + * @implements IImportDataOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata=} [properties] Properties to set */ - function TextExtractionAnnotation(properties) { + function ImportDataOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45335,103 +46684,63 @@ } /** - * TextExtractionAnnotation textSegment. - * @member {google.cloud.automl.v1beta1.ITextSegment|null|undefined} textSegment - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation - * @instance - */ - TextExtractionAnnotation.prototype.textSegment = null; - - /** - * TextExtractionAnnotation score. - * @member {number} score - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation - * @instance - */ - TextExtractionAnnotation.prototype.score = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TextExtractionAnnotation annotation. - * @member {"textSegment"|undefined} annotation - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation - * @instance - */ - Object.defineProperty(TextExtractionAnnotation.prototype, "annotation", { - get: $util.oneOfGetter($oneOfFields = ["textSegment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TextExtractionAnnotation instance using the specified properties. + * Creates a new ImportDataOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation instance + * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata instance */ - TextExtractionAnnotation.create = function create(properties) { - return new TextExtractionAnnotation(properties); + ImportDataOperationMetadata.create = function create(properties) { + return new ImportDataOperationMetadata(properties); }; /** - * Encodes the specified TextExtractionAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. + * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionAnnotation.encode = function encode(message, writer) { + ImportDataOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); - if (message.textSegment != null && message.hasOwnProperty("textSegment")) - $root.google.cloud.automl.v1beta1.TextSegment.encode(message.textSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionAnnotation.verify|verify} messages. + * Encodes the specified ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionAnnotation} message TextExtractionAnnotation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + ImportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation + * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionAnnotation.decode = function decode(reader, length) { + ImportDataOperationMetadata.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.automl.v1beta1.TextExtractionAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.decode(reader, reader.uint32()); - break; - case 1: - message.score = reader.float(); - break; default: reader.skipType(tag & 7); break; @@ -45441,128 +46750,94 @@ }; /** - * Decodes a TextExtractionAnnotation message from the specified reader or buffer, length delimited. + * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation + * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionAnnotation.decodeDelimited = function decodeDelimited(reader) { + ImportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextExtractionAnnotation message. + * Verifies an ImportDataOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextExtractionAnnotation.verify = function verify(message) { + ImportDataOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.textSegment != null && message.hasOwnProperty("textSegment")) { - properties.annotation = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextSegment.verify(message.textSegment); - if (error) - return "textSegment." + error; - } - } - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; return null; }; /** - * Creates a TextExtractionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextExtractionAnnotation} TextExtractionAnnotation + * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata */ - TextExtractionAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionAnnotation) + ImportDataOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TextExtractionAnnotation(); - if (object.textSegment != null) { - if (typeof object.textSegment !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TextExtractionAnnotation.textSegment: object expected"); - message.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.fromObject(object.textSegment); - } - if (object.score != null) - message.score = Number(object.score); - return message; + return new $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata(); }; /** - * Creates a plain object from a TextExtractionAnnotation message. Also converts values to other types if specified. + * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.TextExtractionAnnotation} message TextExtractionAnnotation + * @param {google.cloud.automl.v1beta1.ImportDataOperationMetadata} message ImportDataOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextExtractionAnnotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.score = 0; - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (message.textSegment != null && message.hasOwnProperty("textSegment")) { - object.textSegment = $root.google.cloud.automl.v1beta1.TextSegment.toObject(message.textSegment, options); - if (options.oneofs) - object.annotation = "textSegment"; - } - return object; + ImportDataOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this TextExtractionAnnotation to JSON. + * Converts this ImportDataOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextExtractionAnnotation + * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata * @instance * @returns {Object.} JSON object */ - TextExtractionAnnotation.prototype.toJSON = function toJSON() { + ImportDataOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextExtractionAnnotation; + return ImportDataOperationMetadata; })(); - v1beta1.TextExtractionEvaluationMetrics = (function() { + v1beta1.ExportDataOperationMetadata = (function() { /** - * Properties of a TextExtractionEvaluationMetrics. + * Properties of an ExportDataOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ITextExtractionEvaluationMetrics - * @property {number|null} [auPrc] TextExtractionEvaluationMetrics auPrc - * @property {Array.|null} [confidenceMetricsEntries] TextExtractionEvaluationMetrics confidenceMetricsEntries + * @interface IExportDataOperationMetadata + * @property {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null} [outputInfo] ExportDataOperationMetadata outputInfo */ /** - * Constructs a new TextExtractionEvaluationMetrics. + * Constructs a new ExportDataOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextExtractionEvaluationMetrics. - * @implements ITextExtractionEvaluationMetrics + * @classdesc Represents an ExportDataOperationMetadata. + * @implements IExportDataOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata=} [properties] Properties to set */ - function TextExtractionEvaluationMetrics(properties) { - this.confidenceMetricsEntries = []; + function ExportDataOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45570,91 +46845,75 @@ } /** - * TextExtractionEvaluationMetrics auPrc. - * @member {number} auPrc - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - * @instance - */ - TextExtractionEvaluationMetrics.prototype.auPrc = 0; - - /** - * TextExtractionEvaluationMetrics confidenceMetricsEntries. - * @member {Array.} confidenceMetricsEntries - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * ExportDataOperationMetadata outputInfo. + * @member {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null|undefined} outputInfo + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @instance */ - TextExtractionEvaluationMetrics.prototype.confidenceMetricsEntries = $util.emptyArray; + ExportDataOperationMetadata.prototype.outputInfo = null; /** - * Creates a new TextExtractionEvaluationMetrics instance using the specified properties. + * Creates a new ExportDataOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics instance + * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata instance */ - TextExtractionEvaluationMetrics.create = function create(properties) { - return new TextExtractionEvaluationMetrics(properties); + ExportDataOperationMetadata.create = function create(properties) { + return new ExportDataOperationMetadata(properties); }; /** - * Encodes the specified TextExtractionEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. + * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionEvaluationMetrics.encode = function encode(message, writer) { + ExportDataOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.auPrc); - if (message.confidenceMetricsEntries != null && message.confidenceMetricsEntries.length) - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) - $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.encode(message.confidenceMetricsEntries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.encode(message.outputInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextExtractionEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify|verify} messages. + * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + ExportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionEvaluationMetrics.decode = function decode(reader, length) { + ExportDataOperationMetadata.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.automl.v1beta1.TextExtractionEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.auPrc = reader.float(); - break; - case 2: - if (!(message.confidenceMetricsEntries && message.confidenceMetricsEntries.length)) - message.confidenceMetricsEntries = []; - message.confidenceMetricsEntries.push($root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.decode(reader, reader.uint32())); + message.outputInfo = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -45665,133 +46924,110 @@ }; /** - * Decodes a TextExtractionEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + ExportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextExtractionEvaluationMetrics message. + * Verifies an ExportDataOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextExtractionEvaluationMetrics.verify = function verify(message) { + ExportDataOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - if (typeof message.auPrc !== "number") - return "auPrc: number expected"; - if (message.confidenceMetricsEntries != null && message.hasOwnProperty("confidenceMetricsEntries")) { - if (!Array.isArray(message.confidenceMetricsEntries)) - return "confidenceMetricsEntries: array expected"; - for (var i = 0; i < message.confidenceMetricsEntries.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify(message.confidenceMetricsEntries[i]); - if (error) - return "confidenceMetricsEntries." + error; - } + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { + var error = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify(message.outputInfo); + if (error) + return "outputInfo." + error; } return null; }; /** - * Creates a TextExtractionEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} TextExtractionEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata */ - TextExtractionEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) + ExportDataOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics(); - if (object.auPrc != null) - message.auPrc = Number(object.auPrc); - if (object.confidenceMetricsEntries) { - if (!Array.isArray(object.confidenceMetricsEntries)) - throw TypeError(".google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: array expected"); - message.confidenceMetricsEntries = []; - for (var i = 0; i < object.confidenceMetricsEntries.length; ++i) { - if (typeof object.confidenceMetricsEntries[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.confidenceMetricsEntries: object expected"); - message.confidenceMetricsEntries[i] = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.fromObject(object.confidenceMetricsEntries[i]); - } + var message = new $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata(); + if (object.outputInfo != null) { + if (typeof object.outputInfo !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExportDataOperationMetadata.outputInfo: object expected"); + message.outputInfo = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.fromObject(object.outputInfo); } return message; }; /** - * Creates a plain object from a TextExtractionEvaluationMetrics message. Also converts values to other types if specified. + * Creates a plain object from an ExportDataOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} message TextExtractionEvaluationMetrics + * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata} message ExportDataOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextExtractionEvaluationMetrics.toObject = function toObject(message, options) { + ExportDataOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.confidenceMetricsEntries = []; if (options.defaults) - object.auPrc = 0; - if (message.auPrc != null && message.hasOwnProperty("auPrc")) - object.auPrc = options.json && !isFinite(message.auPrc) ? String(message.auPrc) : message.auPrc; - if (message.confidenceMetricsEntries && message.confidenceMetricsEntries.length) { - object.confidenceMetricsEntries = []; - for (var j = 0; j < message.confidenceMetricsEntries.length; ++j) - object.confidenceMetricsEntries[j] = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.toObject(message.confidenceMetricsEntries[j], options); - } + object.outputInfo = null; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + object.outputInfo = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.toObject(message.outputInfo, options); return object; }; /** - * Converts this TextExtractionEvaluationMetrics to JSON. + * Converts this ExportDataOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata * @instance * @returns {Object.} JSON object */ - TextExtractionEvaluationMetrics.prototype.toJSON = function toJSON() { + ExportDataOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TextExtractionEvaluationMetrics.ConfidenceMetricsEntry = (function() { + ExportDataOperationMetadata.ExportDataOutputInfo = (function() { /** - * Properties of a ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - * @interface IConfidenceMetricsEntry - * @property {number|null} [confidenceThreshold] ConfidenceMetricsEntry confidenceThreshold - * @property {number|null} [recall] ConfidenceMetricsEntry recall - * @property {number|null} [precision] ConfidenceMetricsEntry precision - * @property {number|null} [f1Score] ConfidenceMetricsEntry f1Score + * Properties of an ExportDataOutputInfo. + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @interface IExportDataOutputInfo + * @property {string|null} [gcsOutputDirectory] ExportDataOutputInfo gcsOutputDirectory + * @property {string|null} [bigqueryOutputDataset] ExportDataOutputInfo bigqueryOutputDataset */ /** - * Constructs a new ConfidenceMetricsEntry. - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - * @classdesc Represents a ConfidenceMetricsEntry. - * @implements IConfidenceMetricsEntry + * Constructs a new ExportDataOutputInfo. + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @classdesc Represents an ExportDataOutputInfo. + * @implements IExportDataOutputInfo * @constructor - * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set */ - function ConfidenceMetricsEntry(properties) { + function ExportDataOutputInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45799,114 +47035,102 @@ } /** - * ConfidenceMetricsEntry confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * ExportDataOutputInfo gcsOutputDirectory. + * @member {string} gcsOutputDirectory + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @instance */ - ConfidenceMetricsEntry.prototype.confidenceThreshold = 0; + ExportDataOutputInfo.prototype.gcsOutputDirectory = ""; /** - * ConfidenceMetricsEntry recall. - * @member {number} recall - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * ExportDataOutputInfo bigqueryOutputDataset. + * @member {string} bigqueryOutputDataset + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @instance */ - ConfidenceMetricsEntry.prototype.recall = 0; + ExportDataOutputInfo.prototype.bigqueryOutputDataset = ""; - /** - * ConfidenceMetricsEntry precision. - * @member {number} precision - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - * @instance - */ - ConfidenceMetricsEntry.prototype.precision = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ConfidenceMetricsEntry f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * ExportDataOutputInfo outputLocation. + * @member {"gcsOutputDirectory"|"bigqueryOutputDataset"|undefined} outputLocation + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @instance */ - ConfidenceMetricsEntry.prototype.f1Score = 0; + Object.defineProperty(ExportDataOutputInfo.prototype, "outputLocation", { + get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory", "bigqueryOutputDataset"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ConfidenceMetricsEntry instance using the specified properties. + * Creates a new ExportDataOutputInfo instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static - * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry instance + * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo instance */ - ConfidenceMetricsEntry.create = function create(properties) { - return new ConfidenceMetricsEntry(properties); + ExportDataOutputInfo.create = function create(properties) { + return new ExportDataOutputInfo(properties); }; /** - * Encodes the specified ConfidenceMetricsEntry message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static - * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfidenceMetricsEntry.encode = function encode(message, writer) { + ExportDataOutputInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceThreshold); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.recall); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.precision); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.f1Score); + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryOutputDataset); return writer; }; /** - * Encodes the specified ConfidenceMetricsEntry message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.verify|verify} messages. + * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static - * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.IConfidenceMetricsEntry} message ConfidenceMetricsEntry message or plain object to encode + * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfidenceMetricsEntry.encodeDelimited = function encodeDelimited(message, writer) { + ExportDataOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer. + * Decodes an ExportDataOutputInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfidenceMetricsEntry.decode = function decode(reader, length) { + ExportDataOutputInfo.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.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.confidenceThreshold = reader.float(); - break; - case 3: - message.recall = reader.float(); - break; - case 4: - message.precision = reader.float(); + message.gcsOutputDirectory = reader.string(); break; - case 5: - message.f1Score = reader.float(); + case 2: + message.bigqueryOutputDataset = reader.string(); break; default: reader.skipType(tag & 7); @@ -45917,331 +47141,129 @@ }; /** - * Decodes a ConfidenceMetricsEntry message from the specified reader or buffer, length delimited. + * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfidenceMetricsEntry.decodeDelimited = function decodeDelimited(reader) { + ExportDataOutputInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConfidenceMetricsEntry message. + * Verifies an ExportDataOutputInfo message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConfidenceMetricsEntry.verify = function verify(message) { + ExportDataOutputInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; + var properties = {}; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + properties.outputLocation = 1; + if (!$util.isString(message.gcsOutputDirectory)) + return "gcsOutputDirectory: string expected"; + } + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { + if (properties.outputLocation === 1) + return "outputLocation: multiple values"; + properties.outputLocation = 1; + if (!$util.isString(message.bigqueryOutputDataset)) + return "bigqueryOutputDataset: string expected"; + } return null; }; /** - * Creates a ConfidenceMetricsEntry message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} ConfidenceMetricsEntry + * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo */ - ConfidenceMetricsEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) + ExportDataOutputInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) return object; - var message = new $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry(); - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.recall != null) - message.recall = Number(object.recall); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); + var message = new $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo(); + if (object.gcsOutputDirectory != null) + message.gcsOutputDirectory = String(object.gcsOutputDirectory); + if (object.bigqueryOutputDataset != null) + message.bigqueryOutputDataset = String(object.bigqueryOutputDataset); return message; }; /** - * Creates a plain object from a ConfidenceMetricsEntry message. Also converts values to other types if specified. + * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @static - * @param {google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} message ConfidenceMetricsEntry + * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} message ExportDataOutputInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConfidenceMetricsEntry.toObject = function toObject(message, options) { + ExportDataOutputInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.confidenceThreshold = 0; - object.recall = 0; - object.precision = 0; - object.f1Score = 0; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + object.gcsOutputDirectory = message.gcsOutputDirectory; + if (options.oneofs) + object.outputLocation = "gcsOutputDirectory"; + } + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { + object.bigqueryOutputDataset = message.bigqueryOutputDataset; + if (options.oneofs) + object.outputLocation = "bigqueryOutputDataset"; } - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; return object; }; /** - * Converts this ConfidenceMetricsEntry to JSON. + * Converts this ExportDataOutputInfo to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo * @instance * @returns {Object.} JSON object */ - ConfidenceMetricsEntry.prototype.toJSON = function toJSON() { + ExportDataOutputInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ConfidenceMetricsEntry; + return ExportDataOutputInfo; })(); - return TextExtractionEvaluationMetrics; - })(); - - v1beta1.TextSentimentAnnotation = (function() { - - /** - * Properties of a TextSentimentAnnotation. - * @memberof google.cloud.automl.v1beta1 - * @interface ITextSentimentAnnotation - * @property {number|null} [sentiment] TextSentimentAnnotation sentiment - */ - - /** - * Constructs a new TextSentimentAnnotation. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextSentimentAnnotation. - * @implements ITextSentimentAnnotation - * @constructor - * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation=} [properties] Properties to set - */ - function TextSentimentAnnotation(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]]; - } - - /** - * TextSentimentAnnotation sentiment. - * @member {number} sentiment - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @instance - */ - TextSentimentAnnotation.prototype.sentiment = 0; - - /** - * Creates a new TextSentimentAnnotation instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation instance - */ - TextSentimentAnnotation.create = function create(properties) { - return new TextSentimentAnnotation(properties); - }; - - /** - * Encodes the specified TextSentimentAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextSentimentAnnotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentiment); - return writer; - }; - - /** - * Encodes the specified TextSentimentAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentAnnotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentAnnotation} message TextSentimentAnnotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextSentimentAnnotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextSentimentAnnotation.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.automl.v1beta1.TextSentimentAnnotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sentiment = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TextSentimentAnnotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextSentimentAnnotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextSentimentAnnotation message. - * @function verify - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextSentimentAnnotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - if (!$util.isInteger(message.sentiment)) - return "sentiment: integer expected"; - return null; - }; - - /** - * Creates a TextSentimentAnnotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextSentimentAnnotation} TextSentimentAnnotation - */ - TextSentimentAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentAnnotation) - return object; - var message = new $root.google.cloud.automl.v1beta1.TextSentimentAnnotation(); - if (object.sentiment != null) - message.sentiment = object.sentiment | 0; - return message; - }; - - /** - * Creates a plain object from a TextSentimentAnnotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @static - * @param {google.cloud.automl.v1beta1.TextSentimentAnnotation} message TextSentimentAnnotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextSentimentAnnotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sentiment = 0; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = message.sentiment; - return object; - }; - - /** - * Converts this TextSentimentAnnotation to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextSentimentAnnotation - * @instance - * @returns {Object.} JSON object - */ - TextSentimentAnnotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TextSentimentAnnotation; + return ExportDataOperationMetadata; })(); - v1beta1.TextSentimentEvaluationMetrics = (function() { - - /** - * Properties of a TextSentimentEvaluationMetrics. - * @memberof google.cloud.automl.v1beta1 - * @interface ITextSentimentEvaluationMetrics - * @property {number|null} [precision] TextSentimentEvaluationMetrics precision - * @property {number|null} [recall] TextSentimentEvaluationMetrics recall - * @property {number|null} [f1Score] TextSentimentEvaluationMetrics f1Score - * @property {number|null} [meanAbsoluteError] TextSentimentEvaluationMetrics meanAbsoluteError - * @property {number|null} [meanSquaredError] TextSentimentEvaluationMetrics meanSquaredError - * @property {number|null} [linearKappa] TextSentimentEvaluationMetrics linearKappa - * @property {number|null} [quadraticKappa] TextSentimentEvaluationMetrics quadraticKappa - * @property {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null} [confusionMatrix] TextSentimentEvaluationMetrics confusionMatrix - * @property {Array.|null} [annotationSpecId] TextSentimentEvaluationMetrics annotationSpecId + v1beta1.BatchPredictOperationMetadata = (function() { + + /** + * Properties of a BatchPredictOperationMetadata. + * @memberof google.cloud.automl.v1beta1 + * @interface IBatchPredictOperationMetadata + * @property {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictOperationMetadata inputConfig + * @property {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null} [outputInfo] BatchPredictOperationMetadata outputInfo */ /** - * Constructs a new TextSentimentEvaluationMetrics. + * Constructs a new BatchPredictOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextSentimentEvaluationMetrics. - * @implements ITextSentimentEvaluationMetrics + * @classdesc Represents a BatchPredictOperationMetadata. + * @implements IBatchPredictOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata=} [properties] Properties to set */ - function TextSentimentEvaluationMetrics(properties) { - this.annotationSpecId = []; + function BatchPredictOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46249,182 +47271,88 @@ } /** - * TextSentimentEvaluationMetrics precision. - * @member {number} precision - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - */ - TextSentimentEvaluationMetrics.prototype.precision = 0; - - /** - * TextSentimentEvaluationMetrics recall. - * @member {number} recall - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - */ - TextSentimentEvaluationMetrics.prototype.recall = 0; - - /** - * TextSentimentEvaluationMetrics f1Score. - * @member {number} f1Score - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - */ - TextSentimentEvaluationMetrics.prototype.f1Score = 0; - - /** - * TextSentimentEvaluationMetrics meanAbsoluteError. - * @member {number} meanAbsoluteError - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - */ - TextSentimentEvaluationMetrics.prototype.meanAbsoluteError = 0; - - /** - * TextSentimentEvaluationMetrics meanSquaredError. - * @member {number} meanSquaredError - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - */ - TextSentimentEvaluationMetrics.prototype.meanSquaredError = 0; - - /** - * TextSentimentEvaluationMetrics linearKappa. - * @member {number} linearKappa - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - */ - TextSentimentEvaluationMetrics.prototype.linearKappa = 0; - - /** - * TextSentimentEvaluationMetrics quadraticKappa. - * @member {number} quadraticKappa - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - */ - TextSentimentEvaluationMetrics.prototype.quadraticKappa = 0; - - /** - * TextSentimentEvaluationMetrics confusionMatrix. - * @member {google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.IConfusionMatrix|null|undefined} confusionMatrix - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * BatchPredictOperationMetadata inputConfig. + * @member {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @instance */ - TextSentimentEvaluationMetrics.prototype.confusionMatrix = null; + BatchPredictOperationMetadata.prototype.inputConfig = null; /** - * TextSentimentEvaluationMetrics annotationSpecId. - * @member {Array.} annotationSpecId - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * BatchPredictOperationMetadata outputInfo. + * @member {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null|undefined} outputInfo + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @instance */ - TextSentimentEvaluationMetrics.prototype.annotationSpecId = $util.emptyArray; + BatchPredictOperationMetadata.prototype.outputInfo = null; /** - * Creates a new TextSentimentEvaluationMetrics instance using the specified properties. + * Creates a new BatchPredictOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics instance + * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata instance */ - TextSentimentEvaluationMetrics.create = function create(properties) { - return new TextSentimentEvaluationMetrics(properties); + BatchPredictOperationMetadata.create = function create(properties) { + return new BatchPredictOperationMetadata(properties); }; /** - * Encodes the specified TextSentimentEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. + * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentEvaluationMetrics.encode = function encode(message, writer) { + BatchPredictOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.precision != null && message.hasOwnProperty("precision")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.precision); - if (message.recall != null && message.hasOwnProperty("recall")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.f1Score); - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.meanAbsoluteError); - if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.meanSquaredError); - if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.linearKappa); - if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) - writer.uint32(/* id 7, wireType 5 =*/61).float(message.quadraticKappa); - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.encode(message.confusionMatrix, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.annotationSpecId != null && message.annotationSpecId.length) - for (var i = 0; i < message.annotationSpecId.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.annotationSpecId[i]); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextSentimentEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify|verify} messages. + * Encodes the specified BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentEvaluationMetrics.decode = function decode(reader, length) { + BatchPredictOperationMetadata.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.automl.v1beta1.TextSentimentEvaluationMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.precision = reader.float(); + message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.decode(reader, reader.uint32()); break; case 2: - message.recall = reader.float(); - break; - case 3: - message.f1Score = reader.float(); - break; - case 4: - message.meanAbsoluteError = reader.float(); - break; - case 5: - message.meanSquaredError = reader.float(); - break; - case 6: - message.linearKappa = reader.float(); - break; - case 7: - message.quadraticKappa = reader.float(); - break; - case 8: - message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.annotationSpecId && message.annotationSpecId.length)) - message.annotationSpecId = []; - message.annotationSpecId.push(reader.string()); + message.outputInfo = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -46435,191 +47363,359 @@ }; /** - * Decodes a TextSentimentEvaluationMetrics message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { + BatchPredictOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSentimentEvaluationMetrics message. + * Verifies a BatchPredictOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSentimentEvaluationMetrics.verify = function verify(message) { + BatchPredictOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (typeof message.precision !== "number") - return "precision: number expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - if (typeof message.f1Score !== "number") - return "f1Score: number expected"; - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - if (typeof message.meanAbsoluteError !== "number") - return "meanAbsoluteError: number expected"; - if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) - if (typeof message.meanSquaredError !== "number") - return "meanSquaredError: number expected"; - if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) - if (typeof message.linearKappa !== "number") - return "linearKappa: number expected"; - if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) - if (typeof message.quadraticKappa !== "number") - return "quadraticKappa: number expected"; - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) { - var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.verify(message.confusionMatrix); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.verify(message.inputConfig); if (error) - return "confusionMatrix." + error; + return "inputConfig." + error; } - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) { - if (!Array.isArray(message.annotationSpecId)) - return "annotationSpecId: array expected"; - for (var i = 0; i < message.annotationSpecId.length; ++i) - if (!$util.isString(message.annotationSpecId[i])) - return "annotationSpecId: string[] expected"; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { + var error = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify(message.outputInfo); + if (error) + return "outputInfo." + error; } return null; }; /** - * Creates a TextSentimentEvaluationMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} TextSentimentEvaluationMetrics + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata */ - TextSentimentEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics) + BatchPredictOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics(); - if (object.precision != null) - message.precision = Number(object.precision); - if (object.recall != null) - message.recall = Number(object.recall); - if (object.f1Score != null) - message.f1Score = Number(object.f1Score); - if (object.meanAbsoluteError != null) - message.meanAbsoluteError = Number(object.meanAbsoluteError); - if (object.meanSquaredError != null) - message.meanSquaredError = Number(object.meanSquaredError); - if (object.linearKappa != null) - message.linearKappa = Number(object.linearKappa); - if (object.quadraticKappa != null) - message.quadraticKappa = Number(object.quadraticKappa); - if (object.confusionMatrix != null) { - if (typeof object.confusionMatrix !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.confusionMatrix: object expected"); - message.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.fromObject(object.confusionMatrix); + var message = new $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata(); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOperationMetadata.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.fromObject(object.inputConfig); } - if (object.annotationSpecId) { - if (!Array.isArray(object.annotationSpecId)) - throw TypeError(".google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotationSpecId: array expected"); - message.annotationSpecId = []; - for (var i = 0; i < object.annotationSpecId.length; ++i) - message.annotationSpecId[i] = String(object.annotationSpecId[i]); + if (object.outputInfo != null) { + if (typeof object.outputInfo !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOperationMetadata.outputInfo: object expected"); + message.outputInfo = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.fromObject(object.outputInfo); } return message; }; - /** - * Creates a plain object from a TextSentimentEvaluationMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @static - * @param {google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} message TextSentimentEvaluationMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextSentimentEvaluationMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotationSpecId = []; - if (options.defaults) { - object.precision = 0; - object.recall = 0; - object.f1Score = 0; - object.meanAbsoluteError = 0; - object.meanSquaredError = 0; - object.linearKappa = 0; - object.quadraticKappa = 0; - object.confusionMatrix = null; - } - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - if (message.f1Score != null && message.hasOwnProperty("f1Score")) - object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; - if (message.meanAbsoluteError != null && message.hasOwnProperty("meanAbsoluteError")) - object.meanAbsoluteError = options.json && !isFinite(message.meanAbsoluteError) ? String(message.meanAbsoluteError) : message.meanAbsoluteError; - if (message.meanSquaredError != null && message.hasOwnProperty("meanSquaredError")) - object.meanSquaredError = options.json && !isFinite(message.meanSquaredError) ? String(message.meanSquaredError) : message.meanSquaredError; - if (message.linearKappa != null && message.hasOwnProperty("linearKappa")) - object.linearKappa = options.json && !isFinite(message.linearKappa) ? String(message.linearKappa) : message.linearKappa; - if (message.quadraticKappa != null && message.hasOwnProperty("quadraticKappa")) - object.quadraticKappa = options.json && !isFinite(message.quadraticKappa) ? String(message.quadraticKappa) : message.quadraticKappa; - if (message.confusionMatrix != null && message.hasOwnProperty("confusionMatrix")) - object.confusionMatrix = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.toObject(message.confusionMatrix, options); - if (message.annotationSpecId && message.annotationSpecId.length) { - object.annotationSpecId = []; - for (var j = 0; j < message.annotationSpecId.length; ++j) - object.annotationSpecId[j] = message.annotationSpecId[j]; - } - return object; - }; + /** + * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @static + * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} message BatchPredictOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchPredictOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputConfig = null; + object.outputInfo = null; + } + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.toObject(message.inputConfig, options); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + object.outputInfo = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.toObject(message.outputInfo, options); + return object; + }; + + /** + * Converts this BatchPredictOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + BatchPredictOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + BatchPredictOperationMetadata.BatchPredictOutputInfo = (function() { + + /** + * Properties of a BatchPredictOutputInfo. + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @interface IBatchPredictOutputInfo + * @property {string|null} [gcsOutputDirectory] BatchPredictOutputInfo gcsOutputDirectory + * @property {string|null} [bigqueryOutputDataset] BatchPredictOutputInfo bigqueryOutputDataset + */ + + /** + * Constructs a new BatchPredictOutputInfo. + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @classdesc Represents a BatchPredictOutputInfo. + * @implements IBatchPredictOutputInfo + * @constructor + * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set + */ + function BatchPredictOutputInfo(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]]; + } + + /** + * BatchPredictOutputInfo gcsOutputDirectory. + * @member {string} gcsOutputDirectory + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @instance + */ + BatchPredictOutputInfo.prototype.gcsOutputDirectory = ""; + + /** + * BatchPredictOutputInfo bigqueryOutputDataset. + * @member {string} bigqueryOutputDataset + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @instance + */ + BatchPredictOutputInfo.prototype.bigqueryOutputDataset = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BatchPredictOutputInfo outputLocation. + * @member {"gcsOutputDirectory"|"bigqueryOutputDataset"|undefined} outputLocation + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @instance + */ + Object.defineProperty(BatchPredictOutputInfo.prototype, "outputLocation", { + get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory", "bigqueryOutputDataset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BatchPredictOutputInfo instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo instance + */ + BatchPredictOutputInfo.create = function create(properties) { + return new BatchPredictOutputInfo(properties); + }; + + /** + * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchPredictOutputInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryOutputDataset); + return writer; + }; + + /** + * Encodes the specified BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchPredictOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchPredictOutputInfo.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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsOutputDirectory = reader.string(); + break; + case 2: + message.bigqueryOutputDataset = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchPredictOutputInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchPredictOutputInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchPredictOutputInfo message. + * @function verify + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchPredictOutputInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + properties.outputLocation = 1; + if (!$util.isString(message.gcsOutputDirectory)) + return "gcsOutputDirectory: string expected"; + } + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { + if (properties.outputLocation === 1) + return "outputLocation: multiple values"; + properties.outputLocation = 1; + if (!$util.isString(message.bigqueryOutputDataset)) + return "bigqueryOutputDataset: string expected"; + } + return null; + }; + + /** + * Creates a BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo + */ + BatchPredictOutputInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) + return object; + var message = new $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); + if (object.gcsOutputDirectory != null) + message.gcsOutputDirectory = String(object.gcsOutputDirectory); + if (object.bigqueryOutputDataset != null) + message.bigqueryOutputDataset = String(object.bigqueryOutputDataset); + return message; + }; + + /** + * Creates a plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} message BatchPredictOutputInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchPredictOutputInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { + object.gcsOutputDirectory = message.gcsOutputDirectory; + if (options.oneofs) + object.outputLocation = "gcsOutputDirectory"; + } + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { + object.bigqueryOutputDataset = message.bigqueryOutputDataset; + if (options.oneofs) + object.outputLocation = "bigqueryOutputDataset"; + } + return object; + }; + + /** + * Converts this BatchPredictOutputInfo to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + * @instance + * @returns {Object.} JSON object + */ + BatchPredictOutputInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this TextSentimentEvaluationMetrics to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics - * @instance - * @returns {Object.} JSON object - */ - TextSentimentEvaluationMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return BatchPredictOutputInfo; + })(); - return TextSentimentEvaluationMetrics; + return BatchPredictOperationMetadata; })(); - v1beta1.TranslationDatasetMetadata = (function() { + v1beta1.ExportModelOperationMetadata = (function() { /** - * Properties of a TranslationDatasetMetadata. + * Properties of an ExportModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ITranslationDatasetMetadata - * @property {string|null} [sourceLanguageCode] TranslationDatasetMetadata sourceLanguageCode - * @property {string|null} [targetLanguageCode] TranslationDatasetMetadata targetLanguageCode + * @interface IExportModelOperationMetadata + * @property {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null} [outputInfo] ExportModelOperationMetadata outputInfo */ /** - * Constructs a new TranslationDatasetMetadata. + * Constructs a new ExportModelOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TranslationDatasetMetadata. - * @implements ITranslationDatasetMetadata + * @classdesc Represents an ExportModelOperationMetadata. + * @implements IExportModelOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata=} [properties] Properties to set */ - function TranslationDatasetMetadata(properties) { + function ExportModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46627,88 +47723,75 @@ } /** - * TranslationDatasetMetadata sourceLanguageCode. - * @member {string} sourceLanguageCode - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata - * @instance - */ - TranslationDatasetMetadata.prototype.sourceLanguageCode = ""; - - /** - * TranslationDatasetMetadata targetLanguageCode. - * @member {string} targetLanguageCode - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * ExportModelOperationMetadata outputInfo. + * @member {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null|undefined} outputInfo + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @instance */ - TranslationDatasetMetadata.prototype.targetLanguageCode = ""; + ExportModelOperationMetadata.prototype.outputInfo = null; /** - * Creates a new TranslationDatasetMetadata instance using the specified properties. + * Creates a new ExportModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata instance */ - TranslationDatasetMetadata.create = function create(properties) { - return new TranslationDatasetMetadata(properties); + ExportModelOperationMetadata.create = function create(properties) { + return new ExportModelOperationMetadata(properties); }; /** - * Encodes the specified TranslationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. + * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDatasetMetadata.encode = function encode(message, writer) { + ExportModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceLanguageCode); - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetLanguageCode); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify|verify} messages. + * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITranslationDatasetMetadata} message TranslationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ExportModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDatasetMetadata.decode = function decode(reader, length) { + ExportModelOperationMetadata.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.automl.v1beta1.TranslationDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sourceLanguageCode = reader.string(); - break; case 2: - message.targetLanguageCode = reader.string(); + message.outputInfo = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -46719,328 +47802,299 @@ }; /** - * Decodes a TranslationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + ExportModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationDatasetMetadata message. + * Verifies an ExportModelOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationDatasetMetadata.verify = function verify(message) { + ExportModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - if (!$util.isString(message.sourceLanguageCode)) - return "sourceLanguageCode: string expected"; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - if (!$util.isString(message.targetLanguageCode)) - return "targetLanguageCode: string expected"; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { + var error = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify(message.outputInfo); + if (error) + return "outputInfo." + error; + } return null; }; /** - * Creates a TranslationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TranslationDatasetMetadata} TranslationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata */ - TranslationDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata) + ExportModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata(); - if (object.sourceLanguageCode != null) - message.sourceLanguageCode = String(object.sourceLanguageCode); - if (object.targetLanguageCode != null) - message.targetLanguageCode = String(object.targetLanguageCode); + var message = new $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata(); + if (object.outputInfo != null) { + if (typeof object.outputInfo !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExportModelOperationMetadata.outputInfo: object expected"); + message.outputInfo = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.fromObject(object.outputInfo); + } return message; }; /** - * Creates a plain object from a TranslationDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.TranslationDatasetMetadata} message TranslationDatasetMetadata + * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata} message ExportModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationDatasetMetadata.toObject = function toObject(message, options) { + ExportModelOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sourceLanguageCode = ""; - object.targetLanguageCode = ""; - } - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - object.sourceLanguageCode = message.sourceLanguageCode; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - object.targetLanguageCode = message.targetLanguageCode; + if (options.defaults) + object.outputInfo = null; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + object.outputInfo = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.toObject(message.outputInfo, options); return object; }; /** - * Converts this TranslationDatasetMetadata to JSON. + * Converts this ExportModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TranslationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata * @instance * @returns {Object.} JSON object */ - TranslationDatasetMetadata.prototype.toJSON = function toJSON() { + ExportModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TranslationDatasetMetadata; - })(); - - v1beta1.TranslationEvaluationMetrics = (function() { - - /** - * Properties of a TranslationEvaluationMetrics. - * @memberof google.cloud.automl.v1beta1 - * @interface ITranslationEvaluationMetrics - * @property {number|null} [bleuScore] TranslationEvaluationMetrics bleuScore - * @property {number|null} [baseBleuScore] TranslationEvaluationMetrics baseBleuScore - */ + ExportModelOperationMetadata.ExportModelOutputInfo = (function() { - /** - * Constructs a new TranslationEvaluationMetrics. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TranslationEvaluationMetrics. - * @implements ITranslationEvaluationMetrics - * @constructor - * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics=} [properties] Properties to set - */ - function TranslationEvaluationMetrics(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 an ExportModelOutputInfo. + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @interface IExportModelOutputInfo + * @property {string|null} [gcsOutputDirectory] ExportModelOutputInfo gcsOutputDirectory + */ - /** - * TranslationEvaluationMetrics bleuScore. - * @member {number} bleuScore - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @instance - */ - TranslationEvaluationMetrics.prototype.bleuScore = 0; + /** + * Constructs a new ExportModelOutputInfo. + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @classdesc Represents an ExportModelOutputInfo. + * @implements IExportModelOutputInfo + * @constructor + * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set + */ + function ExportModelOutputInfo(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]]; + } - /** - * TranslationEvaluationMetrics baseBleuScore. - * @member {number} baseBleuScore - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @instance - */ - TranslationEvaluationMetrics.prototype.baseBleuScore = 0; + /** + * ExportModelOutputInfo gcsOutputDirectory. + * @member {string} gcsOutputDirectory + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @instance + */ + ExportModelOutputInfo.prototype.gcsOutputDirectory = ""; - /** - * Creates a new TranslationEvaluationMetrics instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics instance - */ - TranslationEvaluationMetrics.create = function create(properties) { - return new TranslationEvaluationMetrics(properties); - }; + /** + * Creates a new ExportModelOutputInfo instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo instance + */ + ExportModelOutputInfo.create = function create(properties) { + return new ExportModelOutputInfo(properties); + }; - /** - * Encodes the specified TranslationEvaluationMetrics message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslationEvaluationMetrics.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.bleuScore); - if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.baseBleuScore); - return writer; - }; + /** + * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportModelOutputInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); + return writer; + }; - /** - * Encodes the specified TranslationEvaluationMetrics message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics} message TranslationEvaluationMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslationEvaluationMetrics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportModelOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationEvaluationMetrics.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.automl.v1beta1.TranslationEvaluationMetrics(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bleuScore = reader.double(); - break; - case 2: - message.baseBleuScore = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportModelOutputInfo.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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsOutputDirectory = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a TranslationEvaluationMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationEvaluationMetrics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportModelOutputInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a TranslationEvaluationMetrics message. - * @function verify - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TranslationEvaluationMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) - if (typeof message.bleuScore !== "number") - return "bleuScore: number expected"; - if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) - if (typeof message.baseBleuScore !== "number") - return "baseBleuScore: number expected"; - return null; - }; + /** + * Verifies an ExportModelOutputInfo message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportModelOutputInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + if (!$util.isString(message.gcsOutputDirectory)) + return "gcsOutputDirectory: string expected"; + return null; + }; - /** - * Creates a TranslationEvaluationMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} TranslationEvaluationMetrics - */ - TranslationEvaluationMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) + /** + * Creates an ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo + */ + ExportModelOutputInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) + return object; + var message = new $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo(); + if (object.gcsOutputDirectory != null) + message.gcsOutputDirectory = String(object.gcsOutputDirectory); + return message; + }; + + /** + * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} message ExportModelOutputInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportModelOutputInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.gcsOutputDirectory = ""; + if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) + object.gcsOutputDirectory = message.gcsOutputDirectory; return object; - var message = new $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics(); - if (object.bleuScore != null) - message.bleuScore = Number(object.bleuScore); - if (object.baseBleuScore != null) - message.baseBleuScore = Number(object.baseBleuScore); - return message; - }; + }; - /** - * Creates a plain object from a TranslationEvaluationMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @static - * @param {google.cloud.automl.v1beta1.TranslationEvaluationMetrics} message TranslationEvaluationMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TranslationEvaluationMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bleuScore = 0; - object.baseBleuScore = 0; - } - if (message.bleuScore != null && message.hasOwnProperty("bleuScore")) - object.bleuScore = options.json && !isFinite(message.bleuScore) ? String(message.bleuScore) : message.bleuScore; - if (message.baseBleuScore != null && message.hasOwnProperty("baseBleuScore")) - object.baseBleuScore = options.json && !isFinite(message.baseBleuScore) ? String(message.baseBleuScore) : message.baseBleuScore; - return object; - }; + /** + * Converts this ExportModelOutputInfo to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + * @instance + * @returns {Object.} JSON object + */ + ExportModelOutputInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this TranslationEvaluationMetrics to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.TranslationEvaluationMetrics - * @instance - * @returns {Object.} JSON object - */ - TranslationEvaluationMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ExportModelOutputInfo; + })(); - return TranslationEvaluationMetrics; + return ExportModelOperationMetadata; })(); - v1beta1.TranslationModelMetadata = (function() { + v1beta1.ExportEvaluatedExamplesOperationMetadata = (function() { /** - * Properties of a TranslationModelMetadata. + * Properties of an ExportEvaluatedExamplesOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @interface ITranslationModelMetadata - * @property {string|null} [baseModel] TranslationModelMetadata baseModel - * @property {string|null} [sourceLanguageCode] TranslationModelMetadata sourceLanguageCode - * @property {string|null} [targetLanguageCode] TranslationModelMetadata targetLanguageCode + * @interface IExportEvaluatedExamplesOperationMetadata + * @property {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null} [outputInfo] ExportEvaluatedExamplesOperationMetadata outputInfo */ /** - * Constructs a new TranslationModelMetadata. + * Constructs a new ExportEvaluatedExamplesOperationMetadata. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TranslationModelMetadata. - * @implements ITranslationModelMetadata + * @classdesc Represents an ExportEvaluatedExamplesOperationMetadata. + * @implements IExportEvaluatedExamplesOperationMetadata * @constructor - * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata=} [properties] Properties to set */ - function TranslationModelMetadata(properties) { + function ExportEvaluatedExamplesOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47048,101 +48102,75 @@ } /** - * TranslationModelMetadata baseModel. - * @member {string} baseModel - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata - * @instance - */ - TranslationModelMetadata.prototype.baseModel = ""; - - /** - * TranslationModelMetadata sourceLanguageCode. - * @member {string} sourceLanguageCode - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata - * @instance - */ - TranslationModelMetadata.prototype.sourceLanguageCode = ""; - - /** - * TranslationModelMetadata targetLanguageCode. - * @member {string} targetLanguageCode - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * ExportEvaluatedExamplesOperationMetadata outputInfo. + * @member {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null|undefined} outputInfo + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @instance */ - TranslationModelMetadata.prototype.targetLanguageCode = ""; + ExportEvaluatedExamplesOperationMetadata.prototype.outputInfo = null; /** - * Creates a new TranslationModelMetadata instance using the specified properties. + * Creates a new ExportEvaluatedExamplesOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata instance + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata instance */ - TranslationModelMetadata.create = function create(properties) { - return new TranslationModelMetadata(properties); + ExportEvaluatedExamplesOperationMetadata.create = function create(properties) { + return new ExportEvaluatedExamplesOperationMetadata(properties); }; /** - * Encodes the specified TranslationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. + * Encodes the specified ExportEvaluatedExamplesOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata} message ExportEvaluatedExamplesOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationModelMetadata.encode = function encode(message, writer) { + ExportEvaluatedExamplesOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseModel != null && message.hasOwnProperty("baseModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModel); - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceLanguageCode); - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetLanguageCode); + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationModelMetadata.verify|verify} messages. + * Encodes the specified ExportEvaluatedExamplesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.ITranslationModelMetadata} message TranslationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata} message ExportEvaluatedExamplesOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ExportEvaluatedExamplesOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer. + * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationModelMetadata.decode = function decode(reader, length) { + ExportEvaluatedExamplesOperationMetadata.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.automl.v1beta1.TranslationModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseModel = reader.string(); - break; case 2: - message.sourceLanguageCode = reader.string(); - break; - case 3: - message.targetLanguageCode = reader.string(); + message.outputInfo = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -47153,318 +48181,403 @@ }; /** - * Decodes a TranslationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationModelMetadata.decodeDelimited = function decodeDelimited(reader) { + ExportEvaluatedExamplesOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationModelMetadata message. + * Verifies an ExportEvaluatedExamplesOperationMetadata message. * @function verify - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationModelMetadata.verify = function verify(message) { + ExportEvaluatedExamplesOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.baseModel != null && message.hasOwnProperty("baseModel")) - if (!$util.isString(message.baseModel)) - return "baseModel: string expected"; - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - if (!$util.isString(message.sourceLanguageCode)) - return "sourceLanguageCode: string expected"; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - if (!$util.isString(message.targetLanguageCode)) - return "targetLanguageCode: string expected"; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { + var error = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify(message.outputInfo); + if (error) + return "outputInfo." + error; + } return null; }; /** - * Creates a TranslationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEvaluatedExamplesOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TranslationModelMetadata} TranslationModelMetadata + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata */ - TranslationModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TranslationModelMetadata) + ExportEvaluatedExamplesOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) return object; - var message = new $root.google.cloud.automl.v1beta1.TranslationModelMetadata(); - if (object.baseModel != null) - message.baseModel = String(object.baseModel); - if (object.sourceLanguageCode != null) - message.sourceLanguageCode = String(object.sourceLanguageCode); - if (object.targetLanguageCode != null) - message.targetLanguageCode = String(object.targetLanguageCode); + var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata(); + if (object.outputInfo != null) { + if (typeof object.outputInfo !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.outputInfo: object expected"); + message.outputInfo = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.fromObject(object.outputInfo); + } return message; }; /** - * Creates a plain object from a TranslationModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ExportEvaluatedExamplesOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @static - * @param {google.cloud.automl.v1beta1.TranslationModelMetadata} message TranslationModelMetadata + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} message ExportEvaluatedExamplesOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationModelMetadata.toObject = function toObject(message, options) { + ExportEvaluatedExamplesOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.baseModel = ""; - object.sourceLanguageCode = ""; - object.targetLanguageCode = ""; - } - if (message.baseModel != null && message.hasOwnProperty("baseModel")) - object.baseModel = message.baseModel; - if (message.sourceLanguageCode != null && message.hasOwnProperty("sourceLanguageCode")) - object.sourceLanguageCode = message.sourceLanguageCode; - if (message.targetLanguageCode != null && message.hasOwnProperty("targetLanguageCode")) - object.targetLanguageCode = message.targetLanguageCode; + if (options.defaults) + object.outputInfo = null; + if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) + object.outputInfo = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.toObject(message.outputInfo, options); return object; }; /** - * Converts this TranslationModelMetadata to JSON. + * Converts this ExportEvaluatedExamplesOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TranslationModelMetadata + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata * @instance * @returns {Object.} JSON object */ - TranslationModelMetadata.prototype.toJSON = function toJSON() { + ExportEvaluatedExamplesOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TranslationModelMetadata; - })(); + ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo = (function() { - v1beta1.TranslationAnnotation = (function() { + /** + * Properties of an ExportEvaluatedExamplesOutputInfo. + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @interface IExportEvaluatedExamplesOutputInfo + * @property {string|null} [bigqueryOutputDataset] ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset + */ - /** - * Properties of a TranslationAnnotation. - * @memberof google.cloud.automl.v1beta1 - * @interface ITranslationAnnotation - * @property {google.cloud.automl.v1beta1.ITextSnippet|null} [translatedContent] TranslationAnnotation translatedContent - */ + /** + * Constructs a new ExportEvaluatedExamplesOutputInfo. + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @classdesc Represents an ExportEvaluatedExamplesOutputInfo. + * @implements IExportEvaluatedExamplesOutputInfo + * @constructor + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo=} [properties] Properties to set + */ + function ExportEvaluatedExamplesOutputInfo(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]]; + } - /** - * Constructs a new TranslationAnnotation. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TranslationAnnotation. - * @implements ITranslationAnnotation - * @constructor - * @param {google.cloud.automl.v1beta1.ITranslationAnnotation=} [properties] Properties to set - */ - function TranslationAnnotation(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]]; - } + /** + * ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset. + * @member {string} bigqueryOutputDataset + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @instance + */ + ExportEvaluatedExamplesOutputInfo.prototype.bigqueryOutputDataset = ""; - /** - * TranslationAnnotation translatedContent. - * @member {google.cloud.automl.v1beta1.ITextSnippet|null|undefined} translatedContent - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @instance - */ - TranslationAnnotation.prototype.translatedContent = null; + /** + * Creates a new ExportEvaluatedExamplesOutputInfo instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo instance + */ + ExportEvaluatedExamplesOutputInfo.create = function create(properties) { + return new ExportEvaluatedExamplesOutputInfo(properties); + }; - /** - * Creates a new TranslationAnnotation instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @static - * @param {google.cloud.automl.v1beta1.ITranslationAnnotation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation instance - */ - TranslationAnnotation.create = function create(properties) { - return new TranslationAnnotation(properties); - }; + /** + * Encodes the specified ExportEvaluatedExamplesOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo} message ExportEvaluatedExamplesOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluatedExamplesOutputInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryOutputDataset); + return writer; + }; - /** - * Encodes the specified TranslationAnnotation message. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @static - * @param {google.cloud.automl.v1beta1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + /** + * Encodes the specified ExportEvaluatedExamplesOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo} message ExportEvaluatedExamplesOutputInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluatedExamplesOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluatedExamplesOutputInfo.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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.bigqueryOutputDataset = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluatedExamplesOutputInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportEvaluatedExamplesOutputInfo message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportEvaluatedExamplesOutputInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) + if (!$util.isString(message.bigqueryOutputDataset)) + return "bigqueryOutputDataset: string expected"; + return null; + }; + + /** + * Creates an ExportEvaluatedExamplesOutputInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo + */ + ExportEvaluatedExamplesOutputInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo) + return object; + var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo(); + if (object.bigqueryOutputDataset != null) + message.bigqueryOutputDataset = String(object.bigqueryOutputDataset); + return message; + }; + + /** + * Creates a plain object from an ExportEvaluatedExamplesOutputInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @static + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} message ExportEvaluatedExamplesOutputInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportEvaluatedExamplesOutputInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bigqueryOutputDataset = ""; + if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) + object.bigqueryOutputDataset = message.bigqueryOutputDataset; + return object; + }; + + /** + * Converts this ExportEvaluatedExamplesOutputInfo to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + * @instance + * @returns {Object.} JSON object + */ + ExportEvaluatedExamplesOutputInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExportEvaluatedExamplesOutputInfo; + })(); + + return ExportEvaluatedExamplesOperationMetadata; + })(); + + v1beta1.PredictionService = (function() { + + /** + * Constructs a new PredictionService service. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a PredictionService + * @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 */ - TranslationAnnotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) - $root.google.cloud.automl.v1beta1.TextSnippet.encode(message.translatedContent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + function PredictionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PredictionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PredictionService; /** - * Encodes the specified TranslationAnnotation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TranslationAnnotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation + * Creates new PredictionService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.automl.v1beta1.PredictionService * @static - * @param {google.cloud.automl.v1beta1.ITranslationAnnotation} message TranslationAnnotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @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 {PredictionService} RPC service. Useful where requests and/or responses are streamed. */ - TranslationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PredictionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Decodes a TranslationAnnotation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation - * @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.automl.v1beta1.PredictionService#predict}. + * @memberof google.cloud.automl.v1beta1.PredictionService + * @typedef PredictCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.PredictResponse} [response] PredictResponse */ - TranslationAnnotation.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.automl.v1beta1.TranslationAnnotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.translatedContent = $root.google.cloud.automl.v1beta1.TextSnippet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a TranslationAnnotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls Predict. + * @function predict + * @memberof google.cloud.automl.v1beta1.PredictionService + * @instance + * @param {google.cloud.automl.v1beta1.IPredictRequest} request PredictRequest message or plain object + * @param {google.cloud.automl.v1beta1.PredictionService.PredictCallback} callback Node-style callback called with the error, if any, and PredictResponse + * @returns {undefined} + * @variation 1 */ - TranslationAnnotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(PredictionService.prototype.predict = function predict(request, callback) { + return this.rpcCall(predict, $root.google.cloud.automl.v1beta1.PredictRequest, $root.google.cloud.automl.v1beta1.PredictResponse, request, callback); + }, "name", { value: "Predict" }); /** - * Verifies a TranslationAnnotation message. - * @function verify - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls Predict. + * @function predict + * @memberof google.cloud.automl.v1beta1.PredictionService + * @instance + * @param {google.cloud.automl.v1beta1.IPredictRequest} request PredictRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TranslationAnnotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) { - var error = $root.google.cloud.automl.v1beta1.TextSnippet.verify(message.translatedContent); - if (error) - return "translatedContent." + error; - } - return null; - }; /** - * Creates a TranslationAnnotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TranslationAnnotation} TranslationAnnotation + * Callback as used by {@link google.cloud.automl.v1beta1.PredictionService#batchPredict}. + * @memberof google.cloud.automl.v1beta1.PredictionService + * @typedef BatchPredictCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - TranslationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TranslationAnnotation) - return object; - var message = new $root.google.cloud.automl.v1beta1.TranslationAnnotation(); - if (object.translatedContent != null) { - if (typeof object.translatedContent !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TranslationAnnotation.translatedContent: object expected"); - message.translatedContent = $root.google.cloud.automl.v1beta1.TextSnippet.fromObject(object.translatedContent); - } - return message; - }; /** - * Creates a plain object from a TranslationAnnotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation - * @static - * @param {google.cloud.automl.v1beta1.TranslationAnnotation} message TranslationAnnotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls BatchPredict. + * @function batchPredict + * @memberof google.cloud.automl.v1beta1.PredictionService + * @instance + * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} request BatchPredictRequest message or plain object + * @param {google.cloud.automl.v1beta1.PredictionService.BatchPredictCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - TranslationAnnotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.translatedContent = null; - if (message.translatedContent != null && message.hasOwnProperty("translatedContent")) - object.translatedContent = $root.google.cloud.automl.v1beta1.TextSnippet.toObject(message.translatedContent, options); - return object; - }; + Object.defineProperty(PredictionService.prototype.batchPredict = function batchPredict(request, callback) { + return this.rpcCall(batchPredict, $root.google.cloud.automl.v1beta1.BatchPredictRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchPredict" }); /** - * Converts this TranslationAnnotation to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.TranslationAnnotation + * Calls BatchPredict. + * @function batchPredict + * @memberof google.cloud.automl.v1beta1.PredictionService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} request BatchPredictRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TranslationAnnotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return TranslationAnnotation; + return PredictionService; })(); - v1beta1.AnnotationSpec = (function() { + v1beta1.PredictRequest = (function() { /** - * Properties of an AnnotationSpec. + * Properties of a PredictRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IAnnotationSpec - * @property {string|null} [name] AnnotationSpec name - * @property {string|null} [displayName] AnnotationSpec displayName - * @property {number|null} [exampleCount] AnnotationSpec exampleCount + * @interface IPredictRequest + * @property {string|null} [name] PredictRequest name + * @property {google.cloud.automl.v1beta1.IExamplePayload|null} [payload] PredictRequest payload + * @property {Object.|null} [params] PredictRequest params */ /** - * Constructs a new AnnotationSpec. + * Constructs a new PredictRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an AnnotationSpec. - * @implements IAnnotationSpec + * @classdesc Represents a PredictRequest. + * @implements IPredictRequest * @constructor - * @param {google.cloud.automl.v1beta1.IAnnotationSpec=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IPredictRequest=} [properties] Properties to set */ - function AnnotationSpec(properties) { + function PredictRequest(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47472,90 +48585,91 @@ } /** - * AnnotationSpec name. + * PredictRequest name. * @member {string} name - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @instance */ - AnnotationSpec.prototype.name = ""; + PredictRequest.prototype.name = ""; /** - * AnnotationSpec displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * PredictRequest payload. + * @member {google.cloud.automl.v1beta1.IExamplePayload|null|undefined} payload + * @memberof google.cloud.automl.v1beta1.PredictRequest * @instance */ - AnnotationSpec.prototype.displayName = ""; + PredictRequest.prototype.payload = null; /** - * AnnotationSpec exampleCount. - * @member {number} exampleCount - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * PredictRequest params. + * @member {Object.} params + * @memberof google.cloud.automl.v1beta1.PredictRequest * @instance */ - AnnotationSpec.prototype.exampleCount = 0; + PredictRequest.prototype.params = $util.emptyObject; /** - * Creates a new AnnotationSpec instance using the specified properties. + * Creates a new PredictRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static - * @param {google.cloud.automl.v1beta1.IAnnotationSpec=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec instance + * @param {google.cloud.automl.v1beta1.IPredictRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest instance */ - AnnotationSpec.create = function create(properties) { - return new AnnotationSpec(properties); + PredictRequest.create = function create(properties) { + return new PredictRequest(properties); }; /** - * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. + * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static - * @param {google.cloud.automl.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode + * @param {google.cloud.automl.v1beta1.IPredictRequest} message PredictRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpec.encode = function encode(message, writer) { + PredictRequest.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.exampleCount != null && message.hasOwnProperty("exampleCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.exampleCount); + if (message.payload != null && message.hasOwnProperty("payload")) + $root.google.cloud.automl.v1beta1.ExamplePayload.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.AnnotationSpec.verify|verify} messages. + * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static - * @param {google.cloud.automl.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode + * @param {google.cloud.automl.v1beta1.IPredictRequest} message PredictRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpec.encodeDelimited = function encodeDelimited(message, writer) { + PredictRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationSpec message from the specified reader or buffer. + * Decodes a PredictRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpec.decode = function decode(reader, length) { + PredictRequest.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.automl.v1beta1.AnnotationSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.PredictRequest(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -47563,10 +48677,15 @@ message.name = reader.string(); break; case 2: - message.displayName = reader.string(); + message.payload = $root.google.cloud.automl.v1beta1.ExamplePayload.decode(reader, reader.uint32()); break; - case 9: - message.exampleCount = reader.int32(); + case 3: + reader.skip().pos++; + if (message.params === $util.emptyObject) + message.params = {}; + key = reader.string(); + reader.pos++; + message.params[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -47577,410 +48696,259 @@ }; /** - * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. + * Decodes a PredictRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpec.decodeDelimited = function decodeDelimited(reader) { + PredictRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationSpec message. + * Verifies a PredictRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationSpec.verify = function verify(message) { + PredictRequest.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.exampleCount != null && message.hasOwnProperty("exampleCount")) - if (!$util.isInteger(message.exampleCount)) - return "exampleCount: integer expected"; + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.cloud.automl.v1beta1.ExamplePayload.verify(message.payload); + if (error) + return "payload." + error; + } + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; + } return null; }; /** - * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. + * Creates a PredictRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest */ - AnnotationSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.AnnotationSpec) + PredictRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.PredictRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.AnnotationSpec(); + var message = new $root.google.cloud.automl.v1beta1.PredictRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.exampleCount != null) - message.exampleCount = object.exampleCount | 0; + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.automl.v1beta1.PredictRequest.payload: object expected"); + message.payload = $root.google.cloud.automl.v1beta1.ExamplePayload.fromObject(object.payload); + } + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.automl.v1beta1.PredictRequest.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); + } return message; }; /** - * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. + * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @static - * @param {google.cloud.automl.v1beta1.AnnotationSpec} message AnnotationSpec + * @param {google.cloud.automl.v1beta1.PredictRequest} message PredictRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationSpec.toObject = function toObject(message, options) { + PredictRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.params = {}; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.exampleCount = 0; + object.payload = 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.exampleCount != null && message.hasOwnProperty("exampleCount")) - object.exampleCount = message.exampleCount; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = $root.google.cloud.automl.v1beta1.ExamplePayload.toObject(message.payload, options); + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; + } return object; }; /** - * Converts this AnnotationSpec to JSON. + * Converts this PredictRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.AnnotationSpec + * @memberof google.cloud.automl.v1beta1.PredictRequest * @instance * @returns {Object.} JSON object */ - AnnotationSpec.prototype.toJSON = function toJSON() { + PredictRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnnotationSpec; + return PredictRequest; })(); - v1beta1.Dataset = (function() { - - /** - * Properties of a Dataset. - * @memberof google.cloud.automl.v1beta1 - * @interface IDataset - * @property {google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null} [translationDatasetMetadata] Dataset translationDatasetMetadata - * @property {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null} [imageClassificationDatasetMetadata] Dataset imageClassificationDatasetMetadata - * @property {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null} [textClassificationDatasetMetadata] Dataset textClassificationDatasetMetadata - * @property {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null} [imageObjectDetectionDatasetMetadata] Dataset imageObjectDetectionDatasetMetadata - * @property {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null} [videoClassificationDatasetMetadata] Dataset videoClassificationDatasetMetadata - * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null} [videoObjectTrackingDatasetMetadata] Dataset videoObjectTrackingDatasetMetadata - * @property {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null} [textExtractionDatasetMetadata] Dataset textExtractionDatasetMetadata - * @property {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null} [textSentimentDatasetMetadata] Dataset textSentimentDatasetMetadata - * @property {google.cloud.automl.v1beta1.ITablesDatasetMetadata|null} [tablesDatasetMetadata] Dataset tablesDatasetMetadata - * @property {string|null} [name] Dataset name - * @property {string|null} [displayName] Dataset displayName - * @property {string|null} [description] Dataset description - * @property {number|null} [exampleCount] Dataset exampleCount - * @property {google.protobuf.ITimestamp|null} [createTime] Dataset createTime - * @property {string|null} [etag] Dataset etag - */ - - /** - * Constructs a new Dataset. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a Dataset. - * @implements IDataset - * @constructor - * @param {google.cloud.automl.v1beta1.IDataset=} [properties] Properties to set - */ - function Dataset(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]]; - } - - /** - * Dataset translationDatasetMetadata. - * @member {google.cloud.automl.v1beta1.ITranslationDatasetMetadata|null|undefined} translationDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.translationDatasetMetadata = null; - - /** - * Dataset imageClassificationDatasetMetadata. - * @member {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata|null|undefined} imageClassificationDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.imageClassificationDatasetMetadata = null; - - /** - * Dataset textClassificationDatasetMetadata. - * @member {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata|null|undefined} textClassificationDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.textClassificationDatasetMetadata = null; - - /** - * Dataset imageObjectDetectionDatasetMetadata. - * @member {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata|null|undefined} imageObjectDetectionDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.imageObjectDetectionDatasetMetadata = null; - - /** - * Dataset videoClassificationDatasetMetadata. - * @member {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata|null|undefined} videoClassificationDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.videoClassificationDatasetMetadata = null; - - /** - * Dataset videoObjectTrackingDatasetMetadata. - * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata|null|undefined} videoObjectTrackingDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.videoObjectTrackingDatasetMetadata = null; - - /** - * Dataset textExtractionDatasetMetadata. - * @member {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata|null|undefined} textExtractionDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.textExtractionDatasetMetadata = null; - - /** - * Dataset textSentimentDatasetMetadata. - * @member {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata|null|undefined} textSentimentDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.textSentimentDatasetMetadata = null; - - /** - * Dataset tablesDatasetMetadata. - * @member {google.cloud.automl.v1beta1.ITablesDatasetMetadata|null|undefined} tablesDatasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.tablesDatasetMetadata = null; - - /** - * Dataset name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.name = ""; - - /** - * Dataset displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance - */ - Dataset.prototype.displayName = ""; - - /** - * Dataset description. - * @member {string} description - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance + v1beta1.PredictResponse = (function() { + + /** + * Properties of a PredictResponse. + * @memberof google.cloud.automl.v1beta1 + * @interface IPredictResponse + * @property {Array.|null} [payload] PredictResponse payload + * @property {google.cloud.automl.v1beta1.IExamplePayload|null} [preprocessedInput] PredictResponse preprocessedInput + * @property {Object.|null} [metadata] PredictResponse metadata */ - Dataset.prototype.description = ""; /** - * Dataset exampleCount. - * @member {number} exampleCount - * @memberof google.cloud.automl.v1beta1.Dataset - * @instance + * Constructs a new PredictResponse. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a PredictResponse. + * @implements IPredictResponse + * @constructor + * @param {google.cloud.automl.v1beta1.IPredictResponse=} [properties] Properties to set */ - Dataset.prototype.exampleCount = 0; + function PredictResponse(properties) { + this.payload = []; + this.metadata = {}; + 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]]; + } /** - * Dataset createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.automl.v1beta1.Dataset + * PredictResponse payload. + * @member {Array.} payload + * @memberof google.cloud.automl.v1beta1.PredictResponse * @instance */ - Dataset.prototype.createTime = null; + PredictResponse.prototype.payload = $util.emptyArray; /** - * Dataset etag. - * @member {string} etag - * @memberof google.cloud.automl.v1beta1.Dataset + * PredictResponse preprocessedInput. + * @member {google.cloud.automl.v1beta1.IExamplePayload|null|undefined} preprocessedInput + * @memberof google.cloud.automl.v1beta1.PredictResponse * @instance */ - Dataset.prototype.etag = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + PredictResponse.prototype.preprocessedInput = null; /** - * Dataset datasetMetadata. - * @member {"translationDatasetMetadata"|"imageClassificationDatasetMetadata"|"textClassificationDatasetMetadata"|"imageObjectDetectionDatasetMetadata"|"videoClassificationDatasetMetadata"|"videoObjectTrackingDatasetMetadata"|"textExtractionDatasetMetadata"|"textSentimentDatasetMetadata"|"tablesDatasetMetadata"|undefined} datasetMetadata - * @memberof google.cloud.automl.v1beta1.Dataset + * PredictResponse metadata. + * @member {Object.} metadata + * @memberof google.cloud.automl.v1beta1.PredictResponse * @instance */ - Object.defineProperty(Dataset.prototype, "datasetMetadata", { - get: $util.oneOfGetter($oneOfFields = ["translationDatasetMetadata", "imageClassificationDatasetMetadata", "textClassificationDatasetMetadata", "imageObjectDetectionDatasetMetadata", "videoClassificationDatasetMetadata", "videoObjectTrackingDatasetMetadata", "textExtractionDatasetMetadata", "textSentimentDatasetMetadata", "tablesDatasetMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + PredictResponse.prototype.metadata = $util.emptyObject; /** - * Creates a new Dataset instance using the specified properties. + * Creates a new PredictResponse instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static - * @param {google.cloud.automl.v1beta1.IDataset=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Dataset} Dataset instance + * @param {google.cloud.automl.v1beta1.IPredictResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse instance */ - Dataset.create = function create(properties) { - return new Dataset(properties); + PredictResponse.create = function create(properties) { + return new PredictResponse(properties); }; /** - * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. + * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static - * @param {google.cloud.automl.v1beta1.IDataset} message Dataset message or plain object to encode + * @param {google.cloud.automl.v1beta1.IPredictResponse} message PredictResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dataset.encode = function encode(message, writer) { + PredictResponse.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.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.etag != null && message.hasOwnProperty("etag")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.etag); - if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.exampleCount); - if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) - $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.encode(message.translationDatasetMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) - $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.encode(message.imageClassificationDatasetMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) - $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.encode(message.textClassificationDatasetMetadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) - $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.encode(message.imageObjectDetectionDatasetMetadata, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) - $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.encode(message.textExtractionDatasetMetadata, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.videoObjectTrackingDatasetMetadata != null && message.hasOwnProperty("videoObjectTrackingDatasetMetadata")) - $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.encode(message.videoObjectTrackingDatasetMetadata, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) - $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.encode(message.textSentimentDatasetMetadata, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.videoClassificationDatasetMetadata != null && message.hasOwnProperty("videoClassificationDatasetMetadata")) - $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.encode(message.videoClassificationDatasetMetadata, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.tablesDatasetMetadata != null && message.hasOwnProperty("tablesDatasetMetadata")) - $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.encode(message.tablesDatasetMetadata, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.payload != null && message.payload.length) + for (var i = 0; i < message.payload.length; ++i) + $root.google.cloud.automl.v1beta1.AnnotationPayload.encode(message.payload[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) + $root.google.cloud.automl.v1beta1.ExamplePayload.encode(message.preprocessedInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Dataset.verify|verify} messages. + * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static - * @param {google.cloud.automl.v1beta1.IDataset} message Dataset message or plain object to encode + * @param {google.cloud.automl.v1beta1.IPredictResponse} message PredictResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dataset.encodeDelimited = function encodeDelimited(message, writer) { + PredictResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Dataset message from the specified reader or buffer. + * Decodes a PredictResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Dataset} Dataset + * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dataset.decode = function decode(reader, length) { + PredictResponse.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.automl.v1beta1.Dataset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.PredictResponse(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 23: - message.translationDatasetMetadata = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.decode(reader, reader.uint32()); - break; - case 24: - message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.decode(reader, reader.uint32()); - break; - case 25: - message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.decode(reader, reader.uint32()); - break; - case 26: - message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.decode(reader, reader.uint32()); - break; - case 31: - message.videoClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.decode(reader, reader.uint32()); - break; - case 29: - message.videoObjectTrackingDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.decode(reader, reader.uint32()); - break; - case 28: - message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.decode(reader, reader.uint32()); - break; - case 30: - message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.decode(reader, reader.uint32()); - break; - case 33: - message.tablesDatasetMetadata = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.decode(reader, reader.uint32()); - break; case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); + if (!(message.payload && message.payload.length)) + message.payload = []; + message.payload.push($root.google.cloud.automl.v1beta1.AnnotationPayload.decode(reader, reader.uint32())); break; case 3: - message.description = reader.string(); - break; - case 21: - message.exampleCount = reader.int32(); - break; - case 14: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.preprocessedInput = $root.google.cloud.automl.v1beta1.ExamplePayload.decode(reader, reader.uint32()); break; - case 17: - message.etag = reader.string(); + case 2: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -47991,332 +48959,165 @@ }; /** - * Decodes a Dataset message from the specified reader or buffer, length delimited. + * Decodes a PredictResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Dataset} Dataset + * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dataset.decodeDelimited = function decodeDelimited(reader) { + PredictResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Dataset message. + * Verifies a PredictResponse message. * @function verify - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Dataset.verify = function verify(message) { + PredictResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.verify(message.translationDatasetMetadata); - if (error) - return "translationDatasetMetadata." + error; - } - } - if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify(message.imageClassificationDatasetMetadata); - if (error) - return "imageClassificationDatasetMetadata." + error; - } - } - if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify(message.textClassificationDatasetMetadata); - if (error) - return "textClassificationDatasetMetadata." + error; - } - } - if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify(message.imageObjectDetectionDatasetMetadata); - if (error) - return "imageObjectDetectionDatasetMetadata." + error; - } - } - if (message.videoClassificationDatasetMetadata != null && message.hasOwnProperty("videoClassificationDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify(message.videoClassificationDatasetMetadata); - if (error) - return "videoClassificationDatasetMetadata." + error; - } - } - if (message.videoObjectTrackingDatasetMetadata != null && message.hasOwnProperty("videoObjectTrackingDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify(message.videoObjectTrackingDatasetMetadata); - if (error) - return "videoObjectTrackingDatasetMetadata." + error; - } - } - if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify(message.textExtractionDatasetMetadata); - if (error) - return "textExtractionDatasetMetadata." + error; - } - } - if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify(message.textSentimentDatasetMetadata); - if (error) - return "textSentimentDatasetMetadata." + error; - } - } - if (message.tablesDatasetMetadata != null && message.hasOwnProperty("tablesDatasetMetadata")) { - if (properties.datasetMetadata === 1) - return "datasetMetadata: multiple values"; - properties.datasetMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.verify(message.tablesDatasetMetadata); + if (message.payload != null && message.hasOwnProperty("payload")) { + if (!Array.isArray(message.payload)) + return "payload: array expected"; + for (var i = 0; i < message.payload.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.AnnotationPayload.verify(message.payload[i]); if (error) - return "tablesDatasetMetadata." + error; + return "payload." + error; } } - 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.exampleCount != null && message.hasOwnProperty("exampleCount")) - if (!$util.isInteger(message.exampleCount)) - return "exampleCount: integer expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) { + var error = $root.google.cloud.automl.v1beta1.ExamplePayload.verify(message.preprocessedInput); if (error) - return "createTime." + error; + return "preprocessedInput." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates a Dataset message from a plain object. Also converts values to their respective internal types. + * Creates a PredictResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Dataset} Dataset + * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse */ - Dataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Dataset) + PredictResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.PredictResponse) return object; - var message = new $root.google.cloud.automl.v1beta1.Dataset(); - if (object.translationDatasetMetadata != null) { - if (typeof object.translationDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.translationDatasetMetadata: object expected"); - message.translationDatasetMetadata = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.fromObject(object.translationDatasetMetadata); - } - if (object.imageClassificationDatasetMetadata != null) { - if (typeof object.imageClassificationDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.imageClassificationDatasetMetadata: object expected"); - message.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.fromObject(object.imageClassificationDatasetMetadata); - } - if (object.textClassificationDatasetMetadata != null) { - if (typeof object.textClassificationDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.textClassificationDatasetMetadata: object expected"); - message.textClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.fromObject(object.textClassificationDatasetMetadata); - } - if (object.imageObjectDetectionDatasetMetadata != null) { - if (typeof object.imageObjectDetectionDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.imageObjectDetectionDatasetMetadata: object expected"); - message.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.fromObject(object.imageObjectDetectionDatasetMetadata); - } - if (object.videoClassificationDatasetMetadata != null) { - if (typeof object.videoClassificationDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.videoClassificationDatasetMetadata: object expected"); - message.videoClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.fromObject(object.videoClassificationDatasetMetadata); - } - if (object.videoObjectTrackingDatasetMetadata != null) { - if (typeof object.videoObjectTrackingDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.videoObjectTrackingDatasetMetadata: object expected"); - message.videoObjectTrackingDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.fromObject(object.videoObjectTrackingDatasetMetadata); - } - if (object.textExtractionDatasetMetadata != null) { - if (typeof object.textExtractionDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.textExtractionDatasetMetadata: object expected"); - message.textExtractionDatasetMetadata = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.fromObject(object.textExtractionDatasetMetadata); - } - if (object.textSentimentDatasetMetadata != null) { - if (typeof object.textSentimentDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.textSentimentDatasetMetadata: object expected"); - message.textSentimentDatasetMetadata = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.fromObject(object.textSentimentDatasetMetadata); + var message = new $root.google.cloud.automl.v1beta1.PredictResponse(); + if (object.payload) { + if (!Array.isArray(object.payload)) + throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.payload: array expected"); + message.payload = []; + for (var i = 0; i < object.payload.length; ++i) { + if (typeof object.payload[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.payload: object expected"); + message.payload[i] = $root.google.cloud.automl.v1beta1.AnnotationPayload.fromObject(object.payload[i]); + } } - if (object.tablesDatasetMetadata != null) { - if (typeof object.tablesDatasetMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.tablesDatasetMetadata: object expected"); - message.tablesDatasetMetadata = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.fromObject(object.tablesDatasetMetadata); + if (object.preprocessedInput != null) { + if (typeof object.preprocessedInput !== "object") + throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.preprocessedInput: object expected"); + message.preprocessedInput = $root.google.cloud.automl.v1beta1.ExamplePayload.fromObject(object.preprocessedInput); } - 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.exampleCount != null) - message.exampleCount = object.exampleCount | 0; - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Dataset.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); } - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a Dataset message. Also converts values to other types if specified. + * Creates a plain object from a PredictResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @static - * @param {google.cloud.automl.v1beta1.Dataset} message Dataset + * @param {google.cloud.automl.v1beta1.PredictResponse} message PredictResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Dataset.toObject = function toObject(message, options) { + PredictResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.createTime = null; - object.etag = ""; - object.exampleCount = 0; - } - 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.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.exampleCount != null && message.hasOwnProperty("exampleCount")) - object.exampleCount = message.exampleCount; - if (message.translationDatasetMetadata != null && message.hasOwnProperty("translationDatasetMetadata")) { - object.translationDatasetMetadata = $root.google.cloud.automl.v1beta1.TranslationDatasetMetadata.toObject(message.translationDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "translationDatasetMetadata"; - } - if (message.imageClassificationDatasetMetadata != null && message.hasOwnProperty("imageClassificationDatasetMetadata")) { - object.imageClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.toObject(message.imageClassificationDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "imageClassificationDatasetMetadata"; - } - if (message.textClassificationDatasetMetadata != null && message.hasOwnProperty("textClassificationDatasetMetadata")) { - object.textClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.toObject(message.textClassificationDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "textClassificationDatasetMetadata"; - } - if (message.imageObjectDetectionDatasetMetadata != null && message.hasOwnProperty("imageObjectDetectionDatasetMetadata")) { - object.imageObjectDetectionDatasetMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.toObject(message.imageObjectDetectionDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "imageObjectDetectionDatasetMetadata"; - } - if (message.textExtractionDatasetMetadata != null && message.hasOwnProperty("textExtractionDatasetMetadata")) { - object.textExtractionDatasetMetadata = $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.toObject(message.textExtractionDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "textExtractionDatasetMetadata"; - } - if (message.videoObjectTrackingDatasetMetadata != null && message.hasOwnProperty("videoObjectTrackingDatasetMetadata")) { - object.videoObjectTrackingDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.toObject(message.videoObjectTrackingDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "videoObjectTrackingDatasetMetadata"; - } - if (message.textSentimentDatasetMetadata != null && message.hasOwnProperty("textSentimentDatasetMetadata")) { - object.textSentimentDatasetMetadata = $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.toObject(message.textSentimentDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "textSentimentDatasetMetadata"; - } - if (message.videoClassificationDatasetMetadata != null && message.hasOwnProperty("videoClassificationDatasetMetadata")) { - object.videoClassificationDatasetMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.toObject(message.videoClassificationDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "videoClassificationDatasetMetadata"; + if (options.arrays || options.defaults) + object.payload = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) + object.preprocessedInput = null; + if (message.payload && message.payload.length) { + object.payload = []; + for (var j = 0; j < message.payload.length; ++j) + object.payload[j] = $root.google.cloud.automl.v1beta1.AnnotationPayload.toObject(message.payload[j], options); } - if (message.tablesDatasetMetadata != null && message.hasOwnProperty("tablesDatasetMetadata")) { - object.tablesDatasetMetadata = $root.google.cloud.automl.v1beta1.TablesDatasetMetadata.toObject(message.tablesDatasetMetadata, options); - if (options.oneofs) - object.datasetMetadata = "tablesDatasetMetadata"; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; } + if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) + object.preprocessedInput = $root.google.cloud.automl.v1beta1.ExamplePayload.toObject(message.preprocessedInput, options); return object; }; /** - * Converts this Dataset to JSON. + * Converts this PredictResponse to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.Dataset + * @memberof google.cloud.automl.v1beta1.PredictResponse * @instance * @returns {Object.} JSON object */ - Dataset.prototype.toJSON = function toJSON() { + PredictResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Dataset; + return PredictResponse; })(); - v1beta1.ImageClassificationDatasetMetadata = (function() { + v1beta1.BatchPredictRequest = (function() { /** - * Properties of an ImageClassificationDatasetMetadata. - * @memberof google.cloud.automl.v1beta1 - * @interface IImageClassificationDatasetMetadata - * @property {google.cloud.automl.v1beta1.ClassificationType|null} [classificationType] ImageClassificationDatasetMetadata classificationType + * Properties of a BatchPredictRequest. + * @memberof google.cloud.automl.v1beta1 + * @interface IBatchPredictRequest + * @property {string|null} [name] BatchPredictRequest name + * @property {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictRequest inputConfig + * @property {google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null} [outputConfig] BatchPredictRequest outputConfig + * @property {Object.|null} [params] BatchPredictRequest params */ /** - * Constructs a new ImageClassificationDatasetMetadata. + * Constructs a new BatchPredictRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageClassificationDatasetMetadata. - * @implements IImageClassificationDatasetMetadata + * @classdesc Represents a BatchPredictRequest. + * @implements IBatchPredictRequest * @constructor - * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBatchPredictRequest=} [properties] Properties to set */ - function ImageClassificationDatasetMetadata(properties) { + function BatchPredictRequest(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48324,75 +49125,120 @@ } /** - * ImageClassificationDatasetMetadata classificationType. - * @member {google.cloud.automl.v1beta1.ClassificationType} classificationType - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * BatchPredictRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @instance */ - ImageClassificationDatasetMetadata.prototype.classificationType = 0; + BatchPredictRequest.prototype.name = ""; /** - * Creates a new ImageClassificationDatasetMetadata instance using the specified properties. + * BatchPredictRequest inputConfig. + * @member {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @instance + */ + BatchPredictRequest.prototype.inputConfig = null; + + /** + * BatchPredictRequest outputConfig. + * @member {google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @instance + */ + BatchPredictRequest.prototype.outputConfig = null; + + /** + * BatchPredictRequest params. + * @member {Object.} params + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @instance + */ + BatchPredictRequest.prototype.params = $util.emptyObject; + + /** + * Creates a new BatchPredictRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.IBatchPredictRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest instance */ - ImageClassificationDatasetMetadata.create = function create(properties) { - return new ImageClassificationDatasetMetadata(properties); + BatchPredictRequest.create = function create(properties) { + return new BatchPredictRequest(properties); }; /** - * Encodes the specified ImageClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationDatasetMetadata.encode = function encode(message, writer) { + BatchPredictRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ImageClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes a BatchPredictRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationDatasetMetadata.decode = function decode(reader, length) { + BatchPredictRequest.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.automl.v1beta1.ImageClassificationDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BatchPredictRequest(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.classificationType = reader.int32(); + message.name = reader.string(); + break; + case 3: + message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.decode(reader, reader.uint32()); + break; + case 4: + message.outputConfig = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.decode(reader, reader.uint32()); + break; + case 5: + reader.skip().pos++; + if (message.params === $util.emptyObject) + message.params = {}; + key = reader.string(); + reader.pos++; + message.params[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -48403,124 +49249,158 @@ }; /** - * Decodes an ImageClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + BatchPredictRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageClassificationDatasetMetadata message. + * Verifies a BatchPredictRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageClassificationDatasetMetadata.verify = function verify(message) { + BatchPredictRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - switch (message.classificationType) { - default: - return "classificationType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.verify(message.inputConfig); + if (error) + return "inputConfig." + error; + } + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify(message.outputConfig); + if (error) + return "outputConfig." + error; + } + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; + } return null; }; /** - * Creates an ImageClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BatchPredictRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} ImageClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest */ - ImageClassificationDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) + BatchPredictRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata(); - switch (object.classificationType) { - case "CLASSIFICATION_TYPE_UNSPECIFIED": - case 0: - message.classificationType = 0; - break; - case "MULTICLASS": - case 1: - message.classificationType = 1; - break; - case "MULTILABEL": - case 2: - message.classificationType = 2; - break; + var message = new $root.google.cloud.automl.v1beta1.BatchPredictRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictRequest.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.fromObject(object.inputConfig); + } + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictRequest.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.fromObject(object.outputConfig); + } + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictRequest.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); } return message; }; /** - * Creates a plain object from an ImageClassificationDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @static - * @param {google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} message ImageClassificationDatasetMetadata + * @param {google.cloud.automl.v1beta1.BatchPredictRequest} message BatchPredictRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageClassificationDatasetMetadata.toObject = function toObject(message, options) { + BatchPredictRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; + if (options.objects || options.defaults) + object.params = {}; + if (options.defaults) { + object.name = ""; + object.inputConfig = null; + object.outputConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.toObject(message.inputConfig, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.toObject(message.outputConfig, options); + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; + } return object; }; /** - * Converts this ImageClassificationDatasetMetadata to JSON. + * Converts this BatchPredictRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictRequest * @instance * @returns {Object.} JSON object */ - ImageClassificationDatasetMetadata.prototype.toJSON = function toJSON() { + BatchPredictRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageClassificationDatasetMetadata; + return BatchPredictRequest; })(); - v1beta1.ImageObjectDetectionDatasetMetadata = (function() { + v1beta1.BatchPredictResult = (function() { /** - * Properties of an ImageObjectDetectionDatasetMetadata. + * Properties of a BatchPredictResult. * @memberof google.cloud.automl.v1beta1 - * @interface IImageObjectDetectionDatasetMetadata + * @interface IBatchPredictResult + * @property {Object.|null} [metadata] BatchPredictResult metadata */ /** - * Constructs a new ImageObjectDetectionDatasetMetadata. + * Constructs a new BatchPredictResult. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageObjectDetectionDatasetMetadata. - * @implements IImageObjectDetectionDatasetMetadata + * @classdesc Represents a BatchPredictResult. + * @implements IBatchPredictResult * @constructor - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IBatchPredictResult=} [properties] Properties to set */ - function ImageObjectDetectionDatasetMetadata(properties) { + function BatchPredictResult(properties) { + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48528,63 +49408,82 @@ } /** - * Creates a new ImageObjectDetectionDatasetMetadata instance using the specified properties. + * BatchPredictResult metadata. + * @member {Object.} metadata + * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @instance + */ + BatchPredictResult.prototype.metadata = $util.emptyObject; + + /** + * Creates a new BatchPredictResult instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictResult * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.IBatchPredictResult=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.BatchPredictResult} BatchPredictResult instance */ - ImageObjectDetectionDatasetMetadata.create = function create(properties) { - return new ImageObjectDetectionDatasetMetadata(properties); + BatchPredictResult.create = function create(properties) { + return new BatchPredictResult(properties); }; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictResult * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictResult} message BatchPredictResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionDatasetMetadata.encode = function encode(message, writer) { + BatchPredictResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ImageObjectDetectionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.verify|verify} messages. + * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictResult * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IBatchPredictResult} message BatchPredictResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageObjectDetectionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + BatchPredictResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer. + * Decodes a BatchPredictResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata + * @returns {google.cloud.automl.v1beta1.BatchPredictResult} BatchPredictResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionDatasetMetadata.decode = function decode(reader, length) { + BatchPredictResult.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.automl.v1beta1.ImageObjectDetectionDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.BatchPredictResult(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -48594,1198 +49493,949 @@ }; /** - * Decodes an ImageObjectDetectionDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata + * @returns {google.cloud.automl.v1beta1.BatchPredictResult} BatchPredictResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageObjectDetectionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + BatchPredictResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageObjectDetectionDatasetMetadata message. + * Verifies a BatchPredictResult message. * @function verify - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.BatchPredictResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageObjectDetectionDatasetMetadata.verify = function verify(message) { + BatchPredictResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } return null; }; /** - * Creates an ImageObjectDetectionDatasetMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} ImageObjectDetectionDatasetMetadata + * Creates a BatchPredictResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.BatchPredictResult} BatchPredictResult + */ + BatchPredictResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictResult) + return object; + var message = new $root.google.cloud.automl.v1beta1.BatchPredictResult(); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.BatchPredictResult.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @static + * @param {google.cloud.automl.v1beta1.BatchPredictResult} message BatchPredictResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchPredictResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + return object; + }; + + /** + * Converts this BatchPredictResult to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @instance + * @returns {Object.} JSON object + */ + BatchPredictResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BatchPredictResult; + })(); + + v1beta1.AutoMl = (function() { + + /** + * Constructs a new AutoMl service. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents an AutoMl + * @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 AutoMl(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AutoMl.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AutoMl; + + /** + * Creates new AutoMl service using the specified rpc implementation. + * @function create + * @memberof google.cloud.automl.v1beta1.AutoMl + * @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 {AutoMl} RPC service. Useful where requests and/or responses are streamed. + */ + AutoMl.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#createDataset}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef CreateDatasetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.Dataset} [response] Dataset + */ + + /** + * Calls CreateDataset. + * @function createDataset + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} request CreateDatasetRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.CreateDatasetCallback} callback Node-style callback called with the error, if any, and Dataset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AutoMl.prototype.createDataset = function createDataset(request, callback) { + return this.rpcCall(createDataset, $root.google.cloud.automl.v1beta1.CreateDatasetRequest, $root.google.cloud.automl.v1beta1.Dataset, request, callback); + }, "name", { value: "CreateDataset" }); + + /** + * Calls CreateDataset. + * @function createDataset + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} request CreateDatasetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getDataset}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef GetDatasetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.Dataset} [response] Dataset + */ + + /** + * Calls GetDataset. + * @function getDataset + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} request GetDatasetRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.GetDatasetCallback} callback Node-style callback called with the error, if any, and Dataset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AutoMl.prototype.getDataset = function getDataset(request, callback) { + return this.rpcCall(getDataset, $root.google.cloud.automl.v1beta1.GetDatasetRequest, $root.google.cloud.automl.v1beta1.Dataset, request, callback); + }, "name", { value: "GetDataset" }); + + /** + * Calls GetDataset. + * @function getDataset + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} request GetDatasetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listDatasets}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ListDatasetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ListDatasetsResponse} [response] ListDatasetsResponse + */ + + /** + * Calls ListDatasets. + * @function listDatasets + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} request ListDatasetsRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ListDatasetsCallback} callback Node-style callback called with the error, if any, and ListDatasetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AutoMl.prototype.listDatasets = function listDatasets(request, callback) { + return this.rpcCall(listDatasets, $root.google.cloud.automl.v1beta1.ListDatasetsRequest, $root.google.cloud.automl.v1beta1.ListDatasetsResponse, request, callback); + }, "name", { value: "ListDatasets" }); + + /** + * Calls ListDatasets. + * @function listDatasets + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} request ListDatasetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - return object; - return new $root.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata(); - }; /** - * Creates a plain object from an ImageObjectDetectionDatasetMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - * @static - * @param {google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} message ImageObjectDetectionDatasetMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateDataset}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef UpdateDatasetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.Dataset} [response] Dataset */ - ImageObjectDetectionDatasetMetadata.toObject = function toObject() { - return {}; - }; /** - * Converts this ImageObjectDetectionDatasetMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + * Calls UpdateDataset. + * @function updateDataset + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance - * @returns {Object.} JSON object + * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} request UpdateDatasetRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.UpdateDatasetCallback} callback Node-style callback called with the error, if any, and Dataset + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionDatasetMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImageObjectDetectionDatasetMetadata; - })(); - - v1beta1.ImageClassificationModelMetadata = (function() { + Object.defineProperty(AutoMl.prototype.updateDataset = function updateDataset(request, callback) { + return this.rpcCall(updateDataset, $root.google.cloud.automl.v1beta1.UpdateDatasetRequest, $root.google.cloud.automl.v1beta1.Dataset, request, callback); + }, "name", { value: "UpdateDataset" }); /** - * Properties of an ImageClassificationModelMetadata. - * @memberof google.cloud.automl.v1beta1 - * @interface IImageClassificationModelMetadata - * @property {string|null} [baseModelId] ImageClassificationModelMetadata baseModelId - * @property {number|Long|null} [trainBudget] ImageClassificationModelMetadata trainBudget - * @property {number|Long|null} [trainCost] ImageClassificationModelMetadata trainCost - * @property {string|null} [stopReason] ImageClassificationModelMetadata stopReason - * @property {string|null} [modelType] ImageClassificationModelMetadata modelType - * @property {number|null} [nodeQps] ImageClassificationModelMetadata nodeQps - * @property {number|Long|null} [nodeCount] ImageClassificationModelMetadata nodeCount + * Calls UpdateDataset. + * @function updateDataset + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} request UpdateDatasetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ImageClassificationModelMetadata. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageClassificationModelMetadata. - * @implements IImageClassificationModelMetadata - * @constructor - * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata=} [properties] Properties to set + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#deleteDataset}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef DeleteDatasetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - function ImageClassificationModelMetadata(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]]; - } /** - * ImageClassificationModelMetadata baseModelId. - * @member {string} baseModelId - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * Calls DeleteDataset. + * @function deleteDataset + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} request DeleteDatasetRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.DeleteDatasetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelMetadata.prototype.baseModelId = ""; + Object.defineProperty(AutoMl.prototype.deleteDataset = function deleteDataset(request, callback) { + return this.rpcCall(deleteDataset, $root.google.cloud.automl.v1beta1.DeleteDatasetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataset" }); /** - * ImageClassificationModelMetadata trainBudget. - * @member {number|Long} trainBudget - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * Calls DeleteDataset. + * @function deleteDataset + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} request DeleteDatasetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelMetadata.prototype.trainBudget = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImageClassificationModelMetadata trainCost. - * @member {number|Long} trainCost - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @instance + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#importData}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ImportDataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ImageClassificationModelMetadata.prototype.trainCost = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImageClassificationModelMetadata stopReason. - * @member {string} stopReason - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * Calls ImportData. + * @function importData + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IImportDataRequest} request ImportDataRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ImportDataCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelMetadata.prototype.stopReason = ""; + Object.defineProperty(AutoMl.prototype.importData = function importData(request, callback) { + return this.rpcCall(importData, $root.google.cloud.automl.v1beta1.ImportDataRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportData" }); /** - * ImageClassificationModelMetadata modelType. - * @member {string} modelType - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * Calls ImportData. + * @function importData + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IImportDataRequest} request ImportDataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelMetadata.prototype.modelType = ""; /** - * ImageClassificationModelMetadata nodeQps. - * @member {number} nodeQps - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @instance + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportData}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ExportDataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ImageClassificationModelMetadata.prototype.nodeQps = 0; /** - * ImageClassificationModelMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * Calls ExportData. + * @function exportData + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IExportDataRequest} request ExportDataRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ExportDataCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(AutoMl.prototype.exportData = function exportData(request, callback) { + return this.rpcCall(exportData, $root.google.cloud.automl.v1beta1.ExportDataRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportData" }); /** - * Creates a new ImageClassificationModelMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata instance + * Calls ExportData. + * @function exportData + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IExportDataRequest} request ExportDataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelMetadata.create = function create(properties) { - return new ImageClassificationModelMetadata(properties); - }; /** - * Encodes the specified ImageClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata 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.automl.v1beta1.AutoMl#getAnnotationSpec}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef GetAnnotationSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.AnnotationSpec} [response] AnnotationSpec */ - ImageClassificationModelMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseModelId); - if (message.trainBudget != null && message.hasOwnProperty("trainBudget")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.trainBudget); - if (message.trainCost != null && message.hasOwnProperty("trainCost")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.trainCost); - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); - if (message.modelType != null && message.hasOwnProperty("modelType")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.modelType); - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - writer.uint32(/* id 13, wireType 1 =*/105).double(message.nodeQps); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 14, wireType 0 =*/112).int64(message.nodeCount); - return writer; - }; /** - * Encodes the specified ImageClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationModelMetadata} message ImageClassificationModelMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetAnnotationSpec. + * @function getAnnotationSpec + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} request GetAnnotationSpecRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpecCallback} callback Node-style callback called with the error, if any, and AnnotationSpec + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(AutoMl.prototype.getAnnotationSpec = function getAnnotationSpec(request, callback) { + return this.rpcCall(getAnnotationSpec, $root.google.cloud.automl.v1beta1.GetAnnotationSpecRequest, $root.google.cloud.automl.v1beta1.AnnotationSpec, request, callback); + }, "name", { value: "GetAnnotationSpec" }); /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetAnnotationSpec. + * @function getAnnotationSpec + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} request GetAnnotationSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelMetadata.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.automl.v1beta1.ImageClassificationModelMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseModelId = reader.string(); - break; - case 2: - message.trainBudget = reader.int64(); - break; - case 3: - message.trainCost = reader.int64(); - break; - case 5: - message.stopReason = reader.string(); - break; - case 7: - message.modelType = reader.string(); - break; - case 13: - message.nodeQps = reader.double(); - break; - case 14: - message.nodeCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an ImageClassificationModelMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata - * @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.automl.v1beta1.AutoMl#getTableSpec}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef GetTableSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.TableSpec} [response] TableSpec */ - ImageClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an ImageClassificationModelMetadata message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetTableSpec. + * @function getTableSpec + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} request GetTableSpecRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.GetTableSpecCallback} callback Node-style callback called with the error, if any, and TableSpec + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) - if (!$util.isString(message.baseModelId)) - return "baseModelId: string expected"; - if (message.trainBudget != null && message.hasOwnProperty("trainBudget")) - if (!$util.isInteger(message.trainBudget) && !(message.trainBudget && $util.isInteger(message.trainBudget.low) && $util.isInteger(message.trainBudget.high))) - return "trainBudget: integer|Long expected"; - if (message.trainCost != null && message.hasOwnProperty("trainCost")) - if (!$util.isInteger(message.trainCost) && !(message.trainCost && $util.isInteger(message.trainCost.low) && $util.isInteger(message.trainCost.high))) - return "trainCost: integer|Long expected"; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - if (!$util.isString(message.stopReason)) - return "stopReason: string expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - if (!$util.isString(message.modelType)) - return "modelType: string expected"; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - if (typeof message.nodeQps !== "number") - return "nodeQps: number expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; - return null; - }; + Object.defineProperty(AutoMl.prototype.getTableSpec = function getTableSpec(request, callback) { + return this.rpcCall(getTableSpec, $root.google.cloud.automl.v1beta1.GetTableSpecRequest, $root.google.cloud.automl.v1beta1.TableSpec, request, callback); + }, "name", { value: "GetTableSpec" }); /** - * Creates an ImageClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} ImageClassificationModelMetadata + * Calls GetTableSpec. + * @function getTableSpec + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} request GetTableSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - return object; - var message = new $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata(); - if (object.baseModelId != null) - message.baseModelId = String(object.baseModelId); - if (object.trainBudget != null) - if ($util.Long) - (message.trainBudget = $util.Long.fromValue(object.trainBudget)).unsigned = false; - else if (typeof object.trainBudget === "string") - message.trainBudget = parseInt(object.trainBudget, 10); - else if (typeof object.trainBudget === "number") - message.trainBudget = object.trainBudget; - else if (typeof object.trainBudget === "object") - message.trainBudget = new $util.LongBits(object.trainBudget.low >>> 0, object.trainBudget.high >>> 0).toNumber(); - if (object.trainCost != null) - if ($util.Long) - (message.trainCost = $util.Long.fromValue(object.trainCost)).unsigned = false; - else if (typeof object.trainCost === "string") - message.trainCost = parseInt(object.trainCost, 10); - else if (typeof object.trainCost === "number") - message.trainCost = object.trainCost; - else if (typeof object.trainCost === "object") - message.trainCost = new $util.LongBits(object.trainCost.low >>> 0, object.trainCost.high >>> 0).toNumber(); - if (object.stopReason != null) - message.stopReason = String(object.stopReason); - if (object.modelType != null) - message.modelType = String(object.modelType); - if (object.nodeQps != null) - message.nodeQps = Number(object.nodeQps); - if (object.nodeCount != null) - if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); - return message; - }; /** - * Creates a plain object from an ImageClassificationModelMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.ImageClassificationModelMetadata} message ImageClassificationModelMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listTableSpecs}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ListTableSpecsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ListTableSpecsResponse} [response] ListTableSpecsResponse */ - ImageClassificationModelMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.baseModelId = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainBudget = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainBudget = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainCost = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainCost = options.longs === String ? "0" : 0; - object.stopReason = ""; - object.modelType = ""; - object.nodeQps = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nodeCount = options.longs === String ? "0" : 0; - } - if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) - object.baseModelId = message.baseModelId; - if (message.trainBudget != null && message.hasOwnProperty("trainBudget")) - if (typeof message.trainBudget === "number") - object.trainBudget = options.longs === String ? String(message.trainBudget) : message.trainBudget; - else - object.trainBudget = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudget) : options.longs === Number ? new $util.LongBits(message.trainBudget.low >>> 0, message.trainBudget.high >>> 0).toNumber() : message.trainBudget; - if (message.trainCost != null && message.hasOwnProperty("trainCost")) - if (typeof message.trainCost === "number") - object.trainCost = options.longs === String ? String(message.trainCost) : message.trainCost; - else - object.trainCost = options.longs === String ? $util.Long.prototype.toString.call(message.trainCost) : options.longs === Number ? new $util.LongBits(message.trainCost.low >>> 0, message.trainCost.high >>> 0).toNumber() : message.trainCost; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - object.stopReason = message.stopReason; - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = message.modelType; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; - else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; - return object; - }; /** - * Converts this ImageClassificationModelMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelMetadata + * Calls ListTableSpecs. + * @function listTableSpecs + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance - * @returns {Object.} JSON object + * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} request ListTableSpecsRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ListTableSpecsCallback} callback Node-style callback called with the error, if any, and ListTableSpecsResponse + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImageClassificationModelMetadata; - })(); - - v1beta1.ImageObjectDetectionModelMetadata = (function() { + Object.defineProperty(AutoMl.prototype.listTableSpecs = function listTableSpecs(request, callback) { + return this.rpcCall(listTableSpecs, $root.google.cloud.automl.v1beta1.ListTableSpecsRequest, $root.google.cloud.automl.v1beta1.ListTableSpecsResponse, request, callback); + }, "name", { value: "ListTableSpecs" }); /** - * Properties of an ImageObjectDetectionModelMetadata. - * @memberof google.cloud.automl.v1beta1 - * @interface IImageObjectDetectionModelMetadata - * @property {string|null} [modelType] ImageObjectDetectionModelMetadata modelType - * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelMetadata nodeCount - * @property {number|null} [nodeQps] ImageObjectDetectionModelMetadata nodeQps - * @property {string|null} [stopReason] ImageObjectDetectionModelMetadata stopReason - * @property {number|Long|null} [trainBudgetMilliNodeHours] ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours - * @property {number|Long|null} [trainCostMilliNodeHours] ImageObjectDetectionModelMetadata trainCostMilliNodeHours + * Calls ListTableSpecs. + * @function listTableSpecs + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} request ListTableSpecsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ImageObjectDetectionModelMetadata. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageObjectDetectionModelMetadata. - * @implements IImageObjectDetectionModelMetadata - * @constructor - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata=} [properties] Properties to set + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#updateTableSpec}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef UpdateTableSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.TableSpec} [response] TableSpec */ - function ImageObjectDetectionModelMetadata(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]]; - } /** - * ImageObjectDetectionModelMetadata modelType. - * @member {string} modelType - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * Calls UpdateTableSpec. + * @function updateTableSpec + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} request UpdateTableSpecRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.UpdateTableSpecCallback} callback Node-style callback called with the error, if any, and TableSpec + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelMetadata.prototype.modelType = ""; + Object.defineProperty(AutoMl.prototype.updateTableSpec = function updateTableSpec(request, callback) { + return this.rpcCall(updateTableSpec, $root.google.cloud.automl.v1beta1.UpdateTableSpecRequest, $root.google.cloud.automl.v1beta1.TableSpec, request, callback); + }, "name", { value: "UpdateTableSpec" }); /** - * ImageObjectDetectionModelMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * Calls UpdateTableSpec. + * @function updateTableSpec + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} request UpdateTableSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImageObjectDetectionModelMetadata nodeQps. - * @member {number} nodeQps - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @instance + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getColumnSpec}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef GetColumnSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ColumnSpec} [response] ColumnSpec */ - ImageObjectDetectionModelMetadata.prototype.nodeQps = 0; /** - * ImageObjectDetectionModelMetadata stopReason. - * @member {string} stopReason - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * Calls GetColumnSpec. + * @function getColumnSpec + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} request GetColumnSpecRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.GetColumnSpecCallback} callback Node-style callback called with the error, if any, and ColumnSpec + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelMetadata.prototype.stopReason = ""; + Object.defineProperty(AutoMl.prototype.getColumnSpec = function getColumnSpec(request, callback) { + return this.rpcCall(getColumnSpec, $root.google.cloud.automl.v1beta1.GetColumnSpecRequest, $root.google.cloud.automl.v1beta1.ColumnSpec, request, callback); + }, "name", { value: "GetColumnSpec" }); /** - * ImageObjectDetectionModelMetadata trainBudgetMilliNodeHours. - * @member {number|Long} trainBudgetMilliNodeHours - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * Calls GetColumnSpec. + * @function getColumnSpec + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} request GetColumnSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelMetadata.prototype.trainBudgetMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImageObjectDetectionModelMetadata trainCostMilliNodeHours. - * @member {number|Long} trainCostMilliNodeHours - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listColumnSpecs}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ListColumnSpecsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ListColumnSpecsResponse} [response] ListColumnSpecsResponse + */ + + /** + * Calls ListColumnSpecs. + * @function listColumnSpecs + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} request ListColumnSpecsRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ListColumnSpecsCallback} callback Node-style callback called with the error, if any, and ListColumnSpecsResponse + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelMetadata.prototype.trainCostMilliNodeHours = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(AutoMl.prototype.listColumnSpecs = function listColumnSpecs(request, callback) { + return this.rpcCall(listColumnSpecs, $root.google.cloud.automl.v1beta1.ListColumnSpecsRequest, $root.google.cloud.automl.v1beta1.ListColumnSpecsResponse, request, callback); + }, "name", { value: "ListColumnSpecs" }); /** - * Creates a new ImageObjectDetectionModelMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata instance + * Calls ListColumnSpecs. + * @function listColumnSpecs + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} request ListColumnSpecsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelMetadata.create = function create(properties) { - return new ImageObjectDetectionModelMetadata(properties); - }; /** - * Encodes the specified ImageObjectDetectionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata 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.automl.v1beta1.AutoMl#updateColumnSpec}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef UpdateColumnSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ColumnSpec} [response] ColumnSpec */ - ImageObjectDetectionModelMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.modelType != null && message.hasOwnProperty("modelType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.modelType); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.nodeCount); - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.nodeQps); - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.stopReason); - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.trainBudgetMilliNodeHours); - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.trainCostMilliNodeHours); - return writer; - }; /** - * Encodes the specified ImageObjectDetectionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateColumnSpec. + * @function updateColumnSpec + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} request UpdateColumnSpecRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpecCallback} callback Node-style callback called with the error, if any, and ColumnSpec + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(AutoMl.prototype.updateColumnSpec = function updateColumnSpec(request, callback) { + return this.rpcCall(updateColumnSpec, $root.google.cloud.automl.v1beta1.UpdateColumnSpecRequest, $root.google.cloud.automl.v1beta1.ColumnSpec, request, callback); + }, "name", { value: "UpdateColumnSpec" }); /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateColumnSpec. + * @function updateColumnSpec + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} request UpdateColumnSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelMetadata.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.automl.v1beta1.ImageObjectDetectionModelMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.modelType = reader.string(); - break; - case 3: - message.nodeCount = reader.int64(); - break; - case 4: - message.nodeQps = reader.double(); - break; - case 5: - message.stopReason = reader.string(); - break; - case 6: - message.trainBudgetMilliNodeHours = reader.int64(); - break; - case 7: - message.trainCostMilliNodeHours = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an ImageObjectDetectionModelMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata - * @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.automl.v1beta1.AutoMl#createModel}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef CreateModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ImageObjectDetectionModelMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an ImageObjectDetectionModelMetadata message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateModel. + * @function createModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.ICreateModelRequest} request CreateModelRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.CreateModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - if (!$util.isString(message.modelType)) - return "modelType: string expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - if (typeof message.nodeQps !== "number") - return "nodeQps: number expected"; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - if (!$util.isString(message.stopReason)) - return "stopReason: string expected"; - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (!$util.isInteger(message.trainBudgetMilliNodeHours) && !(message.trainBudgetMilliNodeHours && $util.isInteger(message.trainBudgetMilliNodeHours.low) && $util.isInteger(message.trainBudgetMilliNodeHours.high))) - return "trainBudgetMilliNodeHours: integer|Long expected"; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (!$util.isInteger(message.trainCostMilliNodeHours) && !(message.trainCostMilliNodeHours && $util.isInteger(message.trainCostMilliNodeHours.low) && $util.isInteger(message.trainCostMilliNodeHours.high))) - return "trainCostMilliNodeHours: integer|Long expected"; - return null; - }; + Object.defineProperty(AutoMl.prototype.createModel = function createModel(request, callback) { + return this.rpcCall(createModel, $root.google.cloud.automl.v1beta1.CreateModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateModel" }); /** - * Creates an ImageObjectDetectionModelMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} ImageObjectDetectionModelMetadata + * Calls CreateModel. + * @function createModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.ICreateModelRequest} request CreateModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - return object; - var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata(); - if (object.modelType != null) - message.modelType = String(object.modelType); - if (object.nodeCount != null) - if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); - if (object.nodeQps != null) - message.nodeQps = Number(object.nodeQps); - if (object.stopReason != null) - message.stopReason = String(object.stopReason); - if (object.trainBudgetMilliNodeHours != null) - if ($util.Long) - (message.trainBudgetMilliNodeHours = $util.Long.fromValue(object.trainBudgetMilliNodeHours)).unsigned = false; - else if (typeof object.trainBudgetMilliNodeHours === "string") - message.trainBudgetMilliNodeHours = parseInt(object.trainBudgetMilliNodeHours, 10); - else if (typeof object.trainBudgetMilliNodeHours === "number") - message.trainBudgetMilliNodeHours = object.trainBudgetMilliNodeHours; - else if (typeof object.trainBudgetMilliNodeHours === "object") - message.trainBudgetMilliNodeHours = new $util.LongBits(object.trainBudgetMilliNodeHours.low >>> 0, object.trainBudgetMilliNodeHours.high >>> 0).toNumber(); - if (object.trainCostMilliNodeHours != null) - if ($util.Long) - (message.trainCostMilliNodeHours = $util.Long.fromValue(object.trainCostMilliNodeHours)).unsigned = false; - else if (typeof object.trainCostMilliNodeHours === "string") - message.trainCostMilliNodeHours = parseInt(object.trainCostMilliNodeHours, 10); - else if (typeof object.trainCostMilliNodeHours === "number") - message.trainCostMilliNodeHours = object.trainCostMilliNodeHours; - else if (typeof object.trainCostMilliNodeHours === "object") - message.trainCostMilliNodeHours = new $util.LongBits(object.trainCostMilliNodeHours.low >>> 0, object.trainCostMilliNodeHours.high >>> 0).toNumber(); - return message; - }; /** - * Creates a plain object from an ImageObjectDetectionModelMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} message ImageObjectDetectionModelMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#getModel}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef GetModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.Model} [response] Model */ - ImageObjectDetectionModelMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.modelType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nodeCount = options.longs === String ? "0" : 0; - object.nodeQps = 0; - object.stopReason = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainBudgetMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainBudgetMilliNodeHours = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainCostMilliNodeHours = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainCostMilliNodeHours = options.longs === String ? "0" : 0; - } - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = message.modelType; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; - else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; - if (message.nodeQps != null && message.hasOwnProperty("nodeQps")) - object.nodeQps = options.json && !isFinite(message.nodeQps) ? String(message.nodeQps) : message.nodeQps; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - object.stopReason = message.stopReason; - if (message.trainBudgetMilliNodeHours != null && message.hasOwnProperty("trainBudgetMilliNodeHours")) - if (typeof message.trainBudgetMilliNodeHours === "number") - object.trainBudgetMilliNodeHours = options.longs === String ? String(message.trainBudgetMilliNodeHours) : message.trainBudgetMilliNodeHours; - else - object.trainBudgetMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainBudgetMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainBudgetMilliNodeHours.low >>> 0, message.trainBudgetMilliNodeHours.high >>> 0).toNumber() : message.trainBudgetMilliNodeHours; - if (message.trainCostMilliNodeHours != null && message.hasOwnProperty("trainCostMilliNodeHours")) - if (typeof message.trainCostMilliNodeHours === "number") - object.trainCostMilliNodeHours = options.longs === String ? String(message.trainCostMilliNodeHours) : message.trainCostMilliNodeHours; - else - object.trainCostMilliNodeHours = options.longs === String ? $util.Long.prototype.toString.call(message.trainCostMilliNodeHours) : options.longs === Number ? new $util.LongBits(message.trainCostMilliNodeHours.low >>> 0, message.trainCostMilliNodeHours.high >>> 0).toNumber() : message.trainCostMilliNodeHours; - return object; - }; /** - * Converts this ImageObjectDetectionModelMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + * Calls GetModel. + * @function getModel + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance - * @returns {Object.} JSON object + * @param {google.cloud.automl.v1beta1.IGetModelRequest} request GetModelRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.GetModelCallback} callback Node-style callback called with the error, if any, and Model + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImageObjectDetectionModelMetadata; - })(); - - v1beta1.ImageClassificationModelDeploymentMetadata = (function() { + Object.defineProperty(AutoMl.prototype.getModel = function getModel(request, callback) { + return this.rpcCall(getModel, $root.google.cloud.automl.v1beta1.GetModelRequest, $root.google.cloud.automl.v1beta1.Model, request, callback); + }, "name", { value: "GetModel" }); /** - * Properties of an ImageClassificationModelDeploymentMetadata. - * @memberof google.cloud.automl.v1beta1 - * @interface IImageClassificationModelDeploymentMetadata - * @property {number|Long|null} [nodeCount] ImageClassificationModelDeploymentMetadata nodeCount + * Calls GetModel. + * @function getModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetModelRequest} request GetModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ImageClassificationModelDeploymentMetadata. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageClassificationModelDeploymentMetadata. - * @implements IImageClassificationModelDeploymentMetadata - * @constructor - * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModels}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ListModelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ListModelsResponse} [response] ListModelsResponse */ - function ImageClassificationModelDeploymentMetadata(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]]; - } /** - * ImageClassificationModelDeploymentMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + * Calls ListModels. + * @function listModels + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IListModelsRequest} request ListModelsRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ListModelsCallback} callback Node-style callback called with the error, if any, and ListModelsResponse + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(AutoMl.prototype.listModels = function listModels(request, callback) { + return this.rpcCall(listModels, $root.google.cloud.automl.v1beta1.ListModelsRequest, $root.google.cloud.automl.v1beta1.ListModelsResponse, request, callback); + }, "name", { value: "ListModels" }); /** - * Creates a new ImageClassificationModelDeploymentMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata instance + * Calls ListModels. + * @function listModels + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IListModelsRequest} request ListModelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelDeploymentMetadata.create = function create(properties) { - return new ImageClassificationModelDeploymentMetadata(properties); - }; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata 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.automl.v1beta1.AutoMl#deleteModel}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef DeleteModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ImageClassificationModelDeploymentMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); - return writer; - }; /** - * Encodes the specified ImageClassificationModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageClassificationModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + * Calls DeleteModel. + * @function deleteModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} request DeleteModelRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.DeleteModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AutoMl.prototype.deleteModel = function deleteModel(request, callback) { + return this.rpcCall(deleteModel, $root.google.cloud.automl.v1beta1.DeleteModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteModel" }); /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteModel. + * @function deleteModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} request DeleteModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelDeploymentMetadata.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.automl.v1beta1.ImageClassificationModelDeploymentMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nodeCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an ImageClassificationModelDeploymentMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata - * @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.automl.v1beta1.AutoMl#deployModel}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef DeployModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ImageClassificationModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an ImageClassificationModelDeploymentMetadata message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeployModel. + * @function deployModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IDeployModelRequest} request DeployModelRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.DeployModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelDeploymentMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; - return null; - }; + Object.defineProperty(AutoMl.prototype.deployModel = function deployModel(request, callback) { + return this.rpcCall(deployModel, $root.google.cloud.automl.v1beta1.DeployModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeployModel" }); /** - * Creates an ImageClassificationModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} ImageClassificationModelDeploymentMetadata + * Calls DeployModel. + * @function deployModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IDeployModelRequest} request DeployModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageClassificationModelDeploymentMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - return object; - var message = new $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata(); - if (object.nodeCount != null) - if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); - return message; - }; /** - * Creates a plain object from an ImageClassificationModelDeploymentMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} message ImageClassificationModelDeploymentMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#undeployModel}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef UndeployModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ImageClassificationModelDeploymentMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nodeCount = options.longs === String ? "0" : 0; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; - else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; - return object; - }; /** - * Converts this ImageClassificationModelDeploymentMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + * Calls UndeployModel. + * @function undeployModel + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance - * @returns {Object.} JSON object + * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} request UndeployModelRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.UndeployModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ImageClassificationModelDeploymentMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImageClassificationModelDeploymentMetadata; - })(); + Object.defineProperty(AutoMl.prototype.undeployModel = function undeployModel(request, callback) { + return this.rpcCall(undeployModel, $root.google.cloud.automl.v1beta1.UndeployModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UndeployModel" }); - v1beta1.ImageObjectDetectionModelDeploymentMetadata = (function() { + /** + * Calls UndeployModel. + * @function undeployModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} request UndeployModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of an ImageObjectDetectionModelDeploymentMetadata. - * @memberof google.cloud.automl.v1beta1 - * @interface IImageObjectDetectionModelDeploymentMetadata - * @property {number|Long|null} [nodeCount] ImageObjectDetectionModelDeploymentMetadata nodeCount + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportModel}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ExportModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new ImageObjectDetectionModelDeploymentMetadata. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImageObjectDetectionModelDeploymentMetadata. - * @implements IImageObjectDetectionModelDeploymentMetadata - * @constructor - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set + * Calls ExportModel. + * @function exportModel + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IExportModelRequest} request ExportModelRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ExportModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - function ImageObjectDetectionModelDeploymentMetadata(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]]; - } + Object.defineProperty(AutoMl.prototype.exportModel = function exportModel(request, callback) { + return this.rpcCall(exportModel, $root.google.cloud.automl.v1beta1.ExportModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportModel" }); /** - * ImageObjectDetectionModelDeploymentMetadata nodeCount. - * @member {number|Long} nodeCount - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata + * Calls ExportModel. + * @function exportModel + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance + * @param {google.cloud.automl.v1beta1.IExportModelRequest} request ExportModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelDeploymentMetadata.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImageObjectDetectionModelDeploymentMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata instance + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#exportEvaluatedExamples}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ExportEvaluatedExamplesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ImageObjectDetectionModelDeploymentMetadata.create = function create(properties) { - return new ImageObjectDetectionModelDeploymentMetadata(properties); - }; /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ExportEvaluatedExamples. + * @function exportEvaluatedExamples + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} request ExportEvaluatedExamplesRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamplesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelDeploymentMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.nodeCount); - return writer; - }; + Object.defineProperty(AutoMl.prototype.exportEvaluatedExamples = function exportEvaluatedExamples(request, callback) { + return this.rpcCall(exportEvaluatedExamples, $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportEvaluatedExamples" }); /** - * Encodes the specified ImageObjectDetectionModelDeploymentMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ExportEvaluatedExamples. + * @function exportEvaluatedExamples + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} request ExportEvaluatedExamplesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelDeploymentMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata - * @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.automl.v1beta1.AutoMl#getModelEvaluation}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef GetModelEvaluationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ModelEvaluation} [response] ModelEvaluation */ - ImageObjectDetectionModelDeploymentMetadata.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.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nodeCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an ImageObjectDetectionModelDeploymentMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetModelEvaluation. + * @function getModelEvaluation + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} request GetModelEvaluationRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.GetModelEvaluationCallback} callback Node-style callback called with the error, if any, and ModelEvaluation + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelDeploymentMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(AutoMl.prototype.getModelEvaluation = function getModelEvaluation(request, callback) { + return this.rpcCall(getModelEvaluation, $root.google.cloud.automl.v1beta1.GetModelEvaluationRequest, $root.google.cloud.automl.v1beta1.ModelEvaluation, request, callback); + }, "name", { value: "GetModelEvaluation" }); /** - * Verifies an ImageObjectDetectionModelDeploymentMetadata message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetModelEvaluation. + * @function getModelEvaluation + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} request GetModelEvaluationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelDeploymentMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) - return "nodeCount: integer|Long expected"; - return null; - }; /** - * Creates an ImageObjectDetectionModelDeploymentMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} ImageObjectDetectionModelDeploymentMetadata + * Callback as used by {@link google.cloud.automl.v1beta1.AutoMl#listModelEvaluations}. + * @memberof google.cloud.automl.v1beta1.AutoMl + * @typedef ListModelEvaluationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} [response] ListModelEvaluationsResponse */ - ImageObjectDetectionModelDeploymentMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - return object; - var message = new $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata(); - if (object.nodeCount != null) - if ($util.Long) - (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; - else if (typeof object.nodeCount === "string") - message.nodeCount = parseInt(object.nodeCount, 10); - else if (typeof object.nodeCount === "number") - message.nodeCount = object.nodeCount; - else if (typeof object.nodeCount === "object") - message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); - return message; - }; /** - * Creates a plain object from an ImageObjectDetectionModelDeploymentMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - * @static - * @param {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} message ImageObjectDetectionModelDeploymentMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListModelEvaluations. + * @function listModelEvaluations + * @memberof google.cloud.automl.v1beta1.AutoMl + * @instance + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} request ListModelEvaluationsRequest message or plain object + * @param {google.cloud.automl.v1beta1.AutoMl.ListModelEvaluationsCallback} callback Node-style callback called with the error, if any, and ListModelEvaluationsResponse + * @returns {undefined} + * @variation 1 */ - ImageObjectDetectionModelDeploymentMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nodeCount = options.longs === String ? "0" : 0; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (typeof message.nodeCount === "number") - object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; - else - object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; - return object; - }; + Object.defineProperty(AutoMl.prototype.listModelEvaluations = function listModelEvaluations(request, callback) { + return this.rpcCall(listModelEvaluations, $root.google.cloud.automl.v1beta1.ListModelEvaluationsRequest, $root.google.cloud.automl.v1beta1.ListModelEvaluationsResponse, request, callback); + }, "name", { value: "ListModelEvaluations" }); /** - * Converts this ImageObjectDetectionModelDeploymentMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata + * Calls ListModelEvaluations. + * @function listModelEvaluations + * @memberof google.cloud.automl.v1beta1.AutoMl * @instance - * @returns {Object.} JSON object + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} request ListModelEvaluationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImageObjectDetectionModelDeploymentMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return ImageObjectDetectionModelDeploymentMetadata; + return AutoMl; })(); - v1beta1.TextClassificationDatasetMetadata = (function() { + v1beta1.CreateDatasetRequest = (function() { /** - * Properties of a TextClassificationDatasetMetadata. + * Properties of a CreateDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @interface ITextClassificationDatasetMetadata - * @property {google.cloud.automl.v1beta1.ClassificationType|null} [classificationType] TextClassificationDatasetMetadata classificationType + * @interface ICreateDatasetRequest + * @property {string|null} [parent] CreateDatasetRequest parent + * @property {google.cloud.automl.v1beta1.IDataset|null} [dataset] CreateDatasetRequest dataset */ /** - * Constructs a new TextClassificationDatasetMetadata. + * Constructs a new CreateDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextClassificationDatasetMetadata. - * @implements ITextClassificationDatasetMetadata + * @classdesc Represents a CreateDatasetRequest. + * @implements ICreateDatasetRequest * @constructor - * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest=} [properties] Properties to set */ - function TextClassificationDatasetMetadata(properties) { + function CreateDatasetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49793,75 +50443,88 @@ } /** - * TextClassificationDatasetMetadata classificationType. - * @member {google.cloud.automl.v1beta1.ClassificationType} classificationType - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * CreateDatasetRequest parent. + * @member {string} parent + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @instance */ - TextClassificationDatasetMetadata.prototype.classificationType = 0; + CreateDatasetRequest.prototype.parent = ""; /** - * Creates a new TextClassificationDatasetMetadata instance using the specified properties. + * CreateDatasetRequest dataset. + * @member {google.cloud.automl.v1beta1.IDataset|null|undefined} dataset + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest + * @instance + */ + CreateDatasetRequest.prototype.dataset = null; + + /** + * Creates a new CreateDatasetRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest instance */ - TextClassificationDatasetMetadata.create = function create(properties) { - return new TextClassificationDatasetMetadata(properties); + CreateDatasetRequest.create = function create(properties) { + return new CreateDatasetRequest(properties); }; /** - * Encodes the specified TextClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} message CreateDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationDatasetMetadata.encode = function encode(message, writer) { + CreateDatasetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.classificationType); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.dataset != null && message.hasOwnProperty("dataset")) + $root.google.cloud.automl.v1beta1.Dataset.encode(message.dataset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateDatasetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextClassificationDatasetMetadata} message TextClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICreateDatasetRequest} message CreateDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes a CreateDatasetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationDatasetMetadata.decode = function decode(reader, length) { + CreateDatasetRequest.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.automl.v1beta1.TextClassificationDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.CreateDatasetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.classificationType = reader.int32(); + message.parent = reader.string(); + break; + case 2: + message.dataset = $root.google.cloud.automl.v1beta1.Dataset.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -49872,125 +50535,121 @@ }; /** - * Decodes a TextClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateDatasetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextClassificationDatasetMetadata message. + * Verifies a CreateDatasetRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextClassificationDatasetMetadata.verify = function verify(message) { + CreateDatasetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - switch (message.classificationType) { - default: - return "classificationType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) { + var error = $root.google.cloud.automl.v1beta1.Dataset.verify(message.dataset); + if (error) + return "dataset." + error; + } return null; }; /** - * Creates a TextClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDatasetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} TextClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.CreateDatasetRequest} CreateDatasetRequest */ - TextClassificationDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) + CreateDatasetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.CreateDatasetRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata(); - switch (object.classificationType) { - case "CLASSIFICATION_TYPE_UNSPECIFIED": - case 0: - message.classificationType = 0; - break; - case "MULTICLASS": - case 1: - message.classificationType = 1; - break; - case "MULTILABEL": - case 2: - message.classificationType = 2; - break; + var message = new $root.google.cloud.automl.v1beta1.CreateDatasetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataset != null) { + if (typeof object.dataset !== "object") + throw TypeError(".google.cloud.automl.v1beta1.CreateDatasetRequest.dataset: object expected"); + message.dataset = $root.google.cloud.automl.v1beta1.Dataset.fromObject(object.dataset); } return message; }; /** - * Creates a plain object from a TextClassificationDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} message TextClassificationDatasetMetadata + * @param {google.cloud.automl.v1beta1.CreateDatasetRequest} message CreateDatasetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextClassificationDatasetMetadata.toObject = function toObject(message, options) { + CreateDatasetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; + if (options.defaults) { + object.parent = ""; + object.dataset = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = $root.google.cloud.automl.v1beta1.Dataset.toObject(message.dataset, options); return object; }; /** - * Converts this TextClassificationDatasetMetadata to JSON. + * Converts this CreateDatasetRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.CreateDatasetRequest * @instance * @returns {Object.} JSON object */ - TextClassificationDatasetMetadata.prototype.toJSON = function toJSON() { + CreateDatasetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextClassificationDatasetMetadata; + return CreateDatasetRequest; })(); - v1beta1.TextClassificationModelMetadata = (function() { + v1beta1.GetDatasetRequest = (function() { /** - * Properties of a TextClassificationModelMetadata. + * Properties of a GetDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @interface ITextClassificationModelMetadata - * @property {google.cloud.automl.v1beta1.ClassificationType|null} [classificationType] TextClassificationModelMetadata classificationType + * @interface IGetDatasetRequest + * @property {string|null} [name] GetDatasetRequest name */ /** - * Constructs a new TextClassificationModelMetadata. + * Constructs a new GetDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextClassificationModelMetadata. - * @implements ITextClassificationModelMetadata + * @classdesc Represents a GetDatasetRequest. + * @implements IGetDatasetRequest * @constructor - * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGetDatasetRequest=} [properties] Properties to set */ - function TextClassificationModelMetadata(properties) { + function GetDatasetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49998,75 +50657,75 @@ } /** - * TextClassificationModelMetadata classificationType. - * @member {google.cloud.automl.v1beta1.ClassificationType} classificationType - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * GetDatasetRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @instance */ - TextClassificationModelMetadata.prototype.classificationType = 0; + GetDatasetRequest.prototype.name = ""; /** - * Creates a new TextClassificationModelMetadata instance using the specified properties. + * Creates a new GetDatasetRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata instance + * @param {google.cloud.automl.v1beta1.IGetDatasetRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest instance */ - TextClassificationModelMetadata.create = function create(properties) { - return new TextClassificationModelMetadata(properties); + GetDatasetRequest.create = function create(properties) { + return new GetDatasetRequest(properties); }; /** - * Encodes the specified TextClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. + * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} message GetDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationModelMetadata.encode = function encode(message, writer) { + GetDatasetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.classificationType); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified TextClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify|verify} messages. + * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetDatasetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextClassificationModelMetadata} message TextClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetDatasetRequest} message GetDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer. + * Decodes a GetDatasetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata + * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationModelMetadata.decode = function decode(reader, length) { + GetDatasetRequest.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.automl.v1beta1.TextClassificationModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GetDatasetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.classificationType = reader.int32(); + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -50077,124 +50736,110 @@ }; /** - * Decodes a TextClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata + * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { + GetDatasetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextClassificationModelMetadata message. + * Verifies a GetDatasetRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextClassificationModelMetadata.verify = function verify(message) { + GetDatasetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - switch (message.classificationType) { - default: - return "classificationType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a TextClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetDatasetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextClassificationModelMetadata} TextClassificationModelMetadata + * @returns {google.cloud.automl.v1beta1.GetDatasetRequest} GetDatasetRequest */ - TextClassificationModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata) + GetDatasetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GetDatasetRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata(); - switch (object.classificationType) { - case "CLASSIFICATION_TYPE_UNSPECIFIED": - case 0: - message.classificationType = 0; - break; - case "MULTICLASS": - case 1: - message.classificationType = 1; - break; - case "MULTILABEL": - case 2: - message.classificationType = 2; - break; - } + var message = new $root.google.cloud.automl.v1beta1.GetDatasetRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a TextClassificationModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.TextClassificationModelMetadata} message TextClassificationModelMetadata + * @param {google.cloud.automl.v1beta1.GetDatasetRequest} message GetDatasetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextClassificationModelMetadata.toObject = function toObject(message, options) { + GetDatasetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; - if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this TextClassificationModelMetadata to JSON. + * Converts this GetDatasetRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetDatasetRequest * @instance * @returns {Object.} JSON object */ - TextClassificationModelMetadata.prototype.toJSON = function toJSON() { + GetDatasetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextClassificationModelMetadata; + return GetDatasetRequest; })(); - v1beta1.TextExtractionDatasetMetadata = (function() { + v1beta1.ListDatasetsRequest = (function() { /** - * Properties of a TextExtractionDatasetMetadata. + * Properties of a ListDatasetsRequest. * @memberof google.cloud.automl.v1beta1 - * @interface ITextExtractionDatasetMetadata + * @interface IListDatasetsRequest + * @property {string|null} [parent] ListDatasetsRequest parent + * @property {string|null} [filter] ListDatasetsRequest filter + * @property {number|null} [pageSize] ListDatasetsRequest pageSize + * @property {string|null} [pageToken] ListDatasetsRequest pageToken */ /** - * Constructs a new TextExtractionDatasetMetadata. + * Constructs a new ListDatasetsRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextExtractionDatasetMetadata. - * @implements ITextExtractionDatasetMetadata + * @classdesc Represents a ListDatasetsRequest. + * @implements IListDatasetsRequest * @constructor - * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListDatasetsRequest=} [properties] Properties to set */ - function TextExtractionDatasetMetadata(properties) { + function ListDatasetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50202,63 +50847,115 @@ } /** - * Creates a new TextExtractionDatasetMetadata instance using the specified properties. + * ListDatasetsRequest parent. + * @member {string} parent + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @instance + */ + ListDatasetsRequest.prototype.parent = ""; + + /** + * ListDatasetsRequest filter. + * @member {string} filter + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @instance + */ + ListDatasetsRequest.prototype.filter = ""; + + /** + * ListDatasetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @instance + */ + ListDatasetsRequest.prototype.pageSize = 0; + + /** + * ListDatasetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest + * @instance + */ + ListDatasetsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDatasetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.IListDatasetsRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest instance */ - TextExtractionDatasetMetadata.create = function create(properties) { - return new TextExtractionDatasetMetadata(properties); + ListDatasetsRequest.create = function create(properties) { + return new ListDatasetsRequest(properties); }; /** - * Encodes the specified TextExtractionDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. + * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} message ListDatasetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionDatasetMetadata.encode = function encode(message, writer) { + ListDatasetsRequest.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.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); return writer; }; /** - * Encodes the specified TextExtractionDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.verify|verify} messages. + * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionDatasetMetadata} message TextExtractionDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListDatasetsRequest} message ListDatasetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListDatasetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer. + * Decodes a ListDatasetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionDatasetMetadata.decode = function decode(reader, length) { + ListDatasetsRequest.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.automl.v1beta1.TextExtractionDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListDatasetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 6: + message.pageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -50268,93 +50965,134 @@ }; /** - * Decodes a TextExtractionDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + ListDatasetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextExtractionDatasetMetadata message. + * Verifies a ListDatasetsRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextExtractionDatasetMetadata.verify = function verify(message) { + ListDatasetsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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 TextExtractionDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListDatasetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} TextExtractionDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ListDatasetsRequest} ListDatasetsRequest */ - TextExtractionDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) + ListDatasetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListDatasetsRequest) return object; - return new $root.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata(); + var message = new $root.google.cloud.automl.v1beta1.ListDatasetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + 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 TextExtractionDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @static - * @param {google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} message TextExtractionDatasetMetadata + * @param {google.cloud.automl.v1beta1.ListDatasetsRequest} message ListDatasetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextExtractionDatasetMetadata.toObject = function toObject() { - return {}; + ListDatasetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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 TextExtractionDatasetMetadata to JSON. + * Converts this ListDatasetsRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsRequest * @instance * @returns {Object.} JSON object */ - TextExtractionDatasetMetadata.prototype.toJSON = function toJSON() { + ListDatasetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextExtractionDatasetMetadata; + return ListDatasetsRequest; })(); - v1beta1.TextExtractionModelMetadata = (function() { + v1beta1.ListDatasetsResponse = (function() { /** - * Properties of a TextExtractionModelMetadata. + * Properties of a ListDatasetsResponse. * @memberof google.cloud.automl.v1beta1 - * @interface ITextExtractionModelMetadata + * @interface IListDatasetsResponse + * @property {Array.|null} [datasets] ListDatasetsResponse datasets + * @property {string|null} [nextPageToken] ListDatasetsResponse nextPageToken */ /** - * Constructs a new TextExtractionModelMetadata. + * Constructs a new ListDatasetsResponse. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextExtractionModelMetadata. - * @implements ITextExtractionModelMetadata + * @classdesc Represents a ListDatasetsResponse. + * @implements IListDatasetsResponse * @constructor - * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListDatasetsResponse=} [properties] Properties to set */ - function TextExtractionModelMetadata(properties) { + function ListDatasetsResponse(properties) { + this.datasets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50362,63 +51100,92 @@ } /** - * Creates a new TextExtractionModelMetadata instance using the specified properties. + * ListDatasetsResponse datasets. + * @member {Array.} datasets + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @instance + */ + ListDatasetsResponse.prototype.datasets = $util.emptyArray; + + /** + * ListDatasetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse + * @instance + */ + ListDatasetsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDatasetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata instance + * @param {google.cloud.automl.v1beta1.IListDatasetsResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse instance */ - TextExtractionModelMetadata.create = function create(properties) { - return new TextExtractionModelMetadata(properties); + ListDatasetsResponse.create = function create(properties) { + return new ListDatasetsResponse(properties); }; /** - * Encodes the specified TextExtractionModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. + * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListDatasetsResponse} message ListDatasetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionModelMetadata.encode = function encode(message, writer) { + ListDatasetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.datasets != null && message.datasets.length) + for (var i = 0; i < message.datasets.length; ++i) + $root.google.cloud.automl.v1beta1.Dataset.encode(message.datasets[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 TextExtractionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify|verify} messages. + * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListDatasetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static - * @param {google.cloud.automl.v1beta1.ITextExtractionModelMetadata} message TextExtractionModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListDatasetsResponse} message ListDatasetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextExtractionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListDatasetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer. + * Decodes a ListDatasetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata + * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionModelMetadata.decode = function decode(reader, length) { + ListDatasetsResponse.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.automl.v1beta1.TextExtractionModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListDatasetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.datasets && message.datasets.length)) + message.datasets = []; + message.datasets.push($root.google.cloud.automl.v1beta1.Dataset.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -50428,94 +51195,134 @@ }; /** - * Decodes a TextExtractionModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata + * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextExtractionModelMetadata.decodeDelimited = function decodeDelimited(reader) { + ListDatasetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextExtractionModelMetadata message. + * Verifies a ListDatasetsResponse message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextExtractionModelMetadata.verify = function verify(message) { + ListDatasetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.datasets != null && message.hasOwnProperty("datasets")) { + if (!Array.isArray(message.datasets)) + return "datasets: array expected"; + for (var i = 0; i < message.datasets.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.Dataset.verify(message.datasets[i]); + if (error) + return "datasets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a TextExtractionModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListDatasetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextExtractionModelMetadata} TextExtractionModelMetadata + * @returns {google.cloud.automl.v1beta1.ListDatasetsResponse} ListDatasetsResponse */ - TextExtractionModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata) + ListDatasetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListDatasetsResponse) return object; - return new $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata(); + var message = new $root.google.cloud.automl.v1beta1.ListDatasetsResponse(); + if (object.datasets) { + if (!Array.isArray(object.datasets)) + throw TypeError(".google.cloud.automl.v1beta1.ListDatasetsResponse.datasets: array expected"); + message.datasets = []; + for (var i = 0; i < object.datasets.length; ++i) { + if (typeof object.datasets[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ListDatasetsResponse.datasets: object expected"); + message.datasets[i] = $root.google.cloud.automl.v1beta1.Dataset.fromObject(object.datasets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; }; /** - * Creates a plain object from a TextExtractionModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListDatasetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @static - * @param {google.cloud.automl.v1beta1.TextExtractionModelMetadata} message TextExtractionModelMetadata + * @param {google.cloud.automl.v1beta1.ListDatasetsResponse} message ListDatasetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextExtractionModelMetadata.toObject = function toObject() { - return {}; + ListDatasetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datasets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.datasets && message.datasets.length) { + object.datasets = []; + for (var j = 0; j < message.datasets.length; ++j) + object.datasets[j] = $root.google.cloud.automl.v1beta1.Dataset.toObject(message.datasets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; }; /** - * Converts this TextExtractionModelMetadata to JSON. + * Converts this ListDatasetsResponse to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextExtractionModelMetadata + * @memberof google.cloud.automl.v1beta1.ListDatasetsResponse * @instance * @returns {Object.} JSON object */ - TextExtractionModelMetadata.prototype.toJSON = function toJSON() { + ListDatasetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextExtractionModelMetadata; + return ListDatasetsResponse; })(); - v1beta1.TextSentimentDatasetMetadata = (function() { + v1beta1.UpdateDatasetRequest = (function() { /** - * Properties of a TextSentimentDatasetMetadata. + * Properties of an UpdateDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @interface ITextSentimentDatasetMetadata - * @property {number|null} [sentimentMax] TextSentimentDatasetMetadata sentimentMax + * @interface IUpdateDatasetRequest + * @property {google.cloud.automl.v1beta1.IDataset|null} [dataset] UpdateDatasetRequest dataset + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDatasetRequest updateMask */ /** - * Constructs a new TextSentimentDatasetMetadata. + * Constructs a new UpdateDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextSentimentDatasetMetadata. - * @implements ITextSentimentDatasetMetadata + * @classdesc Represents an UpdateDatasetRequest. + * @implements IUpdateDatasetRequest * @constructor - * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest=} [properties] Properties to set */ - function TextSentimentDatasetMetadata(properties) { + function UpdateDatasetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50523,75 +51330,88 @@ } /** - * TextSentimentDatasetMetadata sentimentMax. - * @member {number} sentimentMax - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * UpdateDatasetRequest dataset. + * @member {google.cloud.automl.v1beta1.IDataset|null|undefined} dataset + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @instance */ - TextSentimentDatasetMetadata.prototype.sentimentMax = 0; + UpdateDatasetRequest.prototype.dataset = null; /** - * Creates a new TextSentimentDatasetMetadata instance using the specified properties. + * UpdateDatasetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest + * @instance + */ + UpdateDatasetRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDatasetRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest instance */ - TextSentimentDatasetMetadata.create = function create(properties) { - return new TextSentimentDatasetMetadata(properties); + UpdateDatasetRequest.create = function create(properties) { + return new UpdateDatasetRequest(properties); }; /** - * Encodes the specified TextSentimentDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. + * Encodes the specified UpdateDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} message UpdateDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentDatasetMetadata.encode = function encode(message, writer) { + UpdateDatasetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sentimentMax); + if (message.dataset != null && message.hasOwnProperty("dataset")) + $root.google.cloud.automl.v1beta1.Dataset.encode(message.dataset, 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 TextSentimentDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.verify|verify} messages. + * Encodes the specified UpdateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateDatasetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentDatasetMetadata} message TextSentimentDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUpdateDatasetRequest} message UpdateDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer. + * Decodes an UpdateDatasetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata + * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentDatasetMetadata.decode = function decode(reader, length) { + UpdateDatasetRequest.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.automl.v1beta1.TextSentimentDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.UpdateDatasetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sentimentMax = reader.int32(); + message.dataset = $root.google.cloud.automl.v1beta1.Dataset.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -50602,106 +51422,126 @@ }; /** - * Decodes a TextSentimentDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateDatasetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata + * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + UpdateDatasetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSentimentDatasetMetadata message. + * Verifies an UpdateDatasetRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSentimentDatasetMetadata.verify = function verify(message) { + UpdateDatasetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) - if (!$util.isInteger(message.sentimentMax)) - return "sentimentMax: integer expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) { + var error = $root.google.cloud.automl.v1beta1.Dataset.verify(message.dataset); + if (error) + return "dataset." + 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 TextSentimentDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDatasetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} TextSentimentDatasetMetadata + * @returns {google.cloud.automl.v1beta1.UpdateDatasetRequest} UpdateDatasetRequest */ - TextSentimentDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) + UpdateDatasetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.UpdateDatasetRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata(); - if (object.sentimentMax != null) - message.sentimentMax = object.sentimentMax | 0; + var message = new $root.google.cloud.automl.v1beta1.UpdateDatasetRequest(); + if (object.dataset != null) { + if (typeof object.dataset !== "object") + throw TypeError(".google.cloud.automl.v1beta1.UpdateDatasetRequest.dataset: object expected"); + message.dataset = $root.google.cloud.automl.v1beta1.Dataset.fromObject(object.dataset); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.automl.v1beta1.UpdateDatasetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a TextSentimentDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDatasetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} message TextSentimentDatasetMetadata + * @param {google.cloud.automl.v1beta1.UpdateDatasetRequest} message UpdateDatasetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSentimentDatasetMetadata.toObject = function toObject(message, options) { + UpdateDatasetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sentimentMax = 0; - if (message.sentimentMax != null && message.hasOwnProperty("sentimentMax")) - object.sentimentMax = message.sentimentMax; + if (options.defaults) { + object.dataset = null; + object.updateMask = null; + } + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = $root.google.cloud.automl.v1beta1.Dataset.toObject(message.dataset, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this TextSentimentDatasetMetadata to JSON. + * Converts this UpdateDatasetRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + * @memberof google.cloud.automl.v1beta1.UpdateDatasetRequest * @instance * @returns {Object.} JSON object */ - TextSentimentDatasetMetadata.prototype.toJSON = function toJSON() { + UpdateDatasetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSentimentDatasetMetadata; + return UpdateDatasetRequest; })(); - v1beta1.TextSentimentModelMetadata = (function() { + v1beta1.DeleteDatasetRequest = (function() { /** - * Properties of a TextSentimentModelMetadata. + * Properties of a DeleteDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @interface ITextSentimentModelMetadata + * @interface IDeleteDatasetRequest + * @property {string|null} [name] DeleteDatasetRequest name */ /** - * Constructs a new TextSentimentModelMetadata. + * Constructs a new DeleteDatasetRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TextSentimentModelMetadata. - * @implements ITextSentimentModelMetadata + * @classdesc Represents a DeleteDatasetRequest. + * @implements IDeleteDatasetRequest * @constructor - * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest=} [properties] Properties to set */ - function TextSentimentModelMetadata(properties) { + function DeleteDatasetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50709,63 +51549,76 @@ } /** - * Creates a new TextSentimentModelMetadata instance using the specified properties. + * DeleteDatasetRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest + * @instance + */ + DeleteDatasetRequest.prototype.name = ""; + + /** + * Creates a new DeleteDatasetRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata instance + * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest instance */ - TextSentimentModelMetadata.create = function create(properties) { - return new TextSentimentModelMetadata(properties); + DeleteDatasetRequest.create = function create(properties) { + return new DeleteDatasetRequest(properties); }; /** - * Encodes the specified TextSentimentModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. + * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} message DeleteDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentModelMetadata.encode = function encode(message, writer) { + DeleteDatasetRequest.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 TextSentimentModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify|verify} messages. + * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteDatasetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.ITextSentimentModelMetadata} message TextSentimentModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeleteDatasetRequest} message DeleteDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSentimentModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer. + * Decodes a DeleteDatasetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata + * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentModelMetadata.decode = function decode(reader, length) { + DeleteDatasetRequest.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.automl.v1beta1.TextSentimentModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DeleteDatasetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -50775,93 +51628,108 @@ }; /** - * Decodes a TextSentimentModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata + * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSentimentModelMetadata.decodeDelimited = function decodeDelimited(reader) { + DeleteDatasetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSentimentModelMetadata message. + * Verifies a DeleteDatasetRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSentimentModelMetadata.verify = function verify(message) { + DeleteDatasetRequest.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 TextSentimentModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TextSentimentModelMetadata} TextSentimentModelMetadata + * @returns {google.cloud.automl.v1beta1.DeleteDatasetRequest} DeleteDatasetRequest */ - TextSentimentModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata) + DeleteDatasetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DeleteDatasetRequest) return object; - return new $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata(); + var message = new $root.google.cloud.automl.v1beta1.DeleteDatasetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a TextSentimentModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @static - * @param {google.cloud.automl.v1beta1.TextSentimentModelMetadata} message TextSentimentModelMetadata + * @param {google.cloud.automl.v1beta1.DeleteDatasetRequest} message DeleteDatasetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSentimentModelMetadata.toObject = function toObject() { - return {}; + DeleteDatasetRequest.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 TextSentimentModelMetadata to JSON. + * Converts this DeleteDatasetRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TextSentimentModelMetadata + * @memberof google.cloud.automl.v1beta1.DeleteDatasetRequest * @instance * @returns {Object.} JSON object */ - TextSentimentModelMetadata.prototype.toJSON = function toJSON() { + DeleteDatasetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextSentimentModelMetadata; + return DeleteDatasetRequest; })(); - v1beta1.VideoClassificationDatasetMetadata = (function() { + v1beta1.ImportDataRequest = (function() { /** - * Properties of a VideoClassificationDatasetMetadata. + * Properties of an ImportDataRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IVideoClassificationDatasetMetadata + * @interface IImportDataRequest + * @property {string|null} [name] ImportDataRequest name + * @property {google.cloud.automl.v1beta1.IInputConfig|null} [inputConfig] ImportDataRequest inputConfig */ /** - * Constructs a new VideoClassificationDatasetMetadata. + * Constructs a new ImportDataRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a VideoClassificationDatasetMetadata. - * @implements IVideoClassificationDatasetMetadata + * @classdesc Represents an ImportDataRequest. + * @implements IImportDataRequest * @constructor - * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IImportDataRequest=} [properties] Properties to set */ - function VideoClassificationDatasetMetadata(properties) { + function ImportDataRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50869,63 +51737,89 @@ } /** - * Creates a new VideoClassificationDatasetMetadata instance using the specified properties. + * ImportDataRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @instance + */ + ImportDataRequest.prototype.name = ""; + + /** + * ImportDataRequest inputConfig. + * @member {google.cloud.automl.v1beta1.IInputConfig|null|undefined} inputConfig + * @memberof google.cloud.automl.v1beta1.ImportDataRequest + * @instance + */ + ImportDataRequest.prototype.inputConfig = null; + + /** + * Creates a new ImportDataRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.IImportDataRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest instance */ - VideoClassificationDatasetMetadata.create = function create(properties) { - return new VideoClassificationDatasetMetadata(properties); + ImportDataRequest.create = function create(properties) { + return new ImportDataRequest(properties); }; /** - * Encodes the specified VideoClassificationDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified ImportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata} message VideoClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImportDataRequest} message ImportDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationDatasetMetadata.encode = function encode(message, writer) { + ImportDataRequest.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.inputConfig != null && message.hasOwnProperty("inputConfig")) + $root.google.cloud.automl.v1beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoClassificationDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.verify|verify} messages. + * Encodes the specified ImportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationDatasetMetadata} message VideoClassificationDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IImportDataRequest} message ImportDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportDataRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer. + * Decodes an ImportDataRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationDatasetMetadata.decode = function decode(reader, length) { + ImportDataRequest.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.automl.v1beta1.VideoClassificationDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ImportDataRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -50935,93 +51829,122 @@ }; /** - * Decodes a VideoClassificationDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDataRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportDataRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoClassificationDatasetMetadata message. + * Verifies an ImportDataRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoClassificationDatasetMetadata.verify = function verify(message) { + ImportDataRequest.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.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.automl.v1beta1.InputConfig.verify(message.inputConfig); + if (error) + return "inputConfig." + error; + } return null; }; /** - * Creates a VideoClassificationDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDataRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} VideoClassificationDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ImportDataRequest} ImportDataRequest */ - VideoClassificationDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) + ImportDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ImportDataRequest) return object; - return new $root.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata(); + var message = new $root.google.cloud.automl.v1beta1.ImportDataRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ImportDataRequest.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.fromObject(object.inputConfig); + } + return message; }; /** - * Creates a plain object from a VideoClassificationDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportDataRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @static - * @param {google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} message VideoClassificationDatasetMetadata + * @param {google.cloud.automl.v1beta1.ImportDataRequest} message ImportDataRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoClassificationDatasetMetadata.toObject = function toObject() { - return {}; + ImportDataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.automl.v1beta1.InputConfig.toObject(message.inputConfig, options); + return object; }; /** - * Converts this VideoClassificationDatasetMetadata to JSON. + * Converts this ImportDataRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ImportDataRequest * @instance * @returns {Object.} JSON object */ - VideoClassificationDatasetMetadata.prototype.toJSON = function toJSON() { + ImportDataRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoClassificationDatasetMetadata; + return ImportDataRequest; })(); - v1beta1.VideoObjectTrackingDatasetMetadata = (function() { + v1beta1.ExportDataRequest = (function() { /** - * Properties of a VideoObjectTrackingDatasetMetadata. + * Properties of an ExportDataRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IVideoObjectTrackingDatasetMetadata + * @interface IExportDataRequest + * @property {string|null} [name] ExportDataRequest name + * @property {google.cloud.automl.v1beta1.IOutputConfig|null} [outputConfig] ExportDataRequest outputConfig */ /** - * Constructs a new VideoObjectTrackingDatasetMetadata. + * Constructs a new ExportDataRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a VideoObjectTrackingDatasetMetadata. - * @implements IVideoObjectTrackingDatasetMetadata + * @classdesc Represents an ExportDataRequest. + * @implements IExportDataRequest * @constructor - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IExportDataRequest=} [properties] Properties to set */ - function VideoObjectTrackingDatasetMetadata(properties) { + function ExportDataRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51029,63 +51952,89 @@ } /** - * Creates a new VideoObjectTrackingDatasetMetadata instance using the specified properties. + * ExportDataRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @instance + */ + ExportDataRequest.prototype.name = ""; + + /** + * ExportDataRequest outputConfig. + * @member {google.cloud.automl.v1beta1.IOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.automl.v1beta1.ExportDataRequest + * @instance + */ + ExportDataRequest.prototype.outputConfig = null; + + /** + * Creates a new ExportDataRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata instance + * @param {google.cloud.automl.v1beta1.IExportDataRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest instance */ - VideoObjectTrackingDatasetMetadata.create = function create(properties) { - return new VideoObjectTrackingDatasetMetadata(properties); + ExportDataRequest.create = function create(properties) { + return new ExportDataRequest(properties); }; /** - * Encodes the specified VideoObjectTrackingDatasetMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. + * Encodes the specified ExportDataRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata} message VideoObjectTrackingDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportDataRequest} message ExportDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingDatasetMetadata.encode = function encode(message, writer) { + ExportDataRequest.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.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.automl.v1beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoObjectTrackingDatasetMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.verify|verify} messages. + * Encodes the specified ExportDataRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingDatasetMetadata} message VideoObjectTrackingDatasetMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportDataRequest} message ExportDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingDatasetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ExportDataRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer. + * Decodes an ExportDataRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingDatasetMetadata.decode = function decode(reader, length) { + ExportDataRequest.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.automl.v1beta1.VideoObjectTrackingDatasetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExportDataRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.outputConfig = $root.google.cloud.automl.v1beta1.OutputConfig.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -51095,93 +52044,121 @@ }; /** - * Decodes a VideoObjectTrackingDatasetMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportDataRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingDatasetMetadata.decodeDelimited = function decodeDelimited(reader) { + ExportDataRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoObjectTrackingDatasetMetadata message. + * Verifies an ExportDataRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoObjectTrackingDatasetMetadata.verify = function verify(message) { + ExportDataRequest.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.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.automl.v1beta1.OutputConfig.verify(message.outputConfig); + if (error) + return "outputConfig." + error; + } return null; }; /** - * Creates a VideoObjectTrackingDatasetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportDataRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} VideoObjectTrackingDatasetMetadata + * @returns {google.cloud.automl.v1beta1.ExportDataRequest} ExportDataRequest */ - VideoObjectTrackingDatasetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) + ExportDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportDataRequest) return object; - return new $root.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata(); + var message = new $root.google.cloud.automl.v1beta1.ExportDataRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExportDataRequest.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.automl.v1beta1.OutputConfig.fromObject(object.outputConfig); + } + return message; }; /** - * Creates a plain object from a VideoObjectTrackingDatasetMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ExportDataRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @static - * @param {google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} message VideoObjectTrackingDatasetMetadata + * @param {google.cloud.automl.v1beta1.ExportDataRequest} message ExportDataRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoObjectTrackingDatasetMetadata.toObject = function toObject() { - return {}; + ExportDataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.outputConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.automl.v1beta1.OutputConfig.toObject(message.outputConfig, options); + return object; }; /** - * Converts this VideoObjectTrackingDatasetMetadata to JSON. + * Converts this ExportDataRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + * @memberof google.cloud.automl.v1beta1.ExportDataRequest * @instance * @returns {Object.} JSON object */ - VideoObjectTrackingDatasetMetadata.prototype.toJSON = function toJSON() { + ExportDataRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoObjectTrackingDatasetMetadata; + return ExportDataRequest; })(); - v1beta1.VideoClassificationModelMetadata = (function() { + v1beta1.GetAnnotationSpecRequest = (function() { /** - * Properties of a VideoClassificationModelMetadata. + * Properties of a GetAnnotationSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IVideoClassificationModelMetadata + * @interface IGetAnnotationSpecRequest + * @property {string|null} [name] GetAnnotationSpecRequest name */ /** - * Constructs a new VideoClassificationModelMetadata. + * Constructs a new GetAnnotationSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a VideoClassificationModelMetadata. - * @implements IVideoClassificationModelMetadata + * @classdesc Represents a GetAnnotationSpecRequest. + * @implements IGetAnnotationSpecRequest * @constructor - * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest=} [properties] Properties to set */ - function VideoClassificationModelMetadata(properties) { + function GetAnnotationSpecRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51189,63 +52166,76 @@ } /** - * Creates a new VideoClassificationModelMetadata instance using the specified properties. + * GetAnnotationSpecRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest + * @instance + */ + GetAnnotationSpecRequest.prototype.name = ""; + + /** + * Creates a new GetAnnotationSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata instance + * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest instance */ - VideoClassificationModelMetadata.create = function create(properties) { - return new VideoClassificationModelMetadata(properties); + GetAnnotationSpecRequest.create = function create(properties) { + return new GetAnnotationSpecRequest(properties); }; /** - * Encodes the specified VideoClassificationModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. + * Encodes the specified GetAnnotationSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata} message VideoClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} message GetAnnotationSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationModelMetadata.encode = function encode(message, writer) { + GetAnnotationSpecRequest.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 VideoClassificationModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify|verify} messages. + * Encodes the specified GetAnnotationSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetAnnotationSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata} message VideoClassificationModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetAnnotationSpecRequest} message GetAnnotationSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetAnnotationSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer. + * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata + * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationModelMetadata.decode = function decode(reader, length) { + GetAnnotationSpecRequest.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.automl.v1beta1.VideoClassificationModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GetAnnotationSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -51255,93 +52245,108 @@ }; /** - * Decodes a VideoClassificationModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetAnnotationSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata + * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationModelMetadata.decodeDelimited = function decodeDelimited(reader) { + GetAnnotationSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoClassificationModelMetadata message. + * Verifies a GetAnnotationSpecRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoClassificationModelMetadata.verify = function verify(message) { + GetAnnotationSpecRequest.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 VideoClassificationModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetAnnotationSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} VideoClassificationModelMetadata + * @returns {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} GetAnnotationSpecRequest */ - VideoClassificationModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) + GetAnnotationSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GetAnnotationSpecRequest) return object; - return new $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata(); + var message = new $root.google.cloud.automl.v1beta1.GetAnnotationSpecRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a VideoClassificationModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a GetAnnotationSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @static - * @param {google.cloud.automl.v1beta1.VideoClassificationModelMetadata} message VideoClassificationModelMetadata + * @param {google.cloud.automl.v1beta1.GetAnnotationSpecRequest} message GetAnnotationSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoClassificationModelMetadata.toObject = function toObject() { - return {}; + GetAnnotationSpecRequest.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 VideoClassificationModelMetadata to JSON. + * Converts this GetAnnotationSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.VideoClassificationModelMetadata + * @memberof google.cloud.automl.v1beta1.GetAnnotationSpecRequest * @instance * @returns {Object.} JSON object */ - VideoClassificationModelMetadata.prototype.toJSON = function toJSON() { + GetAnnotationSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoClassificationModelMetadata; + return GetAnnotationSpecRequest; })(); - v1beta1.VideoObjectTrackingModelMetadata = (function() { + v1beta1.GetTableSpecRequest = (function() { /** - * Properties of a VideoObjectTrackingModelMetadata. + * Properties of a GetTableSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IVideoObjectTrackingModelMetadata + * @interface IGetTableSpecRequest + * @property {string|null} [name] GetTableSpecRequest name + * @property {google.protobuf.IFieldMask|null} [fieldMask] GetTableSpecRequest fieldMask */ /** - * Constructs a new VideoObjectTrackingModelMetadata. + * Constructs a new GetTableSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a VideoObjectTrackingModelMetadata. - * @implements IVideoObjectTrackingModelMetadata + * @classdesc Represents a GetTableSpecRequest. + * @implements IGetTableSpecRequest * @constructor - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest=} [properties] Properties to set */ - function VideoObjectTrackingModelMetadata(properties) { + function GetTableSpecRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51349,63 +52354,89 @@ } /** - * Creates a new VideoObjectTrackingModelMetadata instance using the specified properties. + * GetTableSpecRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @instance + */ + GetTableSpecRequest.prototype.name = ""; + + /** + * GetTableSpecRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @instance + */ + GetTableSpecRequest.prototype.fieldMask = null; + + /** + * Creates a new GetTableSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata instance + * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest instance */ - VideoObjectTrackingModelMetadata.create = function create(properties) { - return new VideoObjectTrackingModelMetadata(properties); + GetTableSpecRequest.create = function create(properties) { + return new GetTableSpecRequest(properties); }; /** - * Encodes the specified VideoObjectTrackingModelMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. + * Encodes the specified GetTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata} message VideoObjectTrackingModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} message GetTableSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingModelMetadata.encode = function encode(message, writer) { + GetTableSpecRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoObjectTrackingModelMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify|verify} messages. + * Encodes the specified GetTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetTableSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata} message VideoObjectTrackingModelMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetTableSpecRequest} message GetTableSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetTableSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer. + * Decodes a GetTableSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata + * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingModelMetadata.decode = function decode(reader, length) { + GetTableSpecRequest.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.automl.v1beta1.VideoObjectTrackingModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GetTableSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -51415,380 +52446,253 @@ }; /** - * Decodes a VideoObjectTrackingModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetTableSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata + * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingModelMetadata.decodeDelimited = function decodeDelimited(reader) { + GetTableSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoObjectTrackingModelMetadata message. + * Verifies a GetTableSpecRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoObjectTrackingModelMetadata.verify = function verify(message) { + GetTableSpecRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - return null; - }; - - /** - * Creates a VideoObjectTrackingModelMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} VideoObjectTrackingModelMetadata - */ - VideoObjectTrackingModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - return object; - return new $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata(); - }; - - /** - * Creates a plain object from a VideoObjectTrackingModelMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - * @static - * @param {google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} message VideoObjectTrackingModelMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VideoObjectTrackingModelMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this VideoObjectTrackingModelMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - * @instance - * @returns {Object.} JSON object - */ - VideoObjectTrackingModelMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VideoObjectTrackingModelMetadata; - })(); - - v1beta1.Model = (function() { - - /** - * Properties of a Model. - * @memberof google.cloud.automl.v1beta1 - * @interface IModel - * @property {google.cloud.automl.v1beta1.ITranslationModelMetadata|null} [translationModelMetadata] Model translationModelMetadata - * @property {google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null} [imageClassificationModelMetadata] Model imageClassificationModelMetadata - * @property {google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null} [textClassificationModelMetadata] Model textClassificationModelMetadata - * @property {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null} [imageObjectDetectionModelMetadata] Model imageObjectDetectionModelMetadata - * @property {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null} [videoClassificationModelMetadata] Model videoClassificationModelMetadata - * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null} [videoObjectTrackingModelMetadata] Model videoObjectTrackingModelMetadata - * @property {google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null} [textExtractionModelMetadata] Model textExtractionModelMetadata - * @property {google.cloud.automl.v1beta1.ITablesModelMetadata|null} [tablesModelMetadata] Model tablesModelMetadata - * @property {google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null} [textSentimentModelMetadata] Model textSentimentModelMetadata - * @property {string|null} [name] Model name - * @property {string|null} [displayName] Model displayName - * @property {string|null} [datasetId] Model datasetId - * @property {google.protobuf.ITimestamp|null} [createTime] Model createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Model updateTime - * @property {google.cloud.automl.v1beta1.Model.DeploymentState|null} [deploymentState] Model deploymentState - */ - - /** - * Constructs a new Model. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a Model. - * @implements IModel - * @constructor - * @param {google.cloud.automl.v1beta1.IModel=} [properties] Properties to set - */ - function Model(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]]; - } - - /** - * Model translationModelMetadata. - * @member {google.cloud.automl.v1beta1.ITranslationModelMetadata|null|undefined} translationModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance - */ - Model.prototype.translationModelMetadata = null; - - /** - * Model imageClassificationModelMetadata. - * @member {google.cloud.automl.v1beta1.IImageClassificationModelMetadata|null|undefined} imageClassificationModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance - */ - Model.prototype.imageClassificationModelMetadata = null; - - /** - * Model textClassificationModelMetadata. - * @member {google.cloud.automl.v1beta1.ITextClassificationModelMetadata|null|undefined} textClassificationModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance - */ - Model.prototype.textClassificationModelMetadata = null; - - /** - * Model imageObjectDetectionModelMetadata. - * @member {google.cloud.automl.v1beta1.IImageObjectDetectionModelMetadata|null|undefined} imageObjectDetectionModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance - */ - Model.prototype.imageObjectDetectionModelMetadata = null; - - /** - * Model videoClassificationModelMetadata. - * @member {google.cloud.automl.v1beta1.IVideoClassificationModelMetadata|null|undefined} videoClassificationModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance - */ - Model.prototype.videoClassificationModelMetadata = null; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } + return null; + }; /** - * Model videoObjectTrackingModelMetadata. - * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingModelMetadata|null|undefined} videoObjectTrackingModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance + * Creates a GetTableSpecRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.GetTableSpecRequest} GetTableSpecRequest */ - Model.prototype.videoObjectTrackingModelMetadata = null; + GetTableSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GetTableSpecRequest) + return object; + var message = new $root.google.cloud.automl.v1beta1.GetTableSpecRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.automl.v1beta1.GetTableSpecRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + return message; + }; /** - * Model textExtractionModelMetadata. - * @member {google.cloud.automl.v1beta1.ITextExtractionModelMetadata|null|undefined} textExtractionModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance + * Creates a plain object from a GetTableSpecRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest + * @static + * @param {google.cloud.automl.v1beta1.GetTableSpecRequest} message GetTableSpecRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Model.prototype.textExtractionModelMetadata = null; + GetTableSpecRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.fieldMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + return object; + }; /** - * Model tablesModelMetadata. - * @member {google.cloud.automl.v1beta1.ITablesModelMetadata|null|undefined} tablesModelMetadata - * @memberof google.cloud.automl.v1beta1.Model + * Converts this GetTableSpecRequest to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.GetTableSpecRequest * @instance + * @returns {Object.} JSON object */ - Model.prototype.tablesModelMetadata = null; + GetTableSpecRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Model textSentimentModelMetadata. - * @member {google.cloud.automl.v1beta1.ITextSentimentModelMetadata|null|undefined} textSentimentModelMetadata - * @memberof google.cloud.automl.v1beta1.Model - * @instance - */ - Model.prototype.textSentimentModelMetadata = null; + return GetTableSpecRequest; + })(); + + v1beta1.ListTableSpecsRequest = (function() { /** - * Model name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.Model - * @instance + * Properties of a ListTableSpecsRequest. + * @memberof google.cloud.automl.v1beta1 + * @interface IListTableSpecsRequest + * @property {string|null} [parent] ListTableSpecsRequest parent + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListTableSpecsRequest fieldMask + * @property {string|null} [filter] ListTableSpecsRequest filter + * @property {number|null} [pageSize] ListTableSpecsRequest pageSize + * @property {string|null} [pageToken] ListTableSpecsRequest pageToken */ - Model.prototype.name = ""; /** - * Model displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1beta1.Model - * @instance + * Constructs a new ListTableSpecsRequest. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a ListTableSpecsRequest. + * @implements IListTableSpecsRequest + * @constructor + * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest=} [properties] Properties to set */ - Model.prototype.displayName = ""; + function ListTableSpecsRequest(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]]; + } /** - * Model datasetId. - * @member {string} datasetId - * @memberof google.cloud.automl.v1beta1.Model + * ListTableSpecsRequest parent. + * @member {string} parent + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @instance */ - Model.prototype.datasetId = ""; + ListTableSpecsRequest.prototype.parent = ""; /** - * Model createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.automl.v1beta1.Model + * ListTableSpecsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @instance */ - Model.prototype.createTime = null; + ListTableSpecsRequest.prototype.fieldMask = null; /** - * Model updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.automl.v1beta1.Model + * ListTableSpecsRequest filter. + * @member {string} filter + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @instance */ - Model.prototype.updateTime = null; + ListTableSpecsRequest.prototype.filter = ""; /** - * Model deploymentState. - * @member {google.cloud.automl.v1beta1.Model.DeploymentState} deploymentState - * @memberof google.cloud.automl.v1beta1.Model + * ListTableSpecsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @instance */ - Model.prototype.deploymentState = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListTableSpecsRequest.prototype.pageSize = 0; /** - * Model modelMetadata. - * @member {"translationModelMetadata"|"imageClassificationModelMetadata"|"textClassificationModelMetadata"|"imageObjectDetectionModelMetadata"|"videoClassificationModelMetadata"|"videoObjectTrackingModelMetadata"|"textExtractionModelMetadata"|"tablesModelMetadata"|"textSentimentModelMetadata"|undefined} modelMetadata - * @memberof google.cloud.automl.v1beta1.Model + * ListTableSpecsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @instance */ - Object.defineProperty(Model.prototype, "modelMetadata", { - get: $util.oneOfGetter($oneOfFields = ["translationModelMetadata", "imageClassificationModelMetadata", "textClassificationModelMetadata", "imageObjectDetectionModelMetadata", "videoClassificationModelMetadata", "videoObjectTrackingModelMetadata", "textExtractionModelMetadata", "tablesModelMetadata", "textSentimentModelMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListTableSpecsRequest.prototype.pageToken = ""; /** - * Creates a new Model instance using the specified properties. + * Creates a new ListTableSpecsRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.IModel=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.Model} Model instance + * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest instance */ - Model.create = function create(properties) { - return new Model(properties); + ListTableSpecsRequest.create = function create(properties) { + return new ListTableSpecsRequest(properties); }; /** - * Encodes the specified Model message. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. + * Encodes the specified ListTableSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.IModel} message Model message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} message ListTableSpecsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Model.encode = function encode(message, writer) { + ListTableSpecsRequest.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.datasetId != null && message.hasOwnProperty("datasetId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.datasetId); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.deploymentState); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) - $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.encode(message.imageClassificationModelMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) - $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.encode(message.textClassificationModelMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) - $root.google.cloud.automl.v1beta1.TranslationModelMetadata.encode(message.translationModelMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) - $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.encode(message.textExtractionModelMetadata, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) - $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.encode(message.imageObjectDetectionModelMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.videoObjectTrackingModelMetadata != null && message.hasOwnProperty("videoObjectTrackingModelMetadata")) - $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.encode(message.videoObjectTrackingModelMetadata, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) - $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.encode(message.textSentimentModelMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.videoClassificationModelMetadata != null && message.hasOwnProperty("videoClassificationModelMetadata")) - $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.encode(message.videoClassificationModelMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.tablesModelMetadata != null && message.hasOwnProperty("tablesModelMetadata")) - $root.google.cloud.automl.v1beta1.TablesModelMetadata.encode(message.tablesModelMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); return writer; }; /** - * Encodes the specified Model message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.Model.verify|verify} messages. + * Encodes the specified ListTableSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.IModel} message Model message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListTableSpecsRequest} message ListTableSpecsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Model.encodeDelimited = function encodeDelimited(message, writer) { + ListTableSpecsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Model message from the specified reader or buffer. + * Decodes a ListTableSpecsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.Model} Model + * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Model.decode = function decode(reader, length) { + ListTableSpecsRequest.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.automl.v1beta1.Model(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListTableSpecsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 15: - message.translationModelMetadata = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.decode(reader, reader.uint32()); - break; - case 13: - message.imageClassificationModelMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.decode(reader, reader.uint32()); - break; - case 14: - message.textClassificationModelMetadata = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.decode(reader, reader.uint32()); - break; - case 20: - message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.decode(reader, reader.uint32()); - break; - case 23: - message.videoClassificationModelMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.decode(reader, reader.uint32()); - break; - case 21: - message.videoObjectTrackingModelMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.decode(reader, reader.uint32()); - break; - case 19: - message.textExtractionModelMetadata = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.decode(reader, reader.uint32()); - break; - case 24: - message.tablesModelMetadata = $root.google.cloud.automl.v1beta1.TablesModelMetadata.decode(reader, reader.uint32()); - break; - case 22: - message.textSentimentModelMetadata = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.decode(reader, reader.uint32()); - break; case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.displayName = reader.string(); + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; case 3: - message.datasetId = reader.string(); - break; - case 7: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.filter = reader.string(); break; - case 11: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 4: + message.pageSize = reader.int32(); break; - case 8: - message.deploymentState = reader.int32(); + case 6: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -51799,382 +52703,147 @@ }; /** - * Decodes a Model message from the specified reader or buffer, length delimited. + * Decodes a ListTableSpecsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.Model} Model + * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Model.decodeDelimited = function decodeDelimited(reader) { + ListTableSpecsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Model message. + * Verifies a ListTableSpecsRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Model.verify = function verify(message) { + ListTableSpecsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.verify(message.translationModelMetadata); - if (error) - return "translationModelMetadata." + error; - } - } - if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.verify(message.imageClassificationModelMetadata); - if (error) - return "imageClassificationModelMetadata." + error; - } - } - if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.verify(message.textClassificationModelMetadata); - if (error) - return "textClassificationModelMetadata." + error; - } - } - if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.verify(message.imageObjectDetectionModelMetadata); - if (error) - return "imageObjectDetectionModelMetadata." + error; - } - } - if (message.videoClassificationModelMetadata != null && message.hasOwnProperty("videoClassificationModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.verify(message.videoClassificationModelMetadata); - if (error) - return "videoClassificationModelMetadata." + error; - } - } - if (message.videoObjectTrackingModelMetadata != null && message.hasOwnProperty("videoObjectTrackingModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.verify(message.videoObjectTrackingModelMetadata); - if (error) - return "videoObjectTrackingModelMetadata." + error; - } - } - if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.verify(message.textExtractionModelMetadata); - if (error) - return "textExtractionModelMetadata." + error; - } - } - if (message.tablesModelMetadata != null && message.hasOwnProperty("tablesModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TablesModelMetadata.verify(message.tablesModelMetadata); - if (error) - return "tablesModelMetadata." + error; - } - } - if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.verify(message.textSentimentModelMetadata); - if (error) - return "textSentimentModelMetadata." + error; - } - } - 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.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string 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 (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) - return "updateTime." + error; + return "fieldMask." + error; } - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - switch (message.deploymentState) { - default: - return "deploymentState: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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 Model message from a plain object. Also converts values to their respective internal types. + * Creates a ListTableSpecsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.Model} Model + * @returns {google.cloud.automl.v1beta1.ListTableSpecsRequest} ListTableSpecsRequest */ - Model.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.Model) + ListTableSpecsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListTableSpecsRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.Model(); - if (object.translationModelMetadata != null) { - if (typeof object.translationModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.translationModelMetadata: object expected"); - message.translationModelMetadata = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.fromObject(object.translationModelMetadata); - } - if (object.imageClassificationModelMetadata != null) { - if (typeof object.imageClassificationModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.imageClassificationModelMetadata: object expected"); - message.imageClassificationModelMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.fromObject(object.imageClassificationModelMetadata); - } - if (object.textClassificationModelMetadata != null) { - if (typeof object.textClassificationModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.textClassificationModelMetadata: object expected"); - message.textClassificationModelMetadata = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.fromObject(object.textClassificationModelMetadata); - } - if (object.imageObjectDetectionModelMetadata != null) { - if (typeof object.imageObjectDetectionModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.imageObjectDetectionModelMetadata: object expected"); - message.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.fromObject(object.imageObjectDetectionModelMetadata); - } - if (object.videoClassificationModelMetadata != null) { - if (typeof object.videoClassificationModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.videoClassificationModelMetadata: object expected"); - message.videoClassificationModelMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.fromObject(object.videoClassificationModelMetadata); - } - if (object.videoObjectTrackingModelMetadata != null) { - if (typeof object.videoObjectTrackingModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.videoObjectTrackingModelMetadata: object expected"); - message.videoObjectTrackingModelMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.fromObject(object.videoObjectTrackingModelMetadata); - } - if (object.textExtractionModelMetadata != null) { - if (typeof object.textExtractionModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.textExtractionModelMetadata: object expected"); - message.textExtractionModelMetadata = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.fromObject(object.textExtractionModelMetadata); - } - if (object.tablesModelMetadata != null) { - if (typeof object.tablesModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.tablesModelMetadata: object expected"); - message.tablesModelMetadata = $root.google.cloud.automl.v1beta1.TablesModelMetadata.fromObject(object.tablesModelMetadata); - } - if (object.textSentimentModelMetadata != null) { - if (typeof object.textSentimentModelMetadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.textSentimentModelMetadata: object expected"); - message.textSentimentModelMetadata = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.fromObject(object.textSentimentModelMetadata); - } - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1beta1.Model.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.automl.v1beta1.Model.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.deploymentState) { - case "DEPLOYMENT_STATE_UNSPECIFIED": - case 0: - message.deploymentState = 0; - break; - case "DEPLOYED": - case 1: - message.deploymentState = 1; - break; - case "UNDEPLOYED": - case 2: - message.deploymentState = 2; - break; + var message = new $root.google.cloud.automl.v1beta1.ListTableSpecsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ListTableSpecsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); } + if (object.filter != null) + message.filter = String(object.filter); + 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 Model message. Also converts values to other types if specified. + * Creates a plain object from a ListTableSpecsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.Model} message Model + * @param {google.cloud.automl.v1beta1.ListTableSpecsRequest} message ListTableSpecsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Model.toObject = function toObject(message, options) { + ListTableSpecsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.datasetId = ""; - object.createTime = null; - object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; - object.updateTime = 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.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1beta1.Model.DeploymentState[message.deploymentState] : message.deploymentState; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { - object.imageClassificationModelMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.toObject(message.imageClassificationModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "imageClassificationModelMetadata"; - } - if (message.textClassificationModelMetadata != null && message.hasOwnProperty("textClassificationModelMetadata")) { - object.textClassificationModelMetadata = $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata.toObject(message.textClassificationModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "textClassificationModelMetadata"; - } - if (message.translationModelMetadata != null && message.hasOwnProperty("translationModelMetadata")) { - object.translationModelMetadata = $root.google.cloud.automl.v1beta1.TranslationModelMetadata.toObject(message.translationModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "translationModelMetadata"; - } - if (message.textExtractionModelMetadata != null && message.hasOwnProperty("textExtractionModelMetadata")) { - object.textExtractionModelMetadata = $root.google.cloud.automl.v1beta1.TextExtractionModelMetadata.toObject(message.textExtractionModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "textExtractionModelMetadata"; - } - if (message.imageObjectDetectionModelMetadata != null && message.hasOwnProperty("imageObjectDetectionModelMetadata")) { - object.imageObjectDetectionModelMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.toObject(message.imageObjectDetectionModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "imageObjectDetectionModelMetadata"; - } - if (message.videoObjectTrackingModelMetadata != null && message.hasOwnProperty("videoObjectTrackingModelMetadata")) { - object.videoObjectTrackingModelMetadata = $root.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.toObject(message.videoObjectTrackingModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "videoObjectTrackingModelMetadata"; - } - if (message.textSentimentModelMetadata != null && message.hasOwnProperty("textSentimentModelMetadata")) { - object.textSentimentModelMetadata = $root.google.cloud.automl.v1beta1.TextSentimentModelMetadata.toObject(message.textSentimentModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "textSentimentModelMetadata"; - } - if (message.videoClassificationModelMetadata != null && message.hasOwnProperty("videoClassificationModelMetadata")) { - object.videoClassificationModelMetadata = $root.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.toObject(message.videoClassificationModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "videoClassificationModelMetadata"; - } - if (message.tablesModelMetadata != null && message.hasOwnProperty("tablesModelMetadata")) { - object.tablesModelMetadata = $root.google.cloud.automl.v1beta1.TablesModelMetadata.toObject(message.tablesModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "tablesModelMetadata"; + object.parent = ""; + object.fieldMask = null; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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 Model to JSON. + * Converts this ListTableSpecsRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.Model + * @memberof google.cloud.automl.v1beta1.ListTableSpecsRequest * @instance * @returns {Object.} JSON object */ - Model.prototype.toJSON = function toJSON() { + ListTableSpecsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * DeploymentState enum. - * @name google.cloud.automl.v1beta1.Model.DeploymentState - * @enum {string} - * @property {number} DEPLOYMENT_STATE_UNSPECIFIED=0 DEPLOYMENT_STATE_UNSPECIFIED value - * @property {number} DEPLOYED=1 DEPLOYED value - * @property {number} UNDEPLOYED=2 UNDEPLOYED value - */ - Model.DeploymentState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEPLOYMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEPLOYED"] = 1; - values[valuesById[2] = "UNDEPLOYED"] = 2; - return values; - })(); - - return Model; + return ListTableSpecsRequest; })(); - v1beta1.ModelEvaluation = (function() { + v1beta1.ListTableSpecsResponse = (function() { /** - * Properties of a ModelEvaluation. + * Properties of a ListTableSpecsResponse. * @memberof google.cloud.automl.v1beta1 - * @interface IModelEvaluation - * @property {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null} [classificationEvaluationMetrics] ModelEvaluation classificationEvaluationMetrics - * @property {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null} [regressionEvaluationMetrics] ModelEvaluation regressionEvaluationMetrics - * @property {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null} [translationEvaluationMetrics] ModelEvaluation translationEvaluationMetrics - * @property {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null} [imageObjectDetectionEvaluationMetrics] ModelEvaluation imageObjectDetectionEvaluationMetrics - * @property {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null} [videoObjectTrackingEvaluationMetrics] ModelEvaluation videoObjectTrackingEvaluationMetrics - * @property {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null} [textSentimentEvaluationMetrics] ModelEvaluation textSentimentEvaluationMetrics - * @property {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null} [textExtractionEvaluationMetrics] ModelEvaluation textExtractionEvaluationMetrics - * @property {string|null} [name] ModelEvaluation name - * @property {string|null} [annotationSpecId] ModelEvaluation annotationSpecId - * @property {string|null} [displayName] ModelEvaluation displayName - * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluation createTime - * @property {number|null} [evaluatedExampleCount] ModelEvaluation evaluatedExampleCount + * @interface IListTableSpecsResponse + * @property {Array.|null} [tableSpecs] ListTableSpecsResponse tableSpecs + * @property {string|null} [nextPageToken] ListTableSpecsResponse nextPageToken */ /** - * Constructs a new ModelEvaluation. + * Constructs a new ListTableSpecsResponse. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a ModelEvaluation. - * @implements IModelEvaluation + * @classdesc Represents a ListTableSpecsResponse. + * @implements IListTableSpecsResponse * @constructor - * @param {google.cloud.automl.v1beta1.IModelEvaluation=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse=} [properties] Properties to set */ - function ModelEvaluation(properties) { + function ListTableSpecsResponse(properties) { + this.tableSpecs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52182,232 +52851,318 @@ } /** - * ModelEvaluation classificationEvaluationMetrics. - * @member {google.cloud.automl.v1beta1.IClassificationEvaluationMetrics|null|undefined} classificationEvaluationMetrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * ListTableSpecsResponse tableSpecs. + * @member {Array.} tableSpecs + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse * @instance */ - ModelEvaluation.prototype.classificationEvaluationMetrics = null; + ListTableSpecsResponse.prototype.tableSpecs = $util.emptyArray; /** - * ModelEvaluation regressionEvaluationMetrics. - * @member {google.cloud.automl.v1beta1.IRegressionEvaluationMetrics|null|undefined} regressionEvaluationMetrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * ListTableSpecsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse * @instance */ - ModelEvaluation.prototype.regressionEvaluationMetrics = null; + ListTableSpecsResponse.prototype.nextPageToken = ""; /** - * ModelEvaluation translationEvaluationMetrics. - * @member {google.cloud.automl.v1beta1.ITranslationEvaluationMetrics|null|undefined} translationEvaluationMetrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Creates a new ListTableSpecsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse instance */ - ModelEvaluation.prototype.translationEvaluationMetrics = null; + ListTableSpecsResponse.create = function create(properties) { + return new ListTableSpecsResponse(properties); + }; /** - * ModelEvaluation imageObjectDetectionEvaluationMetrics. - * @member {google.cloud.automl.v1beta1.IImageObjectDetectionEvaluationMetrics|null|undefined} imageObjectDetectionEvaluationMetrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Encodes the specified ListTableSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse} message ListTableSpecsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ModelEvaluation.prototype.imageObjectDetectionEvaluationMetrics = null; + ListTableSpecsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableSpecs != null && message.tableSpecs.length) + for (var i = 0; i < message.tableSpecs.length; ++i) + $root.google.cloud.automl.v1beta1.TableSpec.encode(message.tableSpecs[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; + }; /** - * ModelEvaluation videoObjectTrackingEvaluationMetrics. - * @member {google.cloud.automl.v1beta1.IVideoObjectTrackingEvaluationMetrics|null|undefined} videoObjectTrackingEvaluationMetrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Encodes the specified ListTableSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListTableSpecsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {google.cloud.automl.v1beta1.IListTableSpecsResponse} message ListTableSpecsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ModelEvaluation.prototype.videoObjectTrackingEvaluationMetrics = null; + ListTableSpecsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ModelEvaluation textSentimentEvaluationMetrics. - * @member {google.cloud.automl.v1beta1.ITextSentimentEvaluationMetrics|null|undefined} textSentimentEvaluationMetrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Decodes a ListTableSpecsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluation.prototype.textSentimentEvaluationMetrics = null; + ListTableSpecsResponse.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.automl.v1beta1.ListTableSpecsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tableSpecs && message.tableSpecs.length)) + message.tableSpecs = []; + message.tableSpecs.push($root.google.cloud.automl.v1beta1.TableSpec.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ModelEvaluation textExtractionEvaluationMetrics. - * @member {google.cloud.automl.v1beta1.ITextExtractionEvaluationMetrics|null|undefined} textExtractionEvaluationMetrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Decodes a ListTableSpecsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluation.prototype.textExtractionEvaluationMetrics = null; + ListTableSpecsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ModelEvaluation name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Verifies a ListTableSpecsResponse message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelEvaluation.prototype.name = ""; + ListTableSpecsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableSpecs != null && message.hasOwnProperty("tableSpecs")) { + if (!Array.isArray(message.tableSpecs)) + return "tableSpecs: array expected"; + for (var i = 0; i < message.tableSpecs.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.TableSpec.verify(message.tableSpecs[i]); + if (error) + return "tableSpecs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * ModelEvaluation annotationSpecId. - * @member {string} annotationSpecId - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Creates a ListTableSpecsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ListTableSpecsResponse} ListTableSpecsResponse */ - ModelEvaluation.prototype.annotationSpecId = ""; + ListTableSpecsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListTableSpecsResponse) + return object; + var message = new $root.google.cloud.automl.v1beta1.ListTableSpecsResponse(); + if (object.tableSpecs) { + if (!Array.isArray(object.tableSpecs)) + throw TypeError(".google.cloud.automl.v1beta1.ListTableSpecsResponse.tableSpecs: array expected"); + message.tableSpecs = []; + for (var i = 0; i < object.tableSpecs.length; ++i) { + if (typeof object.tableSpecs[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ListTableSpecsResponse.tableSpecs: object expected"); + message.tableSpecs[i] = $root.google.cloud.automl.v1beta1.TableSpec.fromObject(object.tableSpecs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * ModelEvaluation displayName. - * @member {string} displayName - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Creates a plain object from a ListTableSpecsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse + * @static + * @param {google.cloud.automl.v1beta1.ListTableSpecsResponse} message ListTableSpecsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ModelEvaluation.prototype.displayName = ""; + ListTableSpecsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tableSpecs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tableSpecs && message.tableSpecs.length) { + object.tableSpecs = []; + for (var j = 0; j < message.tableSpecs.length; ++j) + object.tableSpecs[j] = $root.google.cloud.automl.v1beta1.TableSpec.toObject(message.tableSpecs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * ModelEvaluation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * Converts this ListTableSpecsResponse to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ListTableSpecsResponse * @instance + * @returns {Object.} JSON object */ - ModelEvaluation.prototype.createTime = null; + ListTableSpecsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTableSpecsResponse; + })(); + + v1beta1.UpdateTableSpecRequest = (function() { /** - * ModelEvaluation evaluatedExampleCount. - * @member {number} evaluatedExampleCount - * @memberof google.cloud.automl.v1beta1.ModelEvaluation - * @instance + * Properties of an UpdateTableSpecRequest. + * @memberof google.cloud.automl.v1beta1 + * @interface IUpdateTableSpecRequest + * @property {google.cloud.automl.v1beta1.ITableSpec|null} [tableSpec] UpdateTableSpecRequest tableSpec + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTableSpecRequest updateMask */ - ModelEvaluation.prototype.evaluatedExampleCount = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new UpdateTableSpecRequest. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents an UpdateTableSpecRequest. + * @implements IUpdateTableSpecRequest + * @constructor + * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest=} [properties] Properties to set + */ + function UpdateTableSpecRequest(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]]; + } /** - * ModelEvaluation metrics. - * @member {"classificationEvaluationMetrics"|"regressionEvaluationMetrics"|"translationEvaluationMetrics"|"imageObjectDetectionEvaluationMetrics"|"videoObjectTrackingEvaluationMetrics"|"textSentimentEvaluationMetrics"|"textExtractionEvaluationMetrics"|undefined} metrics - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * UpdateTableSpecRequest tableSpec. + * @member {google.cloud.automl.v1beta1.ITableSpec|null|undefined} tableSpec + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @instance */ - Object.defineProperty(ModelEvaluation.prototype, "metrics", { - get: $util.oneOfGetter($oneOfFields = ["classificationEvaluationMetrics", "regressionEvaluationMetrics", "translationEvaluationMetrics", "imageObjectDetectionEvaluationMetrics", "videoObjectTrackingEvaluationMetrics", "textSentimentEvaluationMetrics", "textExtractionEvaluationMetrics"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateTableSpecRequest.prototype.tableSpec = null; /** - * Creates a new ModelEvaluation instance using the specified properties. + * UpdateTableSpecRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest + * @instance + */ + UpdateTableSpecRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateTableSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IModelEvaluation=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation instance + * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest instance */ - ModelEvaluation.create = function create(properties) { - return new ModelEvaluation(properties); + UpdateTableSpecRequest.create = function create(properties) { + return new UpdateTableSpecRequest(properties); }; /** - * Encodes the specified ModelEvaluation message. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. + * Encodes the specified UpdateTableSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IModelEvaluation} message ModelEvaluation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} message UpdateTableSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelEvaluation.encode = function encode(message, writer) { + UpdateTableSpecRequest.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.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.annotationSpecId); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.evaluatedExampleCount); - if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) - $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.encode(message.classificationEvaluationMetrics, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) - $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.encode(message.translationEvaluationMetrics, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) - $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.encode(message.textSentimentEvaluationMetrics, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) - $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.encode(message.imageObjectDetectionEvaluationMetrics, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) - $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.encode(message.textExtractionEvaluationMetrics, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.videoObjectTrackingEvaluationMetrics != null && message.hasOwnProperty("videoObjectTrackingEvaluationMetrics")) - $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.encode(message.videoObjectTrackingEvaluationMetrics, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.displayName); - if (message.regressionEvaluationMetrics != null && message.hasOwnProperty("regressionEvaluationMetrics")) - $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.encode(message.regressionEvaluationMetrics, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) + $root.google.cloud.automl.v1beta1.TableSpec.encode(message.tableSpec, 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 ModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ModelEvaluation.verify|verify} messages. + * Encodes the specified UpdateTableSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateTableSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IModelEvaluation} message ModelEvaluation message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUpdateTableSpecRequest} message UpdateTableSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelEvaluation.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTableSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ModelEvaluation message from the specified reader or buffer. + * Decodes an UpdateTableSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluation.decode = function decode(reader, length) { + UpdateTableSpecRequest.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.automl.v1beta1.ModelEvaluation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.UpdateTableSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - message.classificationEvaluationMetrics = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.decode(reader, reader.uint32()); - break; - case 24: - message.regressionEvaluationMetrics = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.decode(reader, reader.uint32()); - break; - case 9: - message.translationEvaluationMetrics = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.decode(reader, reader.uint32()); - break; - case 12: - message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.decode(reader, reader.uint32()); - break; - case 14: - message.videoObjectTrackingEvaluationMetrics = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.decode(reader, reader.uint32()); - break; - case 11: - message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.decode(reader, reader.uint32()); - break; - case 13: - message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.decode(reader, reader.uint32()); - break; case 1: - message.name = reader.string(); + message.tableSpec = $root.google.cloud.automl.v1beta1.TableSpec.decode(reader, reader.uint32()); break; case 2: - message.annotationSpecId = reader.string(); - break; - case 15: - message.displayName = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.evaluatedExampleCount = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -52418,297 +53173,127 @@ }; /** - * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. + * Decodes an UpdateTableSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluation.decodeDelimited = function decodeDelimited(reader) { + UpdateTableSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModelEvaluation message. + * Verifies an UpdateTableSpecRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelEvaluation.verify = function verify(message) { + UpdateTableSpecRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { - properties.metrics = 1; - { - var error = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.verify(message.classificationEvaluationMetrics); - if (error) - return "classificationEvaluationMetrics." + error; - } - } - if (message.regressionEvaluationMetrics != null && message.hasOwnProperty("regressionEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; - { - var error = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.verify(message.regressionEvaluationMetrics); - if (error) - return "regressionEvaluationMetrics." + error; - } - } - if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; - { - var error = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.verify(message.translationEvaluationMetrics); - if (error) - return "translationEvaluationMetrics." + error; - } - } - if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.verify(message.imageObjectDetectionEvaluationMetrics); - if (error) - return "imageObjectDetectionEvaluationMetrics." + error; - } - } - if (message.videoObjectTrackingEvaluationMetrics != null && message.hasOwnProperty("videoObjectTrackingEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; - { - var error = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.verify(message.videoObjectTrackingEvaluationMetrics); - if (error) - return "videoObjectTrackingEvaluationMetrics." + error; - } - } - if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.verify(message.textSentimentEvaluationMetrics); - if (error) - return "textSentimentEvaluationMetrics." + error; - } - } - if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { - if (properties.metrics === 1) - return "metrics: multiple values"; - properties.metrics = 1; - { - var error = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.verify(message.textExtractionEvaluationMetrics); - if (error) - return "textExtractionEvaluationMetrics." + error; - } + if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { + var error = $root.google.cloud.automl.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"; - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - if (!$util.isString(message.annotationSpecId)) - return "annotationSpecId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "createTime." + error; + return "updateMask." + error; } - if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) - if (!$util.isInteger(message.evaluatedExampleCount)) - return "evaluatedExampleCount: integer expected"; return null; }; /** - * Creates a ModelEvaluation message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTableSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.automl.v1beta1.UpdateTableSpecRequest} UpdateTableSpecRequest */ - ModelEvaluation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ModelEvaluation) + UpdateTableSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.UpdateTableSpecRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.ModelEvaluation(); - if (object.classificationEvaluationMetrics != null) { - if (typeof object.classificationEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.classificationEvaluationMetrics: object expected"); - message.classificationEvaluationMetrics = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.fromObject(object.classificationEvaluationMetrics); - } - if (object.regressionEvaluationMetrics != null) { - if (typeof object.regressionEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.regressionEvaluationMetrics: object expected"); - message.regressionEvaluationMetrics = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.fromObject(object.regressionEvaluationMetrics); - } - if (object.translationEvaluationMetrics != null) { - if (typeof object.translationEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.translationEvaluationMetrics: object expected"); - message.translationEvaluationMetrics = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.fromObject(object.translationEvaluationMetrics); - } - if (object.imageObjectDetectionEvaluationMetrics != null) { - if (typeof object.imageObjectDetectionEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.imageObjectDetectionEvaluationMetrics: object expected"); - message.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.fromObject(object.imageObjectDetectionEvaluationMetrics); - } - if (object.videoObjectTrackingEvaluationMetrics != null) { - if (typeof object.videoObjectTrackingEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.videoObjectTrackingEvaluationMetrics: object expected"); - message.videoObjectTrackingEvaluationMetrics = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.fromObject(object.videoObjectTrackingEvaluationMetrics); - } - if (object.textSentimentEvaluationMetrics != null) { - if (typeof object.textSentimentEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.textSentimentEvaluationMetrics: object expected"); - message.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.fromObject(object.textSentimentEvaluationMetrics); - } - if (object.textExtractionEvaluationMetrics != null) { - if (typeof object.textExtractionEvaluationMetrics !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.textExtractionEvaluationMetrics: object expected"); - message.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.fromObject(object.textExtractionEvaluationMetrics); + var message = new $root.google.cloud.automl.v1beta1.UpdateTableSpecRequest(); + if (object.tableSpec != null) { + if (typeof object.tableSpec !== "object") + throw TypeError(".google.cloud.automl.v1beta1.UpdateTableSpecRequest.tableSpec: object expected"); + message.tableSpec = $root.google.cloud.automl.v1beta1.TableSpec.fromObject(object.tableSpec); } - if (object.name != null) - message.name = String(object.name); - if (object.annotationSpecId != null) - message.annotationSpecId = String(object.annotationSpecId); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ModelEvaluation.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.automl.v1beta1.UpdateTableSpecRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.evaluatedExampleCount != null) - message.evaluatedExampleCount = object.evaluatedExampleCount | 0; return message; }; /** - * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTableSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @static - * @param {google.cloud.automl.v1beta1.ModelEvaluation} message ModelEvaluation + * @param {google.cloud.automl.v1beta1.UpdateTableSpecRequest} message UpdateTableSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelEvaluation.toObject = function toObject(message, options) { + UpdateTableSpecRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.annotationSpecId = ""; - object.createTime = null; - object.evaluatedExampleCount = 0; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.annotationSpecId != null && message.hasOwnProperty("annotationSpecId")) - object.annotationSpecId = message.annotationSpecId; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.evaluatedExampleCount != null && message.hasOwnProperty("evaluatedExampleCount")) - object.evaluatedExampleCount = message.evaluatedExampleCount; - if (message.classificationEvaluationMetrics != null && message.hasOwnProperty("classificationEvaluationMetrics")) { - object.classificationEvaluationMetrics = $root.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.toObject(message.classificationEvaluationMetrics, options); - if (options.oneofs) - object.metrics = "classificationEvaluationMetrics"; - } - if (message.translationEvaluationMetrics != null && message.hasOwnProperty("translationEvaluationMetrics")) { - object.translationEvaluationMetrics = $root.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.toObject(message.translationEvaluationMetrics, options); - if (options.oneofs) - object.metrics = "translationEvaluationMetrics"; - } - if (message.textSentimentEvaluationMetrics != null && message.hasOwnProperty("textSentimentEvaluationMetrics")) { - object.textSentimentEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.toObject(message.textSentimentEvaluationMetrics, options); - if (options.oneofs) - object.metrics = "textSentimentEvaluationMetrics"; - } - if (message.imageObjectDetectionEvaluationMetrics != null && message.hasOwnProperty("imageObjectDetectionEvaluationMetrics")) { - object.imageObjectDetectionEvaluationMetrics = $root.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.toObject(message.imageObjectDetectionEvaluationMetrics, options); - if (options.oneofs) - object.metrics = "imageObjectDetectionEvaluationMetrics"; - } - if (message.textExtractionEvaluationMetrics != null && message.hasOwnProperty("textExtractionEvaluationMetrics")) { - object.textExtractionEvaluationMetrics = $root.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.toObject(message.textExtractionEvaluationMetrics, options); - if (options.oneofs) - object.metrics = "textExtractionEvaluationMetrics"; - } - if (message.videoObjectTrackingEvaluationMetrics != null && message.hasOwnProperty("videoObjectTrackingEvaluationMetrics")) { - object.videoObjectTrackingEvaluationMetrics = $root.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.toObject(message.videoObjectTrackingEvaluationMetrics, options); - if (options.oneofs) - object.metrics = "videoObjectTrackingEvaluationMetrics"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.regressionEvaluationMetrics != null && message.hasOwnProperty("regressionEvaluationMetrics")) { - object.regressionEvaluationMetrics = $root.google.cloud.automl.v1beta1.RegressionEvaluationMetrics.toObject(message.regressionEvaluationMetrics, options); - if (options.oneofs) - object.metrics = "regressionEvaluationMetrics"; + object.tableSpec = null; + object.updateMask = null; } + if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) + object.tableSpec = $root.google.cloud.automl.v1beta1.TableSpec.toObject(message.tableSpec, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ModelEvaluation to JSON. + * Converts this UpdateTableSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ModelEvaluation + * @memberof google.cloud.automl.v1beta1.UpdateTableSpecRequest * @instance * @returns {Object.} JSON object */ - ModelEvaluation.prototype.toJSON = function toJSON() { + UpdateTableSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ModelEvaluation; + return UpdateTableSpecRequest; })(); - v1beta1.OperationMetadata = (function() { + v1beta1.GetColumnSpecRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a GetColumnSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IOperationMetadata - * @property {google.cloud.automl.v1beta1.IDeleteOperationMetadata|null} [deleteDetails] OperationMetadata deleteDetails - * @property {google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null} [deployModelDetails] OperationMetadata deployModelDetails - * @property {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null} [undeployModelDetails] OperationMetadata undeployModelDetails - * @property {google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null} [createModelDetails] OperationMetadata createModelDetails - * @property {google.cloud.automl.v1beta1.IImportDataOperationMetadata|null} [importDataDetails] OperationMetadata importDataDetails - * @property {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null} [batchPredictDetails] OperationMetadata batchPredictDetails - * @property {google.cloud.automl.v1beta1.IExportDataOperationMetadata|null} [exportDataDetails] OperationMetadata exportDataDetails - * @property {google.cloud.automl.v1beta1.IExportModelOperationMetadata|null} [exportModelDetails] OperationMetadata exportModelDetails - * @property {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null} [exportEvaluatedExamplesDetails] OperationMetadata exportEvaluatedExamplesDetails - * @property {number|null} [progressPercent] OperationMetadata progressPercent - * @property {Array.|null} [partialFailures] OperationMetadata partialFailures - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime + * @interface IGetColumnSpecRequest + * @property {string|null} [name] GetColumnSpecRequest name + * @property {google.protobuf.IFieldMask|null} [fieldMask] GetColumnSpecRequest fieldMask */ /** - * Constructs a new OperationMetadata. + * Constructs a new GetColumnSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a GetColumnSpecRequest. + * @implements IGetColumnSpecRequest * @constructor - * @param {google.cloud.automl.v1beta1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { - this.partialFailures = []; + function GetColumnSpecRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52716,248 +53301,88 @@ } /** - * OperationMetadata deleteDetails. - * @member {google.cloud.automl.v1beta1.IDeleteOperationMetadata|null|undefined} deleteDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.deleteDetails = null; - - /** - * OperationMetadata deployModelDetails. - * @member {google.cloud.automl.v1beta1.IDeployModelOperationMetadata|null|undefined} deployModelDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.deployModelDetails = null; - - /** - * OperationMetadata undeployModelDetails. - * @member {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata|null|undefined} undeployModelDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.undeployModelDetails = null; - - /** - * OperationMetadata createModelDetails. - * @member {google.cloud.automl.v1beta1.ICreateModelOperationMetadata|null|undefined} createModelDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createModelDetails = null; - - /** - * OperationMetadata importDataDetails. - * @member {google.cloud.automl.v1beta1.IImportDataOperationMetadata|null|undefined} importDataDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.importDataDetails = null; - - /** - * OperationMetadata batchPredictDetails. - * @member {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata|null|undefined} batchPredictDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.batchPredictDetails = null; - - /** - * OperationMetadata exportDataDetails. - * @member {google.cloud.automl.v1beta1.IExportDataOperationMetadata|null|undefined} exportDataDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.exportDataDetails = null; - - /** - * OperationMetadata exportModelDetails. - * @member {google.cloud.automl.v1beta1.IExportModelOperationMetadata|null|undefined} exportModelDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.exportModelDetails = null; - - /** - * OperationMetadata exportEvaluatedExamplesDetails. - * @member {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata|null|undefined} exportEvaluatedExamplesDetails - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.exportEvaluatedExamplesDetails = null; - - /** - * OperationMetadata progressPercent. - * @member {number} progressPercent - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.progressPercent = 0; - - /** - * OperationMetadata partialFailures. - * @member {Array.} partialFailures - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.partialFailures = $util.emptyArray; - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.automl.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * GetColumnSpecRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @instance */ - OperationMetadata.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GetColumnSpecRequest.prototype.name = ""; /** - * OperationMetadata details. - * @member {"deleteDetails"|"deployModelDetails"|"undeployModelDetails"|"createModelDetails"|"importDataDetails"|"batchPredictDetails"|"exportDataDetails"|"exportModelDetails"|"exportEvaluatedExamplesDetails"|undefined} details - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * GetColumnSpecRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @instance */ - Object.defineProperty(OperationMetadata.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["deleteDetails", "deployModelDetails", "undeployModelDetails", "createModelDetails", "importDataDetails", "batchPredictDetails", "exportDataDetails", "exportModelDetails", "exportEvaluatedExamplesDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetColumnSpecRequest.prototype.fieldMask = null; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new GetColumnSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + GetColumnSpecRequest.create = function create(properties) { + return new GetColumnSpecRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. + * Encodes the specified GetColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} message GetColumnSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + GetColumnSpecRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.partialFailures != null && message.partialFailures.length) - for (var i = 0; i < message.partialFailures.length; ++i) - $root.google.rpc.Status.encode(message.partialFailures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) - $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.encode(message.deleteDetails, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) - $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.encode(message.createModelDetails, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.progressPercent); - if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) - $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.encode(message.importDataDetails, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) - $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.encode(message.batchPredictDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) - $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.encode(message.exportDataDetails, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) - $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.encode(message.exportModelDetails, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) - $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.encode(message.deployModelDetails, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) - $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.encode(message.undeployModelDetails, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.exportEvaluatedExamplesDetails != null && message.hasOwnProperty("exportEvaluatedExamplesDetails")) - $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.encode(message.exportEvaluatedExamplesDetails, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.OperationMetadata.verify|verify} messages. + * Encodes the specified GetColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetColumnSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetColumnSpecRequest} message GetColumnSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetColumnSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a GetColumnSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata + * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + GetColumnSpecRequest.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.automl.v1beta1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GetColumnSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - message.deleteDetails = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.decode(reader, reader.uint32()); - break; - case 24: - message.deployModelDetails = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.decode(reader, reader.uint32()); - break; - case 25: - message.undeployModelDetails = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.decode(reader, reader.uint32()); - break; - case 10: - message.createModelDetails = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.decode(reader, reader.uint32()); - break; - case 15: - message.importDataDetails = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.decode(reader, reader.uint32()); - break; - case 16: - message.batchPredictDetails = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.decode(reader, reader.uint32()); - break; - case 21: - message.exportDataDetails = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.decode(reader, reader.uint32()); - break; - case 22: - message.exportModelDetails = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.decode(reader, reader.uint32()); - break; - case 26: - message.exportEvaluatedExamplesDetails = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.decode(reader, reader.uint32()); - break; - case 13: - message.progressPercent = reader.int32(); + case 1: + message.name = reader.string(); break; case 2: - if (!(message.partialFailures && message.partialFailures.length)) - message.partialFailures = []; - message.partialFailures.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; - case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -52968,338 +53393,125 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetColumnSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata + * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + GetColumnSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a GetColumnSpecRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + GetColumnSpecRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.verify(message.deleteDetails); - if (error) - return "deleteDetails." + error; - } - } - if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify(message.deployModelDetails); - if (error) - return "deployModelDetails." + error; - } - } - if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify(message.undeployModelDetails); - if (error) - return "undeployModelDetails." + error; - } - } - if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify(message.createModelDetails); - if (error) - return "createModelDetails." + error; - } - } - if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify(message.importDataDetails); - if (error) - return "importDataDetails." + error; - } - } - if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify(message.batchPredictDetails); - if (error) - return "batchPredictDetails." + error; - } - } - if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify(message.exportDataDetails); - if (error) - return "exportDataDetails." + error; - } - } - if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify(message.exportModelDetails); - if (error) - return "exportModelDetails." + error; - } - } - if (message.exportEvaluatedExamplesDetails != null && message.hasOwnProperty("exportEvaluatedExamplesDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify(message.exportEvaluatedExamplesDetails); - if (error) - return "exportEvaluatedExamplesDetails." + error; - } - } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - if (!$util.isInteger(message.progressPercent)) - return "progressPercent: integer expected"; - if (message.partialFailures != null && message.hasOwnProperty("partialFailures")) { - if (!Array.isArray(message.partialFailures)) - return "partialFailures: array expected"; - for (var i = 0; i < message.partialFailures.length; ++i) { - var error = $root.google.rpc.Status.verify(message.partialFailures[i]); - if (error) - return "partialFailures." + error; - } - } - 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 (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) - return "updateTime." + error; + return "fieldMask." + error; } return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetColumnSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.OperationMetadata} OperationMetadata + * @returns {google.cloud.automl.v1beta1.GetColumnSpecRequest} GetColumnSpecRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.OperationMetadata) + GetColumnSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GetColumnSpecRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.OperationMetadata(); - if (object.deleteDetails != null) { - if (typeof object.deleteDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.deleteDetails: object expected"); - message.deleteDetails = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.fromObject(object.deleteDetails); - } - if (object.deployModelDetails != null) { - if (typeof object.deployModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.deployModelDetails: object expected"); - message.deployModelDetails = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.fromObject(object.deployModelDetails); - } - if (object.undeployModelDetails != null) { - if (typeof object.undeployModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.undeployModelDetails: object expected"); - message.undeployModelDetails = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.fromObject(object.undeployModelDetails); - } - if (object.createModelDetails != null) { - if (typeof object.createModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.createModelDetails: object expected"); - message.createModelDetails = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.fromObject(object.createModelDetails); - } - if (object.importDataDetails != null) { - if (typeof object.importDataDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.importDataDetails: object expected"); - message.importDataDetails = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.fromObject(object.importDataDetails); - } - if (object.batchPredictDetails != null) { - if (typeof object.batchPredictDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.batchPredictDetails: object expected"); - message.batchPredictDetails = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.fromObject(object.batchPredictDetails); - } - if (object.exportDataDetails != null) { - if (typeof object.exportDataDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.exportDataDetails: object expected"); - message.exportDataDetails = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.fromObject(object.exportDataDetails); - } - if (object.exportModelDetails != null) { - if (typeof object.exportModelDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.exportModelDetails: object expected"); - message.exportModelDetails = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.fromObject(object.exportModelDetails); - } - if (object.exportEvaluatedExamplesDetails != null) { - if (typeof object.exportEvaluatedExamplesDetails !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.exportEvaluatedExamplesDetails: object expected"); - message.exportEvaluatedExamplesDetails = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.fromObject(object.exportEvaluatedExamplesDetails); - } - if (object.progressPercent != null) - message.progressPercent = object.progressPercent | 0; - if (object.partialFailures) { - if (!Array.isArray(object.partialFailures)) - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.partialFailures: array expected"); - message.partialFailures = []; - for (var i = 0; i < object.partialFailures.length; ++i) { - if (typeof object.partialFailures[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.partialFailures: object expected"); - message.partialFailures[i] = $root.google.rpc.Status.fromObject(object.partialFailures[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.automl.v1beta1.OperationMetadata.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.automl.v1beta1.OperationMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + var message = new $root.google.cloud.automl.v1beta1.GetColumnSpecRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.automl.v1beta1.GetColumnSpecRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); } return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a GetColumnSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.OperationMetadata} message OperationMetadata + * @param {google.cloud.automl.v1beta1.GetColumnSpecRequest} message GetColumnSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + GetColumnSpecRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.partialFailures = []; if (options.defaults) { - object.createTime = null; - object.updateTime = null; - object.progressPercent = 0; - } - if (message.partialFailures && message.partialFailures.length) { - object.partialFailures = []; - for (var j = 0; j < message.partialFailures.length; ++j) - object.partialFailures[j] = $root.google.rpc.Status.toObject(message.partialFailures[j], options); - } - 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.deleteDetails != null && message.hasOwnProperty("deleteDetails")) { - object.deleteDetails = $root.google.cloud.automl.v1beta1.DeleteOperationMetadata.toObject(message.deleteDetails, options); - if (options.oneofs) - object.details = "deleteDetails"; - } - if (message.createModelDetails != null && message.hasOwnProperty("createModelDetails")) { - object.createModelDetails = $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata.toObject(message.createModelDetails, options); - if (options.oneofs) - object.details = "createModelDetails"; - } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - object.progressPercent = message.progressPercent; - if (message.importDataDetails != null && message.hasOwnProperty("importDataDetails")) { - object.importDataDetails = $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata.toObject(message.importDataDetails, options); - if (options.oneofs) - object.details = "importDataDetails"; - } - if (message.batchPredictDetails != null && message.hasOwnProperty("batchPredictDetails")) { - object.batchPredictDetails = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.toObject(message.batchPredictDetails, options); - if (options.oneofs) - object.details = "batchPredictDetails"; - } - if (message.exportDataDetails != null && message.hasOwnProperty("exportDataDetails")) { - object.exportDataDetails = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.toObject(message.exportDataDetails, options); - if (options.oneofs) - object.details = "exportDataDetails"; - } - if (message.exportModelDetails != null && message.hasOwnProperty("exportModelDetails")) { - object.exportModelDetails = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.toObject(message.exportModelDetails, options); - if (options.oneofs) - object.details = "exportModelDetails"; - } - if (message.deployModelDetails != null && message.hasOwnProperty("deployModelDetails")) { - object.deployModelDetails = $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata.toObject(message.deployModelDetails, options); - if (options.oneofs) - object.details = "deployModelDetails"; - } - if (message.undeployModelDetails != null && message.hasOwnProperty("undeployModelDetails")) { - object.undeployModelDetails = $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.toObject(message.undeployModelDetails, options); - if (options.oneofs) - object.details = "undeployModelDetails"; - } - if (message.exportEvaluatedExamplesDetails != null && message.hasOwnProperty("exportEvaluatedExamplesDetails")) { - object.exportEvaluatedExamplesDetails = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.toObject(message.exportEvaluatedExamplesDetails, options); - if (options.oneofs) - object.details = "exportEvaluatedExamplesDetails"; + object.name = ""; + object.fieldMask = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this GetColumnSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.OperationMetadata + * @memberof google.cloud.automl.v1beta1.GetColumnSpecRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + GetColumnSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OperationMetadata; + return GetColumnSpecRequest; })(); - v1beta1.DeleteOperationMetadata = (function() { + v1beta1.ListColumnSpecsRequest = (function() { /** - * Properties of a DeleteOperationMetadata. + * Properties of a ListColumnSpecsRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IDeleteOperationMetadata + * @interface IListColumnSpecsRequest + * @property {string|null} [parent] ListColumnSpecsRequest parent + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListColumnSpecsRequest fieldMask + * @property {string|null} [filter] ListColumnSpecsRequest filter + * @property {number|null} [pageSize] ListColumnSpecsRequest pageSize + * @property {string|null} [pageToken] ListColumnSpecsRequest pageToken */ /** - * Constructs a new DeleteOperationMetadata. + * Constructs a new ListColumnSpecsRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DeleteOperationMetadata. - * @implements IDeleteOperationMetadata + * @classdesc Represents a ListColumnSpecsRequest. + * @implements IListColumnSpecsRequest * @constructor - * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest=} [properties] Properties to set */ - function DeleteOperationMetadata(properties) { + function ListColumnSpecsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53307,63 +53519,128 @@ } /** - * Creates a new DeleteOperationMetadata instance using the specified properties. + * ListColumnSpecsRequest parent. + * @member {string} parent + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @instance + */ + ListColumnSpecsRequest.prototype.parent = ""; + + /** + * ListColumnSpecsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @instance + */ + ListColumnSpecsRequest.prototype.fieldMask = null; + + /** + * ListColumnSpecsRequest filter. + * @member {string} filter + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @instance + */ + ListColumnSpecsRequest.prototype.filter = ""; + + /** + * ListColumnSpecsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @instance + */ + ListColumnSpecsRequest.prototype.pageSize = 0; + + /** + * ListColumnSpecsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest + * @instance + */ + ListColumnSpecsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListColumnSpecsRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest instance */ - DeleteOperationMetadata.create = function create(properties) { - return new DeleteOperationMetadata(properties); + ListColumnSpecsRequest.create = function create(properties) { + return new ListColumnSpecsRequest(properties); }; /** - * Encodes the specified DeleteOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. + * Encodes the specified ListColumnSpecsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} message ListColumnSpecsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationMetadata.encode = function encode(message, writer) { + ListColumnSpecsRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); return writer; }; /** - * Encodes the specified DeleteOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteOperationMetadata.verify|verify} messages. + * Encodes the specified ListColumnSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.IDeleteOperationMetadata} message DeleteOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListColumnSpecsRequest} message ListColumnSpecsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListColumnSpecsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer. + * Decodes a ListColumnSpecsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOperationMetadata.decode = function decode(reader, length) { + ListColumnSpecsRequest.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.automl.v1beta1.DeleteOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListColumnSpecsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 6: + message.pageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -53373,93 +53650,147 @@ }; /** - * Decodes a DeleteOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListColumnSpecsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ListColumnSpecsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteOperationMetadata message. + * Verifies a ListColumnSpecsRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteOperationMetadata.verify = function verify(message) { + ListColumnSpecsRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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 DeleteOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListColumnSpecsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DeleteOperationMetadata} DeleteOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsRequest} ListColumnSpecsRequest */ - DeleteOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DeleteOperationMetadata) + ListColumnSpecsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListColumnSpecsRequest) return object; - return new $root.google.cloud.automl.v1beta1.DeleteOperationMetadata(); + var message = new $root.google.cloud.automl.v1beta1.ListColumnSpecsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ListColumnSpecsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + if (object.filter != null) + message.filter = String(object.filter); + 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 DeleteOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListColumnSpecsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @static - * @param {google.cloud.automl.v1beta1.DeleteOperationMetadata} message DeleteOperationMetadata + * @param {google.cloud.automl.v1beta1.ListColumnSpecsRequest} message ListColumnSpecsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOperationMetadata.toObject = function toObject() { - return {}; + ListColumnSpecsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.fieldMask = null; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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 DeleteOperationMetadata to JSON. + * Converts this ListColumnSpecsRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DeleteOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsRequest * @instance * @returns {Object.} JSON object */ - DeleteOperationMetadata.prototype.toJSON = function toJSON() { + ListColumnSpecsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteOperationMetadata; + return ListColumnSpecsRequest; })(); - v1beta1.DeployModelOperationMetadata = (function() { + v1beta1.ListColumnSpecsResponse = (function() { /** - * Properties of a DeployModelOperationMetadata. + * Properties of a ListColumnSpecsResponse. * @memberof google.cloud.automl.v1beta1 - * @interface IDeployModelOperationMetadata + * @interface IListColumnSpecsResponse + * @property {Array.|null} [columnSpecs] ListColumnSpecsResponse columnSpecs + * @property {string|null} [nextPageToken] ListColumnSpecsResponse nextPageToken */ /** - * Constructs a new DeployModelOperationMetadata. + * Constructs a new ListColumnSpecsResponse. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a DeployModelOperationMetadata. - * @implements IDeployModelOperationMetadata + * @classdesc Represents a ListColumnSpecsResponse. + * @implements IListColumnSpecsResponse * @constructor - * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse=} [properties] Properties to set */ - function DeployModelOperationMetadata(properties) { + function ListColumnSpecsResponse(properties) { + this.columnSpecs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53467,63 +53798,92 @@ } /** - * Creates a new DeployModelOperationMetadata instance using the specified properties. + * ListColumnSpecsResponse columnSpecs. + * @member {Array.} columnSpecs + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse + * @instance + */ + ListColumnSpecsResponse.prototype.columnSpecs = $util.emptyArray; + + /** + * ListColumnSpecsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse + * @instance + */ + ListColumnSpecsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListColumnSpecsResponse instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static - * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse instance */ - DeployModelOperationMetadata.create = function create(properties) { - return new DeployModelOperationMetadata(properties); + ListColumnSpecsResponse.create = function create(properties) { + return new ListColumnSpecsResponse(properties); }; /** - * Encodes the specified DeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. + * Encodes the specified ListColumnSpecsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static - * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse} message ListColumnSpecsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployModelOperationMetadata.encode = function encode(message, writer) { + ListColumnSpecsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.columnSpecs != null && message.columnSpecs.length) + for (var i = 0; i < message.columnSpecs.length; ++i) + $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.columnSpecs[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 DeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelOperationMetadata.verify|verify} messages. + * Encodes the specified ListColumnSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListColumnSpecsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static - * @param {google.cloud.automl.v1beta1.IDeployModelOperationMetadata} message DeployModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListColumnSpecsResponse} message ListColumnSpecsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListColumnSpecsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer. + * Decodes a ListColumnSpecsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployModelOperationMetadata.decode = function decode(reader, length) { + ListColumnSpecsResponse.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.automl.v1beta1.DeployModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListColumnSpecsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.columnSpecs && message.columnSpecs.length)) + message.columnSpecs = []; + message.columnSpecs.push($root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -53533,93 +53893,134 @@ }; /** - * Decodes a DeployModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListColumnSpecsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ListColumnSpecsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployModelOperationMetadata message. + * Verifies a ListColumnSpecsResponse message. * @function verify - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployModelOperationMetadata.verify = function verify(message) { + ListColumnSpecsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.columnSpecs != null && message.hasOwnProperty("columnSpecs")) { + if (!Array.isArray(message.columnSpecs)) + return "columnSpecs: array expected"; + for (var i = 0; i < message.columnSpecs.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.columnSpecs[i]); + if (error) + return "columnSpecs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListColumnSpecsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.DeployModelOperationMetadata} DeployModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListColumnSpecsResponse} ListColumnSpecsResponse */ - DeployModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata) + ListColumnSpecsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListColumnSpecsResponse) return object; - return new $root.google.cloud.automl.v1beta1.DeployModelOperationMetadata(); + var message = new $root.google.cloud.automl.v1beta1.ListColumnSpecsResponse(); + if (object.columnSpecs) { + if (!Array.isArray(object.columnSpecs)) + throw TypeError(".google.cloud.automl.v1beta1.ListColumnSpecsResponse.columnSpecs: array expected"); + message.columnSpecs = []; + for (var i = 0; i < object.columnSpecs.length; ++i) { + if (typeof object.columnSpecs[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ListColumnSpecsResponse.columnSpecs: object expected"); + message.columnSpecs[i] = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.columnSpecs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; }; /** - * Creates a plain object from a DeployModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListColumnSpecsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @static - * @param {google.cloud.automl.v1beta1.DeployModelOperationMetadata} message DeployModelOperationMetadata + * @param {google.cloud.automl.v1beta1.ListColumnSpecsResponse} message ListColumnSpecsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployModelOperationMetadata.toObject = function toObject() { - return {}; + ListColumnSpecsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columnSpecs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.columnSpecs && message.columnSpecs.length) { + object.columnSpecs = []; + for (var j = 0; j < message.columnSpecs.length; ++j) + object.columnSpecs[j] = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.columnSpecs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; }; /** - * Converts this DeployModelOperationMetadata to JSON. + * Converts this ListColumnSpecsResponse to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.DeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListColumnSpecsResponse * @instance * @returns {Object.} JSON object */ - DeployModelOperationMetadata.prototype.toJSON = function toJSON() { + ListColumnSpecsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeployModelOperationMetadata; + return ListColumnSpecsResponse; })(); - v1beta1.UndeployModelOperationMetadata = (function() { + v1beta1.UpdateColumnSpecRequest = (function() { /** - * Properties of an UndeployModelOperationMetadata. + * Properties of an UpdateColumnSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IUndeployModelOperationMetadata + * @interface IUpdateColumnSpecRequest + * @property {google.cloud.automl.v1beta1.IColumnSpec|null} [columnSpec] UpdateColumnSpecRequest columnSpec + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateColumnSpecRequest updateMask */ /** - * Constructs a new UndeployModelOperationMetadata. + * Constructs a new UpdateColumnSpecRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an UndeployModelOperationMetadata. - * @implements IUndeployModelOperationMetadata + * @classdesc Represents an UpdateColumnSpecRequest. + * @implements IUpdateColumnSpecRequest * @constructor - * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest=} [properties] Properties to set */ - function UndeployModelOperationMetadata(properties) { + function UpdateColumnSpecRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53627,63 +54028,89 @@ } /** - * Creates a new UndeployModelOperationMetadata instance using the specified properties. + * UpdateColumnSpecRequest columnSpec. + * @member {google.cloud.automl.v1beta1.IColumnSpec|null|undefined} columnSpec + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @instance + */ + UpdateColumnSpecRequest.prototype.columnSpec = null; + + /** + * UpdateColumnSpecRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest + * @instance + */ + UpdateColumnSpecRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateColumnSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest instance */ - UndeployModelOperationMetadata.create = function create(properties) { - return new UndeployModelOperationMetadata(properties); + UpdateColumnSpecRequest.create = function create(properties) { + return new UpdateColumnSpecRequest(properties); }; /** - * Encodes the specified UndeployModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. + * Encodes the specified UpdateColumnSpecRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} message UpdateColumnSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployModelOperationMetadata.encode = function encode(message, writer) { + UpdateColumnSpecRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.columnSpec != null && message.hasOwnProperty("columnSpec")) + $root.google.cloud.automl.v1beta1.ColumnSpec.encode(message.columnSpec, 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 UndeployModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelOperationMetadata.verify|verify} messages. + * Encodes the specified UpdateColumnSpecRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UpdateColumnSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.IUndeployModelOperationMetadata} message UndeployModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUpdateColumnSpecRequest} message UpdateColumnSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdateColumnSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer. + * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployModelOperationMetadata.decode = function decode(reader, length) { + UpdateColumnSpecRequest.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.automl.v1beta1.UndeployModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.UpdateColumnSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.columnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -53693,93 +54120,127 @@ }; /** - * Decodes an UndeployModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateColumnSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + UpdateColumnSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UndeployModelOperationMetadata message. + * Verifies an UpdateColumnSpecRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UndeployModelOperationMetadata.verify = function verify(message) { + UpdateColumnSpecRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.columnSpec != null && message.hasOwnProperty("columnSpec")) { + var error = $root.google.cloud.automl.v1beta1.ColumnSpec.verify(message.columnSpec); + if (error) + return "columnSpec." + 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 UndeployModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateColumnSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} UndeployModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} UpdateColumnSpecRequest */ - UndeployModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) + UpdateColumnSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.UpdateColumnSpecRequest) return object; - return new $root.google.cloud.automl.v1beta1.UndeployModelOperationMetadata(); + var message = new $root.google.cloud.automl.v1beta1.UpdateColumnSpecRequest(); + if (object.columnSpec != null) { + if (typeof object.columnSpec !== "object") + throw TypeError(".google.cloud.automl.v1beta1.UpdateColumnSpecRequest.columnSpec: object expected"); + message.columnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.fromObject(object.columnSpec); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.automl.v1beta1.UpdateColumnSpecRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; }; /** - * Creates a plain object from an UndeployModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an UpdateColumnSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @static - * @param {google.cloud.automl.v1beta1.UndeployModelOperationMetadata} message UndeployModelOperationMetadata + * @param {google.cloud.automl.v1beta1.UpdateColumnSpecRequest} message UpdateColumnSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeployModelOperationMetadata.toObject = function toObject() { - return {}; + UpdateColumnSpecRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.columnSpec = null; + object.updateMask = null; + } + if (message.columnSpec != null && message.hasOwnProperty("columnSpec")) + object.columnSpec = $root.google.cloud.automl.v1beta1.ColumnSpec.toObject(message.columnSpec, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; }; /** - * Converts this UndeployModelOperationMetadata to JSON. + * Converts this UpdateColumnSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.UndeployModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.UpdateColumnSpecRequest * @instance * @returns {Object.} JSON object */ - UndeployModelOperationMetadata.prototype.toJSON = function toJSON() { + UpdateColumnSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UndeployModelOperationMetadata; + return UpdateColumnSpecRequest; })(); - v1beta1.CreateModelOperationMetadata = (function() { + v1beta1.CreateModelRequest = (function() { /** - * Properties of a CreateModelOperationMetadata. + * Properties of a CreateModelRequest. * @memberof google.cloud.automl.v1beta1 - * @interface ICreateModelOperationMetadata + * @interface ICreateModelRequest + * @property {string|null} [parent] CreateModelRequest parent + * @property {google.cloud.automl.v1beta1.IModel|null} [model] CreateModelRequest model */ /** - * Constructs a new CreateModelOperationMetadata. + * Constructs a new CreateModelRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a CreateModelOperationMetadata. - * @implements ICreateModelOperationMetadata + * @classdesc Represents a CreateModelRequest. + * @implements ICreateModelRequest * @constructor - * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ICreateModelRequest=} [properties] Properties to set */ - function CreateModelOperationMetadata(properties) { + function CreateModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53787,63 +54248,89 @@ } /** - * Creates a new CreateModelOperationMetadata instance using the specified properties. + * CreateModelRequest parent. + * @member {string} parent + * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @instance + */ + CreateModelRequest.prototype.parent = ""; + + /** + * CreateModelRequest model. + * @member {google.cloud.automl.v1beta1.IModel|null|undefined} model + * @memberof google.cloud.automl.v1beta1.CreateModelRequest + * @instance + */ + CreateModelRequest.prototype.model = null; + + /** + * Creates a new CreateModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static - * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata instance + * @param {google.cloud.automl.v1beta1.ICreateModelRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest instance */ - CreateModelOperationMetadata.create = function create(properties) { - return new CreateModelOperationMetadata(properties); + CreateModelRequest.create = function create(properties) { + return new CreateModelRequest(properties); }; /** - * Encodes the specified CreateModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. + * Encodes the specified CreateModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static - * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICreateModelRequest} message CreateModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateModelOperationMetadata.encode = function encode(message, writer) { + CreateModelRequest.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.model != null && message.hasOwnProperty("model")) + $root.google.cloud.automl.v1beta1.Model.encode(message.model, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelOperationMetadata.verify|verify} messages. + * Encodes the specified CreateModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.CreateModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static - * @param {google.cloud.automl.v1beta1.ICreateModelOperationMetadata} message CreateModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.ICreateModelRequest} message CreateModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer. + * Decodes a CreateModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateModelOperationMetadata.decode = function decode(reader, length) { + CreateModelRequest.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.automl.v1beta1.CreateModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.CreateModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 4: + message.model = $root.google.cloud.automl.v1beta1.Model.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -53853,93 +54340,121 @@ }; /** - * Decodes a CreateModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateModelOperationMetadata message. + * Verifies a CreateModelRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateModelOperationMetadata.verify = function verify(message) { + CreateModelRequest.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.model != null && message.hasOwnProperty("model")) { + var error = $root.google.cloud.automl.v1beta1.Model.verify(message.model); + if (error) + return "model." + error; + } return null; }; /** - * Creates a CreateModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.CreateModelOperationMetadata} CreateModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.CreateModelRequest} CreateModelRequest */ - CreateModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata) + CreateModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.CreateModelRequest) return object; - return new $root.google.cloud.automl.v1beta1.CreateModelOperationMetadata(); + var message = new $root.google.cloud.automl.v1beta1.CreateModelRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.model != null) { + if (typeof object.model !== "object") + throw TypeError(".google.cloud.automl.v1beta1.CreateModelRequest.model: object expected"); + message.model = $root.google.cloud.automl.v1beta1.Model.fromObject(object.model); + } + return message; }; /** - * Creates a plain object from a CreateModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateModelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @static - * @param {google.cloud.automl.v1beta1.CreateModelOperationMetadata} message CreateModelOperationMetadata + * @param {google.cloud.automl.v1beta1.CreateModelRequest} message CreateModelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateModelOperationMetadata.toObject = function toObject() { - return {}; + CreateModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.model = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.model != null && message.hasOwnProperty("model")) + object.model = $root.google.cloud.automl.v1beta1.Model.toObject(message.model, options); + return object; }; /** - * Converts this CreateModelOperationMetadata to JSON. + * Converts this CreateModelRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.CreateModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.CreateModelRequest * @instance * @returns {Object.} JSON object */ - CreateModelOperationMetadata.prototype.toJSON = function toJSON() { + CreateModelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateModelOperationMetadata; + return CreateModelRequest; })(); - v1beta1.ImportDataOperationMetadata = (function() { + v1beta1.GetModelRequest = (function() { /** - * Properties of an ImportDataOperationMetadata. + * Properties of a GetModelRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IImportDataOperationMetadata + * @interface IGetModelRequest + * @property {string|null} [name] GetModelRequest name */ /** - * Constructs a new ImportDataOperationMetadata. + * Constructs a new GetModelRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ImportDataOperationMetadata. - * @implements IImportDataOperationMetadata + * @classdesc Represents a GetModelRequest. + * @implements IGetModelRequest * @constructor - * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGetModelRequest=} [properties] Properties to set */ - function ImportDataOperationMetadata(properties) { + function GetModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53947,63 +54462,76 @@ } /** - * Creates a new ImportDataOperationMetadata instance using the specified properties. + * GetModelRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.GetModelRequest + * @instance + */ + GetModelRequest.prototype.name = ""; + + /** + * Creates a new GetModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static - * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IGetModelRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest instance */ - ImportDataOperationMetadata.create = function create(properties) { - return new ImportDataOperationMetadata(properties); + GetModelRequest.create = function create(properties) { + return new GetModelRequest(properties); }; /** - * Encodes the specified ImportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. + * Encodes the specified GetModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static - * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetModelRequest} message GetModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDataOperationMetadata.encode = function encode(message, writer) { + GetModelRequest.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 ImportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ImportDataOperationMetadata.verify|verify} messages. + * Encodes the specified GetModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static - * @param {google.cloud.automl.v1beta1.IImportDataOperationMetadata} message ImportDataOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetModelRequest} message GetModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer. + * Decodes a GetModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata + * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDataOperationMetadata.decode = function decode(reader, length) { + GetModelRequest.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.automl.v1beta1.ImportDataOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GetModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -54013,94 +54541,110 @@ }; /** - * Decodes an ImportDataOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata + * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + GetModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDataOperationMetadata message. + * Verifies a GetModelRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDataOperationMetadata.verify = function verify(message) { + GetModelRequest.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 an ImportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ImportDataOperationMetadata} ImportDataOperationMetadata + * @returns {google.cloud.automl.v1beta1.GetModelRequest} GetModelRequest */ - ImportDataOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata) + GetModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GetModelRequest) return object; - return new $root.google.cloud.automl.v1beta1.ImportDataOperationMetadata(); + var message = new $root.google.cloud.automl.v1beta1.GetModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from an ImportDataOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @static - * @param {google.cloud.automl.v1beta1.ImportDataOperationMetadata} message ImportDataOperationMetadata + * @param {google.cloud.automl.v1beta1.GetModelRequest} message GetModelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDataOperationMetadata.toObject = function toObject() { - return {}; + GetModelRequest.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 ImportDataOperationMetadata to JSON. + * Converts this GetModelRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ImportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.GetModelRequest * @instance * @returns {Object.} JSON object */ - ImportDataOperationMetadata.prototype.toJSON = function toJSON() { + GetModelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImportDataOperationMetadata; + return GetModelRequest; })(); - v1beta1.ExportDataOperationMetadata = (function() { + v1beta1.ListModelsRequest = (function() { /** - * Properties of an ExportDataOperationMetadata. + * Properties of a ListModelsRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IExportDataOperationMetadata - * @property {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null} [outputInfo] ExportDataOperationMetadata outputInfo + * @interface IListModelsRequest + * @property {string|null} [parent] ListModelsRequest parent + * @property {string|null} [filter] ListModelsRequest filter + * @property {number|null} [pageSize] ListModelsRequest pageSize + * @property {string|null} [pageToken] ListModelsRequest pageToken */ /** - * Constructs a new ExportDataOperationMetadata. + * Constructs a new ListModelsRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExportDataOperationMetadata. - * @implements IExportDataOperationMetadata + * @classdesc Represents a ListModelsRequest. + * @implements IListModelsRequest * @constructor - * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListModelsRequest=} [properties] Properties to set */ - function ExportDataOperationMetadata(properties) { + function ListModelsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54108,75 +54652,114 @@ } /** - * ExportDataOperationMetadata outputInfo. - * @member {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo|null|undefined} outputInfo - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * ListModelsRequest parent. + * @member {string} parent + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @instance */ - ExportDataOperationMetadata.prototype.outputInfo = null; + ListModelsRequest.prototype.parent = ""; /** - * Creates a new ExportDataOperationMetadata instance using the specified properties. + * ListModelsRequest filter. + * @member {string} filter + * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @instance + */ + ListModelsRequest.prototype.filter = ""; + + /** + * ListModelsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @instance + */ + ListModelsRequest.prototype.pageSize = 0; + + /** + * ListModelsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @instance + */ + ListModelsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListModelsRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static - * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IListModelsRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest instance */ - ExportDataOperationMetadata.create = function create(properties) { - return new ExportDataOperationMetadata(properties); + ListModelsRequest.create = function create(properties) { + return new ListModelsRequest(properties); }; /** - * Encodes the specified ExportDataOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. + * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static - * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelsRequest} message ListModelsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportDataOperationMetadata.encode = function encode(message, writer) { + ListModelsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.encode(message.outputInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); return writer; }; /** - * Encodes the specified ExportDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.verify|verify} messages. + * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static - * @param {google.cloud.automl.v1beta1.IExportDataOperationMetadata} message ExportDataOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelsRequest} message ListModelsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListModelsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer. + * Decodes a ListModelsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportDataOperationMetadata.decode = function decode(reader, length) { + ListModelsRequest.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.automl.v1beta1.ExportDataOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListModelsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.outputInfo = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 6: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -54187,346 +54770,134 @@ }; /** - * Decodes an ExportDataOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ListModelsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportDataOperationMetadata message. + * Verifies a ListModelsRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportDataOperationMetadata.verify = function verify(message) { + ListModelsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { - var error = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify(message.outputInfo); - if (error) - return "outputInfo." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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 an ExportDataOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata} ExportDataOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListModelsRequest} ListModelsRequest */ - ExportDataOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata) + ListModelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListModelsRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata(); - if (object.outputInfo != null) { - if (typeof object.outputInfo !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExportDataOperationMetadata.outputInfo: object expected"); - message.outputInfo = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.fromObject(object.outputInfo); - } + var message = new $root.google.cloud.automl.v1beta1.ListModelsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + 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 an ExportDataOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsRequest * @static - * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata} message ExportDataOperationMetadata + * @param {google.cloud.automl.v1beta1.ListModelsRequest} message ListModelsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportDataOperationMetadata.toObject = function toObject(message, options) { + ListModelsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.outputInfo = null; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - object.outputInfo = $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.toObject(message.outputInfo, options); - return object; - }; - - /** - * Converts this ExportDataOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - ExportDataOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - ExportDataOperationMetadata.ExportDataOutputInfo = (function() { - - /** - * Properties of an ExportDataOutputInfo. - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata - * @interface IExportDataOutputInfo - * @property {string|null} [gcsOutputDirectory] ExportDataOutputInfo gcsOutputDirectory - * @property {string|null} [bigqueryOutputDataset] ExportDataOutputInfo bigqueryOutputDataset - */ - - /** - * Constructs a new ExportDataOutputInfo. - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata - * @classdesc Represents an ExportDataOutputInfo. - * @implements IExportDataOutputInfo - * @constructor - * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set - */ - function ExportDataOutputInfo(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]]; - } - - /** - * ExportDataOutputInfo gcsOutputDirectory. - * @member {string} gcsOutputDirectory - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @instance - */ - ExportDataOutputInfo.prototype.gcsOutputDirectory = ""; - - /** - * ExportDataOutputInfo bigqueryOutputDataset. - * @member {string} bigqueryOutputDataset - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @instance - */ - ExportDataOutputInfo.prototype.bigqueryOutputDataset = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportDataOutputInfo outputLocation. - * @member {"gcsOutputDirectory"|"bigqueryOutputDataset"|undefined} outputLocation - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @instance - */ - Object.defineProperty(ExportDataOutputInfo.prototype, "outputLocation", { - get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory", "bigqueryOutputDataset"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExportDataOutputInfo instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo instance - */ - ExportDataOutputInfo.create = function create(properties) { - return new ExportDataOutputInfo(properties); - }; - - /** - * Encodes the specified ExportDataOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportDataOutputInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryOutputDataset); - return writer; - }; - - /** - * Encodes the specified ExportDataOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.IExportDataOutputInfo} message ExportDataOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportDataOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportDataOutputInfo.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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gcsOutputDirectory = reader.string(); - break; - case 2: - message.bigqueryOutputDataset = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportDataOutputInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportDataOutputInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportDataOutputInfo message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportDataOutputInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - properties.outputLocation = 1; - if (!$util.isString(message.gcsOutputDirectory)) - return "gcsOutputDirectory: string expected"; - } - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { - if (properties.outputLocation === 1) - return "outputLocation: multiple values"; - properties.outputLocation = 1; - if (!$util.isString(message.bigqueryOutputDataset)) - return "bigqueryOutputDataset: string expected"; - } - return null; - }; - - /** - * Creates an ExportDataOutputInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} ExportDataOutputInfo - */ - ExportDataOutputInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - return object; - var message = new $root.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo(); - if (object.gcsOutputDirectory != null) - message.gcsOutputDirectory = String(object.gcsOutputDirectory); - if (object.bigqueryOutputDataset != null) - message.bigqueryOutputDataset = String(object.bigqueryOutputDataset); - return message; - }; - - /** - * Creates a plain object from an ExportDataOutputInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} message ExportDataOutputInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportDataOutputInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - object.gcsOutputDirectory = message.gcsOutputDirectory; - if (options.oneofs) - object.outputLocation = "gcsOutputDirectory"; - } - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { - object.bigqueryOutputDataset = message.bigqueryOutputDataset; - if (options.oneofs) - object.outputLocation = "bigqueryOutputDataset"; - } - return object; - }; - - /** - * Converts this ExportDataOutputInfo to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - * @instance - * @returns {Object.} JSON object - */ - ExportDataOutputInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - return ExportDataOutputInfo; - })(); + /** + * Converts this ListModelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ListModelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListModelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ExportDataOperationMetadata; + return ListModelsRequest; })(); - v1beta1.BatchPredictOperationMetadata = (function() { + v1beta1.ListModelsResponse = (function() { /** - * Properties of a BatchPredictOperationMetadata. + * Properties of a ListModelsResponse. * @memberof google.cloud.automl.v1beta1 - * @interface IBatchPredictOperationMetadata - * @property {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictOperationMetadata inputConfig - * @property {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null} [outputInfo] BatchPredictOperationMetadata outputInfo + * @interface IListModelsResponse + * @property {Array.|null} [model] ListModelsResponse model + * @property {string|null} [nextPageToken] ListModelsResponse nextPageToken */ /** - * Constructs a new BatchPredictOperationMetadata. + * Constructs a new ListModelsResponse. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BatchPredictOperationMetadata. - * @implements IBatchPredictOperationMetadata + * @classdesc Represents a ListModelsResponse. + * @implements IListModelsResponse * @constructor - * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListModelsResponse=} [properties] Properties to set */ - function BatchPredictOperationMetadata(properties) { + function ListModelsResponse(properties) { + this.model = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54534,88 +54905,91 @@ } /** - * BatchPredictOperationMetadata inputConfig. - * @member {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * ListModelsResponse model. + * @member {Array.} model + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @instance */ - BatchPredictOperationMetadata.prototype.inputConfig = null; + ListModelsResponse.prototype.model = $util.emptyArray; /** - * BatchPredictOperationMetadata outputInfo. - * @member {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo|null|undefined} outputInfo - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * ListModelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @instance */ - BatchPredictOperationMetadata.prototype.outputInfo = null; + ListModelsResponse.prototype.nextPageToken = ""; /** - * Creates a new BatchPredictOperationMetadata instance using the specified properties. + * Creates a new ListModelsResponse instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IListModelsResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse instance */ - BatchPredictOperationMetadata.create = function create(properties) { - return new BatchPredictOperationMetadata(properties); + ListModelsResponse.create = function create(properties) { + return new ListModelsResponse(properties); }; /** - * Encodes the specified BatchPredictOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. + * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelsResponse} message ListModelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOperationMetadata.encode = function encode(message, writer) { + ListModelsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.encode(message.outputInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.model != null && message.model.length) + for (var i = 0; i < message.model.length; ++i) + $root.google.cloud.automl.v1beta1.Model.encode(message.model[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 BatchPredictOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.verify|verify} messages. + * Encodes the specified ListModelsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictOperationMetadata} message BatchPredictOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelsResponse} message ListModelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListModelsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer. + * Decodes a ListModelsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictOperationMetadata.decode = function decode(reader, length) { + ListModelsResponse.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.automl.v1beta1.BatchPredictOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListModelsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.decode(reader, reader.uint32()); + if (!(message.model && message.model.length)) + message.model = []; + message.model.push($root.google.cloud.automl.v1beta1.Model.decode(reader, reader.uint32())); break; case 2: - message.outputInfo = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -54626,359 +55000,322 @@ }; /** - * Decodes a BatchPredictOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ListModelsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictOperationMetadata message. + * Verifies a ListModelsResponse message. * @function verify - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchPredictOperationMetadata.verify = function verify(message) { + ListModelsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { - var error = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify(message.outputInfo); - if (error) - return "outputInfo." + error; + if (message.model != null && message.hasOwnProperty("model")) { + if (!Array.isArray(message.model)) + return "model: array expected"; + for (var i = 0; i < message.model.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.Model.verify(message.model[i]); + if (error) + return "model." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a BatchPredictOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} BatchPredictOperationMetadata + * @returns {google.cloud.automl.v1beta1.ListModelsResponse} ListModelsResponse */ - BatchPredictOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) + ListModelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListModelsResponse) return object; - var message = new $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata(); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOperationMetadata.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.fromObject(object.inputConfig); - } - if (object.outputInfo != null) { - if (typeof object.outputInfo !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictOperationMetadata.outputInfo: object expected"); - message.outputInfo = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.fromObject(object.outputInfo); + var message = new $root.google.cloud.automl.v1beta1.ListModelsResponse(); + if (object.model) { + if (!Array.isArray(object.model)) + throw TypeError(".google.cloud.automl.v1beta1.ListModelsResponse.model: array expected"); + message.model = []; + for (var i = 0; i < object.model.length; ++i) { + if (typeof object.model[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ListModelsResponse.model: object expected"); + message.model[i] = $root.google.cloud.automl.v1beta1.Model.fromObject(object.model[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a BatchPredictOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @static - * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata} message BatchPredictOperationMetadata + * @param {google.cloud.automl.v1beta1.ListModelsResponse} message ListModelsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchPredictOperationMetadata.toObject = function toObject(message, options) { + ListModelsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.inputConfig = null; - object.outputInfo = null; + if (options.arrays || options.defaults) + object.model = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.model && message.model.length) { + object.model = []; + for (var j = 0; j < message.model.length; ++j) + object.model[j] = $root.google.cloud.automl.v1beta1.Model.toObject(message.model[j], options); } - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.toObject(message.inputConfig, options); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - object.outputInfo = $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.toObject(message.outputInfo, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this BatchPredictOperationMetadata to JSON. + * Converts this ListModelsResponse to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata + * @memberof google.cloud.automl.v1beta1.ListModelsResponse * @instance * @returns {Object.} JSON object */ - BatchPredictOperationMetadata.prototype.toJSON = function toJSON() { + ListModelsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BatchPredictOperationMetadata.BatchPredictOutputInfo = (function() { - - /** - * Properties of a BatchPredictOutputInfo. - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata - * @interface IBatchPredictOutputInfo - * @property {string|null} [gcsOutputDirectory] BatchPredictOutputInfo gcsOutputDirectory - * @property {string|null} [bigqueryOutputDataset] BatchPredictOutputInfo bigqueryOutputDataset - */ - - /** - * Constructs a new BatchPredictOutputInfo. - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata - * @classdesc Represents a BatchPredictOutputInfo. - * @implements IBatchPredictOutputInfo - * @constructor - * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set - */ - function BatchPredictOutputInfo(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]]; - } + return ListModelsResponse; + })(); - /** - * BatchPredictOutputInfo gcsOutputDirectory. - * @member {string} gcsOutputDirectory - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @instance - */ - BatchPredictOutputInfo.prototype.gcsOutputDirectory = ""; + v1beta1.DeleteModelRequest = (function() { - /** - * BatchPredictOutputInfo bigqueryOutputDataset. - * @member {string} bigqueryOutputDataset - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @instance - */ - BatchPredictOutputInfo.prototype.bigqueryOutputDataset = ""; + /** + * Properties of a DeleteModelRequest. + * @memberof google.cloud.automl.v1beta1 + * @interface IDeleteModelRequest + * @property {string|null} [name] DeleteModelRequest name + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new DeleteModelRequest. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents a DeleteModelRequest. + * @implements IDeleteModelRequest + * @constructor + * @param {google.cloud.automl.v1beta1.IDeleteModelRequest=} [properties] Properties to set + */ + function DeleteModelRequest(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]]; + } - /** - * BatchPredictOutputInfo outputLocation. - * @member {"gcsOutputDirectory"|"bigqueryOutputDataset"|undefined} outputLocation - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @instance - */ - Object.defineProperty(BatchPredictOutputInfo.prototype, "outputLocation", { - get: $util.oneOfGetter($oneOfFields = ["gcsOutputDirectory", "bigqueryOutputDataset"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * DeleteModelRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @instance + */ + DeleteModelRequest.prototype.name = ""; - /** - * Creates a new BatchPredictOutputInfo instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo instance - */ - BatchPredictOutputInfo.create = function create(properties) { - return new BatchPredictOutputInfo(properties); - }; + /** + * Creates a new DeleteModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {google.cloud.automl.v1beta1.IDeleteModelRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest instance + */ + DeleteModelRequest.create = function create(properties) { + return new DeleteModelRequest(properties); + }; - /** - * Encodes the specified BatchPredictOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchPredictOutputInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryOutputDataset); - return writer; - }; + /** + * Encodes the specified DeleteModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} message DeleteModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteModelRequest.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 BatchPredictOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.IBatchPredictOutputInfo} message BatchPredictOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchPredictOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeleteModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeleteModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {google.cloud.automl.v1beta1.IDeleteModelRequest} message DeleteModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a BatchPredictOutputInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchPredictOutputInfo.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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gcsOutputDirectory = reader.string(); - break; - case 2: - message.bigqueryOutputDataset = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a DeleteModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteModelRequest.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.automl.v1beta1.DeleteModelRequest(); + 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 BatchPredictOutputInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchPredictOutputInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a BatchPredictOutputInfo message. - * @function verify - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchPredictOutputInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - properties.outputLocation = 1; - if (!$util.isString(message.gcsOutputDirectory)) - return "gcsOutputDirectory: string expected"; - } - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { - if (properties.outputLocation === 1) - return "outputLocation: multiple values"; - properties.outputLocation = 1; - if (!$util.isString(message.bigqueryOutputDataset)) - return "bigqueryOutputDataset: string expected"; - } - return null; - }; + /** + * Decodes a DeleteModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a BatchPredictOutputInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} BatchPredictOutputInfo - */ - BatchPredictOutputInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - return object; - var message = new $root.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo(); - if (object.gcsOutputDirectory != null) - message.gcsOutputDirectory = String(object.gcsOutputDirectory); - if (object.bigqueryOutputDataset != null) - message.bigqueryOutputDataset = String(object.bigqueryOutputDataset); - return message; - }; + /** + * Verifies a DeleteModelRequest message. + * @function verify + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteModelRequest.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 plain object from a BatchPredictOutputInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} message BatchPredictOutputInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchPredictOutputInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) { - object.gcsOutputDirectory = message.gcsOutputDirectory; - if (options.oneofs) - object.outputLocation = "gcsOutputDirectory"; - } - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) { - object.bigqueryOutputDataset = message.bigqueryOutputDataset; - if (options.oneofs) - object.outputLocation = "bigqueryOutputDataset"; - } + /** + * Creates a DeleteModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.DeleteModelRequest} DeleteModelRequest + */ + DeleteModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DeleteModelRequest) return object; - }; + var message = new $root.google.cloud.automl.v1beta1.DeleteModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this BatchPredictOutputInfo to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - * @instance - * @returns {Object.} JSON object - */ - BatchPredictOutputInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeleteModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @static + * @param {google.cloud.automl.v1beta1.DeleteModelRequest} message DeleteModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteModelRequest.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; + }; - return BatchPredictOutputInfo; - })(); + /** + * Converts this DeleteModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.DeleteModelRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return BatchPredictOperationMetadata; + return DeleteModelRequest; })(); - v1beta1.ExportModelOperationMetadata = (function() { + v1beta1.DeployModelRequest = (function() { /** - * Properties of an ExportModelOperationMetadata. + * Properties of a DeployModelRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IExportModelOperationMetadata - * @property {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null} [outputInfo] ExportModelOperationMetadata outputInfo + * @interface IDeployModelRequest + * @property {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null} [imageObjectDetectionModelDeploymentMetadata] DeployModelRequest imageObjectDetectionModelDeploymentMetadata + * @property {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null} [imageClassificationModelDeploymentMetadata] DeployModelRequest imageClassificationModelDeploymentMetadata + * @property {string|null} [name] DeployModelRequest name */ /** - * Constructs a new ExportModelOperationMetadata. + * Constructs a new DeployModelRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExportModelOperationMetadata. - * @implements IExportModelOperationMetadata + * @classdesc Represents a DeployModelRequest. + * @implements IDeployModelRequest * @constructor - * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IDeployModelRequest=} [properties] Properties to set */ - function ExportModelOperationMetadata(properties) { + function DeployModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54986,75 +55323,115 @@ } /** - * ExportModelOperationMetadata outputInfo. - * @member {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo|null|undefined} outputInfo - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * DeployModelRequest imageObjectDetectionModelDeploymentMetadata. + * @member {google.cloud.automl.v1beta1.IImageObjectDetectionModelDeploymentMetadata|null|undefined} imageObjectDetectionModelDeploymentMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @instance */ - ExportModelOperationMetadata.prototype.outputInfo = null; + DeployModelRequest.prototype.imageObjectDetectionModelDeploymentMetadata = null; /** - * Creates a new ExportModelOperationMetadata instance using the specified properties. + * DeployModelRequest imageClassificationModelDeploymentMetadata. + * @member {google.cloud.automl.v1beta1.IImageClassificationModelDeploymentMetadata|null|undefined} imageClassificationModelDeploymentMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @instance + */ + DeployModelRequest.prototype.imageClassificationModelDeploymentMetadata = null; + + /** + * DeployModelRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @instance + */ + DeployModelRequest.prototype.name = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeployModelRequest modelDeploymentMetadata. + * @member {"imageObjectDetectionModelDeploymentMetadata"|"imageClassificationModelDeploymentMetadata"|undefined} modelDeploymentMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest + * @instance + */ + Object.defineProperty(DeployModelRequest.prototype, "modelDeploymentMetadata", { + get: $util.oneOfGetter($oneOfFields = ["imageObjectDetectionModelDeploymentMetadata", "imageClassificationModelDeploymentMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeployModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IDeployModelRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest instance */ - ExportModelOperationMetadata.create = function create(properties) { - return new ExportModelOperationMetadata(properties); + DeployModelRequest.create = function create(properties) { + return new DeployModelRequest(properties); }; /** - * Encodes the specified ExportModelOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. + * Encodes the specified DeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeployModelRequest} message DeployModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelOperationMetadata.encode = function encode(message, writer) { + DeployModelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.encode(message.outputInfo, 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.imageObjectDetectionModelDeploymentMetadata != null && message.hasOwnProperty("imageObjectDetectionModelDeploymentMetadata")) + $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.encode(message.imageObjectDetectionModelDeploymentMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageClassificationModelDeploymentMetadata != null && message.hasOwnProperty("imageClassificationModelDeploymentMetadata")) + $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.encode(message.imageClassificationModelDeploymentMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.verify|verify} messages. + * Encodes the specified DeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.DeployModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.IExportModelOperationMetadata} message ExportModelOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IDeployModelRequest} message DeployModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DeployModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer. + * Decodes a DeployModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelOperationMetadata.decode = function decode(reader, length) { + DeployModelRequest.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.automl.v1beta1.ExportModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.DeployModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: - message.outputInfo = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.decode(reader, reader.uint32()); + message.imageObjectDetectionModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.decode(reader, reader.uint32()); + break; + case 4: + message.imageClassificationModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.decode(reader, reader.uint32()); + break; + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -55065,299 +55442,146 @@ }; /** - * Decodes an ExportModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeployModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + DeployModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportModelOperationMetadata message. + * Verifies a DeployModelRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportModelOperationMetadata.verify = function verify(message) { + DeployModelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { - var error = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify(message.outputInfo); - if (error) - return "outputInfo." + error; + var properties = {}; + if (message.imageObjectDetectionModelDeploymentMetadata != null && message.hasOwnProperty("imageObjectDetectionModelDeploymentMetadata")) { + properties.modelDeploymentMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.verify(message.imageObjectDetectionModelDeploymentMetadata); + if (error) + return "imageObjectDetectionModelDeploymentMetadata." + error; + } + } + if (message.imageClassificationModelDeploymentMetadata != null && message.hasOwnProperty("imageClassificationModelDeploymentMetadata")) { + if (properties.modelDeploymentMetadata === 1) + return "modelDeploymentMetadata: multiple values"; + properties.modelDeploymentMetadata = 1; + { + var error = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.verify(message.imageClassificationModelDeploymentMetadata); + if (error) + return "imageClassificationModelDeploymentMetadata." + error; + } } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ExportModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeployModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata} ExportModelOperationMetadata + * @returns {google.cloud.automl.v1beta1.DeployModelRequest} DeployModelRequest */ - ExportModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata) + DeployModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.DeployModelRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata(); - if (object.outputInfo != null) { - if (typeof object.outputInfo !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExportModelOperationMetadata.outputInfo: object expected"); - message.outputInfo = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.fromObject(object.outputInfo); + var message = new $root.google.cloud.automl.v1beta1.DeployModelRequest(); + if (object.imageObjectDetectionModelDeploymentMetadata != null) { + if (typeof object.imageObjectDetectionModelDeploymentMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DeployModelRequest.imageObjectDetectionModelDeploymentMetadata: object expected"); + message.imageObjectDetectionModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.fromObject(object.imageObjectDetectionModelDeploymentMetadata); } + if (object.imageClassificationModelDeploymentMetadata != null) { + if (typeof object.imageClassificationModelDeploymentMetadata !== "object") + throw TypeError(".google.cloud.automl.v1beta1.DeployModelRequest.imageClassificationModelDeploymentMetadata: object expected"); + message.imageClassificationModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.fromObject(object.imageClassificationModelDeploymentMetadata); + } + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ExportModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DeployModelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata} message ExportModelOperationMetadata + * @param {google.cloud.automl.v1beta1.DeployModelRequest} message DeployModelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportModelOperationMetadata.toObject = function toObject(message, options) { + DeployModelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.outputInfo = null; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - object.outputInfo = $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.toObject(message.outputInfo, options); + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.imageObjectDetectionModelDeploymentMetadata != null && message.hasOwnProperty("imageObjectDetectionModelDeploymentMetadata")) { + object.imageObjectDetectionModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.toObject(message.imageObjectDetectionModelDeploymentMetadata, options); + if (options.oneofs) + object.modelDeploymentMetadata = "imageObjectDetectionModelDeploymentMetadata"; + } + if (message.imageClassificationModelDeploymentMetadata != null && message.hasOwnProperty("imageClassificationModelDeploymentMetadata")) { + object.imageClassificationModelDeploymentMetadata = $root.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.toObject(message.imageClassificationModelDeploymentMetadata, options); + if (options.oneofs) + object.modelDeploymentMetadata = "imageClassificationModelDeploymentMetadata"; + } return object; }; /** - * Converts this ExportModelOperationMetadata to JSON. + * Converts this DeployModelRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata + * @memberof google.cloud.automl.v1beta1.DeployModelRequest * @instance * @returns {Object.} JSON object */ - ExportModelOperationMetadata.prototype.toJSON = function toJSON() { + DeployModelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ExportModelOperationMetadata.ExportModelOutputInfo = (function() { - - /** - * Properties of an ExportModelOutputInfo. - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata - * @interface IExportModelOutputInfo - * @property {string|null} [gcsOutputDirectory] ExportModelOutputInfo gcsOutputDirectory - */ - - /** - * Constructs a new ExportModelOutputInfo. - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata - * @classdesc Represents an ExportModelOutputInfo. - * @implements IExportModelOutputInfo - * @constructor - * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set - */ - function ExportModelOutputInfo(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]]; - } - - /** - * ExportModelOutputInfo gcsOutputDirectory. - * @member {string} gcsOutputDirectory - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @instance - */ - ExportModelOutputInfo.prototype.gcsOutputDirectory = ""; - - /** - * Creates a new ExportModelOutputInfo instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo instance - */ - ExportModelOutputInfo.create = function create(properties) { - return new ExportModelOutputInfo(properties); - }; - - /** - * Encodes the specified ExportModelOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportModelOutputInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsOutputDirectory); - return writer; - }; - - /** - * Encodes the specified ExportModelOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.IExportModelOutputInfo} message ExportModelOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportModelOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportModelOutputInfo.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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gcsOutputDirectory = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportModelOutputInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportModelOutputInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportModelOutputInfo message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportModelOutputInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - if (!$util.isString(message.gcsOutputDirectory)) - return "gcsOutputDirectory: string expected"; - return null; - }; - - /** - * Creates an ExportModelOutputInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} ExportModelOutputInfo - */ - ExportModelOutputInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - return object; - var message = new $root.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo(); - if (object.gcsOutputDirectory != null) - message.gcsOutputDirectory = String(object.gcsOutputDirectory); - return message; - }; - - /** - * Creates a plain object from an ExportModelOutputInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} message ExportModelOutputInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportModelOutputInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.gcsOutputDirectory = ""; - if (message.gcsOutputDirectory != null && message.hasOwnProperty("gcsOutputDirectory")) - object.gcsOutputDirectory = message.gcsOutputDirectory; - return object; - }; - - /** - * Converts this ExportModelOutputInfo to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - * @instance - * @returns {Object.} JSON object - */ - ExportModelOutputInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExportModelOutputInfo; - })(); - - return ExportModelOperationMetadata; + return DeployModelRequest; })(); - v1beta1.ExportEvaluatedExamplesOperationMetadata = (function() { + v1beta1.UndeployModelRequest = (function() { /** - * Properties of an ExportEvaluatedExamplesOperationMetadata. + * Properties of an UndeployModelRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IExportEvaluatedExamplesOperationMetadata - * @property {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null} [outputInfo] ExportEvaluatedExamplesOperationMetadata outputInfo + * @interface IUndeployModelRequest + * @property {string|null} [name] UndeployModelRequest name */ /** - * Constructs a new ExportEvaluatedExamplesOperationMetadata. + * Constructs a new UndeployModelRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents an ExportEvaluatedExamplesOperationMetadata. - * @implements IExportEvaluatedExamplesOperationMetadata + * @classdesc Represents an UndeployModelRequest. + * @implements IUndeployModelRequest * @constructor - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IUndeployModelRequest=} [properties] Properties to set */ - function ExportEvaluatedExamplesOperationMetadata(properties) { + function UndeployModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55365,75 +55589,75 @@ } /** - * ExportEvaluatedExamplesOperationMetadata outputInfo. - * @member {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo|null|undefined} outputInfo - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * UndeployModelRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @instance */ - ExportEvaluatedExamplesOperationMetadata.prototype.outputInfo = null; + UndeployModelRequest.prototype.name = ""; /** - * Creates a new ExportEvaluatedExamplesOperationMetadata instance using the specified properties. + * Creates a new UndeployModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata instance + * @param {google.cloud.automl.v1beta1.IUndeployModelRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest instance */ - ExportEvaluatedExamplesOperationMetadata.create = function create(properties) { - return new ExportEvaluatedExamplesOperationMetadata(properties); + UndeployModelRequest.create = function create(properties) { + return new UndeployModelRequest(properties); }; /** - * Encodes the specified ExportEvaluatedExamplesOperationMetadata message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. + * Encodes the specified UndeployModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata} message ExportEvaluatedExamplesOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} message UndeployModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEvaluatedExamplesOperationMetadata.encode = function encode(message, writer) { + UndeployModelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.encode(message.outputInfo, 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 ExportEvaluatedExamplesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.verify|verify} messages. + * Encodes the specified UndeployModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.UndeployModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOperationMetadata} message ExportEvaluatedExamplesOperationMetadata message or plain object to encode + * @param {google.cloud.automl.v1beta1.IUndeployModelRequest} message UndeployModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEvaluatedExamplesOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UndeployModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer. + * Decodes an UndeployModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata + * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEvaluatedExamplesOperationMetadata.decode = function decode(reader, length) { + UndeployModelRequest.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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.UndeployModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.outputInfo = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.decode(reader, reader.uint32()); + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -55444,306 +55668,108 @@ }; /** - * Decodes an ExportEvaluatedExamplesOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UndeployModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata + * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEvaluatedExamplesOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + UndeployModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportEvaluatedExamplesOperationMetadata message. + * Verifies an UndeployModelRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportEvaluatedExamplesOperationMetadata.verify = function verify(message) { + UndeployModelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { - var error = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify(message.outputInfo); - if (error) - return "outputInfo." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ExportEvaluatedExamplesOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} ExportEvaluatedExamplesOperationMetadata + * @returns {google.cloud.automl.v1beta1.UndeployModelRequest} UndeployModelRequest */ - ExportEvaluatedExamplesOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) + UndeployModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.UndeployModelRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata(); - if (object.outputInfo != null) { - if (typeof object.outputInfo !== "object") - throw TypeError(".google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.outputInfo: object expected"); - message.outputInfo = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.fromObject(object.outputInfo); - } + var message = new $root.google.cloud.automl.v1beta1.UndeployModelRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ExportEvaluatedExamplesOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an UndeployModelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @static - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} message ExportEvaluatedExamplesOperationMetadata + * @param {google.cloud.automl.v1beta1.UndeployModelRequest} message UndeployModelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportEvaluatedExamplesOperationMetadata.toObject = function toObject(message, options) { + UndeployModelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.outputInfo = null; - if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) - object.outputInfo = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.toObject(message.outputInfo, options); + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ExportEvaluatedExamplesOperationMetadata to JSON. + * Converts this UndeployModelRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + * @memberof google.cloud.automl.v1beta1.UndeployModelRequest * @instance * @returns {Object.} JSON object */ - ExportEvaluatedExamplesOperationMetadata.prototype.toJSON = function toJSON() { + UndeployModelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo = (function() { - - /** - * Properties of an ExportEvaluatedExamplesOutputInfo. - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - * @interface IExportEvaluatedExamplesOutputInfo - * @property {string|null} [bigqueryOutputDataset] ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset - */ - - /** - * Constructs a new ExportEvaluatedExamplesOutputInfo. - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - * @classdesc Represents an ExportEvaluatedExamplesOutputInfo. - * @implements IExportEvaluatedExamplesOutputInfo - * @constructor - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo=} [properties] Properties to set - */ - function ExportEvaluatedExamplesOutputInfo(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]]; - } - - /** - * ExportEvaluatedExamplesOutputInfo bigqueryOutputDataset. - * @member {string} bigqueryOutputDataset - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @instance - */ - ExportEvaluatedExamplesOutputInfo.prototype.bigqueryOutputDataset = ""; - - /** - * Creates a new ExportEvaluatedExamplesOutputInfo instance using the specified properties. - * @function create - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo instance - */ - ExportEvaluatedExamplesOutputInfo.create = function create(properties) { - return new ExportEvaluatedExamplesOutputInfo(properties); - }; - - /** - * Encodes the specified ExportEvaluatedExamplesOutputInfo message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo} message ExportEvaluatedExamplesOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportEvaluatedExamplesOutputInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryOutputDataset); - return writer; - }; - - /** - * Encodes the specified ExportEvaluatedExamplesOutputInfo message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.IExportEvaluatedExamplesOutputInfo} message ExportEvaluatedExamplesOutputInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportEvaluatedExamplesOutputInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportEvaluatedExamplesOutputInfo.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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.bigqueryOutputDataset = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportEvaluatedExamplesOutputInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportEvaluatedExamplesOutputInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportEvaluatedExamplesOutputInfo message. - * @function verify - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportEvaluatedExamplesOutputInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) - if (!$util.isString(message.bigqueryOutputDataset)) - return "bigqueryOutputDataset: string expected"; - return null; - }; - - /** - * Creates an ExportEvaluatedExamplesOutputInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} ExportEvaluatedExamplesOutputInfo - */ - ExportEvaluatedExamplesOutputInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo) - return object; - var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo(); - if (object.bigqueryOutputDataset != null) - message.bigqueryOutputDataset = String(object.bigqueryOutputDataset); - return message; - }; - - /** - * Creates a plain object from an ExportEvaluatedExamplesOutputInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @static - * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} message ExportEvaluatedExamplesOutputInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportEvaluatedExamplesOutputInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryOutputDataset = ""; - if (message.bigqueryOutputDataset != null && message.hasOwnProperty("bigqueryOutputDataset")) - object.bigqueryOutputDataset = message.bigqueryOutputDataset; - return object; - }; - - /** - * Converts this ExportEvaluatedExamplesOutputInfo to JSON. - * @function toJSON - * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo - * @instance - * @returns {Object.} JSON object - */ - ExportEvaluatedExamplesOutputInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExportEvaluatedExamplesOutputInfo; - })(); - - return ExportEvaluatedExamplesOperationMetadata; + return UndeployModelRequest; })(); - v1beta1.TableSpec = (function() { + v1beta1.ExportModelRequest = (function() { /** - * Properties of a TableSpec. + * Properties of an ExportModelRequest. * @memberof google.cloud.automl.v1beta1 - * @interface ITableSpec - * @property {string|null} [name] TableSpec name - * @property {string|null} [timeColumnSpecId] TableSpec timeColumnSpecId - * @property {number|Long|null} [rowCount] TableSpec rowCount - * @property {number|Long|null} [validRowCount] TableSpec validRowCount - * @property {number|Long|null} [columnCount] TableSpec columnCount - * @property {Array.|null} [inputConfigs] TableSpec inputConfigs - * @property {string|null} [etag] TableSpec etag + * @interface IExportModelRequest + * @property {string|null} [name] ExportModelRequest name + * @property {google.cloud.automl.v1beta1.IModelExportOutputConfig|null} [outputConfig] ExportModelRequest outputConfig */ /** - * Constructs a new TableSpec. + * Constructs a new ExportModelRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a TableSpec. - * @implements ITableSpec + * @classdesc Represents an ExportModelRequest. + * @implements IExportModelRequest * @constructor - * @param {google.cloud.automl.v1beta1.ITableSpec=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IExportModelRequest=} [properties] Properties to set */ - function TableSpec(properties) { - this.inputConfigs = []; + function ExportModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55751,156 +55777,303 @@ } /** - * TableSpec name. + * ExportModelRequest name. * @member {string} name - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportModelRequest * @instance */ - TableSpec.prototype.name = ""; + ExportModelRequest.prototype.name = ""; /** - * TableSpec timeColumnSpecId. - * @member {string} timeColumnSpecId - * @memberof google.cloud.automl.v1beta1.TableSpec + * ExportModelRequest outputConfig. + * @member {google.cloud.automl.v1beta1.IModelExportOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.automl.v1beta1.ExportModelRequest * @instance */ - TableSpec.prototype.timeColumnSpecId = ""; + ExportModelRequest.prototype.outputConfig = null; /** - * TableSpec rowCount. - * @member {number|Long} rowCount - * @memberof google.cloud.automl.v1beta1.TableSpec + * Creates a new ExportModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {google.cloud.automl.v1beta1.IExportModelRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest instance + */ + ExportModelRequest.create = function create(properties) { + return new ExportModelRequest(properties); + }; + + /** + * Encodes the specified ExportModelRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {google.cloud.automl.v1beta1.IExportModelRequest} message ExportModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportModelRequest.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.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.encode(message.outputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportModelRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {google.cloud.automl.v1beta1.IExportModelRequest} message ExportModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportModelRequest.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.automl.v1beta1.ExportModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.outputConfig = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportModelRequest message. + * @function verify + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportModelRequest.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.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.verify(message.outputConfig); + if (error) + return "outputConfig." + error; + } + return null; + }; + + /** + * Creates an ExportModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.automl.v1beta1.ExportModelRequest} ExportModelRequest + */ + ExportModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportModelRequest) + return object; + var message = new $root.google.cloud.automl.v1beta1.ExportModelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExportModelRequest.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.fromObject(object.outputConfig); + } + return message; + }; + + /** + * Creates a plain object from an ExportModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.automl.v1beta1.ExportModelRequest + * @static + * @param {google.cloud.automl.v1beta1.ExportModelRequest} message ExportModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.outputConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.automl.v1beta1.ModelExportOutputConfig.toObject(message.outputConfig, options); + return object; + }; + + /** + * Converts this ExportModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.automl.v1beta1.ExportModelRequest * @instance + * @returns {Object.} JSON object */ - TableSpec.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ExportModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExportModelRequest; + })(); + + v1beta1.ExportEvaluatedExamplesRequest = (function() { /** - * TableSpec validRowCount. - * @member {number|Long} validRowCount - * @memberof google.cloud.automl.v1beta1.TableSpec - * @instance + * Properties of an ExportEvaluatedExamplesRequest. + * @memberof google.cloud.automl.v1beta1 + * @interface IExportEvaluatedExamplesRequest + * @property {string|null} [name] ExportEvaluatedExamplesRequest name + * @property {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null} [outputConfig] ExportEvaluatedExamplesRequest outputConfig */ - TableSpec.prototype.validRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * TableSpec columnCount. - * @member {number|Long} columnCount - * @memberof google.cloud.automl.v1beta1.TableSpec - * @instance + * Constructs a new ExportEvaluatedExamplesRequest. + * @memberof google.cloud.automl.v1beta1 + * @classdesc Represents an ExportEvaluatedExamplesRequest. + * @implements IExportEvaluatedExamplesRequest + * @constructor + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest=} [properties] Properties to set */ - TableSpec.prototype.columnCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + function ExportEvaluatedExamplesRequest(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 inputConfigs. - * @member {Array.} inputConfigs - * @memberof google.cloud.automl.v1beta1.TableSpec + * ExportEvaluatedExamplesRequest name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @instance */ - TableSpec.prototype.inputConfigs = $util.emptyArray; + ExportEvaluatedExamplesRequest.prototype.name = ""; /** - * TableSpec etag. - * @member {string} etag - * @memberof google.cloud.automl.v1beta1.TableSpec + * ExportEvaluatedExamplesRequest outputConfig. + * @member {google.cloud.automl.v1beta1.IExportEvaluatedExamplesOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @instance */ - TableSpec.prototype.etag = ""; + ExportEvaluatedExamplesRequest.prototype.outputConfig = null; /** - * Creates a new TableSpec instance using the specified properties. + * Creates a new ExportEvaluatedExamplesRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @static - * @param {google.cloud.automl.v1beta1.ITableSpec=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec instance + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest instance */ - TableSpec.create = function create(properties) { - return new TableSpec(properties); + ExportEvaluatedExamplesRequest.create = function create(properties) { + return new ExportEvaluatedExamplesRequest(properties); }; /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.TableSpec.verify|verify} messages. + * Encodes the specified ExportEvaluatedExamplesRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @static - * @param {google.cloud.automl.v1beta1.ITableSpec} message TableSpec message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} message ExportEvaluatedExamplesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableSpec.encode = function encode(message, writer) { + ExportEvaluatedExamplesRequest.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.timeColumnSpecId != null && message.hasOwnProperty("timeColumnSpecId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.timeColumnSpecId); - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowCount); - if (message.validRowCount != null && message.hasOwnProperty("validRowCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.validRowCount); - if (message.inputConfigs != null && message.inputConfigs.length) - for (var i = 0; i < message.inputConfigs.length; ++i) - $root.google.cloud.automl.v1beta1.InputConfig.encode(message.inputConfigs[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.etag != null && message.hasOwnProperty("etag")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.etag); - if (message.columnCount != null && message.hasOwnProperty("columnCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.columnCount); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.encode(message.outputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TableSpec.verify|verify} messages. + * Encodes the specified ExportEvaluatedExamplesRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @static - * @param {google.cloud.automl.v1beta1.ITableSpec} message TableSpec message or plain object to encode + * @param {google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest} message ExportEvaluatedExamplesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableSpec.encodeDelimited = function encodeDelimited(message, writer) { + ExportEvaluatedExamplesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TableSpec message from the specified reader or buffer. + * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest * @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) { + ExportEvaluatedExamplesRequest.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.automl.v1beta1.TableSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.timeColumnSpecId = reader.string(); - break; case 3: - message.rowCount = reader.int64(); - break; - case 4: - message.validRowCount = reader.int64(); - break; - case 7: - message.columnCount = reader.int64(); - break; - case 5: - if (!(message.inputConfigs && message.inputConfigs.length)) - message.inputConfigs = []; - message.inputConfigs.push($root.google.cloud.automl.v1beta1.InputConfig.decode(reader, reader.uint32())); - break; - case 6: - message.etag = reader.string(); + message.outputConfig = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -55911,320 +56084,121 @@ }; /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. + * Decodes an ExportEvaluatedExamplesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest * @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) { + ExportEvaluatedExamplesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TableSpec message. + * Verifies an ExportEvaluatedExamplesRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @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) { + ExportEvaluatedExamplesRequest.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.timeColumnSpecId != null && message.hasOwnProperty("timeColumnSpecId")) - if (!$util.isString(message.timeColumnSpecId)) - return "timeColumnSpecId: string expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) - return "rowCount: integer|Long expected"; - if (message.validRowCount != null && message.hasOwnProperty("validRowCount")) - if (!$util.isInteger(message.validRowCount) && !(message.validRowCount && $util.isInteger(message.validRowCount.low) && $util.isInteger(message.validRowCount.high))) - return "validRowCount: integer|Long expected"; - if (message.columnCount != null && message.hasOwnProperty("columnCount")) - if (!$util.isInteger(message.columnCount) && !(message.columnCount && $util.isInteger(message.columnCount.low) && $util.isInteger(message.columnCount.high))) - return "columnCount: integer|Long expected"; - if (message.inputConfigs != null && message.hasOwnProperty("inputConfigs")) { - if (!Array.isArray(message.inputConfigs)) - return "inputConfigs: array expected"; - for (var i = 0; i < message.inputConfigs.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.InputConfig.verify(message.inputConfigs[i]); - if (error) - return "inputConfigs." + error; - } + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.verify(message.outputConfig); + if (error) + return "outputConfig." + error; } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEvaluatedExamplesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec + * @returns {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} ExportEvaluatedExamplesRequest */ - TableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.TableSpec) + ExportEvaluatedExamplesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.TableSpec(); + var message = new $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest(); if (object.name != null) message.name = String(object.name); - if (object.timeColumnSpecId != null) - message.timeColumnSpecId = String(object.timeColumnSpecId); - if (object.rowCount != null) - if ($util.Long) - (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; - else if (typeof object.rowCount === "string") - message.rowCount = parseInt(object.rowCount, 10); - else if (typeof object.rowCount === "number") - message.rowCount = object.rowCount; - else if (typeof object.rowCount === "object") - message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); - if (object.validRowCount != null) - if ($util.Long) - (message.validRowCount = $util.Long.fromValue(object.validRowCount)).unsigned = false; - else if (typeof object.validRowCount === "string") - message.validRowCount = parseInt(object.validRowCount, 10); - else if (typeof object.validRowCount === "number") - message.validRowCount = object.validRowCount; - else if (typeof object.validRowCount === "object") - message.validRowCount = new $util.LongBits(object.validRowCount.low >>> 0, object.validRowCount.high >>> 0).toNumber(); - if (object.columnCount != null) - if ($util.Long) - (message.columnCount = $util.Long.fromValue(object.columnCount)).unsigned = false; - else if (typeof object.columnCount === "string") - message.columnCount = parseInt(object.columnCount, 10); - else if (typeof object.columnCount === "number") - message.columnCount = object.columnCount; - else if (typeof object.columnCount === "object") - message.columnCount = new $util.LongBits(object.columnCount.low >>> 0, object.columnCount.high >>> 0).toNumber(); - if (object.inputConfigs) { - if (!Array.isArray(object.inputConfigs)) - throw TypeError(".google.cloud.automl.v1beta1.TableSpec.inputConfigs: array expected"); - message.inputConfigs = []; - for (var i = 0; i < object.inputConfigs.length; ++i) { - if (typeof object.inputConfigs[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.TableSpec.inputConfigs: object expected"); - message.inputConfigs[i] = $root.google.cloud.automl.v1beta1.InputConfig.fromObject(object.inputConfigs[i]); - } + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.fromObject(object.outputConfig); } - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. + * Creates a plain object from an ExportEvaluatedExamplesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @static - * @param {google.cloud.automl.v1beta1.TableSpec} message TableSpec + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} message ExportEvaluatedExamplesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TableSpec.toObject = function toObject(message, options) { + ExportEvaluatedExamplesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.inputConfigs = []; if (options.defaults) { object.name = ""; - object.timeColumnSpecId = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rowCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.validRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.validRowCount = options.longs === String ? "0" : 0; - object.etag = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.columnCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.columnCount = options.longs === String ? "0" : 0; + object.outputConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.timeColumnSpecId != null && message.hasOwnProperty("timeColumnSpecId")) - object.timeColumnSpecId = message.timeColumnSpecId; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (typeof message.rowCount === "number") - object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; - else - object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; - if (message.validRowCount != null && message.hasOwnProperty("validRowCount")) - if (typeof message.validRowCount === "number") - object.validRowCount = options.longs === String ? String(message.validRowCount) : message.validRowCount; - else - object.validRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.validRowCount) : options.longs === Number ? new $util.LongBits(message.validRowCount.low >>> 0, message.validRowCount.high >>> 0).toNumber() : message.validRowCount; - if (message.inputConfigs && message.inputConfigs.length) { - object.inputConfigs = []; - for (var j = 0; j < message.inputConfigs.length; ++j) - object.inputConfigs[j] = $root.google.cloud.automl.v1beta1.InputConfig.toObject(message.inputConfigs[j], options); - } - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.columnCount != null && message.hasOwnProperty("columnCount")) - if (typeof message.columnCount === "number") - object.columnCount = options.longs === String ? String(message.columnCount) : message.columnCount; - else - object.columnCount = options.longs === String ? $util.Long.prototype.toString.call(message.columnCount) : options.longs === Number ? new $util.LongBits(message.columnCount.low >>> 0, message.columnCount.high >>> 0).toNumber() : message.columnCount; + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this TableSpec to JSON. + * Converts this ExportEvaluatedExamplesRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.TableSpec + * @memberof google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest * @instance * @returns {Object.} JSON object */ - TableSpec.prototype.toJSON = function toJSON() { + ExportEvaluatedExamplesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TableSpec; - })(); - - v1beta1.PredictionService = (function() { - - /** - * Constructs a new PredictionService service. - * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a PredictionService - * @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 PredictionService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PredictionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PredictionService; - - /** - * Creates new PredictionService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.automl.v1beta1.PredictionService - * @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 {PredictionService} RPC service. Useful where requests and/or responses are streamed. - */ - PredictionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.automl.v1beta1.PredictionService#predict}. - * @memberof google.cloud.automl.v1beta1.PredictionService - * @typedef PredictCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.automl.v1beta1.PredictResponse} [response] PredictResponse - */ - - /** - * Calls Predict. - * @function predict - * @memberof google.cloud.automl.v1beta1.PredictionService - * @instance - * @param {google.cloud.automl.v1beta1.IPredictRequest} request PredictRequest message or plain object - * @param {google.cloud.automl.v1beta1.PredictionService.PredictCallback} callback Node-style callback called with the error, if any, and PredictResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PredictionService.prototype.predict = function predict(request, callback) { - return this.rpcCall(predict, $root.google.cloud.automl.v1beta1.PredictRequest, $root.google.cloud.automl.v1beta1.PredictResponse, request, callback); - }, "name", { value: "Predict" }); - - /** - * Calls Predict. - * @function predict - * @memberof google.cloud.automl.v1beta1.PredictionService - * @instance - * @param {google.cloud.automl.v1beta1.IPredictRequest} request PredictRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.automl.v1beta1.PredictionService#batchPredict}. - * @memberof google.cloud.automl.v1beta1.PredictionService - * @typedef BatchPredictCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls BatchPredict. - * @function batchPredict - * @memberof google.cloud.automl.v1beta1.PredictionService - * @instance - * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} request BatchPredictRequest message or plain object - * @param {google.cloud.automl.v1beta1.PredictionService.BatchPredictCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PredictionService.prototype.batchPredict = function batchPredict(request, callback) { - return this.rpcCall(batchPredict, $root.google.cloud.automl.v1beta1.BatchPredictRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchPredict" }); - - /** - * Calls BatchPredict. - * @function batchPredict - * @memberof google.cloud.automl.v1beta1.PredictionService - * @instance - * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} request BatchPredictRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return PredictionService; + return ExportEvaluatedExamplesRequest; })(); - v1beta1.PredictRequest = (function() { + v1beta1.GetModelEvaluationRequest = (function() { /** - * Properties of a PredictRequest. + * Properties of a GetModelEvaluationRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IPredictRequest - * @property {string|null} [name] PredictRequest name - * @property {google.cloud.automl.v1beta1.IExamplePayload|null} [payload] PredictRequest payload - * @property {Object.|null} [params] PredictRequest params + * @interface IGetModelEvaluationRequest + * @property {string|null} [name] GetModelEvaluationRequest name */ /** - * Constructs a new PredictRequest. + * Constructs a new GetModelEvaluationRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a PredictRequest. - * @implements IPredictRequest + * @classdesc Represents a GetModelEvaluationRequest. + * @implements IGetModelEvaluationRequest * @constructor - * @param {google.cloud.automl.v1beta1.IPredictRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest=} [properties] Properties to set */ - function PredictRequest(properties) { - this.params = {}; + function GetModelEvaluationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56232,108 +56206,76 @@ } /** - * PredictRequest name. + * GetModelEvaluationRequest name. * @member {string} name - * @memberof google.cloud.automl.v1beta1.PredictRequest - * @instance - */ - PredictRequest.prototype.name = ""; - - /** - * PredictRequest payload. - * @member {google.cloud.automl.v1beta1.IExamplePayload|null|undefined} payload - * @memberof google.cloud.automl.v1beta1.PredictRequest - * @instance - */ - PredictRequest.prototype.payload = null; - - /** - * PredictRequest params. - * @member {Object.} params - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @instance */ - PredictRequest.prototype.params = $util.emptyObject; + GetModelEvaluationRequest.prototype.name = ""; /** - * Creates a new PredictRequest instance using the specified properties. + * Creates a new GetModelEvaluationRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static - * @param {google.cloud.automl.v1beta1.IPredictRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest instance + * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest instance */ - PredictRequest.create = function create(properties) { - return new PredictRequest(properties); + GetModelEvaluationRequest.create = function create(properties) { + return new GetModelEvaluationRequest(properties); }; /** - * Encodes the specified PredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. + * Encodes the specified GetModelEvaluationRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static - * @param {google.cloud.automl.v1beta1.IPredictRequest} message PredictRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} message GetModelEvaluationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictRequest.encode = function encode(message, writer) { + GetModelEvaluationRequest.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.payload != null && message.hasOwnProperty("payload")) - $root.google.cloud.automl.v1beta1.ExamplePayload.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.params != null && message.hasOwnProperty("params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified PredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictRequest.verify|verify} messages. + * Encodes the specified GetModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.GetModelEvaluationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static - * @param {google.cloud.automl.v1beta1.IPredictRequest} message PredictRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IGetModelEvaluationRequest} message GetModelEvaluationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetModelEvaluationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PredictRequest message from the specified reader or buffer. + * Decodes a GetModelEvaluationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest + * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictRequest.decode = function decode(reader, length) { + GetModelEvaluationRequest.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.automl.v1beta1.PredictRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.GetModelEvaluationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.payload = $root.google.cloud.automl.v1beta1.ExamplePayload.decode(reader, reader.uint32()); - break; - case 3: - reader.skip().pos++; - if (message.params === $util.emptyObject) - message.params = {}; - key = reader.string(); - reader.pos++; - message.params[key] = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -56343,148 +56285,110 @@ }; /** - * Decodes a PredictRequest message from the specified reader or buffer, length delimited. + * Decodes a GetModelEvaluationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest + * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictRequest.decodeDelimited = function decodeDelimited(reader) { + GetModelEvaluationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PredictRequest message. + * Verifies a GetModelEvaluationRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PredictRequest.verify = function verify(message) { + GetModelEvaluationRequest.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.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.cloud.automl.v1beta1.ExamplePayload.verify(message.payload); - if (error) - return "payload." + error; - } - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; - } return null; }; /** - * Creates a PredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.PredictRequest} PredictRequest + * @returns {google.cloud.automl.v1beta1.GetModelEvaluationRequest} GetModelEvaluationRequest */ - PredictRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.PredictRequest) + GetModelEvaluationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.GetModelEvaluationRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.PredictRequest(); + var message = new $root.google.cloud.automl.v1beta1.GetModelEvaluationRequest(); if (object.name != null) message.name = String(object.name); - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.automl.v1beta1.PredictRequest.payload: object expected"); - message.payload = $root.google.cloud.automl.v1beta1.ExamplePayload.fromObject(object.payload); - } - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1beta1.PredictRequest.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); - } return message; }; /** - * Creates a plain object from a PredictRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetModelEvaluationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @static - * @param {google.cloud.automl.v1beta1.PredictRequest} message PredictRequest + * @param {google.cloud.automl.v1beta1.GetModelEvaluationRequest} message GetModelEvaluationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PredictRequest.toObject = function toObject(message, options) { + GetModelEvaluationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.params = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.payload = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = $root.google.cloud.automl.v1beta1.ExamplePayload.toObject(message.payload, options); - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; - } return object; }; /** - * Converts this PredictRequest to JSON. + * Converts this GetModelEvaluationRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.PredictRequest + * @memberof google.cloud.automl.v1beta1.GetModelEvaluationRequest * @instance * @returns {Object.} JSON object */ - PredictRequest.prototype.toJSON = function toJSON() { + GetModelEvaluationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PredictRequest; + return GetModelEvaluationRequest; })(); - v1beta1.PredictResponse = (function() { + v1beta1.ListModelEvaluationsRequest = (function() { /** - * Properties of a PredictResponse. + * Properties of a ListModelEvaluationsRequest. * @memberof google.cloud.automl.v1beta1 - * @interface IPredictResponse - * @property {Array.|null} [payload] PredictResponse payload - * @property {google.cloud.automl.v1beta1.IExamplePayload|null} [preprocessedInput] PredictResponse preprocessedInput - * @property {Object.|null} [metadata] PredictResponse metadata + * @interface IListModelEvaluationsRequest + * @property {string|null} [parent] ListModelEvaluationsRequest parent + * @property {string|null} [filter] ListModelEvaluationsRequest filter + * @property {number|null} [pageSize] ListModelEvaluationsRequest pageSize + * @property {string|null} [pageToken] ListModelEvaluationsRequest pageToken */ /** - * Constructs a new PredictResponse. + * Constructs a new ListModelEvaluationsRequest. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a PredictResponse. - * @implements IPredictResponse + * @classdesc Represents a ListModelEvaluationsRequest. + * @implements IListModelEvaluationsRequest * @constructor - * @param {google.cloud.automl.v1beta1.IPredictResponse=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest=} [properties] Properties to set */ - function PredictResponse(properties) { - this.payload = []; - this.metadata = {}; + function ListModelEvaluationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56492,110 +56396,114 @@ } /** - * PredictResponse payload. - * @member {Array.} payload - * @memberof google.cloud.automl.v1beta1.PredictResponse + * ListModelEvaluationsRequest parent. + * @member {string} parent + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @instance */ - PredictResponse.prototype.payload = $util.emptyArray; + ListModelEvaluationsRequest.prototype.parent = ""; /** - * PredictResponse preprocessedInput. - * @member {google.cloud.automl.v1beta1.IExamplePayload|null|undefined} preprocessedInput - * @memberof google.cloud.automl.v1beta1.PredictResponse + * ListModelEvaluationsRequest filter. + * @member {string} filter + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @instance */ - PredictResponse.prototype.preprocessedInput = null; + ListModelEvaluationsRequest.prototype.filter = ""; /** - * PredictResponse metadata. - * @member {Object.} metadata - * @memberof google.cloud.automl.v1beta1.PredictResponse + * ListModelEvaluationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @instance */ - PredictResponse.prototype.metadata = $util.emptyObject; + ListModelEvaluationsRequest.prototype.pageSize = 0; /** - * Creates a new PredictResponse instance using the specified properties. + * ListModelEvaluationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest + * @instance + */ + ListModelEvaluationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListModelEvaluationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static - * @param {google.cloud.automl.v1beta1.IPredictResponse=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse instance + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest instance */ - PredictResponse.create = function create(properties) { - return new PredictResponse(properties); + ListModelEvaluationsRequest.create = function create(properties) { + return new ListModelEvaluationsRequest(properties); }; /** - * Encodes the specified PredictResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. + * Encodes the specified ListModelEvaluationsRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static - * @param {google.cloud.automl.v1beta1.IPredictResponse} message PredictResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} message ListModelEvaluationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictResponse.encode = function encode(message, writer) { + ListModelEvaluationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.payload != null && message.payload.length) - for (var i = 0; i < message.payload.length; ++i) - $root.google.cloud.automl.v1beta1.AnnotationPayload.encode(message.payload[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) - $root.google.cloud.automl.v1beta1.ExamplePayload.encode(message.preprocessedInput, 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.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); return writer; }; /** - * Encodes the specified PredictResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.PredictResponse.verify|verify} messages. + * Encodes the specified ListModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static - * @param {google.cloud.automl.v1beta1.IPredictResponse} message PredictResponse message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsRequest} message ListModelEvaluationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredictResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListModelEvaluationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PredictResponse message from the specified reader or buffer. + * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictResponse.decode = function decode(reader, length) { + ListModelEvaluationsRequest.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.automl.v1beta1.PredictResponse(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListModelEvaluationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.payload && message.payload.length)) - message.payload = []; - message.payload.push($root.google.cloud.automl.v1beta1.AnnotationPayload.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 3: - message.preprocessedInput = $root.google.cloud.automl.v1beta1.ExamplePayload.decode(reader, reader.uint32()); + message.filter = reader.string(); break; - case 2: - reader.skip().pos++; - if (message.metadata === $util.emptyObject) - message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); + case 4: + message.pageSize = reader.int32(); + break; + case 6: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -56606,165 +56514,134 @@ }; /** - * Decodes a PredictResponse message from the specified reader or buffer, length delimited. + * Decodes a ListModelEvaluationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredictResponse.decodeDelimited = function decodeDelimited(reader) { + ListModelEvaluationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PredictResponse message. + * Verifies a ListModelEvaluationsRequest message. * @function verify - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PredictResponse.verify = function verify(message) { + ListModelEvaluationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.payload != null && message.hasOwnProperty("payload")) { - if (!Array.isArray(message.payload)) - return "payload: array expected"; - for (var i = 0; i < message.payload.length; ++i) { - var error = $root.google.cloud.automl.v1beta1.AnnotationPayload.verify(message.payload[i]); - if (error) - return "payload." + error; - } - } - if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) { - var error = $root.google.cloud.automl.v1beta1.ExamplePayload.verify(message.preprocessedInput); - if (error) - return "preprocessedInput." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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 PredictResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.PredictResponse} PredictResponse + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} ListModelEvaluationsRequest */ - PredictResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.PredictResponse) + ListModelEvaluationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListModelEvaluationsRequest) return object; - var message = new $root.google.cloud.automl.v1beta1.PredictResponse(); - if (object.payload) { - if (!Array.isArray(object.payload)) - throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.payload: array expected"); - message.payload = []; - for (var i = 0; i < object.payload.length; ++i) { - if (typeof object.payload[i] !== "object") - throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.payload: object expected"); - message.payload[i] = $root.google.cloud.automl.v1beta1.AnnotationPayload.fromObject(object.payload[i]); - } - } - if (object.preprocessedInput != null) { - if (typeof object.preprocessedInput !== "object") - throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.preprocessedInput: object expected"); - message.preprocessedInput = $root.google.cloud.automl.v1beta1.ExamplePayload.fromObject(object.preprocessedInput); - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.PredictResponse.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } + var message = new $root.google.cloud.automl.v1beta1.ListModelEvaluationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + 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 PredictResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListModelEvaluationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @static - * @param {google.cloud.automl.v1beta1.PredictResponse} message PredictResponse + * @param {google.cloud.automl.v1beta1.ListModelEvaluationsRequest} message ListModelEvaluationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PredictResponse.toObject = function toObject(message, options) { + ListModelEvaluationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.payload = []; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) - object.preprocessedInput = null; - if (message.payload && message.payload.length) { - object.payload = []; - for (var j = 0; j < message.payload.length; ++j) - object.payload[j] = $root.google.cloud.automl.v1beta1.AnnotationPayload.toObject(message.payload[j], options); - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.preprocessedInput != null && message.hasOwnProperty("preprocessedInput")) - object.preprocessedInput = $root.google.cloud.automl.v1beta1.ExamplePayload.toObject(message.preprocessedInput, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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 PredictResponse to JSON. + * Converts this ListModelEvaluationsRequest to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.PredictResponse + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsRequest * @instance * @returns {Object.} JSON object */ - PredictResponse.prototype.toJSON = function toJSON() { + ListModelEvaluationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PredictResponse; + return ListModelEvaluationsRequest; })(); - v1beta1.BatchPredictRequest = (function() { + v1beta1.ListModelEvaluationsResponse = (function() { /** - * Properties of a BatchPredictRequest. + * Properties of a ListModelEvaluationsResponse. * @memberof google.cloud.automl.v1beta1 - * @interface IBatchPredictRequest - * @property {string|null} [name] BatchPredictRequest name - * @property {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null} [inputConfig] BatchPredictRequest inputConfig - * @property {google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null} [outputConfig] BatchPredictRequest outputConfig - * @property {Object.|null} [params] BatchPredictRequest params + * @interface IListModelEvaluationsResponse + * @property {Array.|null} [modelEvaluation] ListModelEvaluationsResponse modelEvaluation + * @property {string|null} [nextPageToken] ListModelEvaluationsResponse nextPageToken */ /** - * Constructs a new BatchPredictRequest. + * Constructs a new ListModelEvaluationsResponse. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BatchPredictRequest. - * @implements IBatchPredictRequest + * @classdesc Represents a ListModelEvaluationsResponse. + * @implements IListModelEvaluationsResponse * @constructor - * @param {google.cloud.automl.v1beta1.IBatchPredictRequest=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse=} [properties] Properties to set */ - function BatchPredictRequest(properties) { - this.params = {}; + function ListModelEvaluationsResponse(properties) { + this.modelEvaluation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56772,120 +56649,91 @@ } /** - * BatchPredictRequest name. - * @member {string} name - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest - * @instance - */ - BatchPredictRequest.prototype.name = ""; - - /** - * BatchPredictRequest inputConfig. - * @member {google.cloud.automl.v1beta1.IBatchPredictInputConfig|null|undefined} inputConfig - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest - * @instance - */ - BatchPredictRequest.prototype.inputConfig = null; - - /** - * BatchPredictRequest outputConfig. - * @member {google.cloud.automl.v1beta1.IBatchPredictOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * ListModelEvaluationsResponse modelEvaluation. + * @member {Array.} modelEvaluation + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @instance */ - BatchPredictRequest.prototype.outputConfig = null; + ListModelEvaluationsResponse.prototype.modelEvaluation = $util.emptyArray; /** - * BatchPredictRequest params. - * @member {Object.} params - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * ListModelEvaluationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @instance */ - BatchPredictRequest.prototype.params = $util.emptyObject; + ListModelEvaluationsResponse.prototype.nextPageToken = ""; /** - * Creates a new BatchPredictRequest instance using the specified properties. + * Creates a new ListModelEvaluationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictRequest=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest instance + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse instance */ - BatchPredictRequest.create = function create(properties) { - return new BatchPredictRequest(properties); + ListModelEvaluationsResponse.create = function create(properties) { + return new ListModelEvaluationsResponse(properties); }; /** - * Encodes the specified BatchPredictRequest message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. + * Encodes the specified ListModelEvaluationsResponse message. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictRequest.encode = function encode(message, writer) { + ListModelEvaluationsResponse.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.inputConfig != null && message.hasOwnProperty("inputConfig")) - $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.encode(message.inputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.params != null && message.hasOwnProperty("params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + if (message.modelEvaluation != null && message.modelEvaluation.length) + for (var i = 0; i < message.modelEvaluation.length; ++i) + $root.google.cloud.automl.v1beta1.ModelEvaluation.encode(message.modelEvaluation[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 BatchPredictRequest message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictRequest.verify|verify} messages. + * Encodes the specified ListModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictRequest} message BatchPredictRequest message or plain object to encode + * @param {google.cloud.automl.v1beta1.IListModelEvaluationsResponse} message ListModelEvaluationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListModelEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer. + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictRequest.decode = function decode(reader, length) { + ListModelEvaluationsResponse.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.automl.v1beta1.BatchPredictRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.ListModelEvaluationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 3: - message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.decode(reader, reader.uint32()); - break; - case 4: - message.outputConfig = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.decode(reader, reader.uint32()); + if (!(message.modelEvaluation && message.modelEvaluation.length)) + message.modelEvaluation = []; + message.modelEvaluation.push($root.google.cloud.automl.v1beta1.ModelEvaluation.decode(reader, reader.uint32())); break; - case 5: - reader.skip().pos++; - if (message.params === $util.emptyObject) - message.params = {}; - key = reader.string(); - reader.pos++; - message.params[key] = reader.string(); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -56896,158 +56744,140 @@ }; /** - * Decodes a BatchPredictRequest message from the specified reader or buffer, length delimited. + * Decodes a ListModelEvaluationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictRequest.decodeDelimited = function decodeDelimited(reader) { + ListModelEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictRequest message. + * Verifies a ListModelEvaluationsResponse message. * @function verify - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchPredictRequest.verify = function verify(message) { + ListModelEvaluationsResponse.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.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.verify(message.outputConfig); - if (error) - return "outputConfig." + error; - } - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; + if (message.modelEvaluation != null && message.hasOwnProperty("modelEvaluation")) { + if (!Array.isArray(message.modelEvaluation)) + return "modelEvaluation: array expected"; + for (var i = 0; i < message.modelEvaluation.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.ModelEvaluation.verify(message.modelEvaluation[i]); + if (error) + return "modelEvaluation." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a BatchPredictRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BatchPredictRequest} BatchPredictRequest + * @returns {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} ListModelEvaluationsResponse */ - BatchPredictRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictRequest) - return object; - var message = new $root.google.cloud.automl.v1beta1.BatchPredictRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictRequest.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.fromObject(object.inputConfig); - } - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictRequest.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.fromObject(object.outputConfig); - } - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictRequest.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); + ListModelEvaluationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.ListModelEvaluationsResponse) + return object; + var message = new $root.google.cloud.automl.v1beta1.ListModelEvaluationsResponse(); + if (object.modelEvaluation) { + if (!Array.isArray(object.modelEvaluation)) + throw TypeError(".google.cloud.automl.v1beta1.ListModelEvaluationsResponse.modelEvaluation: array expected"); + message.modelEvaluation = []; + for (var i = 0; i < object.modelEvaluation.length; ++i) { + if (typeof object.modelEvaluation[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.ListModelEvaluationsResponse.modelEvaluation: object expected"); + message.modelEvaluation[i] = $root.google.cloud.automl.v1beta1.ModelEvaluation.fromObject(object.modelEvaluation[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a BatchPredictRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListModelEvaluationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @static - * @param {google.cloud.automl.v1beta1.BatchPredictRequest} message BatchPredictRequest + * @param {google.cloud.automl.v1beta1.ListModelEvaluationsResponse} message ListModelEvaluationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchPredictRequest.toObject = function toObject(message, options) { + ListModelEvaluationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.params = {}; - if (options.defaults) { - object.name = ""; - object.inputConfig = null; - object.outputConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.automl.v1beta1.BatchPredictInputConfig.toObject(message.inputConfig, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.automl.v1beta1.BatchPredictOutputConfig.toObject(message.outputConfig, options); - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; + if (options.arrays || options.defaults) + object.modelEvaluation = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.modelEvaluation && message.modelEvaluation.length) { + object.modelEvaluation = []; + for (var j = 0; j < message.modelEvaluation.length; ++j) + object.modelEvaluation[j] = $root.google.cloud.automl.v1beta1.ModelEvaluation.toObject(message.modelEvaluation[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this BatchPredictRequest to JSON. + * Converts this ListModelEvaluationsResponse to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BatchPredictRequest + * @memberof google.cloud.automl.v1beta1.ListModelEvaluationsResponse * @instance * @returns {Object.} JSON object */ - BatchPredictRequest.prototype.toJSON = function toJSON() { + ListModelEvaluationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchPredictRequest; + return ListModelEvaluationsResponse; })(); - v1beta1.BatchPredictResult = (function() { + v1beta1.TableSpec = (function() { /** - * Properties of a BatchPredictResult. + * Properties of a TableSpec. * @memberof google.cloud.automl.v1beta1 - * @interface IBatchPredictResult - * @property {Object.|null} [metadata] BatchPredictResult metadata + * @interface ITableSpec + * @property {string|null} [name] TableSpec name + * @property {string|null} [timeColumnSpecId] TableSpec timeColumnSpecId + * @property {number|Long|null} [rowCount] TableSpec rowCount + * @property {number|Long|null} [validRowCount] TableSpec validRowCount + * @property {number|Long|null} [columnCount] TableSpec columnCount + * @property {Array.|null} [inputConfigs] TableSpec inputConfigs + * @property {string|null} [etag] TableSpec etag */ /** - * Constructs a new BatchPredictResult. + * Constructs a new TableSpec. * @memberof google.cloud.automl.v1beta1 - * @classdesc Represents a BatchPredictResult. - * @implements IBatchPredictResult + * @classdesc Represents a TableSpec. + * @implements ITableSpec * @constructor - * @param {google.cloud.automl.v1beta1.IBatchPredictResult=} [properties] Properties to set + * @param {google.cloud.automl.v1beta1.ITableSpec=} [properties] Properties to set */ - function BatchPredictResult(properties) { - this.metadata = {}; + function TableSpec(properties) { + this.inputConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57055,81 +56885,156 @@ } /** - * BatchPredictResult metadata. - * @member {Object.} metadata - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * TableSpec name. + * @member {string} name + * @memberof google.cloud.automl.v1beta1.TableSpec * @instance */ - BatchPredictResult.prototype.metadata = $util.emptyObject; + TableSpec.prototype.name = ""; /** - * Creates a new BatchPredictResult instance using the specified properties. + * TableSpec timeColumnSpecId. + * @member {string} timeColumnSpecId + * @memberof google.cloud.automl.v1beta1.TableSpec + * @instance + */ + TableSpec.prototype.timeColumnSpecId = ""; + + /** + * TableSpec rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.automl.v1beta1.TableSpec + * @instance + */ + TableSpec.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableSpec validRowCount. + * @member {number|Long} validRowCount + * @memberof google.cloud.automl.v1beta1.TableSpec + * @instance + */ + TableSpec.prototype.validRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableSpec columnCount. + * @member {number|Long} columnCount + * @memberof google.cloud.automl.v1beta1.TableSpec + * @instance + */ + TableSpec.prototype.columnCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableSpec inputConfigs. + * @member {Array.} inputConfigs + * @memberof google.cloud.automl.v1beta1.TableSpec + * @instance + */ + TableSpec.prototype.inputConfigs = $util.emptyArray; + + /** + * TableSpec etag. + * @member {string} etag + * @memberof google.cloud.automl.v1beta1.TableSpec + * @instance + */ + TableSpec.prototype.etag = ""; + + /** + * Creates a new TableSpec instance using the specified properties. * @function create - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictResult=} [properties] Properties to set - * @returns {google.cloud.automl.v1beta1.BatchPredictResult} BatchPredictResult instance + * @param {google.cloud.automl.v1beta1.ITableSpec=} [properties] Properties to set + * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec instance */ - BatchPredictResult.create = function create(properties) { - return new BatchPredictResult(properties); + TableSpec.create = function create(properties) { + return new TableSpec(properties); }; /** - * Encodes the specified BatchPredictResult message. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. + * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.automl.v1beta1.TableSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictResult} message BatchPredictResult message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITableSpec} message TableSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictResult.encode = function encode(message, writer) { + TableSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeColumnSpecId != null && message.hasOwnProperty("timeColumnSpecId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.timeColumnSpecId); + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowCount); + if (message.validRowCount != null && message.hasOwnProperty("validRowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.validRowCount); + if (message.inputConfigs != null && message.inputConfigs.length) + for (var i = 0; i < message.inputConfigs.length; ++i) + $root.google.cloud.automl.v1beta1.InputConfig.encode(message.inputConfigs[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.etag); + if (message.columnCount != null && message.hasOwnProperty("columnCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.columnCount); return writer; }; /** - * Encodes the specified BatchPredictResult message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.BatchPredictResult.verify|verify} messages. + * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.automl.v1beta1.TableSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @static - * @param {google.cloud.automl.v1beta1.IBatchPredictResult} message BatchPredictResult message or plain object to encode + * @param {google.cloud.automl.v1beta1.ITableSpec} message TableSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchPredictResult.encodeDelimited = function encodeDelimited(message, writer) { + TableSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchPredictResult message from the specified reader or buffer. + * Decodes a TableSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.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.automl.v1beta1.BatchPredictResult} BatchPredictResult + * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictResult.decode = function decode(reader, length) { + 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.automl.v1beta1.BatchPredictResult(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.automl.v1beta1.TableSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.metadata === $util.emptyObject) - message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); + message.name = reader.string(); + break; + case 2: + message.timeColumnSpecId = reader.string(); + break; + case 3: + message.rowCount = reader.int64(); + break; + case 4: + message.validRowCount = reader.int64(); + break; + case 7: + message.columnCount = reader.int64(); + break; + case 5: + if (!(message.inputConfigs && message.inputConfigs.length)) + message.inputConfigs = []; + message.inputConfigs.push($root.google.cloud.automl.v1beta1.InputConfig.decode(reader, reader.uint32())); + break; + case 6: + message.etag = reader.string(); break; default: reader.skipType(tag & 7); @@ -57140,101 +57045,196 @@ }; /** - * Decodes a BatchPredictResult message from the specified reader or buffer, length delimited. + * Decodes a TableSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.automl.v1beta1.BatchPredictResult} BatchPredictResult + * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchPredictResult.decodeDelimited = function decodeDelimited(reader) { + TableSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchPredictResult message. + * Verifies a TableSpec message. * @function verify - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchPredictResult.verify = function verify(message) { + TableSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeColumnSpecId != null && message.hasOwnProperty("timeColumnSpecId")) + if (!$util.isString(message.timeColumnSpecId)) + return "timeColumnSpecId: string expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.validRowCount != null && message.hasOwnProperty("validRowCount")) + if (!$util.isInteger(message.validRowCount) && !(message.validRowCount && $util.isInteger(message.validRowCount.low) && $util.isInteger(message.validRowCount.high))) + return "validRowCount: integer|Long expected"; + if (message.columnCount != null && message.hasOwnProperty("columnCount")) + if (!$util.isInteger(message.columnCount) && !(message.columnCount && $util.isInteger(message.columnCount.low) && $util.isInteger(message.columnCount.high))) + return "columnCount: integer|Long expected"; + if (message.inputConfigs != null && message.hasOwnProperty("inputConfigs")) { + if (!Array.isArray(message.inputConfigs)) + return "inputConfigs: array expected"; + for (var i = 0; i < message.inputConfigs.length; ++i) { + var error = $root.google.cloud.automl.v1beta1.InputConfig.verify(message.inputConfigs[i]); + if (error) + return "inputConfigs." + error; + } } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates a BatchPredictResult 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. * @function fromObject - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.automl.v1beta1.BatchPredictResult} BatchPredictResult + * @returns {google.cloud.automl.v1beta1.TableSpec} TableSpec */ - BatchPredictResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.automl.v1beta1.BatchPredictResult) + TableSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.automl.v1beta1.TableSpec) return object; - var message = new $root.google.cloud.automl.v1beta1.BatchPredictResult(); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.automl.v1beta1.BatchPredictResult.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + var message = new $root.google.cloud.automl.v1beta1.TableSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.timeColumnSpecId != null) + message.timeColumnSpecId = String(object.timeColumnSpecId); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.validRowCount != null) + if ($util.Long) + (message.validRowCount = $util.Long.fromValue(object.validRowCount)).unsigned = false; + else if (typeof object.validRowCount === "string") + message.validRowCount = parseInt(object.validRowCount, 10); + else if (typeof object.validRowCount === "number") + message.validRowCount = object.validRowCount; + else if (typeof object.validRowCount === "object") + message.validRowCount = new $util.LongBits(object.validRowCount.low >>> 0, object.validRowCount.high >>> 0).toNumber(); + if (object.columnCount != null) + if ($util.Long) + (message.columnCount = $util.Long.fromValue(object.columnCount)).unsigned = false; + else if (typeof object.columnCount === "string") + message.columnCount = parseInt(object.columnCount, 10); + else if (typeof object.columnCount === "number") + message.columnCount = object.columnCount; + else if (typeof object.columnCount === "object") + message.columnCount = new $util.LongBits(object.columnCount.low >>> 0, object.columnCount.high >>> 0).toNumber(); + if (object.inputConfigs) { + if (!Array.isArray(object.inputConfigs)) + throw TypeError(".google.cloud.automl.v1beta1.TableSpec.inputConfigs: array expected"); + message.inputConfigs = []; + for (var i = 0; i < object.inputConfigs.length; ++i) { + if (typeof object.inputConfigs[i] !== "object") + throw TypeError(".google.cloud.automl.v1beta1.TableSpec.inputConfigs: object expected"); + message.inputConfigs[i] = $root.google.cloud.automl.v1beta1.InputConfig.fromObject(object.inputConfigs[i]); + } } + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a BatchPredictResult message. Also converts values to other types if specified. + * Creates a plain object from a TableSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @static - * @param {google.cloud.automl.v1beta1.BatchPredictResult} message BatchPredictResult + * @param {google.cloud.automl.v1beta1.TableSpec} message TableSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchPredictResult.toObject = function toObject(message, options) { + TableSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + if (options.arrays || options.defaults) + object.inputConfigs = []; + if (options.defaults) { + object.name = ""; + object.timeColumnSpecId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.validRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.validRowCount = options.longs === String ? "0" : 0; + object.etag = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.columnCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.columnCount = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeColumnSpecId != null && message.hasOwnProperty("timeColumnSpecId")) + object.timeColumnSpecId = message.timeColumnSpecId; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.validRowCount != null && message.hasOwnProperty("validRowCount")) + if (typeof message.validRowCount === "number") + object.validRowCount = options.longs === String ? String(message.validRowCount) : message.validRowCount; + else + object.validRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.validRowCount) : options.longs === Number ? new $util.LongBits(message.validRowCount.low >>> 0, message.validRowCount.high >>> 0).toNumber() : message.validRowCount; + if (message.inputConfigs && message.inputConfigs.length) { + object.inputConfigs = []; + for (var j = 0; j < message.inputConfigs.length; ++j) + object.inputConfigs[j] = $root.google.cloud.automl.v1beta1.InputConfig.toObject(message.inputConfigs[j], options); } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.columnCount != null && message.hasOwnProperty("columnCount")) + if (typeof message.columnCount === "number") + object.columnCount = options.longs === String ? String(message.columnCount) : message.columnCount; + else + object.columnCount = options.longs === String ? $util.Long.prototype.toString.call(message.columnCount) : options.longs === Number ? new $util.LongBits(message.columnCount.low >>> 0, message.columnCount.high >>> 0).toNumber() : message.columnCount; return object; }; /** - * Converts this BatchPredictResult to JSON. + * Converts this TableSpec to JSON. * @function toJSON - * @memberof google.cloud.automl.v1beta1.BatchPredictResult + * @memberof google.cloud.automl.v1beta1.TableSpec * @instance * @returns {Object.} JSON object */ - BatchPredictResult.prototype.toJSON = function toJSON() { + TableSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchPredictResult; + return TableSpec; })(); return v1beta1; @@ -57255,30 +57255,26 @@ */ var api = {}; - api.ResourceDescriptor = (function() { + api.Http = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a Http. * @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 - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57286,143 +57282,91 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * 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 + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.plural = ""; + Http.prototype.rules = $util.emptyArray; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.singular = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor 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 */ - ResourceDescriptor.encode = function encode(message, writer) { + Http.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.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); + 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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.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.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor 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 */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.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.ResourceDescriptor(); + 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.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - 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(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -57433,196 +57377,143 @@ }; /** - * Decodes a ResourceDescriptor 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.ResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.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 ResourceDescriptor message. + * Verifies a Http message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + Http.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"; - } - 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.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.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"; + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a ResourceDescriptor 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.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) 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]); - } - 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; + 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.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a ResourceDescriptor 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.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - 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]; + 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.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; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + Http.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 Http; })(); - api.ResourceReference = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceReference. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @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 ResourceReference. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceReference(properties) { + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57630,88 +57521,209 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.childType = ""; + HttpRule.prototype.get = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * 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 + */ + 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.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference 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 */ - ResourceReference.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.childType != null && message.hasOwnProperty("childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + 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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.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.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference 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 */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.ResourceReference} ResourceReference + * @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 */ - ResourceReference.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.ResourceReference(); + 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: - message.childType = reader.string(); + 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); @@ -57722,118 +57734,240 @@ }; /** - * Decodes a ResourceReference 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.ResourceReference + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.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 ResourceReference message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.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.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: 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.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 ResourceReference 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.ResourceReference + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) 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.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]); + } + } return message; }; /** - * Creates a plain object from a ResourceReference 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.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return HttpRule; })(); - api.Http = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Http. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Http. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57841,91 +57975,88 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.rules = $util.emptyArray; + CustomHttpPattern.prototype.kind = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new Http instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Http.create = function create(properties) { - return new Http(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http 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 */ - Http.encode = function encode(message, writer) { + CustomHttpPattern.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.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 Http message, length delimited. Does not implicitly {@link google.api.Http.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.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http 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 */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.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.Http(); + 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: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.kind = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -57936,143 +58067,144 @@ }; /** - * Decodes a Http 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.Http + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.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 Http message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + CustomHttpPattern.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.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean 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 Http 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.Http + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) 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]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + 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 Http 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.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.Http} message Http + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + CustomHttpPattern.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); + if (options.defaults) { + object.kind = ""; + object.path = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + 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 Http to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return CustomHttpPattern; })(); - api.HttpRule = (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 HttpRule. + * Properties of a ResourceDescriptor. * @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 + * @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 HttpRule. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58080,209 +58212,143 @@ } /** - * 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 + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.patch = ""; + ResourceDescriptor.prototype.type = ""; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.custom = null; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.body = ""; + ResourceDescriptor.prototype.nameField = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.responseBody = ""; + ResourceDescriptor.prototype.history = 0; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceDescriptor.prototype.plural = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceDescriptor.prototype.singular = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule 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 */ - HttpRule.encode = function encode(message, writer) { + ResourceDescriptor.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.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 HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.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.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule 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 */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule + * @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 */ - HttpRule.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.HttpRule(); + 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: - message.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; case 3: - message.put = reader.string(); + message.nameField = reader.string(); break; case 4: - message.post = reader.string(); + message.history = reader.int32(); break; case 5: - message["delete"] = reader.string(); + message.plural = 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())); + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -58293,240 +58359,196 @@ }; /** - * Decodes a HttpRule 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.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.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 HttpRule message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + ResourceDescriptor.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.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.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; + 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 HttpRule 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.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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); + 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.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]); - } + 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 HttpRule 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.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; + object.pattern = []; 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"; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - 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.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.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + 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 HttpRule to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * 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; })(); - api.CustomHttpPattern = (function() { + api.ResourceReference = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a ResourceReference. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58534,88 +58556,88 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.kind = ""; + ResourceReference.prototype.type = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.path = ""; + ResourceReference.prototype.childType = ""; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern 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 */ - CustomHttpPattern.encode = function encode(message, writer) { + ResourceReference.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.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 CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.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.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern 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 */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decode = function decode(reader, length) { + 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.CustomHttpPattern(); + 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.kind = reader.string(); + message.type = reader.string(); break; case 2: - message.path = reader.string(); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -58626,118 +58648,96 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + ResourceReference.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.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 CustomHttpPattern 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.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) 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.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 CustomHttpPattern 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.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.type = ""; + object.childType = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + 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 CustomHttpPattern to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ResourceReference.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 ResourceReference; })(); return api; @@ -63950,8 +63950,8 @@ * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** @@ -64028,20 +64028,20 @@ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** * Creates a new FieldOptions instance using the specified properties. @@ -64147,9 +64147,6 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; case 1052: if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) message[".google.api.fieldBehavior"] = []; @@ -64160,6 +64157,9 @@ } else message[".google.api.fieldBehavior"].push(reader.int32()); break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -64234,11 +64234,6 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; @@ -64255,6 +64250,11 @@ break; } } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } return null; }; @@ -64316,11 +64316,6 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } if (object[".google.api.fieldBehavior"]) { if (!Array.isArray(object[".google.api.fieldBehavior"])) throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); @@ -64354,6 +64349,11 @@ break; } } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } return message; }; @@ -67432,449 +67432,6 @@ return GeneratedCodeInfo; })(); - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(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]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.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.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Timestamp; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(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]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.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.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Any; - })(); - protobuf.Duration = (function() { /** @@ -68099,6 +67656,225 @@ return Duration; })(); + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.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.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + protobuf.Struct = (function() { /** @@ -68899,6 +68675,230 @@ return ListValue; })(); + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.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.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + protobuf.Empty = (function() { /** diff --git a/packages/google-cloud-automl/protos/protos.json b/packages/google-cloud-automl/protos/protos.json index 09d65eaf32b..b5ff78dad30 100644 --- a/packages/google-cloud-automl/protos/protos.json +++ b/packages/google-cloud-automl/protos/protos.json @@ -17,390 +17,304 @@ "java_outer_classname": "AutoMlProto" }, "nested": { - "OperationMetadata": { + "AnnotationPayload": { "oneofs": { - "details": { + "detail": { "oneof": [ - "deleteDetails", - "deployModelDetails", - "undeployModelDetails", - "createModelDetails", - "createDatasetDetails", - "importDataDetails", - "batchPredictDetails", - "exportDataDetails", - "exportModelDetails" + "translation", + "classification", + "imageObjectDetection", + "textExtraction", + "textSentiment" ] } }, "fields": { - "deleteDetails": { - "type": "DeleteOperationMetadata", - "id": 8 - }, - "deployModelDetails": { - "type": "DeployModelOperationMetadata", - "id": 24 - }, - "undeployModelDetails": { - "type": "UndeployModelOperationMetadata", - "id": 25 - }, - "createModelDetails": { - "type": "CreateModelOperationMetadata", - "id": 10 - }, - "createDatasetDetails": { - "type": "CreateDatasetOperationMetadata", - "id": 30 - }, - "importDataDetails": { - "type": "ImportDataOperationMetadata", - "id": 15 - }, - "batchPredictDetails": { - "type": "BatchPredictOperationMetadata", - "id": 16 + "translation": { + "type": "TranslationAnnotation", + "id": 2 }, - "exportDataDetails": { - "type": "ExportDataOperationMetadata", - "id": 21 + "classification": { + "type": "ClassificationAnnotation", + "id": 3 }, - "exportModelDetails": { - "type": "ExportModelOperationMetadata", - "id": 22 + "imageObjectDetection": { + "type": "ImageObjectDetectionAnnotation", + "id": 4 }, - "progressPercent": { - "type": "int32", - "id": 13 + "textExtraction": { + "type": "TextExtractionAnnotation", + "id": 6 }, - "partialFailures": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 2 + "textSentiment": { + "type": "TextSentimentAnnotation", + "id": 7 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 + "annotationSpecId": { + "type": "string", + "id": 1 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4 + "displayName": { + "type": "string", + "id": 5 } } }, - "DeleteOperationMetadata": { - "fields": {} - }, - "DeployModelOperationMetadata": { - "fields": {} - }, - "UndeployModelOperationMetadata": { - "fields": {} - }, - "CreateDatasetOperationMetadata": { - "fields": {} - }, - "CreateModelOperationMetadata": { - "fields": {} - }, - "ImportDataOperationMetadata": { - "fields": {} + "ClassificationType": { + "values": { + "CLASSIFICATION_TYPE_UNSPECIFIED": 0, + "MULTICLASS": 1, + "MULTILABEL": 2 + } }, - "ExportDataOperationMetadata": { + "ClassificationAnnotation": { "fields": { - "outputInfo": { - "type": "ExportDataOutputInfo", + "score": { + "type": "float", "id": 1 } - }, - "nested": { - "ExportDataOutputInfo": { - "oneofs": { - "outputLocation": { - "oneof": [ - "gcsOutputDirectory" - ] - } - }, - "fields": { - "gcsOutputDirectory": { - "type": "string", - "id": 1 - } - } - } } }, - "BatchPredictOperationMetadata": { + "ClassificationEvaluationMetrics": { "fields": { - "inputConfig": { - "type": "BatchPredictInputConfig", + "auPrc": { + "type": "float", "id": 1 }, - "outputInfo": { - "type": "BatchPredictOutputInfo", - "id": 2 + "auRoc": { + "type": "float", + "id": 6 + }, + "logLoss": { + "type": "float", + "id": 7 + }, + "confidenceMetricsEntry": { + "rule": "repeated", + "type": "ConfidenceMetricsEntry", + "id": 3 + }, + "confusionMatrix": { + "type": "ConfusionMatrix", + "id": 4 + }, + "annotationSpecId": { + "rule": "repeated", + "type": "string", + "id": 5 } }, "nested": { - "BatchPredictOutputInfo": { - "oneofs": { - "outputLocation": { - "oneof": [ - "gcsOutputDirectory" - ] + "ConfidenceMetricsEntry": { + "fields": { + "confidenceThreshold": { + "type": "float", + "id": 1 + }, + "positionThreshold": { + "type": "int32", + "id": 14 + }, + "recall": { + "type": "float", + "id": 2 + }, + "precision": { + "type": "float", + "id": 3 + }, + "falsePositiveRate": { + "type": "float", + "id": 8 + }, + "f1Score": { + "type": "float", + "id": 4 + }, + "recallAt1": { + "type": "float", + "id": 5 + }, + "precisionAt1": { + "type": "float", + "id": 6 + }, + "falsePositiveRateAt1": { + "type": "float", + "id": 9 + }, + "f1ScoreAt1": { + "type": "float", + "id": 7 + }, + "truePositiveCount": { + "type": "int64", + "id": 10 + }, + "falsePositiveCount": { + "type": "int64", + "id": 11 + }, + "falseNegativeCount": { + "type": "int64", + "id": 12 + }, + "trueNegativeCount": { + "type": "int64", + "id": 13 } - }, + } + }, + "ConfusionMatrix": { "fields": { - "gcsOutputDirectory": { + "annotationSpecId": { + "rule": "repeated", "type": "string", "id": 1 + }, + "displayName": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "row": { + "rule": "repeated", + "type": "Row", + "id": 2 + } + }, + "nested": { + "Row": { + "fields": { + "exampleCount": { + "rule": "repeated", + "type": "int32", + "id": 1 + } + } } } } } }, - "ExportModelOperationMetadata": { + "ImageObjectDetectionAnnotation": { "fields": { - "outputInfo": { - "type": "ExportModelOutputInfo", + "boundingBox": { + "type": "BoundingPoly", + "id": 1 + }, + "score": { + "type": "float", "id": 2 } - }, - "nested": { - "ExportModelOutputInfo": { - "fields": { - "gcsOutputDirectory": { - "type": "string", - "id": 1 - } - } - } } }, - "Dataset": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/Dataset", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}" - }, - "oneofs": { - "datasetMetadata": { - "oneof": [ - "translationDatasetMetadata", - "imageClassificationDatasetMetadata", - "textClassificationDatasetMetadata", - "imageObjectDetectionDatasetMetadata", - "textExtractionDatasetMetadata", - "textSentimentDatasetMetadata" - ] - } - }, + "BoundingBoxMetricsEntry": { "fields": { - "translationDatasetMetadata": { - "type": "TranslationDatasetMetadata", - "id": 23 - }, - "imageClassificationDatasetMetadata": { - "type": "ImageClassificationDatasetMetadata", - "id": 24 - }, - "textClassificationDatasetMetadata": { - "type": "TextClassificationDatasetMetadata", - "id": 25 - }, - "imageObjectDetectionDatasetMetadata": { - "type": "ImageObjectDetectionDatasetMetadata", - "id": 26 - }, - "textExtractionDatasetMetadata": { - "type": "TextExtractionDatasetMetadata", - "id": 28 - }, - "textSentimentDatasetMetadata": { - "type": "TextSentimentDatasetMetadata", - "id": 30 - }, - "name": { - "type": "string", + "iouThreshold": { + "type": "float", "id": 1 }, - "displayName": { - "type": "string", + "meanAveragePrecision": { + "type": "float", "id": 2 }, - "description": { - "type": "string", + "confidenceMetricsEntries": { + "rule": "repeated", + "type": "ConfidenceMetricsEntry", "id": 3 - }, - "exampleCount": { - "type": "int32", - "id": 21 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 14 - }, - "etag": { - "type": "string", - "id": 17 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 39 } - } - }, - "ImageClassificationDatasetMetadata": { - "fields": { - "classificationType": { - "type": "ClassificationType", - "id": 1 + }, + "nested": { + "ConfidenceMetricsEntry": { + "fields": { + "confidenceThreshold": { + "type": "float", + "id": 1 + }, + "recall": { + "type": "float", + "id": 2 + }, + "precision": { + "type": "float", + "id": 3 + }, + "f1Score": { + "type": "float", + "id": 4 + } + } } } }, - "ImageObjectDetectionDatasetMetadata": { - "fields": {} - }, - "ImageClassificationModelMetadata": { + "ImageObjectDetectionEvaluationMetrics": { "fields": { - "baseModelId": { - "type": "string", + "evaluatedBoundingBoxCount": { + "type": "int32", "id": 1 }, - "trainBudgetMilliNodeHours": { - "type": "int64", - "id": 16 - }, - "trainCostMilliNodeHours": { - "type": "int64", - "id": 17 - }, - "stopReason": { - "type": "string", - "id": 5 - }, - "modelType": { - "type": "string", - "id": 7 - }, - "nodeQps": { - "type": "double", - "id": 13 + "boundingBoxMetricsEntries": { + "rule": "repeated", + "type": "BoundingBoxMetricsEntry", + "id": 2 }, - "nodeCount": { - "type": "int64", - "id": 14 + "boundingBoxMeanAveragePrecision": { + "type": "float", + "id": 3 } } }, - "ImageObjectDetectionModelMetadata": { + "NormalizedVertex": { "fields": { - "modelType": { - "type": "string", + "x": { + "type": "float", "id": 1 }, - "nodeCount": { - "type": "int64", - "id": 3 - }, - "nodeQps": { - "type": "double", - "id": 4 - }, - "stopReason": { - "type": "string", - "id": 5 - }, - "trainBudgetMilliNodeHours": { - "type": "int64", - "id": 6 - }, - "trainCostMilliNodeHours": { - "type": "int64", - "id": 7 + "y": { + "type": "float", + "id": 2 } } }, - "ImageClassificationModelDeploymentMetadata": { + "BoundingPoly": { "fields": { - "nodeCount": { - "type": "int64", - "id": 1 + "normalizedVertices": { + "rule": "repeated", + "type": "NormalizedVertex", + "id": 2 } } }, - "ImageObjectDetectionModelDeploymentMetadata": { - "fields": { - "nodeCount": { - "type": "int64", - "id": 1 + "TextExtractionAnnotation": { + "oneofs": { + "annotation": { + "oneof": [ + "textSegment" + ] } - } - }, - "AnnotationSpec": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/AnnotationSpec", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" }, "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 + "textSegment": { + "type": "TextSegment", + "id": 3 }, - "exampleCount": { - "type": "int32", - "id": 9 - } - } - }, - "ClassificationType": { - "values": { - "CLASSIFICATION_TYPE_UNSPECIFIED": 0, - "MULTICLASS": 1, - "MULTILABEL": 2 - } - }, - "ClassificationAnnotation": { - "fields": { "score": { "type": "float", "id": 1 } } }, - "ClassificationEvaluationMetrics": { + "TextExtractionEvaluationMetrics": { "fields": { "auPrc": { "type": "float", "id": 1 }, - "auRoc": { - "type": "float", - "id": 6 - }, - "logLoss": { - "type": "float", - "id": 7 - }, - "confidenceMetricsEntry": { + "confidenceMetricsEntries": { "rule": "repeated", "type": "ConfidenceMetricsEntry", - "id": 3 - }, - "confusionMatrix": { - "type": "ConfusionMatrix", - "id": 4 - }, - "annotationSpecId": { - "rule": "repeated", - "type": "string", - "id": 5 + "id": 2 } }, "nested": { @@ -410,125 +324,82 @@ "type": "float", "id": 1 }, - "positionThreshold": { - "type": "int32", - "id": 14 - }, "recall": { - "type": "float", - "id": 2 - }, - "precision": { "type": "float", "id": 3 }, - "falsePositiveRate": { - "type": "float", - "id": 8 - }, - "f1Score": { + "precision": { "type": "float", "id": 4 }, - "recallAt1": { + "f1Score": { "type": "float", "id": 5 - }, - "precisionAt1": { - "type": "float", - "id": 6 - }, - "falsePositiveRateAt1": { - "type": "float", - "id": 9 - }, - "f1ScoreAt1": { - "type": "float", - "id": 7 - }, - "truePositiveCount": { - "type": "int64", - "id": 10 - }, - "falsePositiveCount": { - "type": "int64", - "id": 11 - }, - "falseNegativeCount": { - "type": "int64", - "id": 12 - }, - "trueNegativeCount": { - "type": "int64", - "id": 13 - } - } - }, - "ConfusionMatrix": { - "fields": { - "annotationSpecId": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "displayName": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "row": { - "rule": "repeated", - "type": "Row", - "id": 2 - } - }, - "nested": { - "Row": { - "fields": { - "exampleCount": { - "rule": "repeated", - "type": "int32", - "id": 1 - } - } } } } } }, - "TextClassificationDatasetMetadata": { + "TextSegment": { "fields": { - "classificationType": { - "type": "ClassificationType", + "content": { + "type": "string", + "id": 3 + }, + "startOffset": { + "type": "int64", "id": 1 + }, + "endOffset": { + "type": "int64", + "id": 2 } } }, - "TextClassificationModelMetadata": { + "TextSentimentAnnotation": { "fields": { - "classificationType": { - "type": "ClassificationType", - "id": 3 + "sentiment": { + "type": "int32", + "id": 1 } } }, - "TextExtractionDatasetMetadata": { - "fields": {} - }, - "TextExtractionModelMetadata": { - "fields": {} - }, - "TextSentimentDatasetMetadata": { + "TextSentimentEvaluationMetrics": { "fields": { - "sentimentMax": { - "type": "int32", + "precision": { + "type": "float", "id": 1 + }, + "recall": { + "type": "float", + "id": 2 + }, + "f1Score": { + "type": "float", + "id": 3 + }, + "meanAbsoluteError": { + "type": "float", + "id": 4 + }, + "meanSquaredError": { + "type": "float", + "id": 5 + }, + "linearKappa": { + "type": "float", + "id": 6 + }, + "quadraticKappa": { + "type": "float", + "id": 7 + }, + "confusionMatrix": { + "type": "ClassificationEvaluationMetrics.ConfusionMatrix", + "id": 8 } } }, - "TextSentimentModelMetadata": { - "fields": {} - }, "TranslationDatasetMetadata": { "fields": { "sourceLanguageCode": { @@ -732,27 +603,6 @@ } } }, - "NormalizedVertex": { - "fields": { - "x": { - "type": "float", - "id": 1 - }, - "y": { - "type": "float", - "id": 2 - } - } - }, - "BoundingPoly": { - "fields": { - "normalizedVertices": { - "rule": "repeated", - "type": "NormalizedVertex", - "id": 2 - } - } - }, "InputConfig": { "oneofs": { "source": { @@ -885,399 +735,218 @@ } } }, - "TextSegment": { + "AnnotationSpec": { + "options": { + "(google.api.resource).type": "automl.googleapis.com/AnnotationSpec", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" + }, "fields": { - "content": { + "name": { "type": "string", - "id": 3 - }, - "startOffset": { - "type": "int64", - "id": 1 - }, - "endOffset": { - "type": "int64", - "id": 2 - } - } - }, - "TextSentimentAnnotation": { - "fields": { - "sentiment": { - "type": "int32", - "id": 1 - } - } - }, - "TextSentimentEvaluationMetrics": { - "fields": { - "precision": { - "type": "float", "id": 1 }, - "recall": { - "type": "float", + "displayName": { + "type": "string", "id": 2 }, - "f1Score": { - "type": "float", - "id": 3 - }, - "meanAbsoluteError": { - "type": "float", - "id": 4 - }, - "meanSquaredError": { - "type": "float", - "id": 5 - }, - "linearKappa": { - "type": "float", - "id": 6 - }, - "quadraticKappa": { - "type": "float", - "id": 7 - }, - "confusionMatrix": { - "type": "ClassificationEvaluationMetrics.ConfusionMatrix", - "id": 8 + "exampleCount": { + "type": "int32", + "id": 9 } } }, - "ModelEvaluation": { + "Dataset": { "options": { - "(google.api.resource).type": "automl.googleapis.com/ModelEvaluation", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}" + "(google.api.resource).type": "automl.googleapis.com/Dataset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}" }, "oneofs": { - "metrics": { + "datasetMetadata": { "oneof": [ - "classificationEvaluationMetrics", - "translationEvaluationMetrics", - "imageObjectDetectionEvaluationMetrics", - "textSentimentEvaluationMetrics", - "textExtractionEvaluationMetrics" + "translationDatasetMetadata", + "imageClassificationDatasetMetadata", + "textClassificationDatasetMetadata", + "imageObjectDetectionDatasetMetadata", + "textExtractionDatasetMetadata", + "textSentimentDatasetMetadata" ] } }, "fields": { - "classificationEvaluationMetrics": { - "type": "ClassificationEvaluationMetrics", - "id": 8 + "translationDatasetMetadata": { + "type": "TranslationDatasetMetadata", + "id": 23 }, - "translationEvaluationMetrics": { - "type": "TranslationEvaluationMetrics", - "id": 9 + "imageClassificationDatasetMetadata": { + "type": "ImageClassificationDatasetMetadata", + "id": 24 }, - "imageObjectDetectionEvaluationMetrics": { - "type": "ImageObjectDetectionEvaluationMetrics", - "id": 12 + "textClassificationDatasetMetadata": { + "type": "TextClassificationDatasetMetadata", + "id": 25 }, - "textSentimentEvaluationMetrics": { - "type": "TextSentimentEvaluationMetrics", - "id": 11 + "imageObjectDetectionDatasetMetadata": { + "type": "ImageObjectDetectionDatasetMetadata", + "id": 26 }, - "textExtractionEvaluationMetrics": { - "type": "TextExtractionEvaluationMetrics", - "id": 13 + "textExtractionDatasetMetadata": { + "type": "TextExtractionDatasetMetadata", + "id": 28 + }, + "textSentimentDatasetMetadata": { + "type": "TextSentimentDatasetMetadata", + "id": 30 }, "name": { "type": "string", "id": 1 }, - "annotationSpecId": { + "displayName": { "type": "string", "id": 2 }, - "displayName": { + "description": { "type": "string", - "id": 15 + "id": 3 + }, + "exampleCount": { + "type": "int32", + "id": 21 }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 14 }, - "evaluatedExampleCount": { - "type": "int32", - "id": 6 + "etag": { + "type": "string", + "id": 17 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 39 } } }, - "ImageObjectDetectionAnnotation": { + "ImageClassificationDatasetMetadata": { "fields": { - "boundingBox": { - "type": "BoundingPoly", + "classificationType": { + "type": "ClassificationType", "id": 1 - }, - "score": { - "type": "float", - "id": 2 } } }, - "BoundingBoxMetricsEntry": { + "ImageObjectDetectionDatasetMetadata": { + "fields": {} + }, + "ImageClassificationModelMetadata": { "fields": { - "iouThreshold": { - "type": "float", + "baseModelId": { + "type": "string", "id": 1 }, - "meanAveragePrecision": { - "type": "float", - "id": 2 + "trainBudgetMilliNodeHours": { + "type": "int64", + "id": 16 }, - "confidenceMetricsEntries": { - "rule": "repeated", - "type": "ConfidenceMetricsEntry", - "id": 3 - } - }, - "nested": { - "ConfidenceMetricsEntry": { - "fields": { - "confidenceThreshold": { - "type": "float", - "id": 1 - }, - "recall": { - "type": "float", - "id": 2 - }, - "precision": { - "type": "float", - "id": 3 - }, - "f1Score": { - "type": "float", - "id": 4 - } - } + "trainCostMilliNodeHours": { + "type": "int64", + "id": 17 + }, + "stopReason": { + "type": "string", + "id": 5 + }, + "modelType": { + "type": "string", + "id": 7 + }, + "nodeQps": { + "type": "double", + "id": 13 + }, + "nodeCount": { + "type": "int64", + "id": 14 } } }, - "ImageObjectDetectionEvaluationMetrics": { + "ImageObjectDetectionModelMetadata": { "fields": { - "evaluatedBoundingBoxCount": { - "type": "int32", + "modelType": { + "type": "string", "id": 1 }, - "boundingBoxMetricsEntries": { - "rule": "repeated", - "type": "BoundingBoxMetricsEntry", - "id": 2 - }, - "boundingBoxMeanAveragePrecision": { - "type": "float", + "nodeCount": { + "type": "int64", "id": 3 + }, + "nodeQps": { + "type": "double", + "id": 4 + }, + "stopReason": { + "type": "string", + "id": 5 + }, + "trainBudgetMilliNodeHours": { + "type": "int64", + "id": 6 + }, + "trainCostMilliNodeHours": { + "type": "int64", + "id": 7 } } }, - "TextExtractionAnnotation": { - "oneofs": { - "annotation": { - "oneof": [ - "textSegment" - ] - } - }, + "ImageClassificationModelDeploymentMetadata": { "fields": { - "textSegment": { - "type": "TextSegment", - "id": 3 - }, - "score": { - "type": "float", + "nodeCount": { + "type": "int64", "id": 1 } } }, - "TextExtractionEvaluationMetrics": { + "ImageObjectDetectionModelDeploymentMetadata": { "fields": { - "auPrc": { - "type": "float", + "nodeCount": { + "type": "int64", "id": 1 - }, - "confidenceMetricsEntries": { - "rule": "repeated", - "type": "ConfidenceMetricsEntry", - "id": 2 - } - }, - "nested": { - "ConfidenceMetricsEntry": { - "fields": { - "confidenceThreshold": { - "type": "float", - "id": 1 - }, - "recall": { - "type": "float", - "id": 3 - }, - "precision": { - "type": "float", - "id": 4 - }, - "f1Score": { - "type": "float", - "id": 5 - } - } } } }, - "PredictionService": { - "options": { - "(google.api.default_host)": "automl.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "Predict": { - "requestType": "PredictRequest", - "responseType": "PredictResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:predict", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,payload,params" - } - }, - "BatchPredict": { - "requestType": "BatchPredictRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:batchPredict", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,input_config,output_config,params", - "(google.longrunning.operation_info).response_type": "BatchPredictResult", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "TextClassificationDatasetMetadata": { + "fields": { + "classificationType": { + "type": "ClassificationType", + "id": 1 } } }, - "PredictRequest": { + "TextClassificationModelMetadata": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } - }, - "payload": { - "type": "ExamplePayload", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "params": { - "keyType": "string", - "type": "string", + "classificationType": { + "type": "ClassificationType", "id": 3 } } }, - "PredictResponse": { + "TextExtractionDatasetMetadata": { + "fields": {} + }, + "TextExtractionModelMetadata": { + "fields": {} + }, + "TextSentimentDatasetMetadata": { "fields": { - "payload": { - "rule": "repeated", - "type": "AnnotationPayload", - "id": 1 - }, - "preprocessedInput": { - "type": "ExamplePayload", - "id": 3 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "BatchPredictRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } - }, - "inputConfig": { - "type": "BatchPredictInputConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "outputConfig": { - "type": "BatchPredictOutputConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "params": { - "keyType": "string", - "type": "string", - "id": 5 - } - } - }, - "BatchPredictResult": { - "fields": { - "metadata": { - "keyType": "string", - "type": "string", + "sentimentMax": { + "type": "int32", "id": 1 } } }, - "AnnotationPayload": { - "oneofs": { - "detail": { - "oneof": [ - "translation", - "classification", - "imageObjectDetection", - "textExtraction", - "textSentiment" - ] - } - }, - "fields": { - "translation": { - "type": "TranslationAnnotation", - "id": 2 - }, - "classification": { - "type": "ClassificationAnnotation", - "id": 3 - }, - "imageObjectDetection": { - "type": "ImageObjectDetectionAnnotation", - "id": 4 - }, - "textExtraction": { - "type": "TextExtractionAnnotation", - "id": 6 - }, - "textSentiment": { - "type": "TextSentimentAnnotation", - "id": 7 - }, - "annotationSpecId": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 5 - } - } + "TextSentimentModelMetadata": { + "fields": {} }, "Model": { "options": { @@ -1365,232 +1034,563 @@ } } }, - "AutoMl": { + "ModelEvaluation": { "options": { - "(google.api.default_host)": "automl.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + "(google.api.resource).type": "automl.googleapis.com/ModelEvaluation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}" }, - "methods": { - "CreateDataset": { - "requestType": "CreateDatasetRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/datasets", - "(google.api.http).body": "dataset", - "(google.api.method_signature)": "parent,dataset", - "(google.longrunning.operation_info).response_type": "Dataset", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "oneofs": { + "metrics": { + "oneof": [ + "classificationEvaluationMetrics", + "translationEvaluationMetrics", + "imageObjectDetectionEvaluationMetrics", + "textSentimentEvaluationMetrics", + "textExtractionEvaluationMetrics" + ] + } + }, + "fields": { + "classificationEvaluationMetrics": { + "type": "ClassificationEvaluationMetrics", + "id": 8 }, - "GetDataset": { - "requestType": "GetDatasetRequest", - "responseType": "Dataset", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/datasets/*}", - "(google.api.method_signature)": "name" - } + "translationEvaluationMetrics": { + "type": "TranslationEvaluationMetrics", + "id": 9 }, - "ListDatasets": { - "requestType": "ListDatasetsRequest", - "responseType": "ListDatasetsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/datasets", - "(google.api.method_signature)": "parent" - } + "imageObjectDetectionEvaluationMetrics": { + "type": "ImageObjectDetectionEvaluationMetrics", + "id": 12 }, - "UpdateDataset": { - "requestType": "UpdateDatasetRequest", - "responseType": "Dataset", - "options": { - "(google.api.http).patch": "/v1/{dataset.name=projects/*/locations/*/datasets/*}", - "(google.api.http).body": "dataset", - "(google.api.method_signature)": "dataset,update_mask" - } + "textSentimentEvaluationMetrics": { + "type": "TextSentimentEvaluationMetrics", + "id": 11 }, - "DeleteDataset": { - "requestType": "DeleteDatasetRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/datasets/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "textExtractionEvaluationMetrics": { + "type": "TextExtractionEvaluationMetrics", + "id": 13 }, - "ImportData": { - "requestType": "ImportDataRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/datasets/*}:importData", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,input_config", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "name": { + "type": "string", + "id": 1 }, - "ExportData": { - "requestType": "ExportDataRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/datasets/*}:exportData", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,output_config", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "annotationSpecId": { + "type": "string", + "id": 2 }, - "GetAnnotationSpec": { - "requestType": "GetAnnotationSpecRequest", - "responseType": "AnnotationSpec", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}", - "(google.api.method_signature)": "name" - } + "displayName": { + "type": "string", + "id": 15 }, - "CreateModel": { - "requestType": "CreateModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/models", - "(google.api.http).body": "model", - "(google.api.method_signature)": "parent,model", - "(google.longrunning.operation_info).response_type": "Model", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 }, - "GetModel": { - "requestType": "GetModelRequest", - "responseType": "Model", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/models/*}", - "(google.api.method_signature)": "name" - } + "evaluatedExampleCount": { + "type": "int32", + "id": 6 + } + } + }, + "OperationMetadata": { + "oneofs": { + "details": { + "oneof": [ + "deleteDetails", + "deployModelDetails", + "undeployModelDetails", + "createModelDetails", + "createDatasetDetails", + "importDataDetails", + "batchPredictDetails", + "exportDataDetails", + "exportModelDetails" + ] + } + }, + "fields": { + "deleteDetails": { + "type": "DeleteOperationMetadata", + "id": 8 }, - "ListModels": { - "requestType": "ListModelsRequest", - "responseType": "ListModelsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/models", - "(google.api.method_signature)": "parent" - } + "deployModelDetails": { + "type": "DeployModelOperationMetadata", + "id": 24 }, - "DeleteModel": { - "requestType": "DeleteModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/models/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "undeployModelDetails": { + "type": "UndeployModelOperationMetadata", + "id": 25 }, - "UpdateModel": { - "requestType": "UpdateModelRequest", - "responseType": "Model", - "options": { - "(google.api.http).patch": "/v1/{model.name=projects/*/locations/*/models/*}", - "(google.api.http).body": "model", - "(google.api.method_signature)": "model,update_mask" - } + "createModelDetails": { + "type": "CreateModelOperationMetadata", + "id": 10 }, - "DeployModel": { - "requestType": "DeployModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:deploy", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "createDatasetDetails": { + "type": "CreateDatasetOperationMetadata", + "id": 30 + }, + "importDataDetails": { + "type": "ImportDataOperationMetadata", + "id": 15 + }, + "batchPredictDetails": { + "type": "BatchPredictOperationMetadata", + "id": 16 + }, + "exportDataDetails": { + "type": "ExportDataOperationMetadata", + "id": 21 + }, + "exportModelDetails": { + "type": "ExportModelOperationMetadata", + "id": 22 + }, + "progressPercent": { + "type": "int32", + "id": 13 + }, + "partialFailures": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "DeleteOperationMetadata": { + "fields": {} + }, + "DeployModelOperationMetadata": { + "fields": {} + }, + "UndeployModelOperationMetadata": { + "fields": {} + }, + "CreateDatasetOperationMetadata": { + "fields": {} + }, + "CreateModelOperationMetadata": { + "fields": {} + }, + "ImportDataOperationMetadata": { + "fields": {} + }, + "ExportDataOperationMetadata": { + "fields": { + "outputInfo": { + "type": "ExportDataOutputInfo", + "id": 1 + } + }, + "nested": { + "ExportDataOutputInfo": { + "oneofs": { + "outputLocation": { + "oneof": [ + "gcsOutputDirectory" + ] + } + }, + "fields": { + "gcsOutputDirectory": { + "type": "string", + "id": 1 + } } + } + } + }, + "BatchPredictOperationMetadata": { + "fields": { + "inputConfig": { + "type": "BatchPredictInputConfig", + "id": 1 }, - "UndeployModel": { - "requestType": "UndeployModelRequest", - "responseType": "google.longrunning.Operation", + "outputInfo": { + "type": "BatchPredictOutputInfo", + "id": 2 + } + }, + "nested": { + "BatchPredictOutputInfo": { + "oneofs": { + "outputLocation": { + "oneof": [ + "gcsOutputDirectory" + ] + } + }, + "fields": { + "gcsOutputDirectory": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ExportModelOperationMetadata": { + "fields": { + "outputInfo": { + "type": "ExportModelOutputInfo", + "id": 2 + } + }, + "nested": { + "ExportModelOutputInfo": { + "fields": { + "gcsOutputDirectory": { + "type": "string", + "id": 1 + } + } + } + } + }, + "PredictionService": { + "options": { + "(google.api.default_host)": "automl.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "Predict": { + "requestType": "PredictRequest", + "responseType": "PredictResponse", "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:undeploy", + "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:predict", "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.api.method_signature)": "name,payload,params" } }, - "ExportModel": { - "requestType": "ExportModelRequest", + "BatchPredict": { + "requestType": "BatchPredictRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:export", + "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:batchPredict", "(google.api.http).body": "*", - "(google.api.method_signature)": "name,output_config", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.api.method_signature)": "name,input_config,output_config,params", + "(google.longrunning.operation_info).response_type": "BatchPredictResult", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" } - }, - "GetModelEvaluation": { - "requestType": "GetModelEvaluationRequest", - "responseType": "ModelEvaluation", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}", - "(google.api.method_signature)": "name" - } - }, - "ListModelEvaluations": { - "requestType": "ListModelEvaluationsRequest", - "responseType": "ListModelEvaluationsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations", - "(google.api.method_signature)": "parent,filter" - } } } }, - "CreateDatasetRequest": { + "PredictRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "automl.googleapis.com/Model" } }, - "dataset": { - "type": "Dataset", + "payload": { + "type": "ExamplePayload", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "params": { + "keyType": "string", + "type": "string", + "id": 3 } } }, - "GetDatasetRequest": { + "PredictResponse": { "fields": { - "name": { + "payload": { + "rule": "repeated", + "type": "AnnotationPayload", + "id": 1 + }, + "preprocessedInput": { + "type": "ExamplePayload", + "id": 3 + }, + "metadata": { + "keyType": "string", "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" - } + "id": 2 } } }, - "ListDatasetsRequest": { + "BatchPredictRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "automl.googleapis.com/Model" } }, - "filter": { - "type": "string", - "id": 3 - }, - "pageSize": { - "type": "int32", + "inputConfig": { + "type": "BatchPredictInputConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "outputConfig": { + "type": "BatchPredictOutputConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "params": { + "keyType": "string", + "type": "string", + "id": 5 + } + } + }, + "BatchPredictResult": { + "fields": { + "metadata": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "AutoMl": { + "options": { + "(google.api.default_host)": "automl.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateDataset": { + "requestType": "CreateDatasetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/datasets", + "(google.api.http).body": "dataset", + "(google.api.method_signature)": "parent,dataset", + "(google.longrunning.operation_info).response_type": "Dataset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetDataset": { + "requestType": "GetDatasetRequest", + "responseType": "Dataset", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/datasets/*}", + "(google.api.method_signature)": "name" + } + }, + "ListDatasets": { + "requestType": "ListDatasetsRequest", + "responseType": "ListDatasetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/datasets", + "(google.api.method_signature)": "parent" + } + }, + "UpdateDataset": { + "requestType": "UpdateDatasetRequest", + "responseType": "Dataset", + "options": { + "(google.api.http).patch": "/v1/{dataset.name=projects/*/locations/*/datasets/*}", + "(google.api.http).body": "dataset", + "(google.api.method_signature)": "dataset,update_mask" + } + }, + "DeleteDataset": { + "requestType": "DeleteDatasetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/datasets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ImportData": { + "requestType": "ImportDataRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/datasets/*}:importData", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,input_config", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ExportData": { + "requestType": "ExportDataRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/datasets/*}:exportData", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,output_config", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetAnnotationSpec": { + "requestType": "GetAnnotationSpecRequest", + "responseType": "AnnotationSpec", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}", + "(google.api.method_signature)": "name" + } + }, + "CreateModel": { + "requestType": "CreateModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/models", + "(google.api.http).body": "model", + "(google.api.method_signature)": "parent,model", + "(google.longrunning.operation_info).response_type": "Model", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetModel": { + "requestType": "GetModelRequest", + "responseType": "Model", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/models/*}", + "(google.api.method_signature)": "name" + } + }, + "ListModels": { + "requestType": "ListModelsRequest", + "responseType": "ListModelsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/models", + "(google.api.method_signature)": "parent" + } + }, + "DeleteModel": { + "requestType": "DeleteModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/models/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "UpdateModel": { + "requestType": "UpdateModelRequest", + "responseType": "Model", + "options": { + "(google.api.http).patch": "/v1/{model.name=projects/*/locations/*/models/*}", + "(google.api.http).body": "model", + "(google.api.method_signature)": "model,update_mask" + } + }, + "DeployModel": { + "requestType": "DeployModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:deploy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "UndeployModel": { + "requestType": "UndeployModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:undeploy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ExportModel": { + "requestType": "ExportModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/models/*}:export", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,output_config", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetModelEvaluation": { + "requestType": "GetModelEvaluationRequest", + "responseType": "ModelEvaluation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}", + "(google.api.method_signature)": "name" + } + }, + "ListModelEvaluations": { + "requestType": "ListModelEvaluationsRequest", + "responseType": "ListModelEvaluationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations", + "(google.api.method_signature)": "parent,filter" + } + } + } + }, + "CreateDatasetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "dataset": { + "type": "Dataset", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetDatasetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" + } + } + } + }, + "ListDatasetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", "id": 4 }, "pageToken": { @@ -1907,2714 +1907,2725 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl", "java_multiple_files": true, - "java_outer_classname": "PredictionServiceProto", "java_package": "com.google.cloud.automl.v1beta1", "php_namespace": "Google\\Cloud\\AutoMl\\V1beta1", - "ruby_package": "Google::Cloud::AutoML::V1beta1" + "ruby_package": "Google::Cloud::AutoML::V1beta1", + "java_outer_classname": "AutoMlProto" }, "nested": { - "AutoMl": { - "options": { - "(google.api.default_host)": "automl.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + "AnnotationPayload": { + "oneofs": { + "detail": { + "oneof": [ + "translation", + "classification", + "imageObjectDetection", + "videoClassification", + "videoObjectTracking", + "textExtraction", + "textSentiment", + "tables" + ] + } }, - "methods": { - "CreateDataset": { - "requestType": "CreateDatasetRequest", - "responseType": "Dataset", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/datasets", - "(google.api.http).body": "dataset", - "(google.api.method_signature)": "parent,dataset" - } - }, - "GetDataset": { - "requestType": "GetDatasetRequest", - "responseType": "Dataset", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*}", - "(google.api.method_signature)": "name" - } + "fields": { + "translation": { + "type": "TranslationAnnotation", + "id": 2 }, - "ListDatasets": { - "requestType": "ListDatasetsRequest", - "responseType": "ListDatasetsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/datasets", - "(google.api.method_signature)": "parent" - } + "classification": { + "type": "ClassificationAnnotation", + "id": 3 }, - "UpdateDataset": { - "requestType": "UpdateDatasetRequest", - "responseType": "Dataset", - "options": { - "(google.api.http).patch": "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}", - "(google.api.http).body": "dataset", - "(google.api.method_signature)": "dataset" - } + "imageObjectDetection": { + "type": "ImageObjectDetectionAnnotation", + "id": 4 }, - "DeleteDataset": { - "requestType": "DeleteDatasetRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/datasets/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "videoClassification": { + "type": "VideoClassificationAnnotation", + "id": 9 }, - "ImportData": { - "requestType": "ImportDataRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,input_config", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "videoObjectTracking": { + "type": "VideoObjectTrackingAnnotation", + "id": 8 }, - "ExportData": { - "requestType": "ExportDataRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,output_config", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "textExtraction": { + "type": "TextExtractionAnnotation", + "id": 6 }, - "GetAnnotationSpec": { - "requestType": "GetAnnotationSpecRequest", - "responseType": "AnnotationSpec", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}", - "(google.api.method_signature)": "name" - } + "textSentiment": { + "type": "TextSentimentAnnotation", + "id": 7 }, - "GetTableSpec": { - "requestType": "GetTableSpecRequest", - "responseType": "TableSpec", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}", - "(google.api.method_signature)": "name" - } + "tables": { + "type": "TablesAnnotation", + "id": 10 }, - "ListTableSpecs": { - "requestType": "ListTableSpecsRequest", - "responseType": "ListTableSpecsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs", - "(google.api.method_signature)": "parent" - } + "annotationSpecId": { + "type": "string", + "id": 1 }, - "UpdateTableSpec": { - "requestType": "UpdateTableSpecRequest", - "responseType": "TableSpec", - "options": { - "(google.api.http).patch": "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}", - "(google.api.http).body": "table_spec", - "(google.api.method_signature)": "table_spec" - } + "displayName": { + "type": "string", + "id": 5 + } + } + }, + "ClassificationType": { + "values": { + "CLASSIFICATION_TYPE_UNSPECIFIED": 0, + "MULTICLASS": 1, + "MULTILABEL": 2 + } + }, + "ClassificationAnnotation": { + "fields": { + "score": { + "type": "float", + "id": 1 + } + } + }, + "VideoClassificationAnnotation": { + "fields": { + "type": { + "type": "string", + "id": 1 }, - "GetColumnSpec": { - "requestType": "GetColumnSpecRequest", - "responseType": "ColumnSpec", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}", - "(google.api.method_signature)": "name" - } + "classificationAnnotation": { + "type": "ClassificationAnnotation", + "id": 2 }, - "ListColumnSpecs": { - "requestType": "ListColumnSpecsRequest", - "responseType": "ListColumnSpecsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs", - "(google.api.method_signature)": "parent" - } + "timeSegment": { + "type": "TimeSegment", + "id": 3 + } + } + }, + "ClassificationEvaluationMetrics": { + "fields": { + "auPrc": { + "type": "float", + "id": 1 }, - "UpdateColumnSpec": { - "requestType": "UpdateColumnSpecRequest", - "responseType": "ColumnSpec", + "baseAuPrc": { + "type": "float", + "id": 2, "options": { - "(google.api.http).patch": "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}", - "(google.api.http).body": "column_spec", - "(google.api.method_signature)": "column_spec" + "deprecated": true } }, - "CreateModel": { - "requestType": "CreateModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/models", - "(google.api.http).body": "model", - "(google.api.method_signature)": "parent,model", - "(google.longrunning.operation_info).response_type": "Model", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "auRoc": { + "type": "float", + "id": 6 }, - "GetModel": { - "requestType": "GetModelRequest", - "responseType": "Model", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/models/*}", - "(google.api.method_signature)": "name" - } + "logLoss": { + "type": "float", + "id": 7 }, - "ListModels": { - "requestType": "ListModelsRequest", - "responseType": "ListModelsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/models", - "(google.api.method_signature)": "parent" - } + "confidenceMetricsEntry": { + "rule": "repeated", + "type": "ConfidenceMetricsEntry", + "id": 3 }, - "DeleteModel": { - "requestType": "DeleteModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/models/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + "confusionMatrix": { + "type": "ConfusionMatrix", + "id": 4 }, - "DeployModel": { - "requestType": "DeployModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:deploy", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } - }, - "UndeployModel": { - "requestType": "UndeployModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } - }, - "ExportModel": { - "requestType": "ExportModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:export", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,output_config", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } - }, - "ExportEvaluatedExamples": { - "requestType": "ExportEvaluatedExamplesRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,output_config", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } - }, - "GetModelEvaluation": { - "requestType": "GetModelEvaluationRequest", - "responseType": "ModelEvaluation", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}", - "(google.api.method_signature)": "name" + "annotationSpecId": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "ConfidenceMetricsEntry": { + "fields": { + "confidenceThreshold": { + "type": "float", + "id": 1 + }, + "positionThreshold": { + "type": "int32", + "id": 14 + }, + "recall": { + "type": "float", + "id": 2 + }, + "precision": { + "type": "float", + "id": 3 + }, + "falsePositiveRate": { + "type": "float", + "id": 8 + }, + "f1Score": { + "type": "float", + "id": 4 + }, + "recallAt1": { + "type": "float", + "id": 5 + }, + "precisionAt1": { + "type": "float", + "id": 6 + }, + "falsePositiveRateAt1": { + "type": "float", + "id": 9 + }, + "f1ScoreAt1": { + "type": "float", + "id": 7 + }, + "truePositiveCount": { + "type": "int64", + "id": 10 + }, + "falsePositiveCount": { + "type": "int64", + "id": 11 + }, + "falseNegativeCount": { + "type": "int64", + "id": 12 + }, + "trueNegativeCount": { + "type": "int64", + "id": 13 + } } }, - "ListModelEvaluations": { - "requestType": "ListModelEvaluationsRequest", - "responseType": "ListModelEvaluationsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations", - "(google.api.method_signature)": "parent" + "ConfusionMatrix": { + "fields": { + "annotationSpecId": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "displayName": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "row": { + "rule": "repeated", + "type": "Row", + "id": 2 + } + }, + "nested": { + "Row": { + "fields": { + "exampleCount": { + "rule": "repeated", + "type": "int32", + "id": 1 + } + } + } } } } }, - "CreateDatasetRequest": { + "TimeSegment": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 1 }, - "dataset": { - "type": "Dataset", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 2 } } }, - "GetDatasetRequest": { + "ImageObjectDetectionAnnotation": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" - } + "boundingBox": { + "type": "BoundingPoly", + "id": 1 + }, + "score": { + "type": "float", + "id": 2 } } }, - "ListDatasetsRequest": { + "VideoObjectTrackingAnnotation": { "fields": { - "parent": { + "instanceId": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } + "id": 1 }, - "filter": { - "type": "string", + "timeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "boundingBox": { + "type": "BoundingPoly", "id": 3 }, - "pageSize": { - "type": "int32", + "score": { + "type": "float", "id": 4 - }, - "pageToken": { - "type": "string", - "id": 6 } } }, - "ListDatasetsResponse": { + "BoundingBoxMetricsEntry": { "fields": { - "datasets": { - "rule": "repeated", - "type": "Dataset", + "iouThreshold": { + "type": "float", "id": 1 }, - "nextPageToken": { - "type": "string", + "meanAveragePrecision": { + "type": "float", "id": 2 + }, + "confidenceMetricsEntries": { + "rule": "repeated", + "type": "ConfidenceMetricsEntry", + "id": 3 } - } - }, - "UpdateDatasetRequest": { - "fields": { - "dataset": { - "type": "Dataset", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + }, + "nested": { + "ConfidenceMetricsEntry": { + "fields": { + "confidenceThreshold": { + "type": "float", + "id": 1 + }, + "recall": { + "type": "float", + "id": 2 + }, + "precision": { + "type": "float", + "id": 3 + }, + "f1Score": { + "type": "float", + "id": 4 + } } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 } } }, - "DeleteDatasetRequest": { + "ImageObjectDetectionEvaluationMetrics": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" - } - } - } - }, - "ImportDataRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" - } + "evaluatedBoundingBoxCount": { + "type": "int32", + "id": 1 }, - "inputConfig": { - "type": "InputConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "boundingBoxMetricsEntries": { + "rule": "repeated", + "type": "BoundingBoxMetricsEntry", + "id": 2 + }, + "boundingBoxMeanAveragePrecision": { + "type": "float", + "id": 3 } } }, - "ExportDataRequest": { + "VideoObjectTrackingEvaluationMetrics": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" - } + "evaluatedFrameCount": { + "type": "int32", + "id": 1 }, - "outputConfig": { - "type": "OutputConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "evaluatedBoundingBoxCount": { + "type": "int32", + "id": 2 + }, + "boundingBoxMetricsEntries": { + "rule": "repeated", + "type": "BoundingBoxMetricsEntry", + "id": 4 + }, + "boundingBoxMeanAveragePrecision": { + "type": "float", + "id": 6 } } }, - "GetAnnotationSpecRequest": { + "NormalizedVertex": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/AnnotationSpec" - } + "x": { + "type": "float", + "id": 1 + }, + "y": { + "type": "float", + "id": 2 } } }, - "GetTableSpecRequest": { + "BoundingPoly": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/TableSpec" - } - }, - "fieldMask": { - "type": "google.protobuf.FieldMask", + "normalizedVertices": { + "rule": "repeated", + "type": "NormalizedVertex", "id": 2 } } }, - "ListTableSpecsRequest": { + "TablesDatasetMetadata": { "fields": { - "parent": { + "primaryTableSpecId": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" - } + "id": 1 }, - "fieldMask": { - "type": "google.protobuf.FieldMask", + "targetColumnSpecId": { + "type": "string", "id": 2 }, - "filter": { + "weightColumnSpecId": { "type": "string", "id": 3 }, - "pageSize": { - "type": "int32", + "mlUseColumnSpecId": { + "type": "string", "id": 4 }, - "pageToken": { - "type": "string", + "targetColumnCorrelations": { + "keyType": "string", + "type": "CorrelationStats", "id": 6 + }, + "statsUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 7 } } }, - "ListTableSpecsResponse": { + "TablesModelMetadata": { + "oneofs": { + "additionalOptimizationObjectiveConfig": { + "oneof": [ + "optimizationObjectiveRecallValue", + "optimizationObjectivePrecisionValue" + ] + } + }, "fields": { - "tableSpecs": { + "optimizationObjectiveRecallValue": { + "type": "float", + "id": 17 + }, + "optimizationObjectivePrecisionValue": { + "type": "float", + "id": 18 + }, + "targetColumnSpec": { + "type": "ColumnSpec", + "id": 2 + }, + "inputFeatureColumnSpecs": { "rule": "repeated", - "type": "TableSpec", - "id": 1 + "type": "ColumnSpec", + "id": 3 }, - "nextPageToken": { + "optimizationObjective": { "type": "string", - "id": 2 + "id": 4 + }, + "tablesModelColumnInfo": { + "rule": "repeated", + "type": "TablesModelColumnInfo", + "id": 5 + }, + "trainBudgetMilliNodeHours": { + "type": "int64", + "id": 6 + }, + "trainCostMilliNodeHours": { + "type": "int64", + "id": 7 + }, + "disableEarlyStopping": { + "type": "bool", + "id": 12 } } }, - "UpdateTableSpecRequest": { + "TablesAnnotation": { "fields": { - "tableSpec": { - "type": "TableSpec", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "score": { + "type": "float", + "id": 1 }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "predictionInterval": { + "type": "DoubleRange", + "id": 4 + }, + "value": { + "type": "google.protobuf.Value", "id": 2 + }, + "tablesModelColumnInfo": { + "rule": "repeated", + "type": "TablesModelColumnInfo", + "id": 3 + }, + "baselineScore": { + "type": "float", + "id": 5 } } }, - "GetColumnSpecRequest": { + "TablesModelColumnInfo": { "fields": { - "name": { + "columnSpecName": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/ColumnSpec" - } + "id": 1 }, - "fieldMask": { - "type": "google.protobuf.FieldMask", + "columnDisplayName": { + "type": "string", "id": 2 + }, + "featureImportance": { + "type": "float", + "id": 3 } } }, - "ListColumnSpecsRequest": { + "ColumnSpec": { + "options": { + "(google.api.resource).type": "automl.googleapis.com/ColumnSpec", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}" + }, "fields": { - "parent": { + "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/TableSpec" - } + "id": 1 }, - "fieldMask": { - "type": "google.protobuf.FieldMask", + "dataType": { + "type": "DataType", "id": 2 }, - "filter": { + "displayName": { "type": "string", "id": 3 }, - "pageSize": { - "type": "int32", + "dataStats": { + "type": "DataStats", "id": 4 }, - "pageToken": { + "topCorrelatedColumns": { + "rule": "repeated", + "type": "CorrelatedColumn", + "id": 5 + }, + "etag": { "type": "string", "id": 6 } - } - }, - "ListColumnSpecsResponse": { - "fields": { - "columnSpecs": { - "rule": "repeated", - "type": "ColumnSpec", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 + }, + "nested": { + "CorrelatedColumn": { + "fields": { + "columnSpecId": { + "type": "string", + "id": 1 + }, + "correlationStats": { + "type": "CorrelationStats", + "id": 2 + } + } } } }, - "UpdateColumnSpecRequest": { + "DataStats": { + "oneofs": { + "stats": { + "oneof": [ + "float64Stats", + "stringStats", + "timestampStats", + "arrayStats", + "structStats", + "categoryStats" + ] + } + }, "fields": { - "columnSpec": { - "type": "ColumnSpec", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "float64Stats": { + "type": "Float64Stats", + "id": 3 }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "stringStats": { + "type": "StringStats", + "id": 4 + }, + "timestampStats": { + "type": "TimestampStats", + "id": 5 + }, + "arrayStats": { + "type": "ArrayStats", + "id": 6 + }, + "structStats": { + "type": "StructStats", + "id": 7 + }, + "categoryStats": { + "type": "CategoryStats", + "id": 8 + }, + "distinctValueCount": { + "type": "int64", + "id": 1 + }, + "nullValueCount": { + "type": "int64", "id": 2 + }, + "validValueCount": { + "type": "int64", + "id": 9 } } }, - "CreateModelRequest": { + "Float64Stats": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } + "mean": { + "type": "double", + "id": 1 }, - "model": { - "type": "Model", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "standardDeviation": { + "type": "double", + "id": 2 + }, + "quantiles": { + "rule": "repeated", + "type": "double", + "id": 3 + }, + "histogramBuckets": { + "rule": "repeated", + "type": "HistogramBucket", + "id": 4 + } + }, + "nested": { + "HistogramBucket": { + "fields": { + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + }, + "count": { + "type": "int64", + "id": 3 + } } } } }, - "GetModelRequest": { + "StringStats": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" + "topUnigramStats": { + "rule": "repeated", + "type": "UnigramStats", + "id": 1 + } + }, + "nested": { + "UnigramStats": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "count": { + "type": "int64", + "id": 2 + } } } } }, - "ListModelsRequest": { + "TimestampStats": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "granularStats": { + "keyType": "string", + "type": "GranularStats", + "id": 1 + } + }, + "nested": { + "GranularStats": { + "fields": { + "buckets": { + "keyType": "int32", + "type": "int64", + "id": 1 + } } - }, - "filter": { - "type": "string", - "id": 3 - }, - "pageSize": { - "type": "int32", - "id": 4 - }, - "pageToken": { - "type": "string", - "id": 6 } } }, - "ListModelsResponse": { + "ArrayStats": { "fields": { - "model": { - "rule": "repeated", - "type": "Model", - "id": 1 - }, - "nextPageToken": { - "type": "string", + "memberStats": { + "type": "DataStats", "id": 2 } } }, - "DeleteModelRequest": { + "StructStats": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } + "fieldStats": { + "keyType": "string", + "type": "DataStats", + "id": 1 } } }, - "DeployModelRequest": { - "oneofs": { - "modelDeploymentMetadata": { - "oneof": [ - "imageObjectDetectionModelDeploymentMetadata", - "imageClassificationModelDeploymentMetadata" - ] + "CategoryStats": { + "fields": { + "topCategoryStats": { + "rule": "repeated", + "type": "SingleCategoryStats", + "id": 1 } }, - "fields": { - "imageObjectDetectionModelDeploymentMetadata": { - "type": "ImageObjectDetectionModelDeploymentMetadata", - "id": 2 - }, - "imageClassificationModelDeploymentMetadata": { - "type": "ImageClassificationModelDeploymentMetadata", - "id": 4 - }, - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" + "nested": { + "SingleCategoryStats": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "count": { + "type": "int64", + "id": 2 + } } } } }, - "UndeployModelRequest": { + "CorrelationStats": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } + "cramersV": { + "type": "double", + "id": 1 } } }, - "ExportModelRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } - }, - "outputConfig": { - "type": "ModelExportOutputConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExportEvaluatedExamplesRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } - }, - "outputConfig": { - "type": "ExportEvaluatedExamplesOutputConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } + "TypeCode": { + "values": { + "TYPE_CODE_UNSPECIFIED": 0, + "FLOAT64": 3, + "TIMESTAMP": 4, + "STRING": 6, + "ARRAY": 8, + "STRUCT": 9, + "CATEGORY": 10 } }, - "GetModelEvaluationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/ModelEvaluation" - } + "DataType": { + "oneofs": { + "details": { + "oneof": [ + "listElementType", + "structType", + "timeFormat" + ] } - } - }, - "ListModelEvaluationsRequest": { + }, "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } + "listElementType": { + "type": "DataType", + "id": 2 }, - "filter": { - "type": "string", + "structType": { + "type": "StructType", "id": 3 }, - "pageSize": { - "type": "int32", - "id": 4 - }, - "pageToken": { + "timeFormat": { "type": "string", - "id": 6 + "id": 5 + }, + "typeCode": { + "type": "TypeCode", + "id": 1 + }, + "nullable": { + "type": "bool", + "id": 4 } } }, - "ListModelEvaluationsResponse": { + "StructType": { "fields": { - "modelEvaluation": { - "rule": "repeated", - "type": "ModelEvaluation", + "fields": { + "keyType": "string", + "type": "DataType", "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 } } }, - "AnnotationPayload": { + "Image": { "oneofs": { - "detail": { + "data": { "oneof": [ - "translation", - "classification", - "imageObjectDetection", - "videoClassification", - "videoObjectTracking", - "textExtraction", - "textSentiment", - "tables" + "imageBytes", + "inputConfig" ] } }, "fields": { - "translation": { - "type": "TranslationAnnotation", - "id": 2 - }, - "classification": { - "type": "ClassificationAnnotation", - "id": 3 - }, - "imageObjectDetection": { - "type": "ImageObjectDetectionAnnotation", - "id": 4 - }, - "videoClassification": { - "type": "VideoClassificationAnnotation", - "id": 9 - }, - "videoObjectTracking": { - "type": "VideoObjectTrackingAnnotation", - "id": 8 + "imageBytes": { + "type": "bytes", + "id": 1 }, - "textExtraction": { - "type": "TextExtractionAnnotation", + "inputConfig": { + "type": "InputConfig", "id": 6 }, - "textSentiment": { - "type": "TextSentimentAnnotation", - "id": 7 - }, - "tables": { - "type": "TablesAnnotation", - "id": 10 - }, - "annotationSpecId": { - "type": "string", - "id": 1 - }, - "displayName": { + "thumbnailUri": { "type": "string", - "id": 5 + "id": 4 } } }, - "ClassificationType": { - "values": { - "CLASSIFICATION_TYPE_UNSPECIFIED": 0, - "MULTICLASS": 1, - "MULTILABEL": 2 - } - }, - "ClassificationAnnotation": { + "TextSnippet": { "fields": { - "score": { - "type": "float", + "content": { + "type": "string", "id": 1 + }, + "mimeType": { + "type": "string", + "id": 2 + }, + "contentUri": { + "type": "string", + "id": 4 } } }, - "VideoClassificationAnnotation": { + "DocumentDimensions": { "fields": { - "type": { - "type": "string", + "unit": { + "type": "DocumentDimensionUnit", "id": 1 }, - "classificationAnnotation": { - "type": "ClassificationAnnotation", + "width": { + "type": "float", "id": 2 }, - "timeSegment": { - "type": "TimeSegment", + "height": { + "type": "float", "id": 3 } + }, + "nested": { + "DocumentDimensionUnit": { + "values": { + "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": 0, + "INCH": 1, + "CENTIMETER": 2, + "POINT": 3 + } + } } }, - "ClassificationEvaluationMetrics": { + "Document": { "fields": { - "auPrc": { - "type": "float", + "inputConfig": { + "type": "DocumentInputConfig", "id": 1 }, - "baseAuPrc": { - "type": "float", - "id": 2, - "options": { - "deprecated": true - } - }, - "auRoc": { - "type": "float", - "id": 6 - }, - "logLoss": { - "type": "float", - "id": 7 + "documentText": { + "type": "TextSnippet", + "id": 2 }, - "confidenceMetricsEntry": { + "layout": { "rule": "repeated", - "type": "ConfidenceMetricsEntry", + "type": "Layout", "id": 3 }, - "confusionMatrix": { - "type": "ConfusionMatrix", + "documentDimensions": { + "type": "DocumentDimensions", "id": 4 }, - "annotationSpecId": { - "rule": "repeated", - "type": "string", + "pageCount": { + "type": "int32", "id": 5 } }, "nested": { - "ConfidenceMetricsEntry": { + "Layout": { "fields": { - "confidenceThreshold": { - "type": "float", + "textSegment": { + "type": "TextSegment", "id": 1 }, - "positionThreshold": { + "pageNumber": { "type": "int32", - "id": 14 - }, - "recall": { - "type": "float", "id": 2 }, - "precision": { - "type": "float", + "boundingPoly": { + "type": "BoundingPoly", "id": 3 }, - "falsePositiveRate": { - "type": "float", - "id": 8 - }, - "f1Score": { - "type": "float", + "textSegmentType": { + "type": "TextSegmentType", "id": 4 - }, - "recallAt1": { - "type": "float", - "id": 5 - }, - "precisionAt1": { - "type": "float", - "id": 6 - }, - "falsePositiveRateAt1": { - "type": "float", - "id": 9 - }, - "f1ScoreAt1": { - "type": "float", - "id": 7 - }, - "truePositiveCount": { - "type": "int64", - "id": 10 - }, - "falsePositiveCount": { - "type": "int64", - "id": 11 - }, - "falseNegativeCount": { - "type": "int64", - "id": 12 - }, - "trueNegativeCount": { - "type": "int64", - "id": 13 - } - } - }, - "ConfusionMatrix": { - "fields": { - "annotationSpecId": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "displayName": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "row": { - "rule": "repeated", - "type": "Row", - "id": 2 } }, "nested": { - "Row": { - "fields": { - "exampleCount": { - "rule": "repeated", - "type": "int32", - "id": 1 - } + "TextSegmentType": { + "values": { + "TEXT_SEGMENT_TYPE_UNSPECIFIED": 0, + "TOKEN": 1, + "PARAGRAPH": 2, + "FORM_FIELD": 3, + "FORM_FIELD_NAME": 4, + "FORM_FIELD_CONTENTS": 5, + "TABLE": 6, + "TABLE_HEADER": 7, + "TABLE_ROW": 8, + "TABLE_CELL": 9 } } } } } }, - "TimeSegment": { + "Row": { "fields": { - "startTimeOffset": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "endTimeOffset": { - "type": "google.protobuf.Duration", + "columnSpecIds": { + "rule": "repeated", + "type": "string", "id": 2 + }, + "values": { + "rule": "repeated", + "type": "google.protobuf.Value", + "id": 3 } } }, - "ImageObjectDetectionAnnotation": { + "ExamplePayload": { + "oneofs": { + "payload": { + "oneof": [ + "image", + "textSnippet", + "document", + "row" + ] + } + }, "fields": { - "boundingBox": { - "type": "BoundingPoly", + "image": { + "type": "Image", "id": 1 }, - "score": { - "type": "float", + "textSnippet": { + "type": "TextSnippet", "id": 2 + }, + "document": { + "type": "Document", + "id": 4 + }, + "row": { + "type": "Row", + "id": 3 } } }, - "VideoObjectTrackingAnnotation": { + "InputConfig": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource", + "bigquerySource" + ] + } + }, "fields": { - "instanceId": { - "type": "string", + "gcsSource": { + "type": "GcsSource", "id": 1 }, - "timeOffset": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "boundingBox": { - "type": "BoundingPoly", + "bigquerySource": { + "type": "BigQuerySource", "id": 3 }, - "score": { - "type": "float", - "id": 4 + "params": { + "keyType": "string", + "type": "string", + "id": 2 } } }, - "BoundingBoxMetricsEntry": { + "BatchPredictInputConfig": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource", + "bigquerySource" + ] + } + }, "fields": { - "iouThreshold": { - "type": "float", + "gcsSource": { + "type": "GcsSource", "id": 1 }, - "meanAveragePrecision": { - "type": "float", + "bigquerySource": { + "type": "BigQuerySource", "id": 2 - }, - "confidenceMetricsEntries": { - "rule": "repeated", - "type": "ConfidenceMetricsEntry", - "id": 3 - } - }, - "nested": { - "ConfidenceMetricsEntry": { - "fields": { - "confidenceThreshold": { - "type": "float", - "id": 1 - }, - "recall": { - "type": "float", - "id": 2 - }, - "precision": { - "type": "float", - "id": 3 - }, - "f1Score": { - "type": "float", - "id": 4 - } - } } } }, - "ImageObjectDetectionEvaluationMetrics": { + "DocumentInputConfig": { "fields": { - "evaluatedBoundingBoxCount": { - "type": "int32", + "gcsSource": { + "type": "GcsSource", "id": 1 - }, - "boundingBoxMetricsEntries": { - "rule": "repeated", - "type": "BoundingBoxMetricsEntry", - "id": 2 - }, - "boundingBoxMeanAveragePrecision": { - "type": "float", - "id": 3 } } }, - "VideoObjectTrackingEvaluationMetrics": { + "OutputConfig": { + "oneofs": { + "destination": { + "oneof": [ + "gcsDestination", + "bigqueryDestination" + ] + } + }, "fields": { - "evaluatedFrameCount": { - "type": "int32", + "gcsDestination": { + "type": "GcsDestination", "id": 1 }, - "evaluatedBoundingBoxCount": { - "type": "int32", + "bigqueryDestination": { + "type": "BigQueryDestination", "id": 2 - }, - "boundingBoxMetricsEntries": { - "rule": "repeated", - "type": "BoundingBoxMetricsEntry", - "id": 4 - }, - "boundingBoxMeanAveragePrecision": { - "type": "float", - "id": 6 } } }, - "NormalizedVertex": { + "BatchPredictOutputConfig": { + "oneofs": { + "destination": { + "oneof": [ + "gcsDestination", + "bigqueryDestination" + ] + } + }, "fields": { - "x": { - "type": "float", + "gcsDestination": { + "type": "GcsDestination", "id": 1 }, - "y": { - "type": "float", + "bigqueryDestination": { + "type": "BigQueryDestination", "id": 2 } } }, - "BoundingPoly": { - "fields": { - "normalizedVertices": { - "rule": "repeated", - "type": "NormalizedVertex", - "id": 2 + "ModelExportOutputConfig": { + "oneofs": { + "destination": { + "oneof": [ + "gcsDestination", + "gcrDestination" + ] } - } - }, - "TablesDatasetMetadata": { + }, "fields": { - "primaryTableSpecId": { - "type": "string", + "gcsDestination": { + "type": "GcsDestination", "id": 1 }, - "targetColumnSpecId": { - "type": "string", - "id": 2 - }, - "weightColumnSpecId": { - "type": "string", + "gcrDestination": { + "type": "GcrDestination", "id": 3 }, - "mlUseColumnSpecId": { + "modelFormat": { "type": "string", "id": 4 }, - "targetColumnCorrelations": { + "params": { "keyType": "string", - "type": "CorrelationStats", - "id": 6 - }, - "statsUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 7 + "type": "string", + "id": 2 } } }, - "TablesModelMetadata": { + "ExportEvaluatedExamplesOutputConfig": { "oneofs": { - "additionalOptimizationObjectiveConfig": { + "destination": { "oneof": [ - "optimizationObjectiveRecallValue", - "optimizationObjectivePrecisionValue" + "bigqueryDestination" ] } }, "fields": { - "optimizationObjectiveRecallValue": { - "type": "float", - "id": 17 - }, - "optimizationObjectivePrecisionValue": { - "type": "float", - "id": 18 - }, - "targetColumnSpec": { - "type": "ColumnSpec", + "bigqueryDestination": { + "type": "BigQueryDestination", "id": 2 - }, - "inputFeatureColumnSpecs": { + } + } + }, + "GcsSource": { + "fields": { + "inputUris": { "rule": "repeated", - "type": "ColumnSpec", - "id": 3 - }, - "optimizationObjective": { "type": "string", - "id": 4 - }, - "tablesModelColumnInfo": { - "rule": "repeated", - "type": "TablesModelColumnInfo", - "id": 5 - }, - "trainBudgetMilliNodeHours": { - "type": "int64", - "id": 6 - }, - "trainCostMilliNodeHours": { - "type": "int64", - "id": 7 - }, - "disableEarlyStopping": { - "type": "bool", - "id": 12 + "id": 1 } } }, - "TablesAnnotation": { + "BigQuerySource": { "fields": { - "score": { - "type": "float", + "inputUri": { + "type": "string", "id": 1 - }, - "predictionInterval": { - "type": "DoubleRange", - "id": 4 - }, - "value": { - "type": "google.protobuf.Value", - "id": 2 - }, - "tablesModelColumnInfo": { - "rule": "repeated", - "type": "TablesModelColumnInfo", - "id": 3 - }, - "baselineScore": { - "type": "float", - "id": 5 } } }, - "TablesModelColumnInfo": { + "GcsDestination": { "fields": { - "columnSpecName": { + "outputUriPrefix": { "type": "string", "id": 1 - }, - "columnDisplayName": { - "type": "string", - "id": 2 - }, - "featureImportance": { - "type": "float", - "id": 3 } } }, - "ColumnSpec": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/ColumnSpec", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}" - }, + "BigQueryDestination": { "fields": { - "name": { + "outputUri": { "type": "string", "id": 1 - }, - "dataType": { - "type": "DataType", - "id": 2 - }, - "displayName": { - "type": "string", - "id": 3 - }, - "dataStats": { - "type": "DataStats", - "id": 4 - }, - "topCorrelatedColumns": { - "rule": "repeated", - "type": "CorrelatedColumn", - "id": 5 - }, - "etag": { - "type": "string", - "id": 6 - } - }, - "nested": { - "CorrelatedColumn": { - "fields": { - "columnSpecId": { - "type": "string", - "id": 1 - }, - "correlationStats": { - "type": "CorrelationStats", - "id": 2 - } - } } } }, - "DataStats": { - "oneofs": { - "stats": { - "oneof": [ - "float64Stats", - "stringStats", - "timestampStats", - "arrayStats", - "structStats", - "categoryStats" - ] + "GcrDestination": { + "fields": { + "outputUri": { + "type": "string", + "id": 1 } - }, + } + }, + "TextSegment": { "fields": { - "float64Stats": { - "type": "Float64Stats", + "content": { + "type": "string", "id": 3 }, - "stringStats": { - "type": "StringStats", - "id": 4 - }, - "timestampStats": { - "type": "TimestampStats", - "id": 5 - }, - "arrayStats": { - "type": "ArrayStats", - "id": 6 - }, - "structStats": { - "type": "StructStats", - "id": 7 - }, - "categoryStats": { - "type": "CategoryStats", - "id": 8 - }, - "distinctValueCount": { + "startOffset": { "type": "int64", "id": 1 }, - "nullValueCount": { + "endOffset": { "type": "int64", "id": 2 - }, - "validValueCount": { - "type": "int64", - "id": 9 } } }, - "Float64Stats": { + "DoubleRange": { "fields": { - "mean": { + "start": { "type": "double", "id": 1 }, - "standardDeviation": { + "end": { "type": "double", "id": 2 + } + } + }, + "RegressionEvaluationMetrics": { + "fields": { + "rootMeanSquaredError": { + "type": "float", + "id": 1 }, - "quantiles": { - "rule": "repeated", - "type": "double", + "meanAbsoluteError": { + "type": "float", + "id": 2 + }, + "meanAbsolutePercentageError": { + "type": "float", "id": 3 }, - "histogramBuckets": { - "rule": "repeated", - "type": "HistogramBucket", + "rSquared": { + "type": "float", "id": 4 - } - }, - "nested": { - "HistogramBucket": { - "fields": { - "min": { - "type": "double", - "id": 1 - }, - "max": { - "type": "double", - "id": 2 - }, - "count": { - "type": "int64", - "id": 3 - } - } + }, + "rootMeanSquaredLogError": { + "type": "float", + "id": 5 } } }, - "StringStats": { - "fields": { - "topUnigramStats": { - "rule": "repeated", - "type": "UnigramStats", - "id": 1 + "TextExtractionAnnotation": { + "oneofs": { + "annotation": { + "oneof": [ + "textSegment" + ] } }, - "nested": { - "UnigramStats": { - "fields": { - "value": { - "type": "string", - "id": 1 - }, - "count": { - "type": "int64", - "id": 2 - } - } - } - } - }, - "TimestampStats": { "fields": { - "granularStats": { - "keyType": "string", - "type": "GranularStats", + "textSegment": { + "type": "TextSegment", + "id": 3 + }, + "score": { + "type": "float", "id": 1 } - }, - "nested": { - "GranularStats": { - "fields": { - "buckets": { - "keyType": "int32", - "type": "int64", - "id": 1 - } - } - } - } - }, - "ArrayStats": { - "fields": { - "memberStats": { - "type": "DataStats", - "id": 2 - } } }, - "StructStats": { + "TextExtractionEvaluationMetrics": { "fields": { - "fieldStats": { - "keyType": "string", - "type": "DataStats", + "auPrc": { + "type": "float", "id": 1 - } - } - }, - "CategoryStats": { - "fields": { - "topCategoryStats": { + }, + "confidenceMetricsEntries": { "rule": "repeated", - "type": "SingleCategoryStats", - "id": 1 + "type": "ConfidenceMetricsEntry", + "id": 2 } }, "nested": { - "SingleCategoryStats": { + "ConfidenceMetricsEntry": { "fields": { - "value": { - "type": "string", + "confidenceThreshold": { + "type": "float", "id": 1 }, - "count": { - "type": "int64", - "id": 2 + "recall": { + "type": "float", + "id": 3 + }, + "precision": { + "type": "float", + "id": 4 + }, + "f1Score": { + "type": "float", + "id": 5 } } } } }, - "CorrelationStats": { + "TextSentimentAnnotation": { "fields": { - "cramersV": { - "type": "double", + "sentiment": { + "type": "int32", "id": 1 } } }, - "TypeCode": { - "values": { - "TYPE_CODE_UNSPECIFIED": 0, - "FLOAT64": 3, - "TIMESTAMP": 4, - "STRING": 6, - "ARRAY": 8, - "STRUCT": 9, - "CATEGORY": 10 - } - }, - "DataType": { - "oneofs": { - "details": { - "oneof": [ - "listElementType", - "structType", - "timeFormat" - ] - } - }, + "TextSentimentEvaluationMetrics": { "fields": { - "listElementType": { - "type": "DataType", + "precision": { + "type": "float", + "id": 1 + }, + "recall": { + "type": "float", "id": 2 }, - "structType": { - "type": "StructType", + "f1Score": { + "type": "float", "id": 3 }, - "timeFormat": { - "type": "string", + "meanAbsoluteError": { + "type": "float", + "id": 4 + }, + "meanSquaredError": { + "type": "float", "id": 5 }, - "typeCode": { - "type": "TypeCode", - "id": 1 + "linearKappa": { + "type": "float", + "id": 6 }, - "nullable": { - "type": "bool", - "id": 4 + "quadraticKappa": { + "type": "float", + "id": 7 + }, + "confusionMatrix": { + "type": "ClassificationEvaluationMetrics.ConfusionMatrix", + "id": 8 + }, + "annotationSpecId": { + "rule": "repeated", + "type": "string", + "id": 9, + "options": { + "deprecated": true + } } } }, - "StructType": { + "TranslationDatasetMetadata": { "fields": { - "fields": { - "keyType": "string", - "type": "DataType", - "id": 1 + "sourceLanguageCode": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "targetLanguageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "Image": { - "oneofs": { - "data": { - "oneof": [ - "imageBytes", - "inputConfig" - ] - } - }, + "TranslationEvaluationMetrics": { "fields": { - "imageBytes": { - "type": "bytes", + "bleuScore": { + "type": "double", "id": 1 }, - "inputConfig": { - "type": "InputConfig", - "id": 6 - }, - "thumbnailUri": { - "type": "string", - "id": 4 + "baseBleuScore": { + "type": "double", + "id": 2 } } }, - "TextSnippet": { + "TranslationModelMetadata": { "fields": { - "content": { + "baseModel": { "type": "string", "id": 1 }, - "mimeType": { + "sourceLanguageCode": { "type": "string", "id": 2 }, - "contentUri": { + "targetLanguageCode": { "type": "string", - "id": 4 + "id": 3 } } }, - "DocumentDimensions": { + "TranslationAnnotation": { "fields": { - "unit": { - "type": "DocumentDimensionUnit", + "translatedContent": { + "type": "TextSnippet", "id": 1 - }, - "width": { - "type": "float", - "id": 2 - }, - "height": { - "type": "float", - "id": 3 - } - }, - "nested": { - "DocumentDimensionUnit": { - "values": { - "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": 0, - "INCH": 1, - "CENTIMETER": 2, - "POINT": 3 - } } } }, - "Document": { + "AnnotationSpec": { + "options": { + "(google.api.resource).type": "automl.googleapis.com/AnnotationSpec", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" + }, "fields": { - "inputConfig": { - "type": "DocumentInputConfig", + "name": { + "type": "string", "id": 1 }, - "documentText": { - "type": "TextSnippet", - "id": 2 - }, - "layout": { - "rule": "repeated", - "type": "Layout", - "id": 3 - }, - "documentDimensions": { - "type": "DocumentDimensions", - "id": 4 - }, - "pageCount": { - "type": "int32", - "id": 5 - } - }, - "nested": { - "Layout": { - "fields": { - "textSegment": { - "type": "TextSegment", - "id": 1 - }, - "pageNumber": { - "type": "int32", - "id": 2 - }, - "boundingPoly": { - "type": "BoundingPoly", - "id": 3 - }, - "textSegmentType": { - "type": "TextSegmentType", - "id": 4 - } - }, - "nested": { - "TextSegmentType": { - "values": { - "TEXT_SEGMENT_TYPE_UNSPECIFIED": 0, - "TOKEN": 1, - "PARAGRAPH": 2, - "FORM_FIELD": 3, - "FORM_FIELD_NAME": 4, - "FORM_FIELD_CONTENTS": 5, - "TABLE": 6, - "TABLE_HEADER": 7, - "TABLE_ROW": 8, - "TABLE_CELL": 9 - } - } - } - } - } - }, - "Row": { - "fields": { - "columnSpecIds": { - "rule": "repeated", + "displayName": { "type": "string", "id": 2 }, - "values": { - "rule": "repeated", - "type": "google.protobuf.Value", - "id": 3 + "exampleCount": { + "type": "int32", + "id": 9 } } }, - "ExamplePayload": { + "Dataset": { + "options": { + "(google.api.resource).type": "automl.googleapis.com/Dataset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}" + }, "oneofs": { - "payload": { + "datasetMetadata": { "oneof": [ - "image", - "textSnippet", - "document", - "row" + "translationDatasetMetadata", + "imageClassificationDatasetMetadata", + "textClassificationDatasetMetadata", + "imageObjectDetectionDatasetMetadata", + "videoClassificationDatasetMetadata", + "videoObjectTrackingDatasetMetadata", + "textExtractionDatasetMetadata", + "textSentimentDatasetMetadata", + "tablesDatasetMetadata" ] } }, "fields": { - "image": { - "type": "Image", - "id": 1 + "translationDatasetMetadata": { + "type": "TranslationDatasetMetadata", + "id": 23 }, - "textSnippet": { - "type": "TextSnippet", - "id": 2 + "imageClassificationDatasetMetadata": { + "type": "ImageClassificationDatasetMetadata", + "id": 24 }, - "document": { - "type": "Document", - "id": 4 + "textClassificationDatasetMetadata": { + "type": "TextClassificationDatasetMetadata", + "id": 25 }, - "row": { - "type": "Row", - "id": 3 - } - } - }, - "InputConfig": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource", - "bigquerySource" - ] - } - }, - "fields": { - "gcsSource": { - "type": "GcsSource", - "id": 1 + "imageObjectDetectionDatasetMetadata": { + "type": "ImageObjectDetectionDatasetMetadata", + "id": 26 }, - "bigquerySource": { - "type": "BigQuerySource", - "id": 3 + "videoClassificationDatasetMetadata": { + "type": "VideoClassificationDatasetMetadata", + "id": 31 }, - "params": { - "keyType": "string", + "videoObjectTrackingDatasetMetadata": { + "type": "VideoObjectTrackingDatasetMetadata", + "id": 29 + }, + "textExtractionDatasetMetadata": { + "type": "TextExtractionDatasetMetadata", + "id": 28 + }, + "textSentimentDatasetMetadata": { + "type": "TextSentimentDatasetMetadata", + "id": 30 + }, + "tablesDatasetMetadata": { + "type": "TablesDatasetMetadata", + "id": 33 + }, + "name": { "type": "string", - "id": 2 - } - } - }, - "BatchPredictInputConfig": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource", - "bigquerySource" - ] - } - }, - "fields": { - "gcsSource": { - "type": "GcsSource", "id": 1 }, - "bigquerySource": { - "type": "BigQuerySource", + "displayName": { + "type": "string", "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "exampleCount": { + "type": "int32", + "id": 21 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + }, + "etag": { + "type": "string", + "id": 17 } } }, - "DocumentInputConfig": { + "ImageClassificationDatasetMetadata": { "fields": { - "gcsSource": { - "type": "GcsSource", + "classificationType": { + "type": "ClassificationType", "id": 1 } } }, - "OutputConfig": { - "oneofs": { - "destination": { - "oneof": [ - "gcsDestination", - "bigqueryDestination" - ] - } - }, + "ImageObjectDetectionDatasetMetadata": { + "fields": {} + }, + "ImageClassificationModelMetadata": { "fields": { - "gcsDestination": { - "type": "GcsDestination", + "baseModelId": { + "type": "string", "id": 1 }, - "bigqueryDestination": { - "type": "BigQueryDestination", + "trainBudget": { + "type": "int64", "id": 2 + }, + "trainCost": { + "type": "int64", + "id": 3 + }, + "stopReason": { + "type": "string", + "id": 5 + }, + "modelType": { + "type": "string", + "id": 7 + }, + "nodeQps": { + "type": "double", + "id": 13 + }, + "nodeCount": { + "type": "int64", + "id": 14 } } }, - "BatchPredictOutputConfig": { - "oneofs": { - "destination": { - "oneof": [ - "gcsDestination", - "bigqueryDestination" - ] - } - }, - "fields": { - "gcsDestination": { - "type": "GcsDestination", - "id": 1 - }, - "bigqueryDestination": { - "type": "BigQueryDestination", - "id": 2 - } - } - }, - "ModelExportOutputConfig": { - "oneofs": { - "destination": { - "oneof": [ - "gcsDestination", - "gcrDestination" - ] - } - }, + "ImageObjectDetectionModelMetadata": { "fields": { - "gcsDestination": { - "type": "GcsDestination", + "modelType": { + "type": "string", "id": 1 }, - "gcrDestination": { - "type": "GcrDestination", + "nodeCount": { + "type": "int64", "id": 3 }, - "modelFormat": { - "type": "string", + "nodeQps": { + "type": "double", "id": 4 }, - "params": { - "keyType": "string", + "stopReason": { "type": "string", - "id": 2 - } - } - }, - "ExportEvaluatedExamplesOutputConfig": { - "oneofs": { - "destination": { - "oneof": [ - "bigqueryDestination" - ] - } - }, - "fields": { - "bigqueryDestination": { - "type": "BigQueryDestination", - "id": 2 + "id": 5 + }, + "trainBudgetMilliNodeHours": { + "type": "int64", + "id": 6 + }, + "trainCostMilliNodeHours": { + "type": "int64", + "id": 7 } } }, - "GcsSource": { + "ImageClassificationModelDeploymentMetadata": { "fields": { - "inputUris": { - "rule": "repeated", - "type": "string", + "nodeCount": { + "type": "int64", "id": 1 } } }, - "BigQuerySource": { + "ImageObjectDetectionModelDeploymentMetadata": { "fields": { - "inputUri": { - "type": "string", + "nodeCount": { + "type": "int64", "id": 1 } } }, - "GcsDestination": { + "TextClassificationDatasetMetadata": { "fields": { - "outputUriPrefix": { - "type": "string", + "classificationType": { + "type": "ClassificationType", "id": 1 } } }, - "BigQueryDestination": { + "TextClassificationModelMetadata": { "fields": { - "outputUri": { - "type": "string", - "id": 1 + "classificationType": { + "type": "ClassificationType", + "id": 3 } } }, - "GcrDestination": { + "TextExtractionDatasetMetadata": { + "fields": {} + }, + "TextExtractionModelMetadata": { + "fields": {} + }, + "TextSentimentDatasetMetadata": { "fields": { - "outputUri": { - "type": "string", + "sentimentMax": { + "type": "int32", "id": 1 } } }, - "TextSegment": { + "TextSentimentModelMetadata": { + "fields": {} + }, + "VideoClassificationDatasetMetadata": { + "fields": {} + }, + "VideoObjectTrackingDatasetMetadata": { + "fields": {} + }, + "VideoClassificationModelMetadata": { + "fields": {} + }, + "VideoObjectTrackingModelMetadata": { + "fields": {} + }, + "Model": { + "options": { + "(google.api.resource).type": "automl.googleapis.com/Model", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/models/{model}" + }, + "oneofs": { + "modelMetadata": { + "oneof": [ + "translationModelMetadata", + "imageClassificationModelMetadata", + "textClassificationModelMetadata", + "imageObjectDetectionModelMetadata", + "videoClassificationModelMetadata", + "videoObjectTrackingModelMetadata", + "textExtractionModelMetadata", + "tablesModelMetadata", + "textSentimentModelMetadata" + ] + } + }, "fields": { - "content": { - "type": "string", - "id": 3 + "translationModelMetadata": { + "type": "TranslationModelMetadata", + "id": 15 }, - "startOffset": { - "type": "int64", - "id": 1 + "imageClassificationModelMetadata": { + "type": "ImageClassificationModelMetadata", + "id": 13 }, - "endOffset": { - "type": "int64", - "id": 2 - } - } - }, - "DoubleRange": { - "fields": { - "start": { - "type": "double", - "id": 1 + "textClassificationModelMetadata": { + "type": "TextClassificationModelMetadata", + "id": 14 }, - "end": { - "type": "double", - "id": 2 - } - } - }, - "RegressionEvaluationMetrics": { - "fields": { - "rootMeanSquaredError": { - "type": "float", + "imageObjectDetectionModelMetadata": { + "type": "ImageObjectDetectionModelMetadata", + "id": 20 + }, + "videoClassificationModelMetadata": { + "type": "VideoClassificationModelMetadata", + "id": 23 + }, + "videoObjectTrackingModelMetadata": { + "type": "VideoObjectTrackingModelMetadata", + "id": 21 + }, + "textExtractionModelMetadata": { + "type": "TextExtractionModelMetadata", + "id": 19 + }, + "tablesModelMetadata": { + "type": "TablesModelMetadata", + "id": 24 + }, + "textSentimentModelMetadata": { + "type": "TextSentimentModelMetadata", + "id": 22 + }, + "name": { + "type": "string", "id": 1 }, - "meanAbsoluteError": { - "type": "float", + "displayName": { + "type": "string", "id": 2 }, - "meanAbsolutePercentageError": { - "type": "float", + "datasetId": { + "type": "string", "id": 3 }, - "rSquared": { - "type": "float", - "id": 4 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7 }, - "rootMeanSquaredLogError": { - "type": "float", - "id": 5 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11 + }, + "deploymentState": { + "type": "DeploymentState", + "id": 8 + } + }, + "nested": { + "DeploymentState": { + "values": { + "DEPLOYMENT_STATE_UNSPECIFIED": 0, + "DEPLOYED": 1, + "UNDEPLOYED": 2 + } } } }, - "TextExtractionAnnotation": { + "ModelEvaluation": { + "options": { + "(google.api.resource).type": "automl.googleapis.com/ModelEvaluation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}" + }, "oneofs": { - "annotation": { + "metrics": { "oneof": [ - "textSegment" + "classificationEvaluationMetrics", + "regressionEvaluationMetrics", + "translationEvaluationMetrics", + "imageObjectDetectionEvaluationMetrics", + "videoObjectTrackingEvaluationMetrics", + "textSentimentEvaluationMetrics", + "textExtractionEvaluationMetrics" ] } }, "fields": { - "textSegment": { - "type": "TextSegment", - "id": 3 - }, - "score": { - "type": "float", - "id": 1 - } - } - }, - "TextExtractionEvaluationMetrics": { - "fields": { - "auPrc": { - "type": "float", - "id": 1 - }, - "confidenceMetricsEntries": { - "rule": "repeated", - "type": "ConfidenceMetricsEntry", - "id": 2 - } - }, - "nested": { - "ConfidenceMetricsEntry": { - "fields": { - "confidenceThreshold": { - "type": "float", - "id": 1 - }, - "recall": { - "type": "float", - "id": 3 - }, - "precision": { - "type": "float", - "id": 4 - }, - "f1Score": { - "type": "float", - "id": 5 - } - } - } - } - }, - "TextSentimentAnnotation": { - "fields": { - "sentiment": { - "type": "int32", - "id": 1 - } - } - }, - "TextSentimentEvaluationMetrics": { - "fields": { - "precision": { - "type": "float", - "id": 1 - }, - "recall": { - "type": "float", - "id": 2 - }, - "f1Score": { - "type": "float", - "id": 3 - }, - "meanAbsoluteError": { - "type": "float", - "id": 4 + "classificationEvaluationMetrics": { + "type": "ClassificationEvaluationMetrics", + "id": 8 }, - "meanSquaredError": { - "type": "float", - "id": 5 + "regressionEvaluationMetrics": { + "type": "RegressionEvaluationMetrics", + "id": 24 }, - "linearKappa": { - "type": "float", - "id": 6 + "translationEvaluationMetrics": { + "type": "TranslationEvaluationMetrics", + "id": 9 }, - "quadraticKappa": { - "type": "float", - "id": 7 + "imageObjectDetectionEvaluationMetrics": { + "type": "ImageObjectDetectionEvaluationMetrics", + "id": 12 }, - "confusionMatrix": { - "type": "ClassificationEvaluationMetrics.ConfusionMatrix", - "id": 8 + "videoObjectTrackingEvaluationMetrics": { + "type": "VideoObjectTrackingEvaluationMetrics", + "id": 14 }, - "annotationSpecId": { - "rule": "repeated", - "type": "string", - "id": 9, - "options": { - "deprecated": true - } - } - } - }, - "TranslationDatasetMetadata": { - "fields": { - "sourceLanguageCode": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "textSentimentEvaluationMetrics": { + "type": "TextSentimentEvaluationMetrics", + "id": 11 }, - "targetLanguageCode": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TranslationEvaluationMetrics": { - "fields": { - "bleuScore": { - "type": "double", - "id": 1 + "textExtractionEvaluationMetrics": { + "type": "TextExtractionEvaluationMetrics", + "id": 13 }, - "baseBleuScore": { - "type": "double", - "id": 2 - } - } - }, - "TranslationModelMetadata": { - "fields": { - "baseModel": { + "name": { "type": "string", "id": 1 }, - "sourceLanguageCode": { + "annotationSpecId": { "type": "string", "id": 2 }, - "targetLanguageCode": { - "type": "string", - "id": 3 - } - } - }, - "TranslationAnnotation": { - "fields": { - "translatedContent": { - "type": "TextSnippet", - "id": 1 - } - } - }, - "AnnotationSpec": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/AnnotationSpec", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, "displayName": { "type": "string", - "id": 2 + "id": 15 }, - "exampleCount": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "evaluatedExampleCount": { "type": "int32", - "id": 9 + "id": 6 } } }, - "Dataset": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/Dataset", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}" - }, + "OperationMetadata": { "oneofs": { - "datasetMetadata": { + "details": { "oneof": [ - "translationDatasetMetadata", - "imageClassificationDatasetMetadata", - "textClassificationDatasetMetadata", - "imageObjectDetectionDatasetMetadata", - "videoClassificationDatasetMetadata", - "videoObjectTrackingDatasetMetadata", - "textExtractionDatasetMetadata", - "textSentimentDatasetMetadata", - "tablesDatasetMetadata" + "deleteDetails", + "deployModelDetails", + "undeployModelDetails", + "createModelDetails", + "importDataDetails", + "batchPredictDetails", + "exportDataDetails", + "exportModelDetails", + "exportEvaluatedExamplesDetails" ] } }, "fields": { - "translationDatasetMetadata": { - "type": "TranslationDatasetMetadata", - "id": 23 + "deleteDetails": { + "type": "DeleteOperationMetadata", + "id": 8 }, - "imageClassificationDatasetMetadata": { - "type": "ImageClassificationDatasetMetadata", + "deployModelDetails": { + "type": "DeployModelOperationMetadata", "id": 24 }, - "textClassificationDatasetMetadata": { - "type": "TextClassificationDatasetMetadata", + "undeployModelDetails": { + "type": "UndeployModelOperationMetadata", "id": 25 }, - "imageObjectDetectionDatasetMetadata": { - "type": "ImageObjectDetectionDatasetMetadata", - "id": 26 + "createModelDetails": { + "type": "CreateModelOperationMetadata", + "id": 10 }, - "videoClassificationDatasetMetadata": { - "type": "VideoClassificationDatasetMetadata", - "id": 31 + "importDataDetails": { + "type": "ImportDataOperationMetadata", + "id": 15 }, - "videoObjectTrackingDatasetMetadata": { - "type": "VideoObjectTrackingDatasetMetadata", - "id": 29 + "batchPredictDetails": { + "type": "BatchPredictOperationMetadata", + "id": 16 }, - "textExtractionDatasetMetadata": { - "type": "TextExtractionDatasetMetadata", - "id": 28 + "exportDataDetails": { + "type": "ExportDataOperationMetadata", + "id": 21 }, - "textSentimentDatasetMetadata": { - "type": "TextSentimentDatasetMetadata", - "id": 30 + "exportModelDetails": { + "type": "ExportModelOperationMetadata", + "id": 22 }, - "tablesDatasetMetadata": { - "type": "TablesDatasetMetadata", - "id": 33 + "exportEvaluatedExamplesDetails": { + "type": "ExportEvaluatedExamplesOperationMetadata", + "id": 26 }, + "progressPercent": { + "type": "int32", + "id": 13 + }, + "partialFailures": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "DeleteOperationMetadata": { + "fields": {} + }, + "DeployModelOperationMetadata": { + "fields": {} + }, + "UndeployModelOperationMetadata": { + "fields": {} + }, + "CreateModelOperationMetadata": { + "fields": {} + }, + "ImportDataOperationMetadata": { + "fields": {} + }, + "ExportDataOperationMetadata": { + "fields": { + "outputInfo": { + "type": "ExportDataOutputInfo", + "id": 1 + } + }, + "nested": { + "ExportDataOutputInfo": { + "oneofs": { + "outputLocation": { + "oneof": [ + "gcsOutputDirectory", + "bigqueryOutputDataset" + ] + } + }, + "fields": { + "gcsOutputDirectory": { + "type": "string", + "id": 1 + }, + "bigqueryOutputDataset": { + "type": "string", + "id": 2 + } + } + } + } + }, + "BatchPredictOperationMetadata": { + "fields": { + "inputConfig": { + "type": "BatchPredictInputConfig", + "id": 1 + }, + "outputInfo": { + "type": "BatchPredictOutputInfo", + "id": 2 + } + }, + "nested": { + "BatchPredictOutputInfo": { + "oneofs": { + "outputLocation": { + "oneof": [ + "gcsOutputDirectory", + "bigqueryOutputDataset" + ] + } + }, + "fields": { + "gcsOutputDirectory": { + "type": "string", + "id": 1 + }, + "bigqueryOutputDataset": { + "type": "string", + "id": 2 + } + } + } + } + }, + "ExportModelOperationMetadata": { + "fields": { + "outputInfo": { + "type": "ExportModelOutputInfo", + "id": 2 + } + }, + "nested": { + "ExportModelOutputInfo": { + "fields": { + "gcsOutputDirectory": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ExportEvaluatedExamplesOperationMetadata": { + "fields": { + "outputInfo": { + "type": "ExportEvaluatedExamplesOutputInfo", + "id": 2 + } + }, + "nested": { + "ExportEvaluatedExamplesOutputInfo": { + "fields": { + "bigqueryOutputDataset": { + "type": "string", + "id": 2 + } + } + } + } + }, + "PredictionService": { + "options": { + "(google.api.default_host)": "automl.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "Predict": { + "requestType": "PredictRequest", + "responseType": "PredictResponse", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:predict", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,payload,params" + } + }, + "BatchPredict": { + "requestType": "BatchPredictRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:batchPredict", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,input_config,output_config,params", + "(google.longrunning.operation_info).response_type": "BatchPredictResult", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + } + } + }, + "PredictRequest": { + "fields": { "name": { "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" + } + }, + "payload": { + "type": "ExamplePayload", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "params": { + "keyType": "string", + "type": "string", + "id": 3 + } + } + }, + "PredictResponse": { + "fields": { + "payload": { + "rule": "repeated", + "type": "AnnotationPayload", "id": 1 }, - "displayName": { + "preprocessedInput": { + "type": "ExamplePayload", + "id": 3 + }, + "metadata": { + "keyType": "string", "type": "string", "id": 2 - }, - "description": { + } + } + }, + "BatchPredictRequest": { + "fields": { + "name": { "type": "string", - "id": 3 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" + } }, - "exampleCount": { - "type": "int32", - "id": 21 + "inputConfig": { + "type": "BatchPredictInputConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 14 + "outputConfig": { + "type": "BatchPredictOutputConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "etag": { + "params": { + "keyType": "string", "type": "string", - "id": 17 + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "ImageClassificationDatasetMetadata": { + "BatchPredictResult": { "fields": { - "classificationType": { - "type": "ClassificationType", + "metadata": { + "keyType": "string", + "type": "string", "id": 1 } } }, - "ImageObjectDetectionDatasetMetadata": { - "fields": {} - }, - "ImageClassificationModelMetadata": { + "AutoMl": { + "options": { + "(google.api.default_host)": "automl.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateDataset": { + "requestType": "CreateDatasetRequest", + "responseType": "Dataset", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/datasets", + "(google.api.http).body": "dataset", + "(google.api.method_signature)": "parent,dataset" + } + }, + "GetDataset": { + "requestType": "GetDatasetRequest", + "responseType": "Dataset", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*}", + "(google.api.method_signature)": "name" + } + }, + "ListDatasets": { + "requestType": "ListDatasetsRequest", + "responseType": "ListDatasetsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/datasets", + "(google.api.method_signature)": "parent" + } + }, + "UpdateDataset": { + "requestType": "UpdateDatasetRequest", + "responseType": "Dataset", + "options": { + "(google.api.http).patch": "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}", + "(google.api.http).body": "dataset", + "(google.api.method_signature)": "dataset" + } + }, + "DeleteDataset": { + "requestType": "DeleteDatasetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/datasets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ImportData": { + "requestType": "ImportDataRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,input_config", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ExportData": { + "requestType": "ExportDataRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,output_config", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetAnnotationSpec": { + "requestType": "GetAnnotationSpecRequest", + "responseType": "AnnotationSpec", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}", + "(google.api.method_signature)": "name" + } + }, + "GetTableSpec": { + "requestType": "GetTableSpecRequest", + "responseType": "TableSpec", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}", + "(google.api.method_signature)": "name" + } + }, + "ListTableSpecs": { + "requestType": "ListTableSpecsRequest", + "responseType": "ListTableSpecsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs", + "(google.api.method_signature)": "parent" + } + }, + "UpdateTableSpec": { + "requestType": "UpdateTableSpecRequest", + "responseType": "TableSpec", + "options": { + "(google.api.http).patch": "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}", + "(google.api.http).body": "table_spec", + "(google.api.method_signature)": "table_spec" + } + }, + "GetColumnSpec": { + "requestType": "GetColumnSpecRequest", + "responseType": "ColumnSpec", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}", + "(google.api.method_signature)": "name" + } + }, + "ListColumnSpecs": { + "requestType": "ListColumnSpecsRequest", + "responseType": "ListColumnSpecsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs", + "(google.api.method_signature)": "parent" + } + }, + "UpdateColumnSpec": { + "requestType": "UpdateColumnSpecRequest", + "responseType": "ColumnSpec", + "options": { + "(google.api.http).patch": "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}", + "(google.api.http).body": "column_spec", + "(google.api.method_signature)": "column_spec" + } + }, + "CreateModel": { + "requestType": "CreateModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/models", + "(google.api.http).body": "model", + "(google.api.method_signature)": "parent,model", + "(google.longrunning.operation_info).response_type": "Model", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetModel": { + "requestType": "GetModelRequest", + "responseType": "Model", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/models/*}", + "(google.api.method_signature)": "name" + } + }, + "ListModels": { + "requestType": "ListModelsRequest", + "responseType": "ListModelsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/models", + "(google.api.method_signature)": "parent" + } + }, + "DeleteModel": { + "requestType": "DeleteModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/models/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "DeployModel": { + "requestType": "DeployModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:deploy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "UndeployModel": { + "requestType": "UndeployModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ExportModel": { + "requestType": "ExportModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:export", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,output_config", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ExportEvaluatedExamples": { + "requestType": "ExportEvaluatedExamplesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,output_config", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetModelEvaluation": { + "requestType": "GetModelEvaluationRequest", + "responseType": "ModelEvaluation", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}", + "(google.api.method_signature)": "name" + } + }, + "ListModelEvaluations": { + "requestType": "ListModelEvaluationsRequest", + "responseType": "ListModelEvaluationsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations", + "(google.api.method_signature)": "parent" + } + } + } + }, + "CreateDatasetRequest": { "fields": { - "baseModelId": { - "type": "string", - "id": 1 - }, - "trainBudget": { - "type": "int64", - "id": 2 - }, - "trainCost": { - "type": "int64", - "id": 3 - }, - "stopReason": { + "parent": { "type": "string", - "id": 5 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, - "modelType": { + "dataset": { + "type": "Dataset", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetDatasetRequest": { + "fields": { + "name": { "type": "string", - "id": 7 - }, - "nodeQps": { - "type": "double", - "id": 13 - }, - "nodeCount": { - "type": "int64", - "id": 14 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" + } } } }, - "ImageObjectDetectionModelMetadata": { + "ListDatasetsRequest": { "fields": { - "modelType": { + "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, - "nodeCount": { - "type": "int64", + "filter": { + "type": "string", "id": 3 }, - "nodeQps": { - "type": "double", + "pageSize": { + "type": "int32", "id": 4 }, - "stopReason": { + "pageToken": { "type": "string", - "id": 5 - }, - "trainBudgetMilliNodeHours": { - "type": "int64", "id": 6 - }, - "trainCostMilliNodeHours": { - "type": "int64", - "id": 7 } } }, - "ImageClassificationModelDeploymentMetadata": { - "fields": { - "nodeCount": { - "type": "int64", - "id": 1 - } - } - }, - "ImageObjectDetectionModelDeploymentMetadata": { + "ListDatasetsResponse": { "fields": { - "nodeCount": { - "type": "int64", + "datasets": { + "rule": "repeated", + "type": "Dataset", "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "TextClassificationDatasetMetadata": { + "UpdateDatasetRequest": { "fields": { - "classificationType": { - "type": "ClassificationType", - "id": 1 + "dataset": { + "type": "Dataset", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 } } }, - "TextClassificationModelMetadata": { + "DeleteDatasetRequest": { "fields": { - "classificationType": { - "type": "ClassificationType", - "id": 3 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" + } } } }, - "TextExtractionDatasetMetadata": { - "fields": {} - }, - "TextExtractionModelMetadata": { - "fields": {} - }, - "TextSentimentDatasetMetadata": { + "ImportDataRequest": { "fields": { - "sentimentMax": { - "type": "int32", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" + } + }, + "inputConfig": { + "type": "InputConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "TextSentimentModelMetadata": { - "fields": {} - }, - "VideoClassificationDatasetMetadata": { - "fields": {} - }, - "VideoObjectTrackingDatasetMetadata": { - "fields": {} - }, - "VideoClassificationModelMetadata": { - "fields": {} - }, - "VideoObjectTrackingModelMetadata": { - "fields": {} - }, - "Model": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/Model", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/models/{model}" - }, - "oneofs": { - "modelMetadata": { - "oneof": [ - "translationModelMetadata", - "imageClassificationModelMetadata", - "textClassificationModelMetadata", - "imageObjectDetectionModelMetadata", - "videoClassificationModelMetadata", - "videoObjectTrackingModelMetadata", - "textExtractionModelMetadata", - "tablesModelMetadata", - "textSentimentModelMetadata" - ] - } - }, + "ExportDataRequest": { "fields": { - "translationModelMetadata": { - "type": "TranslationModelMetadata", - "id": 15 - }, - "imageClassificationModelMetadata": { - "type": "ImageClassificationModelMetadata", - "id": 13 - }, - "textClassificationModelMetadata": { - "type": "TextClassificationModelMetadata", - "id": 14 - }, - "imageObjectDetectionModelMetadata": { - "type": "ImageObjectDetectionModelMetadata", - "id": 20 - }, - "videoClassificationModelMetadata": { - "type": "VideoClassificationModelMetadata", - "id": 23 - }, - "videoObjectTrackingModelMetadata": { - "type": "VideoObjectTrackingModelMetadata", - "id": 21 - }, - "textExtractionModelMetadata": { - "type": "TextExtractionModelMetadata", - "id": 19 - }, - "tablesModelMetadata": { - "type": "TablesModelMetadata", - "id": 24 - }, - "textSentimentModelMetadata": { - "type": "TextSentimentModelMetadata", - "id": 22 - }, "name": { "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "datasetId": { - "type": "string", - "id": 3 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11 - }, - "deploymentState": { - "type": "DeploymentState", - "id": 8 - } - }, - "nested": { - "DeploymentState": { - "values": { - "DEPLOYMENT_STATE_UNSPECIFIED": 0, - "DEPLOYED": 1, - "UNDEPLOYED": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" + } + }, + "outputConfig": { + "type": "OutputConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "ModelEvaluation": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/ModelEvaluation", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}" - }, - "oneofs": { - "metrics": { - "oneof": [ - "classificationEvaluationMetrics", - "regressionEvaluationMetrics", - "translationEvaluationMetrics", - "imageObjectDetectionEvaluationMetrics", - "videoObjectTrackingEvaluationMetrics", - "textSentimentEvaluationMetrics", - "textExtractionEvaluationMetrics" - ] + "GetAnnotationSpecRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/AnnotationSpec" + } } - }, + } + }, + "GetTableSpecRequest": { "fields": { - "classificationEvaluationMetrics": { - "type": "ClassificationEvaluationMetrics", - "id": 8 - }, - "regressionEvaluationMetrics": { - "type": "RegressionEvaluationMetrics", - "id": 24 - }, - "translationEvaluationMetrics": { - "type": "TranslationEvaluationMetrics", - "id": 9 - }, - "imageObjectDetectionEvaluationMetrics": { - "type": "ImageObjectDetectionEvaluationMetrics", - "id": 12 - }, - "videoObjectTrackingEvaluationMetrics": { - "type": "VideoObjectTrackingEvaluationMetrics", - "id": 14 - }, - "textSentimentEvaluationMetrics": { - "type": "TextSentimentEvaluationMetrics", - "id": 11 - }, - "textExtractionEvaluationMetrics": { - "type": "TextExtractionEvaluationMetrics", - "id": 13 - }, "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/TableSpec" + } }, - "annotationSpecId": { + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListTableSpecsRequest": { + "fields": { + "parent": { "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Dataset" + } + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", "id": 2 }, - "displayName": { + "filter": { "type": "string", - "id": 15 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 + "id": 3 }, - "evaluatedExampleCount": { + "pageSize": { "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", "id": 6 } } }, - "OperationMetadata": { - "oneofs": { - "details": { - "oneof": [ - "deleteDetails", - "deployModelDetails", - "undeployModelDetails", - "createModelDetails", - "importDataDetails", - "batchPredictDetails", - "exportDataDetails", - "exportModelDetails", - "exportEvaluatedExamplesDetails" - ] - } - }, + "ListTableSpecsResponse": { "fields": { - "deleteDetails": { - "type": "DeleteOperationMetadata", - "id": 8 - }, - "deployModelDetails": { - "type": "DeployModelOperationMetadata", - "id": 24 - }, - "undeployModelDetails": { - "type": "UndeployModelOperationMetadata", - "id": 25 - }, - "createModelDetails": { - "type": "CreateModelOperationMetadata", - "id": 10 - }, - "importDataDetails": { - "type": "ImportDataOperationMetadata", - "id": 15 - }, - "batchPredictDetails": { - "type": "BatchPredictOperationMetadata", - "id": 16 - }, - "exportDataDetails": { - "type": "ExportDataOperationMetadata", - "id": 21 - }, - "exportModelDetails": { - "type": "ExportModelOperationMetadata", - "id": 22 - }, - "exportEvaluatedExamplesDetails": { - "type": "ExportEvaluatedExamplesOperationMetadata", - "id": 26 - }, - "progressPercent": { - "type": "int32", - "id": 13 - }, - "partialFailures": { + "tableSpecs": { "rule": "repeated", - "type": "google.rpc.Status", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 + "type": "TableSpec", + "id": 1 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4 + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "DeleteOperationMetadata": { - "fields": {} - }, - "DeployModelOperationMetadata": { - "fields": {} - }, - "UndeployModelOperationMetadata": { - "fields": {} - }, - "CreateModelOperationMetadata": { - "fields": {} - }, - "ImportDataOperationMetadata": { - "fields": {} + "UpdateTableSpecRequest": { + "fields": { + "tableSpec": { + "type": "TableSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } }, - "ExportDataOperationMetadata": { + "GetColumnSpecRequest": { "fields": { - "outputInfo": { - "type": "ExportDataOutputInfo", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/ColumnSpec" + } + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 } - }, - "nested": { - "ExportDataOutputInfo": { - "oneofs": { - "outputLocation": { - "oneof": [ - "gcsOutputDirectory", - "bigqueryOutputDataset" - ] - } - }, - "fields": { - "gcsOutputDirectory": { - "type": "string", - "id": 1 - }, - "bigqueryOutputDataset": { - "type": "string", - "id": 2 - } + } + }, + "ListColumnSpecsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/TableSpec" } + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "filter": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 6 } } }, - "BatchPredictOperationMetadata": { + "ListColumnSpecsResponse": { "fields": { - "inputConfig": { - "type": "BatchPredictInputConfig", + "columnSpecs": { + "rule": "repeated", + "type": "ColumnSpec", "id": 1 }, - "outputInfo": { - "type": "BatchPredictOutputInfo", + "nextPageToken": { + "type": "string", "id": 2 } - }, - "nested": { - "BatchPredictOutputInfo": { - "oneofs": { - "outputLocation": { - "oneof": [ - "gcsOutputDirectory", - "bigqueryOutputDataset" - ] - } - }, - "fields": { - "gcsOutputDirectory": { - "type": "string", - "id": 1 - }, - "bigqueryOutputDataset": { - "type": "string", - "id": 2 - } - } - } } }, - "ExportModelOperationMetadata": { + "UpdateColumnSpecRequest": { "fields": { - "outputInfo": { - "type": "ExportModelOutputInfo", + "columnSpec": { + "type": "ColumnSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 2 } - }, - "nested": { - "ExportModelOutputInfo": { - "fields": { - "gcsOutputDirectory": { - "type": "string", - "id": 1 - } + } + }, + "CreateModelRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "model": { + "type": "Model", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "ExportEvaluatedExamplesOperationMetadata": { + "GetModelRequest": { "fields": { - "outputInfo": { - "type": "ExportEvaluatedExamplesOutputInfo", - "id": 2 - } - }, - "nested": { - "ExportEvaluatedExamplesOutputInfo": { - "fields": { - "bigqueryOutputDataset": { - "type": "string", - "id": 2 - } + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" } } } }, - "TableSpec": { - "options": { - "(google.api.resource).type": "automl.googleapis.com/TableSpec", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}" - }, + "ListModelsRequest": { "fields": { - "name": { + "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, - "timeColumnSpecId": { + "filter": { "type": "string", - "id": 2 - }, - "rowCount": { - "type": "int64", "id": 3 }, - "validRowCount": { - "type": "int64", + "pageSize": { + "type": "int32", "id": 4 }, - "columnCount": { - "type": "int64", - "id": 7 - }, - "inputConfigs": { + "pageToken": { + "type": "string", + "id": 6 + } + } + }, + "ListModelsResponse": { + "fields": { + "model": { "rule": "repeated", - "type": "InputConfig", - "id": 5 + "type": "Model", + "id": 1 }, - "etag": { + "nextPageToken": { "type": "string", - "id": 6 + "id": 2 } } }, - "PredictionService": { - "options": { - "(google.api.default_host)": "automl.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + "DeleteModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" + } + } + } + }, + "DeployModelRequest": { + "oneofs": { + "modelDeploymentMetadata": { + "oneof": [ + "imageObjectDetectionModelDeploymentMetadata", + "imageClassificationModelDeploymentMetadata" + ] + } }, - "methods": { - "Predict": { - "requestType": "PredictRequest", - "responseType": "PredictResponse", + "fields": { + "imageObjectDetectionModelDeploymentMetadata": { + "type": "ImageObjectDetectionModelDeploymentMetadata", + "id": 2 + }, + "imageClassificationModelDeploymentMetadata": { + "type": "ImageClassificationModelDeploymentMetadata", + "id": 4 + }, + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:predict", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,payload,params" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" + } + } + } + }, + "UndeployModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" + } + } + } + }, + "ExportModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" } }, - "BatchPredict": { - "requestType": "BatchPredictRequest", - "responseType": "google.longrunning.Operation", + "outputConfig": { + "type": "ModelExportOutputConfig", + "id": 3, "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/models/*}:batchPredict", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,input_config,output_config,params", - "(google.longrunning.operation_info).response_type": "BatchPredictResult", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExportEvaluatedExamplesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/Model" + } + }, + "outputConfig": { + "type": "ExportEvaluatedExamplesOutputConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetModelEvaluationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "automl.googleapis.com/ModelEvaluation" } } } }, - "PredictRequest": { + "ListModelEvaluationsRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { @@ -4622,78 +4633,67 @@ "(google.api.resource_reference).type": "automl.googleapis.com/Model" } }, - "payload": { - "type": "ExamplePayload", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "params": { - "keyType": "string", + "filter": { "type": "string", "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 6 } } }, - "PredictResponse": { + "ListModelEvaluationsResponse": { "fields": { - "payload": { + "modelEvaluation": { "rule": "repeated", - "type": "AnnotationPayload", + "type": "ModelEvaluation", "id": 1 }, - "preprocessedInput": { - "type": "ExamplePayload", - "id": 3 - }, - "metadata": { - "keyType": "string", + "nextPageToken": { "type": "string", "id": 2 } } }, - "BatchPredictRequest": { + "TableSpec": { + "options": { + "(google.api.resource).type": "automl.googleapis.com/TableSpec", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}" + }, "fields": { "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "automl.googleapis.com/Model" - } + "id": 1 }, - "inputConfig": { - "type": "BatchPredictInputConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "timeColumnSpecId": { + "type": "string", + "id": 2 }, - "outputConfig": { - "type": "BatchPredictOutputConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "rowCount": { + "type": "int64", + "id": 3 }, - "params": { - "keyType": "string", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "BatchPredictResult": { - "fields": { - "metadata": { - "keyType": "string", + "validRowCount": { + "type": "int64", + "id": 4 + }, + "columnCount": { + "type": "int64", + "id": 7 + }, + "inputConfigs": { + "rule": "repeated", + "type": "InputConfig", + "id": 5 + }, + "etag": { "type": "string", - "id": 1 + "id": 6 } } } @@ -4705,80 +4705,14 @@ }, "api": { "options": { - "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, "java_outer_classname": "ClientProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI" + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true }, "nested": { - "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, @@ -4882,6 +4816,72 @@ "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 + } + } + }, "methodSignature": { "rule": "repeated", "type": "string", @@ -5791,7 +5791,7 @@ } } }, - "Timestamp": { + "Duration": { "fields": { "seconds": { "type": "int64", @@ -5815,18 +5815,6 @@ } } }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "Struct": { "fields": { "fields": { @@ -5890,6 +5878,18 @@ } } }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Empty": { "fields": {} }, diff --git a/packages/google-cloud-automl/samples/package.json b/packages/google-cloud-automl/samples/package.json index af88b422042..90f6888de4a 100644 --- a/packages/google-cloud-automl/samples/package.json +++ b/packages/google-cloud-automl/samples/package.json @@ -9,7 +9,7 @@ "repository": "googleapis/nodejs-automl", "private": true, "scripts": { - "test": "mocha --timeout 900000" + "test": "mocha --timeout 9000000" }, "files": [ "**/*.js", diff --git a/packages/google-cloud-automl/src/extra_proto_list.json b/packages/google-cloud-automl/src/extra_proto_list.json deleted file mode 100644 index 62b903b5c6f..00000000000 --- a/packages/google-cloud-automl/src/extra_proto_list.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - "../../protos/google/cloud/automl/v1/operations.proto", - "../../protos/google/cloud/automl/v1/annotation_spec.proto", - "../../protos/google/cloud/automl/v1/io.proto", - "../../protos/google/cloud/automl/v1/data_items.proto", - "../../protos/google/cloud/automl/v1/text_sentiment.proto", - "../../protos/google/cloud/automl/v1/dataset.proto", - "../../protos/google/cloud/automl/v1/model_evaluation.proto", - "../../protos/google/cloud/automl/v1/prediction_service.proto", - "../../protos/google/cloud/automl/v1/text.proto", - "../../protos/google/cloud/automl/v1/text_segment.proto", - "../../protos/google/cloud/automl/v1/detection.proto", - "../../protos/google/cloud/automl/v1/annotation_payload.proto", - "../../protos/google/cloud/automl/v1/geometry.proto", - "../../protos/google/cloud/automl/v1/translation.proto", - "../../protos/google/cloud/automl/v1/model.proto", - "../../protos/google/cloud/automl/v1/classification.proto", - "../../protos/google/cloud/automl/v1/text_extraction.proto", - "../../protos/google/cloud/automl/v1/image.proto" -] diff --git a/packages/google-cloud-automl/src/index.js b/packages/google-cloud-automl/src/index.js deleted file mode 100644 index 15bffb83fa7..00000000000 --- a/packages/google-cloud-automl/src/index.js +++ /dev/null @@ -1,109 +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.protobuf - */ -/** - * @namespace google.rpc - */ -/** - * @namespace google.longrunning - */ -/** - * @namespace google.cloud - */ -/** - * @namespace google.cloud.automl - */ -/** - * @namespace google.cloud.automl.v1 - */ -/** - * @namespace google.cloud.automl.v1beta1 - */ - -'use strict'; - -// Import the clients for each version supported by this package. -const gapic = Object.freeze({ - v1: require('./v1'), - v1beta1: require('./v1beta1'), -}); - -/** - * The `automl` package has the following named exports: - * - * - `AutoMlClient` - Reference to - * {@link v1.AutoMlClient} - * - `PredictionServiceClient` - Reference to - * {@link v1.PredictionServiceClient} - * - `v1` - This is used for selecting or pinning a - * particular backend service version. It exports: - * - `AutoMlClient` - Reference to - * {@link v1.AutoMlClient} - * - `PredictionServiceClient` - Reference to - * {@link v1.PredictionServiceClient} - * - * @module {object} automl - * @alias nodejs-automl - * - * @example Install the client library with npm: - * npm install --save automl - * - * @example Import the client library: - * const automl = require('automl'); - * - * @example Create a client that uses Application Default Credentials (ADC): - * const client = new automl.AutoMlClient(); - * - * @example Create a client with explicit credentials: - * const client = new automl.AutoMlClient({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json', - * }); - */ - -/** - * @type {object} - * @property {constructor} AutoMlClient - * Reference to {@link v1.AutoMlClient} - * @property {constructor} PredictionServiceClient - * Reference to {@link v1.PredictionServiceClient} - */ -module.exports = gapic.v1beta1; - -/** - * @type {object} - * @property {constructor} AutoMlClient - * Reference to {@link v1.AutoMlClient} - * @property {constructor} PredictionServiceClient - * Reference to {@link v1.PredictionServiceClient} - */ -module.exports.v1beta1 = gapic.v1beta1; - -/** - * @type {object} - * @property {constructor} AutoMlClient - * Reference to {@link v1.AutoMlClient} - * @property {constructor} PredictionServiceClient - * Reference to {@link v1.PredictionServiceClient} - */ -module.exports.v1 = gapic.v1; - -// Alias `module.exports` as `module.exports.default`, for future-proofing. -module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-automl/src/index.ts b/packages/google-cloud-automl/src/index.ts new file mode 100644 index 00000000000..5c7e68cf5a0 --- /dev/null +++ b/packages/google-cloud-automl/src/index.ts @@ -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. ** + +import * as v1 from './v1'; +import * as v1beta1 from './v1beta1'; +const AutoMlClient = v1.AutoMlClient; +const PredictionServiceClient = v1.PredictionServiceClient; +export {v1, v1beta1, AutoMlClient, PredictionServiceClient}; +// For compatibility with JavaScript libraries we need to provide this default export: +// tslint:disable-next-line no-default-export +export default {v1, v1beta1, AutoMlClient, PredictionServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-automl/src/v1/auto_ml_client.js b/packages/google-cloud-automl/src/v1/auto_ml_client.js deleted file mode 100644 index e01cce35b06..00000000000 --- a/packages/google-cloud-automl/src/v1/auto_ml_client.js +++ /dev/null @@ -1,2597 +0,0 @@ -// Copyright 2020 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('./auto_ml_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * AutoML Server API. - * - * The resource names are assigned by the server. - * The server never reuses names that it has created after the resources with - * those names are deleted. - * - * An ID of a resource is the last element of the item's resource name. For - * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - * the id for the item is `{dataset_id}`. - * - * Currently the only supported `location_id` is "us-central1". - * - * On any input that is documented to expect a string parameter in - * snake_case or kebab-case, either of those cases is accepted. - * - * @class - * @memberof v1 - */ -class AutoMlClient { - /** - * Construct an instance of AutoMlClient. - * - * @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 = { - annotationSpecPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' - ), - datasetPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}' - ), - locationPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - modelPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/models/{model}' - ), - modelEvaluationPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}' - ), - }; - - // 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 = { - listDatasets: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'datasets' - ), - listModels: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'model' - ), - listModelEvaluations: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'modelEvaluation' - ), - }; - - const protoFilesRoot = opts.fallback - ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) - : gaxModule.protobuf.loadSync(nodejsProtoPath); - - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - this.operationsClient = new gaxModule.lro({ - auth: gaxGrpc.auth, - grpc: gaxGrpc.grpc, - }).operationsClient(opts); - - const createDatasetResponse = protoFilesRoot.lookup( - 'google.cloud.automl.v1.Dataset' - ); - const createDatasetMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const deleteDatasetResponse = protoFilesRoot.lookup( - 'google.protobuf.Empty' - ); - const deleteDatasetMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const importDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const importDataMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const exportDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const exportDataMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const createModelResponse = protoFilesRoot.lookup( - 'google.cloud.automl.v1.Model' - ); - const createModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const deleteModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const deleteModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const deployModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const deployModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const undeployModelResponse = protoFilesRoot.lookup( - 'google.protobuf.Empty' - ); - const undeployModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - const exportModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const exportModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - - this._descriptors.longrunning = { - createDataset: new gaxModule.LongrunningDescriptor( - this.operationsClient, - createDatasetResponse.decode.bind(createDatasetResponse), - createDatasetMetadata.decode.bind(createDatasetMetadata) - ), - deleteDataset: new gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDatasetResponse.decode.bind(deleteDatasetResponse), - deleteDatasetMetadata.decode.bind(deleteDatasetMetadata) - ), - importData: new gaxModule.LongrunningDescriptor( - this.operationsClient, - importDataResponse.decode.bind(importDataResponse), - importDataMetadata.decode.bind(importDataMetadata) - ), - exportData: new gaxModule.LongrunningDescriptor( - this.operationsClient, - exportDataResponse.decode.bind(exportDataResponse), - exportDataMetadata.decode.bind(exportDataMetadata) - ), - createModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - createModelResponse.decode.bind(createModelResponse), - createModelMetadata.decode.bind(createModelMetadata) - ), - deleteModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteModelResponse.decode.bind(deleteModelResponse), - deleteModelMetadata.decode.bind(deleteModelMetadata) - ), - deployModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - deployModelResponse.decode.bind(deployModelResponse), - deployModelMetadata.decode.bind(deployModelMetadata) - ), - undeployModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - undeployModelResponse.decode.bind(undeployModelResponse), - undeployModelMetadata.decode.bind(undeployModelMetadata) - ), - exportModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - exportModelResponse.decode.bind(exportModelResponse), - exportModelMetadata.decode.bind(exportModelMetadata) - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.automl.v1.AutoMl', - 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.automl.v1.AutoMl. - const autoMlStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.automl.v1.AutoMl') - : protos.google.cloud.automl.v1.AutoMl, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const autoMlStubMethods = [ - 'createDataset', - 'updateDataset', - 'getDataset', - 'listDatasets', - 'deleteDataset', - 'importData', - 'exportData', - 'getAnnotationSpec', - 'createModel', - 'getModel', - 'updateModel', - 'listModels', - 'deleteModel', - 'deployModel', - 'undeployModel', - 'exportModel', - 'getModelEvaluation', - 'listModelEvaluations', - ]; - for (const methodName of autoMlStubMethods) { - const innerCallPromise = autoMlStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.longrunning[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'automl.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'automl.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 -- - // ------------------- - - /** - * Creates a dataset. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the project to create the dataset for. - * @param {Object} request.dataset - * Required. The dataset to create. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1.Dataset} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const dataset = {}; - * const request = { - * parent: formattedParent, - * dataset: dataset, - * }; - * - * // Handle the operation using the promise pattern. - * client.createDataset(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const dataset = {}; - * const request = { - * parent: formattedParent, - * dataset: dataset, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.createDataset(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const dataset = {}; - * const request = { - * parent: formattedParent, - * dataset: dataset, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.createDataset(request); - * - * const [response] = await operation.promise(); - */ - createDataset(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.createDataset(request, options, callback); - } - - /** - * Updates a dataset. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.dataset - * Required. The dataset which replaces the resource on the server. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1.Dataset} - * @param {Object} request.updateMask - * Required. The update mask applies to the resource. - * - * 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 [Dataset]{@link google.cloud.automl.v1.Dataset}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Dataset]{@link google.cloud.automl.v1.Dataset}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const dataset = {}; - * const updateMask = {}; - * const request = { - * dataset: dataset, - * updateMask: updateMask, - * }; - * client.updateDataset(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateDataset(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({ - 'dataset.name': request.dataset.name, - }); - - return this._innerApiCalls.updateDataset(request, options, callback); - } - - /** - * Gets a dataset. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataset to retrieve. - * @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 [Dataset]{@link google.cloud.automl.v1.Dataset}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Dataset]{@link google.cloud.automl.v1.Dataset}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * client.getDataset({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getDataset(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.getDataset(request, options, callback); - } - - /** - * Lists datasets in a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the project from which to list datasets. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `dataset_metadata` - for existence of the case (e.g. - * image_classification_dataset_metadata:*). Some examples of using the filter are: - * - * * `translation_dataset_metadata:*` --> The dataset has - * translation_dataset_metadata. - * @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 [Dataset]{@link google.cloud.automl.v1.Dataset}. - * - * 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 [ListDatasetsResponse]{@link google.cloud.automl.v1.ListDatasetsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Dataset]{@link google.cloud.automl.v1.Dataset}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Dataset]{@link google.cloud.automl.v1.Dataset} 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 [ListDatasetsResponse]{@link google.cloud.automl.v1.ListDatasetsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * - * client.listDatasets({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.locationPath('[PROJECT]', '[LOCATION]'); - * - * - * 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.listDatasets(nextRequest, options).then(callback); - * } - * } - * client.listDatasets({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listDatasets(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.listDatasets(request, options, callback); - } - - /** - * Equivalent to {@link listDatasets}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDatasets} 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 resource name of the project from which to list datasets. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `dataset_metadata` - for existence of the case (e.g. - * image_classification_dataset_metadata:*). Some examples of using the filter are: - * - * * `translation_dataset_metadata:*` --> The dataset has - * translation_dataset_metadata. - * @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 [Dataset]{@link google.cloud.automl.v1.Dataset} on 'data' event. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * client.listDatasetsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listDatasetsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listDatasets.createStream( - this._innerApiCalls.listDatasets, - request, - options - ); - } - - /** - * Deletes a dataset and all of its contents. - * Returns empty response in the - * response field when it completes, - * and `delete_details` in the - * metadata field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataset to delete. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * // Handle the operation using the promise pattern. - * client.deleteDataset({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * // Handle the operation using the event emitter pattern. - * client.deleteDataset({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.deleteDataset({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - deleteDataset(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.deleteDataset(request, options, callback); - } - - /** - * Imports data into a dataset. - * For Tables this method can only be called on an empty Dataset. - * - * For Tables: - * * A - * schema_inference_version - * parameter must be explicitly set. - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Dataset name. Dataset must already exist. All imported - * annotations and examples will be added. - * @param {Object} request.inputConfig - * Required. The desired input location and its domain specific semantics, - * if any. - * - * This object should have the same structure as [InputConfig]{@link google.cloud.automl.v1.InputConfig} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const inputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.importData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const inputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.importData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const inputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.importData(request); - * - * const [response] = await operation.promise(); - */ - importData(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.importData(request, options, callback); - } - - /** - * Exports dataset's data to the provided output location. - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataset. - * @param {Object} request.outputConfig - * Required. The desired output location. - * - * This object should have the same structure as [OutputConfig]{@link google.cloud.automl.v1.OutputConfig} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.exportData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.exportData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.exportData(request); - * - * const [response] = await operation.promise(); - */ - exportData(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.exportData(request, options, callback); - } - - /** - * Gets an annotation spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the annotation spec to retrieve. - * @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 [AnnotationSpec]{@link google.cloud.automl.v1.AnnotationSpec}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotationSpec]{@link google.cloud.automl.v1.AnnotationSpec}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.annotationSpecPath('[PROJECT]', '[LOCATION]', '[DATASET]', '[ANNOTATION_SPEC]'); - * client.getAnnotationSpec({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getAnnotationSpec(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.getAnnotationSpec(request, options, callback); - } - - /** - * Creates a model. - * Returns a Model in the response - * field when it completes. - * When you create a model, several model evaluations are created for it: - * a global evaluation, and one evaluation for each annotation spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the parent project where the model is being created. - * @param {Object} request.model - * Required. The model to create. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1.Model} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const model = {}; - * const request = { - * parent: formattedParent, - * model: model, - * }; - * - * // Handle the operation using the promise pattern. - * client.createModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const model = {}; - * const request = { - * parent: formattedParent, - * model: model, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.createModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const model = {}; - * const request = { - * parent: formattedParent, - * model: model, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.createModel(request); - * - * const [response] = await operation.promise(); - */ - createModel(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.createModel(request, options, callback); - } - - /** - * Gets a model. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model. - * @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 [Model]{@link google.cloud.automl.v1.Model}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Model]{@link google.cloud.automl.v1.Model}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * client.getModel({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getModel(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.getModel(request, options, callback); - } - - /** - * Updates a model. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.model - * Required. The model which replaces the resource on the server. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1.Model} - * @param {Object} request.updateMask - * Required. The update mask applies to the resource. - * - * 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 [Model]{@link google.cloud.automl.v1.Model}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Model]{@link google.cloud.automl.v1.Model}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const model = {}; - * const updateMask = {}; - * const request = { - * model: model, - * updateMask: updateMask, - * }; - * client.updateModel(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateModel(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({ - 'model.name': request.model.name, - }); - - return this._innerApiCalls.updateModel(request, options, callback); - } - - /** - * Lists models. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project, from which to list the models. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `model_metadata` - for existence of the case (e.g. - * video_classification_model_metadata:*). - * * `dataset_id` - for = or !=. Some examples of using the filter are: - * - * * `image_classification_model_metadata:*` --> The model has - * image_classification_model_metadata. - * * `dataset_id=5` --> The model was created from a dataset with ID 5. - * @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 [Model]{@link google.cloud.automl.v1.Model}. - * - * 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 [ListModelsResponse]{@link google.cloud.automl.v1.ListModelsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Model]{@link google.cloud.automl.v1.Model}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Model]{@link google.cloud.automl.v1.Model} 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 [ListModelsResponse]{@link google.cloud.automl.v1.ListModelsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * - * client.listModels({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.locationPath('[PROJECT]', '[LOCATION]'); - * - * - * 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.listModels(nextRequest, options).then(callback); - * } - * } - * client.listModels({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listModels(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.listModels(request, options, callback); - } - - /** - * Equivalent to {@link listModels}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listModels} 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, from which to list the models. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `model_metadata` - for existence of the case (e.g. - * video_classification_model_metadata:*). - * * `dataset_id` - for = or !=. Some examples of using the filter are: - * - * * `image_classification_model_metadata:*` --> The model has - * image_classification_model_metadata. - * * `dataset_id=5` --> The model was created from a dataset with ID 5. - * @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 [Model]{@link google.cloud.automl.v1.Model} on 'data' event. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * client.listModelsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listModelsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listModels.createStream( - this._innerApiCalls.listModels, - request, - options - ); - } - - /** - * Deletes a model. - * Returns `google.protobuf.Empty` in the - * response field when it completes, - * and `delete_details` in the - * metadata field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model being deleted. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the promise pattern. - * client.deleteModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the event emitter pattern. - * client.deleteModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.deleteModel({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - deleteModel(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.deleteModel(request, options, callback); - } - - /** - * Deploys a model. If a model is already deployed, deploying it with the - * same parameters has no effect. Deploying with different parametrs - * (as e.g. changing - * - * node_number) - * will reset the deployment state without pausing the model's availability. - * - * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - * deployment automatically. - * - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model to deploy. - * @param {Object} [request.imageObjectDetectionModelDeploymentMetadata] - * Model deployment metadata specific to Image Object Detection. - * - * This object should have the same structure as [ImageObjectDetectionModelDeploymentMetadata]{@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} - * @param {Object} [request.imageClassificationModelDeploymentMetadata] - * Model deployment metadata specific to Image Classification. - * - * This object should have the same structure as [ImageClassificationModelDeploymentMetadata]{@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the promise pattern. - * client.deployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the event emitter pattern. - * client.deployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.deployModel({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - deployModel(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.deployModel(request, options, callback); - } - - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * - * Only applicable for Text Classification, Image Object Detection and Tables; - * all other domains manage deployment automatically. - * - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model to undeploy. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the promise pattern. - * client.undeployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the event emitter pattern. - * client.undeployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.undeployModel({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - undeployModel(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.undeployModel(request, options, callback); - } - - /** - * Exports a trained, "export-able", model to a user specified Google Cloud - * Storage location. A model is considered export-able if and only if it has - * an export format defined for it in - * ModelExportOutputConfig. - * - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the model to export. - * @param {Object} request.outputConfig - * Required. The desired output location and configuration. - * - * This object should have the same structure as [ModelExportOutputConfig]{@link google.cloud.automl.v1.ModelExportOutputConfig} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.exportModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.exportModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.exportModel(request); - * - * const [response] = await operation.promise(); - */ - exportModel(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.exportModel(request, options, callback); - } - - /** - * Gets a model evaluation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name for the model evaluation. - * @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 [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelEvaluationPath('[PROJECT]', '[LOCATION]', '[MODEL]', '[MODEL_EVALUATION]'); - * client.getModelEvaluation({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getModelEvaluation(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.getModelEvaluation(request, options, callback); - } - - /** - * Lists model evaluations. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the model to list the model evaluations for. - * If modelId is set as "-", this will list model evaluations from across all - * models of the parent location. - * @param {string} request.filter - * Required. An expression for filtering the results of the request. - * - * * `annotation_spec_id` - for =, != or existence. See example below for - * the last. - * - * Some examples of using the filter are: - * - * * `annotation_spec_id!=4` --> The model evaluation was done for - * annotation spec with ID different than 4. - * * `NOT annotation_spec_id:*` --> The model evaluation was done for - * aggregate of all annotation specs. - * @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 [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation}. - * - * 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 [ListModelEvaluationsResponse]{@link google.cloud.automl.v1.ListModelEvaluationsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation} 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 [ListModelEvaluationsResponse]{@link google.cloud.automl.v1.ListModelEvaluationsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const filter = ''; - * const request = { - * parent: formattedParent, - * filter: filter, - * }; - * - * client.listModelEvaluations(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 formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const filter = ''; - * const request = { - * parent: formattedParent, - * filter: filter, - * }; - * - * - * 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.listModelEvaluations(nextRequest, options).then(callback); - * } - * } - * client.listModelEvaluations(request, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listModelEvaluations(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.listModelEvaluations(request, options, callback); - } - - /** - * Equivalent to {@link listModelEvaluations}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listModelEvaluations} 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 model to list the model evaluations for. - * If modelId is set as "-", this will list model evaluations from across all - * models of the parent location. - * @param {string} request.filter - * Required. An expression for filtering the results of the request. - * - * * `annotation_spec_id` - for =, != or existence. See example below for - * the last. - * - * Some examples of using the filter are: - * - * * `annotation_spec_id!=4` --> The model evaluation was done for - * annotation spec with ID different than 4. - * * `NOT annotation_spec_id:*` --> The model evaluation was done for - * aggregate of all annotation specs. - * @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 [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation} on 'data' event. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const filter = ''; - * const request = { - * parent: formattedParent, - * filter: filter, - * }; - * client.listModelEvaluationsStream(request) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listModelEvaluationsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listModelEvaluations.createStream( - this._innerApiCalls.listModelEvaluations, - request, - options - ); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified annotation_spec resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} dataset - * @param {String} annotationSpec - * @returns {String} - */ - annotationSpecPath(project, location, dataset, annotationSpec) { - return this._pathTemplates.annotationSpecPathTemplate.render({ - project: project, - location: location, - dataset: dataset, - annotation_spec: annotationSpec, - }); - } - - /** - * Return a fully-qualified dataset resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} dataset - * @returns {String} - */ - datasetPath(project, location, dataset) { - return this._pathTemplates.datasetPathTemplate.render({ - project: project, - location: location, - dataset: dataset, - }); - } - - /** - * 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 model resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} model - * @returns {String} - */ - modelPath(project, location, model) { - return this._pathTemplates.modelPathTemplate.render({ - project: project, - location: location, - model: model, - }); - } - - /** - * Return a fully-qualified model_evaluation resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} model - * @param {String} modelEvaluation - * @returns {String} - */ - modelEvaluationPath(project, location, model, modelEvaluation) { - return this._pathTemplates.modelEvaluationPathTemplate.render({ - project: project, - location: location, - model: model, - model_evaluation: modelEvaluation, - }); - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).project; - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).location; - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the dataset. - */ - matchDatasetFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).dataset; - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the annotation_spec. - */ - matchAnnotationSpecFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).annotation_spec; - } - - /** - * Parse the datasetName from a dataset resource. - * - * @param {String} datasetName - * A fully-qualified path representing a dataset resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromDatasetName(datasetName) { - return this._pathTemplates.datasetPathTemplate.match(datasetName).project; - } - - /** - * Parse the datasetName from a dataset resource. - * - * @param {String} datasetName - * A fully-qualified path representing a dataset resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromDatasetName(datasetName) { - return this._pathTemplates.datasetPathTemplate.match(datasetName).location; - } - - /** - * Parse the datasetName from a dataset resource. - * - * @param {String} datasetName - * A fully-qualified path representing a dataset resources. - * @returns {String} - A string representing the dataset. - */ - matchDatasetFromDatasetName(datasetName) { - return this._pathTemplates.datasetPathTemplate.match(datasetName).dataset; - } - - /** - * 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 modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).project; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).location; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the model. - */ - matchModelFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).model; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).project; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).location; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the model. - */ - matchModelFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).model; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the model_evaluation. - */ - matchModelEvaluationFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).model_evaluation; - } -} - -module.exports = AutoMlClient; diff --git a/packages/google-cloud-automl/src/v1/auto_ml_client.ts b/packages/google-cloud-automl/src/v1/auto_ml_client.ts new file mode 100644 index 00000000000..5b12a04e732 --- /dev/null +++ b/packages/google-cloud-automl/src/v1/auto_ml_client.ts @@ -0,0 +1,2500 @@ +// 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, + LROperation, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './auto_ml_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * AutoML Server API. + * + * The resource names are assigned by the server. + * The server never reuses names that it has created after the resources with + * those names are deleted. + * + * An ID of a resource is the last element of the item's resource name. For + * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + * the id for the item is `{dataset_id}`. + * + * Currently the only supported `location_id` is "us-central1". + * + * On any input that is documented to expect a string parameter in + * snake_case or kebab-case, either of those cases is accepted. + * @class + * @memberof v1 + */ +export class AutoMlClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + operationsClient: gax.OperationsClient; + autoMlStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AutoMlClient. + * + * @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 AutoMlClient; + 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 AutoMlClient).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 = { + annotationSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + datasetPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}' + ), + locationPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + modelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelEvaluationPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}' + ), + }; + + // 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 = { + listDatasets: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'datasets' + ), + listModels: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'model' + ), + listModelEvaluations: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'modelEvaluation' + ), + }; + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback + ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) + : gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createDatasetResponse = protoFilesRoot.lookup( + '.google.cloud.automl.v1.Dataset' + ) as gax.protobuf.Type; + const createDatasetMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteDatasetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteDatasetMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const importDataResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const importDataMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const exportDataResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const exportDataMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createModelResponse = protoFilesRoot.lookup( + '.google.cloud.automl.v1.Model' + ) as gax.protobuf.Type; + const createModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deployModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deployModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const undeployModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const undeployModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + const exportModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const exportModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this._descriptors.longrunning = { + createDataset: new gaxModule.LongrunningDescriptor( + this.operationsClient, + createDatasetResponse.decode.bind(createDatasetResponse), + createDatasetMetadata.decode.bind(createDatasetMetadata) + ), + deleteDataset: new gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDatasetResponse.decode.bind(deleteDatasetResponse), + deleteDatasetMetadata.decode.bind(deleteDatasetMetadata) + ), + importData: new gaxModule.LongrunningDescriptor( + this.operationsClient, + importDataResponse.decode.bind(importDataResponse), + importDataMetadata.decode.bind(importDataMetadata) + ), + exportData: new gaxModule.LongrunningDescriptor( + this.operationsClient, + exportDataResponse.decode.bind(exportDataResponse), + exportDataMetadata.decode.bind(exportDataMetadata) + ), + createModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + createModelResponse.decode.bind(createModelResponse), + createModelMetadata.decode.bind(createModelMetadata) + ), + deleteModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteModelResponse.decode.bind(deleteModelResponse), + deleteModelMetadata.decode.bind(deleteModelMetadata) + ), + deployModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + deployModelResponse.decode.bind(deployModelResponse), + deployModelMetadata.decode.bind(deployModelMetadata) + ), + undeployModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + undeployModelResponse.decode.bind(undeployModelResponse), + undeployModelMetadata.decode.bind(undeployModelMetadata) + ), + exportModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + exportModelResponse.decode.bind(exportModelResponse), + exportModelMetadata.decode.bind(exportModelMetadata) + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.automl.v1.AutoMl', + 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.automl.v1.AutoMl. + this.autoMlStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.automl.v1.AutoMl' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.automl.v1.AutoMl, + 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 autoMlStubMethods = [ + 'createDataset', + 'getDataset', + 'listDatasets', + 'updateDataset', + 'deleteDataset', + 'importData', + 'exportData', + 'getAnnotationSpec', + 'createModel', + 'getModel', + 'listModels', + 'deleteModel', + 'updateModel', + 'deployModel', + 'undeployModel', + 'exportModel', + 'getModelEvaluation', + 'listModelEvaluations', + ]; + + for (const methodName of autoMlStubMethods) { + const innerCallPromise = this.autoMlStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + 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 + ) => { + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'automl.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'automl.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 -- + // ------------------- + getDataset( + request: protosTypes.google.cloud.automl.v1.IGetDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IGetDatasetRequest | undefined, + {} | undefined + ] + >; + getDataset( + request: protosTypes.google.cloud.automl.v1.IGetDatasetRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IGetDatasetRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataset to retrieve. + * @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 [Dataset]{@link google.cloud.automl.v1.Dataset}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getDataset( + request: protosTypes.google.cloud.automl.v1.IGetDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IGetDatasetRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IGetDatasetRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IGetDatasetRequest | 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.getDataset(request, options, callback); + } + updateDataset( + request: protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest | undefined, + {} | undefined + ] + >; + updateDataset( + request: protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates a dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.automl.v1.Dataset} request.dataset + * Required. The dataset which replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. + * @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 [Dataset]{@link google.cloud.automl.v1.Dataset}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateDataset( + request: protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest | 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({ + 'dataset.name': request.dataset!.name || '', + }); + return this._innerApiCalls.updateDataset(request, options, callback); + } + getAnnotationSpec( + request: protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IAnnotationSpec, + protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest | undefined, + {} | undefined + ] + >; + getAnnotationSpec( + request: protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IAnnotationSpec, + protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets an annotation spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the annotation spec to retrieve. + * @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 [AnnotationSpec]{@link google.cloud.automl.v1.AnnotationSpec}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getAnnotationSpec( + request: protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IAnnotationSpec, + | protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IAnnotationSpec, + protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IAnnotationSpec, + protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest | 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.getAnnotationSpec(request, options, callback); + } + getModel( + request: protosTypes.google.cloud.automl.v1.IGetModelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IGetModelRequest | undefined, + {} | undefined + ] + >; + getModel( + request: protosTypes.google.cloud.automl.v1.IGetModelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IGetModelRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the model. + * @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 [Model]{@link google.cloud.automl.v1.Model}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getModel( + request: protosTypes.google.cloud.automl.v1.IGetModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IGetModelRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IGetModelRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IGetModelRequest | 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.getModel(request, options, callback); + } + updateModel( + request: protosTypes.google.cloud.automl.v1.IUpdateModelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IUpdateModelRequest | undefined, + {} | undefined + ] + >; + updateModel( + request: protosTypes.google.cloud.automl.v1.IUpdateModelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IUpdateModelRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates a model. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.automl.v1.Model} request.model + * Required. The model which replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. + * @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 [Model]{@link google.cloud.automl.v1.Model}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateModel( + request: protosTypes.google.cloud.automl.v1.IUpdateModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IUpdateModelRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IUpdateModelRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IUpdateModelRequest | 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({ + 'model.name': request.model!.name || '', + }); + return this._innerApiCalls.updateModel(request, options, callback); + } + getModelEvaluation( + request: protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModelEvaluation, + protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest | undefined, + {} | undefined + ] + >; + getModelEvaluation( + request: protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IModelEvaluation, + protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a model evaluation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name for the model evaluation. + * @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 [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getModelEvaluation( + request: protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IModelEvaluation, + | protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IModelEvaluation, + protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModelEvaluation, + protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest | 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.getModelEvaluation(request, options, callback); + } + + createDataset( + request: protosTypes.google.cloud.automl.v1.ICreateDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createDataset( + request: protosTypes.google.cloud.automl.v1.ICreateDatasetRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Creates a dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the project to create the dataset for. + * @param {google.cloud.automl.v1.Dataset} request.dataset + * Required. The dataset 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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createDataset( + request: protosTypes.google.cloud.automl.v1.ICreateDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1.IDataset, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.createDataset(request, options, callback); + } + deleteDataset( + request: protosTypes.google.cloud.automl.v1.IDeleteDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteDataset( + request: protosTypes.google.cloud.automl.v1.IDeleteDatasetRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Deletes a dataset and all of its contents. + * Returns empty response in the + * [response][google.longrunning.Operation.response] field when it completes, + * and `delete_details` in the + * [metadata][google.longrunning.Operation.metadata] field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataset to delete. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteDataset( + request: protosTypes.google.cloud.automl.v1.IDeleteDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.deleteDataset(request, options, callback); + } + importData( + request: protosTypes.google.cloud.automl.v1.IImportDataRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importData( + request: protosTypes.google.cloud.automl.v1.IImportDataRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Imports data into a dataset. + * For Tables this method can only be called on an empty Dataset. + * + * For Tables: + * * A + * [schema_inference_version][google.cloud.automl.v1.InputConfig.params] + * parameter must be explicitly set. + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Dataset name. Dataset must already exist. All imported + * annotations and examples will be added. + * @param {google.cloud.automl.v1.InputConfig} request.inputConfig + * Required. The desired input location and its domain specific semantics, + * if any. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + importData( + request: protosTypes.google.cloud.automl.v1.IImportDataRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.importData(request, options, callback); + } + exportData( + request: protosTypes.google.cloud.automl.v1.IExportDataRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + exportData( + request: protosTypes.google.cloud.automl.v1.IExportDataRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Exports dataset's data to the provided output location. + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataset. + * @param {google.cloud.automl.v1.OutputConfig} request.outputConfig + * Required. The desired output location. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + exportData( + request: protosTypes.google.cloud.automl.v1.IExportDataRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.exportData(request, options, callback); + } + createModel( + request: protosTypes.google.cloud.automl.v1.ICreateModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createModel( + request: protosTypes.google.cloud.automl.v1.ICreateModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Creates a model. + * Returns a Model in the [response][google.longrunning.Operation.response] + * field when it completes. + * When you create a model, several model evaluations are created for it: + * a global evaluation, and one evaluation for each annotation spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent project where the model is being created. + * @param {google.cloud.automl.v1.Model} request.model + * Required. The model 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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createModel( + request: protosTypes.google.cloud.automl.v1.ICreateModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1.IModel, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.createModel(request, options, callback); + } + deleteModel( + request: protosTypes.google.cloud.automl.v1.IDeleteModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteModel( + request: protosTypes.google.cloud.automl.v1.IDeleteModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Deletes a model. + * Returns `google.protobuf.Empty` in the + * [response][google.longrunning.Operation.response] field when it completes, + * and `delete_details` in the + * [metadata][google.longrunning.Operation.metadata] field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the model being 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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteModel( + request: protosTypes.google.cloud.automl.v1.IDeleteModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.deleteModel(request, options, callback); + } + deployModel( + request: protosTypes.google.cloud.automl.v1.IDeployModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deployModel( + request: protosTypes.google.cloud.automl.v1.IDeployModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Deploys a model. If a model is already deployed, deploying it with the + * same parameters has no effect. Deploying with different parametrs + * (as e.g. changing + * + * [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + * will reset the deployment state without pausing the model's availability. + * + * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + * deployment automatically. + * + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} request.imageObjectDetectionModelDeploymentMetadata + * Model deployment metadata specific to Image Object Detection. + * @param {google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} request.imageClassificationModelDeploymentMetadata + * Model deployment metadata specific to Image Classification. + * @param {string} request.name + * Required. Resource name of the model to deploy. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deployModel( + request: protosTypes.google.cloud.automl.v1.IDeployModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.deployModel(request, options, callback); + } + undeployModel( + request: protosTypes.google.cloud.automl.v1.IUndeployModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + undeployModel( + request: protosTypes.google.cloud.automl.v1.IUndeployModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Undeploys a model. If the model is not deployed this method has no effect. + * + * Only applicable for Text Classification, Image Object Detection and Tables; + * all other domains manage deployment automatically. + * + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the model to undeploy. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + undeployModel( + request: protosTypes.google.cloud.automl.v1.IUndeployModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.undeployModel(request, options, callback); + } + exportModel( + request: protosTypes.google.cloud.automl.v1.IExportModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + exportModel( + request: protosTypes.google.cloud.automl.v1.IExportModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Exports a trained, "export-able", model to a user specified Google Cloud + * Storage location. A model is considered export-able if and only if it has + * an export format defined for it in + * [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig]. + * + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the model to export. + * @param {google.cloud.automl.v1.ModelExportOutputConfig} request.outputConfig + * Required. The desired output location and configuration. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + exportModel( + request: protosTypes.google.cloud.automl.v1.IExportModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.exportModel(request, options, callback); + } + listDatasets( + request: protosTypes.google.cloud.automl.v1.IListDatasetsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IDataset[], + protosTypes.google.cloud.automl.v1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1.IListDatasetsResponse + ] + >; + listDatasets( + request: protosTypes.google.cloud.automl.v1.IListDatasetsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IDataset[], + protosTypes.google.cloud.automl.v1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1.IListDatasetsResponse + > + ): void; + /** + * Lists datasets in a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the project from which to list datasets. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `dataset_metadata` - for existence of the case (e.g. + * image_classification_dataset_metadata:*). Some examples of using the filter are: + * + * * `translation_dataset_metadata:*` --> The dataset has + * translation_dataset_metadata. + * @param {number} request.pageSize + * Requested page size. Server may return fewer results than requested. + * If unspecified, server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous + * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call. + * @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 Array of [Dataset]{@link google.cloud.automl.v1.Dataset}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Dataset]{@link google.cloud.automl.v1.Dataset} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListDatasetsRequest]{@link google.cloud.automl.v1.ListDatasetsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListDatasetsResponse]{@link google.cloud.automl.v1.ListDatasetsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listDatasets( + request: protosTypes.google.cloud.automl.v1.IListDatasetsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IDataset[], + protosTypes.google.cloud.automl.v1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1.IListDatasetsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IDataset[], + protosTypes.google.cloud.automl.v1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1.IListDatasetsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IDataset[], + protosTypes.google.cloud.automl.v1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1.IListDatasetsResponse + ] + > | 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.listDatasets(request, options, callback); + } + + /** + * Equivalent to {@link listDatasets}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDatasets} 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 resource name of the project from which to list datasets. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `dataset_metadata` - for existence of the case (e.g. + * image_classification_dataset_metadata:*). Some examples of using the filter are: + * + * * `translation_dataset_metadata:*` --> The dataset has + * translation_dataset_metadata. + * @param {number} request.pageSize + * Requested page size. Server may return fewer results than requested. + * If unspecified, server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous + * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call. + * @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 [Dataset]{@link google.cloud.automl.v1.Dataset} on 'data' event. + */ + listDatasetsStream( + request?: protosTypes.google.cloud.automl.v1.IListDatasetsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listDatasets.createStream( + this._innerApiCalls.listDatasets as gax.GaxCall, + request, + callSettings + ); + } + listModels( + request: protosTypes.google.cloud.automl.v1.IListModelsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModel[], + protosTypes.google.cloud.automl.v1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelsResponse + ] + >; + listModels( + request: protosTypes.google.cloud.automl.v1.IListModelsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IModel[], + protosTypes.google.cloud.automl.v1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelsResponse + > + ): void; + /** + * Lists models. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project, from which to list the models. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `model_metadata` - for existence of the case (e.g. + * video_classification_model_metadata:*). + * * `dataset_id` - for = or !=. Some examples of using the filter are: + * + * * `image_classification_model_metadata:*` --> The model has + * image_classification_model_metadata. + * * `dataset_id=5` --> The model was created from a dataset with ID 5. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous + * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call. + * @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 Array of [Model]{@link google.cloud.automl.v1.Model}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Model]{@link google.cloud.automl.v1.Model} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListModelsRequest]{@link google.cloud.automl.v1.ListModelsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListModelsResponse]{@link google.cloud.automl.v1.ListModelsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listModels( + request: protosTypes.google.cloud.automl.v1.IListModelsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IModel[], + protosTypes.google.cloud.automl.v1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IModel[], + protosTypes.google.cloud.automl.v1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModel[], + protosTypes.google.cloud.automl.v1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelsResponse + ] + > | 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.listModels(request, options, callback); + } + + /** + * Equivalent to {@link listModels}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listModels} 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, from which to list the models. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `model_metadata` - for existence of the case (e.g. + * video_classification_model_metadata:*). + * * `dataset_id` - for = or !=. Some examples of using the filter are: + * + * * `image_classification_model_metadata:*` --> The model has + * image_classification_model_metadata. + * * `dataset_id=5` --> The model was created from a dataset with ID 5. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous + * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call. + * @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 [Model]{@link google.cloud.automl.v1.Model} on 'data' event. + */ + listModelsStream( + request?: protosTypes.google.cloud.automl.v1.IListModelsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listModels.createStream( + this._innerApiCalls.listModels as gax.GaxCall, + request, + callSettings + ); + } + listModelEvaluations( + request: protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelEvaluationsResponse + ] + >; + listModelEvaluations( + request: protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelEvaluationsResponse + > + ): void; + /** + * Lists model evaluations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the model to list the model evaluations for. + * If modelId is set as "-", this will list model evaluations from across all + * models of the parent location. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * + * * `annotation_spec_id` - for =, != or existence. See example below for + * the last. + * + * Some examples of using the filter are: + * + * * `annotation_spec_id!=4` --> The model evaluation was done for + * annotation spec with ID different than 4. + * * `NOT annotation_spec_id:*` --> The model evaluation was done for + * aggregate of all annotation specs. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous + * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call. + * @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 Array of [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListModelEvaluationsRequest]{@link google.cloud.automl.v1.ListModelEvaluationsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListModelEvaluationsResponse]{@link google.cloud.automl.v1.ListModelEvaluationsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listModelEvaluations( + request: protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelEvaluationsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelEvaluationsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1.IListModelEvaluationsResponse + ] + > | 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.listModelEvaluations(request, options, callback); + } + + /** + * Equivalent to {@link listModelEvaluations}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listModelEvaluations} 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 model to list the model evaluations for. + * If modelId is set as "-", this will list model evaluations from across all + * models of the parent location. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * + * * `annotation_spec_id` - for =, != or existence. See example below for + * the last. + * + * Some examples of using the filter are: + * + * * `annotation_spec_id!=4` --> The model evaluation was done for + * annotation spec with ID different than 4. + * * `NOT annotation_spec_id:*` --> The model evaluation was done for + * aggregate of all annotation specs. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous + * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call. + * @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 [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation} on 'data' event. + */ + listModelEvaluationsStream( + request?: protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listModelEvaluations.createStream( + this._innerApiCalls.listModelEvaluations as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this._pathTemplates.annotationSpecPathTemplate.render({ + project, + location, + dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this._pathTemplates.datasetPathTemplate.render({ + project, + location, + dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this._pathTemplates.locationPathTemplate.render({ + project, + location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName) + .location; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this._pathTemplates.modelPathTemplate.render({ + project, + location, + model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} model_evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + modelEvaluation: string + ) { + return this._pathTemplates.modelEvaluationPathTemplate.render({ + project, + location, + model, + model_evaluation: modelEvaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the model_evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model_evaluation. + */ + matchModelEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model_evaluation; + } + + /** + * 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.autoMlStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-automl/src/v1/auto_ml_client_config.json b/packages/google-cloud-automl/src/v1/auto_ml_client_config.json index e4800167114..3ad4956b39f 100644 --- a/packages/google-cloud-automl/src/v1/auto_ml_client_config.json +++ b/packages/google-cloud-automl/src/v1/auto_ml_client_config.json @@ -2,20 +2,20 @@ "interfaces": { "google.cloud.automl.v1.AutoMl": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "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.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, @@ -25,28 +25,28 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "UpdateDataset": { - "timeout_millis": 5000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "GetDataset": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListDatasets": { - "timeout_millis": 50000, + "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "UpdateDataset": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "DeleteDataset": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ImportData": { - "timeout_millis": 20000, + "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -61,7 +61,7 @@ "retry_params_name": "default" }, "CreateModel": { - "timeout_millis": 20000, + "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -70,13 +70,8 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "UpdateModel": { - "timeout_millis": 5000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "ListModels": { - "timeout_millis": 50000, + "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, @@ -85,6 +80,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "UpdateModel": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "DeployModel": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", @@ -106,7 +106,7 @@ "retry_params_name": "default" }, "ListModelEvaluations": { - "timeout_millis": 50000, + "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-automl/src/v1/auto_ml_proto_list.json b/packages/google-cloud-automl/src/v1/auto_ml_proto_list.json index f939e13323f..f15ad4ecded 100644 --- a/packages/google-cloud-automl/src/v1/auto_ml_proto_list.json +++ b/packages/google-cloud-automl/src/v1/auto_ml_proto_list.json @@ -1,3 +1,21 @@ [ - "../../protos/google/cloud/automl/v1/service.proto" + "../../protos/google/cloud/automl/v1/annotation_payload.proto", + "../../protos/google/cloud/automl/v1/annotation_spec.proto", + "../../protos/google/cloud/automl/v1/classification.proto", + "../../protos/google/cloud/automl/v1/data_items.proto", + "../../protos/google/cloud/automl/v1/dataset.proto", + "../../protos/google/cloud/automl/v1/detection.proto", + "../../protos/google/cloud/automl/v1/geometry.proto", + "../../protos/google/cloud/automl/v1/image.proto", + "../../protos/google/cloud/automl/v1/io.proto", + "../../protos/google/cloud/automl/v1/model.proto", + "../../protos/google/cloud/automl/v1/model_evaluation.proto", + "../../protos/google/cloud/automl/v1/operations.proto", + "../../protos/google/cloud/automl/v1/prediction_service.proto", + "../../protos/google/cloud/automl/v1/service.proto", + "../../protos/google/cloud/automl/v1/text.proto", + "../../protos/google/cloud/automl/v1/text_extraction.proto", + "../../protos/google/cloud/automl/v1/text_segment.proto", + "../../protos/google/cloud/automl/v1/text_sentiment.proto", + "../../protos/google/cloud/automl/v1/translation.proto" ] diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_annotation_payload.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_annotation_payload.js deleted file mode 100644 index 76049531915..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_annotation_payload.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2020 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. - -/** - * Contains annotation information that is relevant to AutoML. - * - * @property {Object} translation - * Annotation details for translation. - * - * This object should have the same structure as [TranslationAnnotation]{@link google.cloud.automl.v1.TranslationAnnotation} - * - * @property {Object} classification - * Annotation details for content or image classification. - * - * This object should have the same structure as [ClassificationAnnotation]{@link google.cloud.automl.v1.ClassificationAnnotation} - * - * @property {Object} imageObjectDetection - * Annotation details for image object detection. - * - * This object should have the same structure as [ImageObjectDetectionAnnotation]{@link google.cloud.automl.v1.ImageObjectDetectionAnnotation} - * - * @property {Object} textExtraction - * Annotation details for text extraction. - * - * This object should have the same structure as [TextExtractionAnnotation]{@link google.cloud.automl.v1.TextExtractionAnnotation} - * - * @property {Object} textSentiment - * Annotation details for text sentiment. - * - * This object should have the same structure as [TextSentimentAnnotation]{@link google.cloud.automl.v1.TextSentimentAnnotation} - * - * @property {string} annotationSpecId - * Output only . The resource ID of the annotation spec that - * this annotation pertains to. The annotation spec comes from either an - * ancestor dataset, or the dataset that was used to train the model in use. - * - * @property {string} displayName - * Output only. The value of - * display_name - * when the model was trained. Because this field returns a value at model - * training time, for different models trained using the same dataset, the - * returned value could be different as model owner could update the - * `display_name` between any two model training. - * - * @typedef AnnotationPayload - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.AnnotationPayload definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/annotation_payload.proto} - */ -const AnnotationPayload = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_annotation_spec.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_annotation_spec.js deleted file mode 100644 index e919675dac3..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_annotation_spec.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 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 definition of an annotation spec. - * - * @property {string} name - * Output only. Resource name of the annotation spec. - * Form: - * - * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}' - * - * @property {string} displayName - * Required. The name of the annotation spec to show in the interface. The name can be - * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - * - * @property {number} exampleCount - * Output only. The number of examples in the parent dataset - * labeled by the annotation spec. - * - * @typedef AnnotationSpec - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.AnnotationSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/annotation_spec.proto} - */ -const AnnotationSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_classification.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_classification.js deleted file mode 100644 index f580cb77b22..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_classification.js +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2020 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. - -/** - * Contains annotation details specific to classification. - * - * @property {number} score - * Output only. A confidence estimate between 0.0 and 1.0. A higher value - * means greater confidence that the annotation is positive. If a user - * approves an annotation as negative or positive, the score value remains - * unchanged. If a user creates an annotation, the score is 0 for negative or - * 1 for positive. - * - * @typedef ClassificationAnnotation - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ClassificationAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/classification.proto} - */ -const ClassificationAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model evaluation metrics for classification problems. - * Note: For Video Classification this metrics only describe quality of the - * Video Classification predictions of "segment_classification" type. - * - * @property {number} auPrc - * Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - * for the overall evaluation. - * - * @property {number} auRoc - * Output only. The Area Under Receiver Operating Characteristic curve metric. - * Micro-averaged for the overall evaluation. - * - * @property {number} logLoss - * Output only. The Log Loss metric. - * - * @property {Object[]} confidenceMetricsEntry - * Output only. Metrics for each confidence_threshold in - * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - * position_threshold = INT32_MAX_VALUE. - * ROC and precision-recall curves, and other aggregated metrics are derived - * from them. The confidence metrics entries may also be supplied for - * additional values of position_threshold, but from these no aggregated - * metrics are computed. - * - * This object should have the same structure as [ConfidenceMetricsEntry]{@link google.cloud.automl.v1.ConfidenceMetricsEntry} - * - * @property {Object} confusionMatrix - * Output only. Confusion matrix of the evaluation. - * Only set for MULTICLASS classification problems where number - * of labels is no more than 10. - * Only set for model level evaluation, not for evaluation per label. - * - * This object should have the same structure as [ConfusionMatrix]{@link google.cloud.automl.v1.ConfusionMatrix} - * - * @property {string[]} annotationSpecId - * Output only. The annotation spec ids used for this evaluation. - * - * @typedef ClassificationEvaluationMetrics - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ClassificationEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/classification.proto} - */ -const ClassificationEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Metrics for a single confidence threshold. - * - * @property {number} confidenceThreshold - * Output only. Metrics are computed with an assumption that the model - * never returns predictions with score lower than this value. - * - * @property {number} positionThreshold - * Output only. Metrics are computed with an assumption that the model - * always returns at most this many predictions (ordered by their score, - * descendingly), but they all still need to meet the confidence_threshold. - * - * @property {number} recall - * Output only. Recall (True Positive Rate) for the given confidence - * threshold. - * - * @property {number} precision - * Output only. Precision for the given confidence threshold. - * - * @property {number} falsePositiveRate - * Output only. False Positive Rate for the given confidence threshold. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @property {number} recallAt1 - * Output only. The Recall (True Positive Rate) when only considering the - * label that has the highest prediction score and not below the confidence - * threshold for each example. - * - * @property {number} precisionAt1 - * Output only. The precision when only considering the label that has the - * highest prediction score and not below the confidence threshold for each - * example. - * - * @property {number} falsePositiveRateAt1 - * Output only. The False Positive Rate when only considering the label that - * has the highest prediction score and not below the confidence threshold - * for each example. - * - * @property {number} f1ScoreAt1 - * Output only. The harmonic mean of recall_at1 and precision_at1. - * - * @property {number} truePositiveCount - * Output only. The number of model created labels that match a ground truth - * label. - * - * @property {number} falsePositiveCount - * Output only. The number of model created labels that do not match a - * ground truth label. - * - * @property {number} falseNegativeCount - * Output only. The number of ground truth labels that are not matched - * by a model created label. - * - * @property {number} trueNegativeCount - * Output only. The number of labels that were not created by the model, - * but if they would, they would not match a ground truth label. - * - * @typedef ConfidenceMetricsEntry - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/classification.proto} - */ - ConfidenceMetricsEntry: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Confusion matrix of the model running the classification. - * - * @property {string[]} annotationSpecId - * Output only. IDs of the annotation specs used in the confusion matrix. - * For Tables CLASSIFICATION - * - * prediction_type - * only list of annotation_spec_display_name-s is populated. - * - * @property {string[]} displayName - * Output only. Display name of the annotation specs used in the confusion - * matrix, as they were at the moment of the evaluation. For Tables - * CLASSIFICATION - * - * prediction_type-s, - * distinct values of the target column at the moment of the model - * evaluation are populated here. - * - * @property {Object[]} row - * Output only. Rows in the confusion matrix. The number of rows is equal to - * the size of `annotation_spec_id`. - * `row[i].example_count[j]` is the number of examples that have ground - * truth of the `annotation_spec_id[i]` and are predicted as - * `annotation_spec_id[j]` by the model being evaluated. - * - * This object should have the same structure as [Row]{@link google.cloud.automl.v1.Row} - * - * @typedef ConfusionMatrix - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/classification.proto} - */ - ConfusionMatrix: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Output only. A row in the confusion matrix. - * - * @property {number[]} exampleCount - * Output only. Value of the specific cell in the confusion matrix. - * The number of values each row has (i.e. the length of the row) is equal - * to the length of the `annotation_spec_id` field or, if that one is not - * populated, length of the display_name field. - * - * @typedef Row - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/classification.proto} - */ - Row: { - // This is for documentation. Actual contents will be loaded by gRPC. - } - } -}; - -/** - * Type of the classification problem. - * - * @enum {number} - * @memberof google.cloud.automl.v1 - */ -const ClassificationType = { - - /** - * An un-set value of this enum. - */ - CLASSIFICATION_TYPE_UNSPECIFIED: 0, - - /** - * At most one label is allowed per example. - */ - MULTICLASS: 1, - - /** - * Multiple labels are allowed for one example. - */ - MULTILABEL: 2 -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_data_items.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_data_items.js deleted file mode 100644 index 0da53a1fd33..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_data_items.js +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright 2020 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 representation of an image. - * Only images up to 30MB in size are supported. - * - * @property {Buffer} imageBytes - * Image content represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * - * @property {string} thumbnailUri - * Output only. HTTP URI to the thumbnail image. - * - * @typedef Image - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.Image definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/data_items.proto} - */ -const Image = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A representation of a text snippet. - * - * @property {string} content - * Required. The content of the text snippet as a string. Up to 250000 - * characters long. - * - * @property {string} mimeType - * Optional. The format of content. Currently the only two allowed - * values are "text/html" and "text/plain". If left blank, the format is - * automatically determined from the type of the uploaded content. - * - * @property {string} contentUri - * Output only. HTTP URI where you can download the content. - * - * @typedef TextSnippet - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextSnippet definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/data_items.proto} - */ -const TextSnippet = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Message that describes dimension of a document. - * - * @property {number} unit - * Unit of the dimension. - * - * The number should be among the values of [DocumentDimensionUnit]{@link google.cloud.automl.v1.DocumentDimensionUnit} - * - * @property {number} width - * Width value of the document, works together with the unit. - * - * @property {number} height - * Height value of the document, works together with the unit. - * - * @typedef DocumentDimensions - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.DocumentDimensions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/data_items.proto} - */ -const DocumentDimensions = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Unit of the document dimension. - * - * @enum {number} - * @memberof google.cloud.automl.v1 - */ - DocumentDimensionUnit: { - - /** - * Should not be used. - */ - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED: 0, - - /** - * Document dimension is measured in inches. - */ - INCH: 1, - - /** - * Document dimension is measured in centimeters. - */ - CENTIMETER: 2, - - /** - * Document dimension is measured in points. 72 points = 1 inch. - */ - POINT: 3 - } -}; - -/** - * A structured text document e.g. a PDF. - * - * @property {Object} inputConfig - * An input config specifying the content of the document. - * - * This object should have the same structure as [DocumentInputConfig]{@link google.cloud.automl.v1.DocumentInputConfig} - * - * @property {Object} documentText - * The plain text version of this document. - * - * This object should have the same structure as [TextSnippet]{@link google.cloud.automl.v1.TextSnippet} - * - * @property {Object[]} layout - * Describes the layout of the document. - * Sorted by page_number. - * - * This object should have the same structure as [Layout]{@link google.cloud.automl.v1.Layout} - * - * @property {Object} documentDimensions - * The dimensions of the page in the document. - * - * This object should have the same structure as [DocumentDimensions]{@link google.cloud.automl.v1.DocumentDimensions} - * - * @property {number} pageCount - * Number of pages in the document. - * - * @typedef Document - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/data_items.proto} - */ -const Document = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Describes the layout information of a text_segment in the document. - * - * @property {Object} textSegment - * Text Segment that represents a segment in - * document_text. - * - * This object should have the same structure as [TextSegment]{@link google.cloud.automl.v1.TextSegment} - * - * @property {number} pageNumber - * Page number of the text_segment in the original document, starts - * from 1. - * - * @property {Object} boundingPoly - * The position of the text_segment in the page. - * Contains exactly 4 - * - * normalized_vertices - * and they are connected by edges in the order provided, which will - * represent a rectangle parallel to the frame. The - * NormalizedVertex-s are - * relative to the page. - * Coordinates are based on top-left as point (0,0). - * - * This object should have the same structure as [BoundingPoly]{@link google.cloud.automl.v1.BoundingPoly} - * - * @property {number} textSegmentType - * The type of the text_segment in document. - * - * The number should be among the values of [TextSegmentType]{@link google.cloud.automl.v1.TextSegmentType} - * - * @typedef Layout - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.Document.Layout definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/data_items.proto} - */ - Layout: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The type of TextSegment in the context of the original document. - * - * @enum {number} - * @memberof google.cloud.automl.v1 - */ - TextSegmentType: { - - /** - * Should not be used. - */ - TEXT_SEGMENT_TYPE_UNSPECIFIED: 0, - - /** - * The text segment is a token. e.g. word. - */ - TOKEN: 1, - - /** - * The text segment is a paragraph. - */ - PARAGRAPH: 2, - - /** - * The text segment is a form field. - */ - FORM_FIELD: 3, - - /** - * The text segment is the name part of a form field. It will be treated - * as child of another FORM_FIELD TextSegment if its span is subspan of - * another TextSegment with type FORM_FIELD. - */ - FORM_FIELD_NAME: 4, - - /** - * The text segment is the text content part of a form field. It will be - * treated as child of another FORM_FIELD TextSegment if its span is - * subspan of another TextSegment with type FORM_FIELD. - */ - FORM_FIELD_CONTENTS: 5, - - /** - * The text segment is a whole table, including headers, and all rows. - */ - TABLE: 6, - - /** - * The text segment is a table's headers. It will be treated as child of - * another TABLE TextSegment if its span is subspan of another TextSegment - * with type TABLE. - */ - TABLE_HEADER: 7, - - /** - * The text segment is a row in table. It will be treated as child of - * another TABLE TextSegment if its span is subspan of another TextSegment - * with type TABLE. - */ - TABLE_ROW: 8, - - /** - * The text segment is a cell in table. It will be treated as child of - * another TABLE_ROW TextSegment if its span is subspan of another - * TextSegment with type TABLE_ROW. - */ - TABLE_CELL: 9 - } - } -}; - -/** - * Example data used for training or prediction. - * - * @property {Object} image - * Example image. - * - * This object should have the same structure as [Image]{@link google.cloud.automl.v1.Image} - * - * @property {Object} textSnippet - * Example text. - * - * This object should have the same structure as [TextSnippet]{@link google.cloud.automl.v1.TextSnippet} - * - * @property {Object} document - * Example document. - * - * This object should have the same structure as [Document]{@link google.cloud.automl.v1.Document} - * - * @typedef ExamplePayload - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ExamplePayload definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/data_items.proto} - */ -const ExamplePayload = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_dataset.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_dataset.js deleted file mode 100644 index b4883cfd913..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_dataset.js +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2020 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 workspace for solving a single, particular machine learning (ML) problem. - * A workspace contains examples that may be annotated. - * - * @property {Object} translationDatasetMetadata - * Metadata for a dataset used for translation. - * - * This object should have the same structure as [TranslationDatasetMetadata]{@link google.cloud.automl.v1.TranslationDatasetMetadata} - * - * @property {Object} imageClassificationDatasetMetadata - * Metadata for a dataset used for image classification. - * - * This object should have the same structure as [ImageClassificationDatasetMetadata]{@link google.cloud.automl.v1.ImageClassificationDatasetMetadata} - * - * @property {Object} textClassificationDatasetMetadata - * Metadata for a dataset used for text classification. - * - * This object should have the same structure as [TextClassificationDatasetMetadata]{@link google.cloud.automl.v1.TextClassificationDatasetMetadata} - * - * @property {Object} imageObjectDetectionDatasetMetadata - * Metadata for a dataset used for image object detection. - * - * This object should have the same structure as [ImageObjectDetectionDatasetMetadata]{@link google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata} - * - * @property {Object} textExtractionDatasetMetadata - * Metadata for a dataset used for text extraction. - * - * This object should have the same structure as [TextExtractionDatasetMetadata]{@link google.cloud.automl.v1.TextExtractionDatasetMetadata} - * - * @property {Object} textSentimentDatasetMetadata - * Metadata for a dataset used for text sentiment. - * - * This object should have the same structure as [TextSentimentDatasetMetadata]{@link google.cloud.automl.v1.TextSentimentDatasetMetadata} - * - * @property {string} name - * Output only. The resource name of the dataset. - * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - * - * @property {string} displayName - * Required. The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores - * (_), and ASCII digits 0-9. - * - * @property {string} description - * User-provided description of the dataset. The description can be up to - * 25000 characters long. - * - * @property {number} exampleCount - * Output only. The number of examples in the dataset. - * - * @property {Object} createTime - * Output only. Timestamp when this dataset was created. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {string} etag - * Used to perform consistent read-modify-write updates. If not set, a blind - * "overwrite" update happens. - * - * @property {Object.} labels - * Optional. The labels with user-defined metadata to organize your dataset. - * - * Label keys and values can be no longer than 64 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * See https://goo.gl/xmQnxf for more information on and examples of labels. - * - * @typedef Dataset - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.Dataset definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/dataset.proto} - */ -const Dataset = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_detection.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_detection.js deleted file mode 100644 index c3a34e56311..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_detection.js +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2020 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. - -/** - * Annotation details for image object detection. - * - * @property {Object} boundingBox - * Output only. The rectangle representing the object location. - * - * This object should have the same structure as [BoundingPoly]{@link google.cloud.automl.v1.BoundingPoly} - * - * @property {number} score - * Output only. The confidence that this annotation is positive for the parent example, - * value in [0, 1], higher means higher positivity confidence. - * - * @typedef ImageObjectDetectionAnnotation - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageObjectDetectionAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/detection.proto} - */ -const ImageObjectDetectionAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Bounding box matching model metrics for a single intersection-over-union - * threshold and multiple label match confidence thresholds. - * - * @property {number} iouThreshold - * Output only. The intersection-over-union threshold value used to compute - * this metrics entry. - * - * @property {number} meanAveragePrecision - * Output only. The mean average precision, most often close to au_prc. - * - * @property {Object[]} confidenceMetricsEntries - * Output only. Metrics for each label-match confidence_threshold from - * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - * derived from them. - * - * This object should have the same structure as [ConfidenceMetricsEntry]{@link google.cloud.automl.v1.ConfidenceMetricsEntry} - * - * @typedef BoundingBoxMetricsEntry - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.BoundingBoxMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/detection.proto} - */ -const BoundingBoxMetricsEntry = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Metrics for a single confidence threshold. - * - * @property {number} confidenceThreshold - * Output only. The confidence threshold value used to compute the metrics. - * - * @property {number} recall - * Output only. Recall under the given confidence threshold. - * - * @property {number} precision - * Output only. Precision under the given confidence threshold. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @typedef ConfidenceMetricsEntry - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/detection.proto} - */ - ConfidenceMetricsEntry: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * Model evaluation metrics for image object detection problems. - * Evaluates prediction quality of labeled bounding boxes. - * - * @property {number} evaluatedBoundingBoxCount - * Output only. The total number of bounding boxes (i.e. summed over all - * images) the ground truth used to create this evaluation had. - * - * @property {Object[]} boundingBoxMetricsEntries - * Output only. The bounding boxes match metrics for each - * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - * pair. - * - * This object should have the same structure as [BoundingBoxMetricsEntry]{@link google.cloud.automl.v1.BoundingBoxMetricsEntry} - * - * @property {number} boundingBoxMeanAveragePrecision - * Output only. The single metric for bounding boxes evaluation: - * the mean_average_precision averaged over all bounding_box_metrics_entries. - * - * @typedef ImageObjectDetectionEvaluationMetrics - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/detection.proto} - */ -const ImageObjectDetectionEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_geometry.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_geometry.js deleted file mode 100644 index cc88566c4e5..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_geometry.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2020 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 vertex represents a 2D point in the image. - * The normalized vertex coordinates are between 0 to 1 fractions relative to - * the original plane (image, video). E.g. if the plane (e.g. whole image) would - * have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would - * be at the position (1, 6) on that plane. - * - * @property {number} x - * Required. Horizontal coordinate. - * - * @property {number} y - * Required. Vertical coordinate. - * - * @typedef NormalizedVertex - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.NormalizedVertex definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/geometry.proto} - */ -const NormalizedVertex = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A bounding polygon of a detected object on a plane. - * On output both vertices and normalized_vertices are provided. - * The polygon is formed by connecting vertices in the order they are listed. - * - * @property {Object[]} normalizedVertices - * Output only . The bounding polygon normalized vertices. - * - * This object should have the same structure as [NormalizedVertex]{@link google.cloud.automl.v1.NormalizedVertex} - * - * @typedef BoundingPoly - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.BoundingPoly definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/geometry.proto} - */ -const BoundingPoly = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_image.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_image.js deleted file mode 100644 index 0ef7fd89239..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_image.js +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright 2020 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. - -/** - * Dataset metadata that is specific to image classification. - * - * @property {number} classificationType - * Required. Type of the classification problem. - * - * The number should be among the values of [ClassificationType]{@link google.cloud.automl.v1.ClassificationType} - * - * @typedef ImageClassificationDatasetMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageClassificationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/image.proto} - */ -const ImageClassificationDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Dataset metadata specific to image object detection. - * @typedef ImageObjectDetectionDatasetMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/image.proto} - */ -const ImageObjectDetectionDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata for image classification. - * - * @property {string} baseModelId - * Optional. The ID of the `base` model. If it is specified, the new model - * will be created based on the `base` model. Otherwise, the new model will be - * created from scratch. The `base` model must be in the same - * `project` and `location` as the new model to create, and have the same - * `model_type`. - * - * @property {number} trainBudgetMilliNodeHours - * The train budget of creating this model, expressed in milli node - * hours i.e. 1,000 value in this field means 1 node hour. The actual - * `train_cost` will be equal or less than this value. If further model - * training ceases to provide any improvements, it will stop without using - * full budget and the stop_reason will be `MODEL_CONVERGED`. - * Note, node_hour = actual_hour * number_of_nodes_invovled. - * For model type `cloud`(default), the train budget must be between 8,000 - * and 800,000 milli node hours, inclusive. The default value is 192, 000 - * which represents one day in wall time. For model type - * `mobile-low-latency-1`, `mobile-versatile-1`, `mobile-high-accuracy-1`, - * `mobile-core-ml-low-latency-1`, `mobile-core-ml-versatile-1`, - * `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000 - * and 100,000 milli node hours, inclusive. The default value is 24, 000 which - * represents one day in wall time. - * - * @property {number} trainCostMilliNodeHours - * Output only. The actual train cost of creating this model, expressed in - * milli node hours, i.e. 1,000 value in this field means 1 node hour. - * Guaranteed to not exceed the train budget. - * - * @property {string} stopReason - * Output only. The reason that this create model operation stopped, - * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - * - * @property {string} modelType - * Optional. Type of the model. The available values are: - * * `cloud` - Model to be used via prediction calls to AutoML API. - * This is the default value. - * * `mobile-low-latency-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. - * * `mobile-versatile-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. - * * `mobile-high-accuracy-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. - * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. - * * `mobile-core-ml-versatile-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile device with Core - * ML afterwards. - * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - * providing prediction via AutoML API, can also be exported - * (see AutoMl.ExportModel) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. - * - * @property {number} nodeQps - * Output only. An approximate number of online prediction QPS that can - * be supported by this model per each node on which it is deployed. - * - * @property {number} nodeCount - * Output only. The number of nodes this model is deployed on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the node_qps field. - * - * @typedef ImageClassificationModelMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageClassificationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/image.proto} - */ -const ImageClassificationModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata specific to image object detection. - * - * @property {string} modelType - * Optional. Type of the model. The available values are: - * * `cloud-high-accuracy-1` - (default) A model to be used via prediction - * calls to AutoML API. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. - * * `cloud-low-latency-1` - A model to be used via prediction - * calls to AutoML API. Expected to have low latency, but may - * have lower prediction quality than other models. - * * `mobile-low-latency-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. - * * `mobile-versatile-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. - * * `mobile-high-accuracy-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. - * - * @property {number} nodeCount - * Output only. The number of nodes this model is deployed on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the qps_per_node field. - * - * @property {number} nodeQps - * Output only. An approximate number of online prediction QPS that can - * be supported by this model per each node on which it is deployed. - * - * @property {string} stopReason - * Output only. The reason that this create model operation stopped, - * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - * - * @property {number} trainBudgetMilliNodeHours - * The train budget of creating this model, expressed in milli node - * hours i.e. 1,000 value in this field means 1 node hour. The actual - * `train_cost` will be equal or less than this value. If further model - * training ceases to provide any improvements, it will stop without using - * full budget and the stop_reason will be `MODEL_CONVERGED`. - * Note, node_hour = actual_hour * number_of_nodes_invovled. - * For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - * the train budget must be between 20,000 and 900,000 milli node hours, - * inclusive. The default value is 216, 000 which represents one day in - * wall time. - * For model type `mobile-low-latency-1`, `mobile-versatile-1`, - * `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - * `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - * budget must be between 1,000 and 100,000 milli node hours, inclusive. - * The default value is 24, 000 which represents one day in wall time. - * - * @property {number} trainCostMilliNodeHours - * Output only. The actual train cost of creating this model, expressed in - * milli node hours, i.e. 1,000 value in this field means 1 node hour. - * Guaranteed to not exceed the train budget. - * - * @typedef ImageObjectDetectionModelMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageObjectDetectionModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/image.proto} - */ -const ImageObjectDetectionModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model deployment metadata specific to Image Classification. - * - * @property {number} nodeCount - * Input only. The number of nodes to deploy the model on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the model's - * - * node_qps. - * Must be between 1 and 100, inclusive on both ends. - * - * @typedef ImageClassificationModelDeploymentMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/image.proto} - */ -const ImageClassificationModelDeploymentMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model deployment metadata specific to Image Object Detection. - * - * @property {number} nodeCount - * Input only. The number of nodes to deploy the model on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the model's - * - * qps_per_node. - * Must be between 1 and 100, inclusive on both ends. - * - * @typedef ImageObjectDetectionModelDeploymentMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/image.proto} - */ -const ImageObjectDetectionModelDeploymentMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_io.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_io.js deleted file mode 100644 index 8d03bb159b6..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_io.js +++ /dev/null @@ -1,1426 +0,0 @@ -// Copyright 2020 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. - -/** - * Input configuration for AutoMl.ImportData action. - * - * The format of input depends on dataset_metadata the Dataset into which - * the import is happening has. As input source the - * gcs_source - * is expected, unless specified otherwise. Additionally any input .CSV file - * by itself must be 100MB or smaller, unless specified otherwise. - * If an "example" file (that is, image, video etc.) with identical content - * (even if it had different `GCS_FILE_PATH`) is mentioned multiple times, then - * its label, bounding boxes etc. are appended. The same file should be always - * provided with the same `ML_USE` and `GCS_FILE_PATH`, if it is not, then - * these values are nondeterministically selected from the given ones. - * - * The formats are represented in EBNF with commas being literal and with - * non-terminal symbols defined near the end of this comment. The formats are: - * - *

AutoML Vision

- * - * - *
Classification
- * - * See [Preparing your training - * data](https://cloud.google.com/vision/automl/docs/prepare) for more - * information. - * - * CSV file(s) with each line in format: - * - * ML_USE,GCS_FILE_PATH,LABEL,LABEL,... - * - * * `ML_USE` - Identifies the data set that the current row (file) applies - * to. - * This value can be one of the following: - * * `TRAIN` - Rows in this file are used to train the model. - * * `TEST` - Rows in this file are used to test the model during training. - * * `UNASSIGNED` - Rows in this file are not categorized. They are - * Automatically divided into train and test data. 80% for training and - * 20% for testing. - * - * * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to - * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, - * .TIFF, .ICO. - * - * * `LABEL` - A label that identifies the object in the image. - * - * For the `MULTICLASS` classification type, at most one `LABEL` is allowed - * per image. If an image has not yet been labeled, then it should be - * mentioned just once with no `LABEL`. - * - * Some sample rows: - * - * TRAIN,gs://folder/image1.jpg,daisy - * TEST,gs://folder/image2.jpg,dandelion,tulip,rose - * UNASSIGNED,gs://folder/image3.jpg,daisy - * UNASSIGNED,gs://folder/image4.jpg - * - * - *
Object Detection
- * See [Preparing your training - * data](https://cloud.google.com/vision/automl/object-detection/docs/prepare) - * for more information. - * - * A CSV file(s) with each line in format: - * - * ML_USE,GCS_FILE_PATH,[LABEL],(BOUNDING_BOX | ,,,,,,,) - * - * * `ML_USE` - Identifies the data set that the current row (file) applies - * to. - * This value can be one of the following: - * * `TRAIN` - Rows in this file are used to train the model. - * * `TEST` - Rows in this file are used to test the model during training. - * * `UNASSIGNED` - Rows in this file are not categorized. They are - * Automatically divided into train and test data. 80% for training and - * 20% for testing. - * - * * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to - * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. Each image - * is assumed to be exhaustively labeled. - * - * * `LABEL` - A label that identifies the object in the image specified by the - * `BOUNDING_BOX`. - * - * * `BOUNDING BOX` - The vertices of an object in the example image. - * The minimum allowed `BOUNDING_BOX` edge length is 0.01, and no more than - * 500 `BOUNDING_BOX` instances per image are allowed (one `BOUNDING_BOX` - * per line). If an image has no looked for objects then it should be - * mentioned just once with no LABEL and the ",,,,,,," in place of the - * `BOUNDING_BOX`. - * - * **Four sample rows:** - * - * TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, - * TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, - * UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 - * TEST,gs://folder/im3.png,,,,,,,,, - *
- *
- * - * - *

AutoML Video Intelligence

- * - * - *
Classification
- * - * See [Preparing your training - * data](https://cloud.google.com/video-intelligence/automl/docs/prepare) for - * more information. - * - * CSV file(s) with each line in format: - * - * ML_USE,GCS_FILE_PATH - * - * For `ML_USE`, do not use `VALIDATE`. - * - * `GCS_FILE_PATH` is the path to another .csv file that describes training - * example for a given `ML_USE`, using the following row format: - * - * GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) - * - * Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up - * to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * - * `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - * length of the video, and the end time must be after the start time. Any - * segment of a video which has one or more labels on it, is considered a - * hard negative for all other labels. Any segment with no labels on - * it is considered to be unknown. If a whole video is unknown, then - * it should be mentioned just once with ",," in place of `LABEL, - * TIME_SEGMENT_START,TIME_SEGMENT_END`. - * - * Sample top level CSV file: - * - * TRAIN,gs://folder/train_videos.csv - * TEST,gs://folder/test_videos.csv - * UNASSIGNED,gs://folder/other_videos.csv - * - * Sample rows of a CSV file for a particular ML_USE: - * - * gs://folder/video1.avi,car,120,180.000021 - * gs://folder/video1.avi,bike,150,180.000021 - * gs://folder/vid2.avi,car,0,60.5 - * gs://folder/vid3.avi,,, - * - * - * - *
Object Tracking
- * - * See [Preparing your training - * data](https://cloud.google.com/video-intelligence/automl/object-tracking/docs/prepare) for more - * information. - * - * CSV file(s) with each line in format: - * - * ML_USE,GCS_FILE_PATH - * - * For `ML_USE`, do not use `VALIDATE`. - * - * `GCS_FILE_PATH` is the path to another .csv file that describes training - * example for a given `ML_USE`, using the following row format: - * - * GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX - * - * or - * - * GCS_FILE_PATH,,,,,,,,,, - * - * Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up - * to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * Providing `INSTANCE_ID`s can help to obtain a better model. When - * a specific labeled entity leaves the video frame, and shows up - * afterwards it is not required, albeit preferable, that the same - * `INSTANCE_ID` is given to it. - * - * `TIMESTAMP` must be within the length of the video, the - * `BOUNDING_BOX` is assumed to be drawn on the closest video's frame - * to the `TIMESTAMP`. Any mentioned by the `TIMESTAMP` frame is expected - * to be exhaustively labeled and no more than 500 `BOUNDING_BOX`-es per - * frame are allowed. If a whole video is unknown, then it should be - * mentioned just once with ",,,,,,,,,," in place of `LABEL, - * [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX`. - * - * Sample top level CSV file: - * - * TRAIN,gs://folder/train_videos.csv - * TEST,gs://folder/test_videos.csv - * UNASSIGNED,gs://folder/other_videos.csv - * - * Seven sample rows of a CSV file for a particular ML_USE: - * - * gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 - * gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 - * gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 - * gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, - * gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, - * gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, - * gs://folder/video2.avi,,,,,,,,,,, - *
- *
- * - * - *

AutoML Natural Language

- * - * - *
Entity Extraction
- * - * See [Preparing your training - * data](https://cloud.google.com/natural-language/automl/entity-analysis/docs/prepare) for more - * information. - * - * One or more CSV file(s) with each line in the following format: - * - * ML_USE,GCS_FILE_PATH - * - * * `ML_USE` - Identifies the data set that the current row (file) applies - * to. - * This value can be one of the following: - * * `TRAIN` - Rows in this file are used to train the model. - * * `TEST` - Rows in this file are used to test the model during training. - * * `UNASSIGNED` - Rows in this file are not categorized. They are - * Automatically divided into train and test data. 80% for training and - * 20% for testing.. - * - * * `GCS_FILE_PATH` - a Identifies JSON Lines (.JSONL) file stored in - * Google Cloud Storage that contains in-line text in-line as documents - * for model training. - * - * After the training data set has been determined from the `TRAIN` and - * `UNASSIGNED` CSV files, the training data is divided into train and - * validation data sets. 70% for training and 30% for validation. - * - * For example: - * - * TRAIN,gs://folder/file1.jsonl - * VALIDATE,gs://folder/file2.jsonl - * TEST,gs://folder/file3.jsonl - * - * **In-line JSONL files** - * - * In-line .JSONL files contain, per line, a JSON document that wraps a - * `text_snippet` field followed by - * one or more `annotations` - * fields, which have `display_name` and `text_extraction` fields to describe - * the entity from the text snippet. Multiple JSON documents can be separated - * using line breaks (\n). - * - * The supplied text must be annotated exhaustively. For example, if you - * include the text "horse", but do not label it as "animal", - * then "horse" is assumed to not be an "animal". - * - * Any given text snippet content must have 30,000 characters or - * less, and also be UTF-8 NFC encoded. ASCII is accepted as it is - * UTF-8 NFC encoded. - * - * For example: - * - * { - * "text_snippet": { - * "content": "dog car cat" - * }, - * "annotations": [ - * { - * "display_name": "animal", - * "text_extraction": { - * "text_segment": {"start_offset": 0, "end_offset": 2} - * } - * }, - * { - * "display_name": "vehicle", - * "text_extraction": { - * "text_segment": {"start_offset": 4, "end_offset": 6} - * } - * }, - * { - * "display_name": "animal", - * "text_extraction": { - * "text_segment": {"start_offset": 8, "end_offset": 10} - * } - * } - * ] - * }\n - * { - * "text_snippet": { - * "content": "This dog is good." - * }, - * "annotations": [ - * { - * "display_name": "animal", - * "text_extraction": { - * "text_segment": {"start_offset": 5, "end_offset": 7} - * } - * } - * ] - * } - * - * **JSONL files that reference documents** - * - * .JSONL files contain, per line, a JSON document that wraps a - * `input_config` that contains the path to a source document. - * Multiple JSON documents can be separated using line breaks (\n). - * - * Supported document extensions: .PDF, .TIF, .TIFF - * - * For example: - * - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - * } - * } - * } - * }\n - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] - * } - * } - * } - * } - * - * **In-line JSONL files with document layout information** - * - * **Note:** You can only annotate documents using the UI. The format described - * below applies to annotated documents exported using the UI or `exportData`. - * - * In-line .JSONL files for documents contain, per line, a JSON document - * that wraps a `document` field that provides the textual content of the - * document and the layout information. - * - * For example: - * - * { - * "document": { - * "document_text": { - * "content": "dog car cat" - * } - * "layout": [ - * { - * "text_segment": { - * "start_offset": 0, - * "end_offset": 11, - * }, - * "page_number": 1, - * "bounding_poly": { - * "normalized_vertices": [ - * {"x": 0.1, "y": 0.1}, - * {"x": 0.1, "y": 0.3}, - * {"x": 0.3, "y": 0.3}, - * {"x": 0.3, "y": 0.1}, - * ], - * }, - * "text_segment_type": TOKEN, - * } - * ], - * "document_dimensions": { - * "width": 8.27, - * "height": 11.69, - * "unit": INCH, - * } - * "page_count": 3, - * }, - * "annotations": [ - * { - * "display_name": "animal", - * "text_extraction": { - * "text_segment": {"start_offset": 0, "end_offset": 3} - * } - * }, - * { - * "display_name": "vehicle", - * "text_extraction": { - * "text_segment": {"start_offset": 4, "end_offset": 7} - * } - * }, - * { - * "display_name": "animal", - * "text_extraction": { - * "text_segment": {"start_offset": 8, "end_offset": 11} - * } - * }, - * ], - * - * - * - * - *
Classification
- * - * See [Preparing your training - * data](https://cloud.google.com/natural-language/automl/docs/prepare) for more - * information. - * - * One or more CSV file(s) with each line in the following format: - * - * ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... - * - * * `ML_USE` - Identifies the data set that the current row (file) applies - * to. - * This value can be one of the following: - * * `TRAIN` - Rows in this file are used to train the model. - * * `TEST` - Rows in this file are used to test the model during training. - * * `UNASSIGNED` - Rows in this file are not categorized. They are - * Automatically divided into train and test data. 80% for training and - * 20% for testing. - * - * * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If - * the column content is a valid Google Cloud Storage file path, that is, - * prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if - * the content is enclosed in double quotes (""), it is treated as a - * `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a - * file with supported extension and UTF-8 encoding, for example, - * "gs://folder/content.txt" AutoML imports the file content - * as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content - * excluding quotes. In both cases, size of the content must be 10MB or - * less in size. For zip files, the size of each file inside the zip must be - * 10MB or less in size. - * - * For the `MULTICLASS` classification type, at most one `LABEL` is allowed. - * - * The `ML_USE` and `LABEL` columns are optional. - * Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP - * - * A maximum of 100 unique labels are allowed per CSV row. - * - * Sample rows: - * - * TRAIN,"They have bad food and very rude",RudeService,BadFood - * gs://folder/content.txt,SlowService - * TEST,gs://folder/document.pdf - * VALIDATE,gs://folder/text_files.zip,BadFood - * - * - * - *
Sentiment Analysis
- * - * See [Preparing your training - * data](https://cloud.google.com/natural-language/automl/docs/prepare) for more - * information. - * - * CSV file(s) with each line in format: - * - * ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT - * - * * `ML_USE` - Identifies the data set that the current row (file) applies - * to. - * This value can be one of the following: - * * `TRAIN` - Rows in this file are used to train the model. - * * `TEST` - Rows in this file are used to test the model during training. - * * `UNASSIGNED` - Rows in this file are not categorized. They are - * Automatically divided into train and test data. 80% for training and - * 20% for testing. - * - * * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If - * the column content is a valid Google Cloud Storage file path, that is, - * prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if - * the content is enclosed in double quotes (""), it is treated as a - * `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a - * file with supported extension and UTF-8 encoding, for example, - * "gs://folder/content.txt" AutoML imports the file content - * as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content - * excluding quotes. In both cases, size of the content must be 128kB or - * less in size. For zip files, the size of each file inside the zip must be - * 128kB or less in size. - * - * The `ML_USE` and `SENTIMENT` columns are optional. - * Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP - * - * * `SENTIMENT` - An integer between 0 and - * Dataset.text_sentiment_dataset_metadata.sentiment_max - * (inclusive). Describes the ordinal of the sentiment - higher - * value means a more positive sentiment. All the values are - * completely relative, i.e. neither 0 needs to mean a negative or - * neutral sentiment nor sentiment_max needs to mean a positive one - - * it is just required that 0 is the least positive sentiment - * in the data, and sentiment_max is the most positive one. - * The SENTIMENT shouldn't be confused with "score" or "magnitude" - * from the previous Natural Language Sentiment Analysis API. - * All SENTIMENT values between 0 and sentiment_max must be - * represented in the imported data. On prediction the same 0 to - * sentiment_max range will be used. The difference between - * neighboring sentiment values needs not to be uniform, e.g. 1 and - * 2 may be similar whereas the difference between 2 and 3 may be - * large. - * - * Sample rows: - * - * TRAIN,"@freewrytin this is way too good for your product",2 - * gs://folder/content.txt,3 - * TEST,gs://folder/document.pdf - * VALIDATE,gs://folder/text_files.zip,2 - *
- *
- * - * - * - *

AutoML Tables

- * - * See [Preparing your training - * data](https://cloud.google.com/automl-tables/docs/prepare) for more - * information. - * - * You can use either - * gcs_source or - * bigquery_source. - * All input is concatenated into a - * single - * - * primary_table_spec_id - * - * **For gcs_source:** - * - * CSV file(s), where the first row of the first file is the header, - * containing unique column names. If the first row of a subsequent - * file is the same as the header, then it is also treated as a - * header. All other rows contain values for the corresponding - * columns. - * - * Each .CSV file by itself must be 10GB or smaller, and their total - * size must be 100GB or smaller. - * - * First three sample rows of a CSV file: - *
- * "Id","First Name","Last Name","Dob","Addresses"
- *
- * "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
- *
- * "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
- * 
- * **For bigquery_source:** - * - * An URI of a BigQuery table. The user data size of the BigQuery - * table must be 100GB or smaller. - * - * An imported table must have between 2 and 1,000 columns, inclusive, - * and between 1000 and 100,000,000 rows, inclusive. There are at most 5 - * import data running in parallel. - * - *
- *
- * - * - * **Input field definitions:** - * - * `ML_USE` - * : ("TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED") - * Describes how the given example (file) should be used for model - * training. "UNASSIGNED" can be used when user has no preference. - * - * `GCS_FILE_PATH` - * : The path to a file on Google Cloud Storage. For example, - * "gs://folder/image1.png". - * - * `LABEL` - * : A display name of an object on an image, video etc., e.g. "dog". - * Must be up to 32 characters long and can consist only of ASCII - * Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. - * For each label an AnnotationSpec is created which display_name - * becomes the label; AnnotationSpecs are given back in predictions. - * - * `INSTANCE_ID` - * : A positive integer that identifies a specific instance of a - * labeled entity on an example. Used e.g. to track two cars on - * a video while being able to tell apart which one is which. - * - * `BOUNDING_BOX` - * : (`VERTEX,VERTEX,VERTEX,VERTEX` | `VERTEX,,,VERTEX,,`) - * A rectangle parallel to the frame of the example (image, - * video). If 4 vertices are given they are connected by edges - * in the order provided, if 2 are given they are recognized - * as diagonally opposite vertices of the rectangle. - * - * `VERTEX` - * : (`COORDINATE,COORDINATE`) - * First coordinate is horizontal (x), the second is vertical (y). - * - * `COORDINATE` - * : A float in 0 to 1 range, relative to total length of - * image or video in given dimension. For fractions the - * leading non-decimal 0 can be omitted (i.e. 0.3 = .3). - * Point 0,0 is in top left. - * - * `TIME_SEGMENT_START` - * : (`TIME_OFFSET`) - * Expresses a beginning, inclusive, of a time segment - * within an example that has a time dimension - * (e.g. video). - * - * `TIME_SEGMENT_END` - * : (`TIME_OFFSET`) - * Expresses an end, exclusive, of a time segment within - * n example that has a time dimension (e.g. video). - * - * `TIME_OFFSET` - * : A number of seconds as measured from the start of an - * example (e.g. video). Fractions are allowed, up to a - * microsecond precision. "inf" is allowed, and it means the end - * of the example. - * - * `TEXT_SNIPPET` - * : The content of a text snippet, UTF-8 encoded, enclosed within - * double quotes (""). - * - * `DOCUMENT` - * : A field that provides the textual content with document and the layout - * information. - * - * - * **Errors:** - * - * If any of the provided CSV files can't be parsed or if more than certain - * percent of CSV rows cannot be processed then the operation fails and - * nothing is imported. Regardless of overall success or failure the per-row - * failures, up to a certain count cap, is listed in - * Operation.metadata.partial_failures. - * - * @property {Object} gcsSource - * The Google Cloud Storage location for the input content. - * For AutoMl.ImportData, `gcs_source` points to a CSV file with - * a structure described in InputConfig. - * - * This object should have the same structure as [GcsSource]{@link google.cloud.automl.v1.GcsSource} - * - * @property {Object.} params - * Additional domain-specific parameters describing the semantic of the - * imported data, any string must be up to 25000 - * characters long. - * - *

AutoML Tables

- * - * `schema_inference_version` - * : (integer) This value must be supplied. - * The version of the - * algorithm to use for the initial inference of the - * column data types of the imported table. Allowed values: "1". - * - * @typedef InputConfig - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.InputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const InputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Input configuration for BatchPredict Action. - * - * The format of input depends on the ML problem of the model used for - * prediction. As input source the - * gcs_source - * is expected, unless specified otherwise. - * - * The formats are represented in EBNF with commas being literal and with - * non-terminal symbols defined near the end of this comment. The formats - * are: - * - *

AutoML Vision

- *
Classification
- * - * One or more CSV files where each line is a single column: - * - * GCS_FILE_PATH - * - * The Google Cloud Storage location of an image of up to - * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. - * This path is treated as the ID in the batch predict output. - * - * Sample rows: - * - * gs://folder/image1.jpeg - * gs://folder/image2.gif - * gs://folder/image3.png - * - *
Object Detection
- * - * One or more CSV files where each line is a single column: - * - * GCS_FILE_PATH - * - * The Google Cloud Storage location of an image of up to - * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. - * This path is treated as the ID in the batch predict output. - * - * Sample rows: - * - * gs://folder/image1.jpeg - * gs://folder/image2.gif - * gs://folder/image3.png - *
- *
- * - *

AutoML Video Intelligence

- *
Classification
- * - * One or more CSV files where each line is a single column: - * - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - * - * `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in - * size and up to 3h in duration duration. - * Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * - * `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - * length of the video, and the end time must be after the start time. - * - * Sample rows: - * - * gs://folder/video1.mp4,10,40 - * gs://folder/video1.mp4,20,60 - * gs://folder/vid2.mov,0,inf - * - *
Object Tracking
- * - * One or more CSV files where each line is a single column: - * - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - * - * `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in - * size and up to 3h in duration duration. - * Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * - * `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - * length of the video, and the end time must be after the start time. - * - * Sample rows: - * - * gs://folder/video1.mp4,10,40 - * gs://folder/video1.mp4,20,60 - * gs://folder/vid2.mov,0,inf - *
- *
- * - *

AutoML Natural Language

- *
Classification
- * - * One or more CSV files where each line is a single column: - * - * GCS_FILE_PATH - * - * `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. - * Supported file extensions: .TXT, .PDF, .TIF, .TIFF - * - * Text files can be no larger than 10MB in size. - * - * Sample rows: - * - * gs://folder/text1.txt - * gs://folder/text2.pdf - * gs://folder/text3.tif - * - *
Sentiment Analysis
- * One or more CSV files where each line is a single column: - * - * GCS_FILE_PATH - * - * `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. - * Supported file extensions: .TXT, .PDF, .TIF, .TIFF - * - * Text files can be no larger than 128kB in size. - * - * Sample rows: - * - * gs://folder/text1.txt - * gs://folder/text2.pdf - * gs://folder/text3.tif - * - *
Entity Extraction
- * - * One or more JSONL (JSON Lines) files that either provide inline text or - * documents. You can only use one format, either inline text or documents, - * for a single call to [AutoMl.BatchPredict]. - * - * Each JSONL file contains a per line a proto that - * wraps a temporary user-assigned TextSnippet ID (string up to 2000 - * characters long) called "id", a TextSnippet proto (in - * JSON representation) and zero or more TextFeature protos. Any given - * text snippet content must have 30,000 characters or less, and also - * be UTF-8 NFC encoded (ASCII already is). The IDs provided should be - * unique. - * - * Each document JSONL file contains, per line, a proto that wraps a Document - * proto with `input_config` set. Each document cannot exceed 2MB in size. - * - * Supported document extensions: .PDF, .TIF, .TIFF - * - * Each JSONL file must not exceed 100MB in size, and no more than 20 - * JSONL files may be passed. - * - * Sample inline JSONL file (Shown with artificial line - * breaks. Actual line breaks are denoted by "\n".): - * - * { - * "id": "my_first_id", - * "text_snippet": { "content": "dog car cat"}, - * "text_features": [ - * { - * "text_segment": {"start_offset": 4, "end_offset": 6}, - * "structural_type": PARAGRAPH, - * "bounding_poly": { - * "normalized_vertices": [ - * {"x": 0.1, "y": 0.1}, - * {"x": 0.1, "y": 0.3}, - * {"x": 0.3, "y": 0.3}, - * {"x": 0.3, "y": 0.1}, - * ] - * }, - * } - * ], - * }\n - * { - * "id": "2", - * "text_snippet": { - * "content": "Extended sample content", - * "mime_type": "text/plain" - * } - * } - * - * Sample document JSONL file (Shown with artificial line - * breaks. Actual line breaks are denoted by "\n".): - * - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - * } - * } - * } - * }\n - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] - * } - * } - * } - * } - *
- *
- * - *

AutoML Tables

- * - * See [Preparing your training - * data](https://cloud.google.com/automl-tables/docs/predict-batch) for more - * information. - * - * You can use either - * gcs_source - * or - * bigquery_source. - * - * **For gcs_source:** - * - * CSV file(s), each by itself 10GB or smaller and total size must be - * 100GB or smaller, where first file must have a header containing - * column names. If the first row of a subsequent file is the same as - * the header, then it is also treated as a header. All other rows - * contain values for the corresponding columns. - * - * The column names must contain the model's - * - * input_feature_column_specs' - * display_name-s - * (order doesn't matter). The columns corresponding to the model's - * input feature column specs must contain values compatible with the - * column spec's data types. Prediction on all the rows, i.e. the CSV - * lines, will be attempted. - * - * - * Sample rows from a CSV file: - *
- * "First Name","Last Name","Dob","Addresses"
- *
- * "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
- *
- * "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
- * 
- * **For bigquery_source:** - * - * The URI of a BigQuery table. The user data size of the BigQuery - * table must be 100GB or smaller. - * - * The column names must contain the model's - * - * input_feature_column_specs' - * display_name-s - * (order doesn't matter). The columns corresponding to the model's - * input feature column specs must contain values compatible with the - * column spec's data types. Prediction on all the rows of the table - * will be attempted. - *
- *
- * - * **Input field definitions:** - * - * `GCS_FILE_PATH` - * : The path to a file on Google Cloud Storage. For example, - * "gs://folder/video.avi". - * - * `TIME_SEGMENT_START` - * : (`TIME_OFFSET`) - * Expresses a beginning, inclusive, of a time segment - * within an example that has a time dimension - * (e.g. video). - * - * `TIME_SEGMENT_END` - * : (`TIME_OFFSET`) - * Expresses an end, exclusive, of a time segment within - * n example that has a time dimension (e.g. video). - * - * `TIME_OFFSET` - * : A number of seconds as measured from the start of an - * example (e.g. video). Fractions are allowed, up to a - * microsecond precision. "inf" is allowed, and it means the end - * of the example. - * - * **Errors:** - * - * If any of the provided CSV files can't be parsed or if more than certain - * percent of CSV rows cannot be processed then the operation fails and - * prediction does not happen. Regardless of overall success or failure the - * per-row failures, up to a certain count cap, will be listed in - * Operation.metadata.partial_failures. - * - * @property {Object} gcsSource - * Required. The Google Cloud Storage location for the input content. - * - * This object should have the same structure as [GcsSource]{@link google.cloud.automl.v1.GcsSource} - * - * @typedef BatchPredictInputConfig - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.BatchPredictInputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const BatchPredictInputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Input configuration of a Document. - * - * @property {Object} gcsSource - * The Google Cloud Storage location of the document file. Only a single path - * should be given. - * - * Max supported size: 512MB. - * - * Supported extensions: .PDF. - * - * This object should have the same structure as [GcsSource]{@link google.cloud.automl.v1.GcsSource} - * - * @typedef DocumentInputConfig - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.DocumentInputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const DocumentInputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * * For Translation: - * CSV file `translation.csv`, with each line in format: - * ML_USE,GCS_FILE_PATH - * GCS_FILE_PATH leads to a .TSV file which describes examples that have - * given ML_USE, using the following row format per line: - * TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target - * language) - * - * * For Tables: - * Output depends on whether the dataset was imported from Google Cloud - * Storage or BigQuery. - * Google Cloud Storage case: - * - * gcs_destination - * must be set. Exported are CSV file(s) `tables_1.csv`, - * `tables_2.csv`,...,`tables_N.csv` with each having as header line - * the table's column names, and all other lines contain values for - * the header columns. - * BigQuery case: - * - * bigquery_destination - * pointing to a BigQuery project must be set. In the given project a - * new dataset will be created with name - * - * `export_data__` - * where will be made - * BigQuery-dataset-name compatible (e.g. most special characters will - * become underscores), and timestamp will be in - * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that - * dataset a new table called `primary_table` will be created, and - * filled with precisely the same data as this obtained on import. - * - * @property {Object} gcsDestination - * Required. The Google Cloud Storage location where the output is to be written to. - * For Image Object Detection, Text Extraction, Video Classification and - * Tables, in the given directory a new directory will be created with name: - * export_data-- where - * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - * output will be written into that directory. - * - * This object should have the same structure as [GcsDestination]{@link google.cloud.automl.v1.GcsDestination} - * - * @typedef OutputConfig - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.OutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const OutputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Output configuration for BatchPredict Action. - * - * As destination the - * - * gcs_destination - * must be set unless specified otherwise for a domain. If gcs_destination is - * set then in the given directory a new directory is created. Its name - * will be - * "prediction--", - * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents - * of it depends on the ML problem the predictions are made for. - * - * * For Image Classification: - * In the created directory files `image_classification_1.jsonl`, - * `image_classification_2.jsonl`,...,`image_classification_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of the successfully predicted images and annotations. - * A single image will be listed only once with all its annotations, - * and its annotations will never be split across files. - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps image's "ID" : "" followed by a list of - * zero or more AnnotationPayload protos (called annotations), which - * have classification detail populated. - * If prediction for any image failed (partially or completely), then an - * additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - * files will be created (N depends on total number of failed - * predictions). These files will have a JSON representation of a proto - * that wraps the same "ID" : "" but here followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`fields. - * - * * For Image Object Detection: - * In the created directory files `image_object_detection_1.jsonl`, - * `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of the successfully predicted images and annotations. - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps image's "ID" : "" followed by a list of - * zero or more AnnotationPayload protos (called annotations), which - * have image_object_detection detail populated. A single image will - * be listed only once with all its annotations, and its annotations - * will never be split across files. - * If prediction for any image failed (partially or completely), then - * additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - * files will be created (N depends on total number of failed - * predictions). These files will have a JSON representation of a proto - * that wraps the same "ID" : "" but here followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`fields. - * * For Video Classification: - * In the created directory a video_classification.csv file, and a .JSON - * file per each video classification requested in the input (i.e. each - * line in given CSV(s)), will be created. - * - * The format of video_classification.csv is: - * - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - * where: - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - * the prediction input lines (i.e. video_classification.csv has - * precisely the same number of lines as the prediction input had.) - * JSON_FILE_NAME = Name of .JSON file in the output directory, which - * contains prediction responses for the video time segment. - * STATUS = "OK" if prediction completed successfully, or an error code - * with message otherwise. If STATUS is not "OK" then the .JSON file - * for that line may not exist or be empty. - * - * Each .JSON file, assuming STATUS is "OK", will contain a list of - * AnnotationPayload protos in JSON format, which are the predictions - * for the video time segment the file is assigned to in the - * video_classification.csv. All AnnotationPayload protos will have - * video_classification field set, and will be sorted by - * video_classification.type field (note that the returned types are - * governed by `classifaction_types` parameter in - * PredictService.BatchPredictRequest.params). - * - * * For Video Object Tracking: - * In the created directory a video_object_tracking.csv file will be - * created, and multiple files video_object_trackinng_1.json, - * video_object_trackinng_2.json,..., video_object_trackinng_N.json, - * where N is the number of requests in the input (i.e. the number of - * lines in given CSV(s)). - * - * The format of video_object_tracking.csv is: - * - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - * where: - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - * the prediction input lines (i.e. video_object_tracking.csv has - * precisely the same number of lines as the prediction input had.) - * JSON_FILE_NAME = Name of .JSON file in the output directory, which - * contains prediction responses for the video time segment. - * STATUS = "OK" if prediction completed successfully, or an error - * code with message otherwise. If STATUS is not "OK" then the .JSON - * file for that line may not exist or be empty. - * - * Each .JSON file, assuming STATUS is "OK", will contain a list of - * AnnotationPayload protos in JSON format, which are the predictions - * for each frame of the video time segment the file is assigned to in - * video_object_tracking.csv. All AnnotationPayload protos will have - * video_object_tracking field set. - * * For Text Classification: - * In the created directory files `text_classification_1.jsonl`, - * `text_classification_2.jsonl`,...,`text_classification_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of inputs and annotations found. - * - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps input text file (or document) in - * the text snippet (or document) proto and a list of - * zero or more AnnotationPayload protos (called annotations), which - * have classification detail populated. A single text file (or - * document) will be listed only once with all its annotations, and its - * annotations will never be split across files. - * - * If prediction for any input file (or document) failed (partially or - * completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - * `errors_N.jsonl` files will be created (N depends on total number of - * failed predictions). These files will have a JSON representation of a - * proto that wraps input file followed by exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`. - * - * * For Text Sentiment: - * In the created directory files `text_sentiment_1.jsonl`, - * `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of inputs and annotations found. - * - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps input text file (or document) in - * the text snippet (or document) proto and a list of - * zero or more AnnotationPayload protos (called annotations), which - * have text_sentiment detail populated. A single text file (or - * document) will be listed only once with all its annotations, and its - * annotations will never be split across files. - * - * If prediction for any input file (or document) failed (partially or - * completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - * `errors_N.jsonl` files will be created (N depends on total number of - * failed predictions). These files will have a JSON representation of a - * proto that wraps input file followed by exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`. - * - * * For Text Extraction: - * In the created directory files `text_extraction_1.jsonl`, - * `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of inputs and annotations found. - * The contents of these .JSONL file(s) depend on whether the input - * used inline text, or documents. - * If input was inline, then each .JSONL file will contain, per line, - * a JSON representation of a proto that wraps given in request text - * snippet's "id" (if specified), followed by input text snippet, - * and a list of zero or more - * AnnotationPayload protos (called annotations), which have - * text_extraction detail populated. A single text snippet will be - * listed only once with all its annotations, and its annotations will - * never be split across files. - * If input used documents, then each .JSONL file will contain, per - * line, a JSON representation of a proto that wraps given in request - * document proto, followed by its OCR-ed representation in the form - * of a text snippet, finally followed by a list of zero or more - * AnnotationPayload protos (called annotations), which have - * text_extraction detail populated and refer, via their indices, to - * the OCR-ed text snippet. A single document (and its text snippet) - * will be listed only once with all its annotations, and its - * annotations will never be split across files. - * If prediction for any text snippet failed (partially or completely), - * then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - * `errors_N.jsonl` files will be created (N depends on total number of - * failed predictions). These files will have a JSON representation of a - * proto that wraps either the "id" : "" (in case of inline) - * or the document proto (in case of document) but here followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`. - * - * * For Tables: - * Output depends on whether - * - * gcs_destination - * or - * - * bigquery_destination - * is set (either is allowed). - * Google Cloud Storage case: - * In the created directory files `tables_1.csv`, `tables_2.csv`,..., - * `tables_N.csv` will be created, where N may be 1, and depends on - * the total number of the successfully predicted rows. - * For all CLASSIFICATION - * - * prediction_type-s: - * Each .csv file will contain a header, listing all columns' - * - * display_name-s - * given on input followed by M target column names in the format of - * - * "__score" where M is the number of distinct target values, - * i.e. number of distinct values in the target column of the table - * used to train the model. Subsequent lines will contain the - * respective values of successfully predicted rows, with the last, - * i.e. the target, columns having the corresponding prediction - * scores. - * For REGRESSION and FORECASTING - * - * prediction_type-s: - * Each .csv file will contain a header, listing all columns' - * display_name-s - * given on input followed by the predicted target column with name - * in the format of - * - * "predicted_" - * Subsequent lines will contain the respective values of - * successfully predicted rows, with the last, i.e. the target, - * column having the predicted target value. - * If prediction for any rows failed, then an additional - * `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be - * created (N depends on total number of failed rows). These files - * will have analogous format as `tables_*.csv`, but always with a - * single target column having - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * represented as a JSON string, and containing only `code` and - * `message`. - * BigQuery case: - * - * bigquery_destination - * pointing to a BigQuery project must be set. In the given project a - * new dataset will be created with name - * `prediction__` - * where will be made - * BigQuery-dataset-name compatible (e.g. most special characters will - * become underscores), and timestamp will be in - * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset - * two tables will be created, `predictions`, and `errors`. - * The `predictions` table's column names will be the input columns' - * - * display_name-s - * followed by the target column with name in the format of - * - * "predicted_" - * The input feature columns will contain the respective values of - * successfully predicted rows, with the target column having an - * ARRAY of - * - * AnnotationPayloads, - * represented as STRUCT-s, containing - * TablesAnnotation. - * The `errors` table contains rows for which the prediction has - * failed, it has analogous input columns while the target column name - * is in the format of - * - * "errors_", - * and as a value has - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * represented as a STRUCT, and containing only `code` and `message`. - * - * @property {Object} gcsDestination - * Required. The Google Cloud Storage location of the directory where the output is to - * be written to. - * - * This object should have the same structure as [GcsDestination]{@link google.cloud.automl.v1.GcsDestination} - * - * @typedef BatchPredictOutputConfig - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.BatchPredictOutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const BatchPredictOutputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Output configuration for ModelExport Action. - * - * @property {Object} gcsDestination - * Required. The Google Cloud Storage location where the model is to be written to. - * This location may only be set for the following model formats: - * "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - * - * Under the directory given as the destination a new one with name - * "model-export--", - * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, - * will be created. Inside the model and any of its supporting files - * will be written. - * - * This object should have the same structure as [GcsDestination]{@link google.cloud.automl.v1.GcsDestination} - * - * @property {string} modelFormat - * The format in which the model must be exported. The available, and default, - * formats depend on the problem and model type (if given problem and type - * combination doesn't have a format listed, it means its models are not - * exportable): - * - * * For Image Classification mobile-low-latency-1, mobile-versatile-1, - * mobile-high-accuracy-1: - * "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - * "docker". - * - * * For Image Classification mobile-core-ml-low-latency-1, - * mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - * "core_ml" (default). - * - * * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, - * mobile-high-accuracy-1: - * "tflite", "tf_saved_model", "tf_js". - * Formats description: - * - * * tflite - Used for Android mobile devices. - * * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) - * devices. - * * tf_saved_model - A tensorflow model in SavedModel format. - * * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can - * be used in the browser and in Node.js using JavaScript. - * * docker - Used for Docker containers. Use the params field to customize - * the container. The container is verified to work correctly on - * ubuntu 16.04 operating system. See more at - * [containers - * - * quickstart](https: - * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - * * core_ml - Used for iOS mobile devices. - * - * @property {Object.} params - * Additional model-type and format specific parameters describing the - * requirements for the to be exported model files, any string must be up to - * 25000 characters long. - * - * * For `docker` format: - * `cpu_architecture` - (string) "x86_64" (default). - * `gpu_architecture` - (string) "none" (default), "nvidia". - * - * @typedef ModelExportOutputConfig - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ModelExportOutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const ModelExportOutputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The Google Cloud Storage location for the input content. - * - * @property {string[]} inputUris - * Required. Google Cloud Storage URIs to input files, up to 2000 - * characters long. Accepted forms: - * * Full object path, e.g. gs://bucket/directory/object.csv - * - * @typedef GcsSource - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.GcsSource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const GcsSource = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The Google Cloud Storage location where the output is to be written to. - * - * @property {string} outputUriPrefix - * Required. Google Cloud Storage URI to output directory, up to 2000 - * characters long. - * Accepted forms: - * * Prefix path: gs://bucket/directory - * The requesting user must have write permission to the bucket. - * The directory is created if it doesn't exist. - * - * @typedef GcsDestination - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.GcsDestination definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/io.proto} - */ -const GcsDestination = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_model.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_model.js deleted file mode 100644 index 7241546931b..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_model.js +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2020 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. - -/** - * API proto representing a trained machine learning model. - * - * @property {Object} translationModelMetadata - * Metadata for translation models. - * - * This object should have the same structure as [TranslationModelMetadata]{@link google.cloud.automl.v1.TranslationModelMetadata} - * - * @property {Object} imageClassificationModelMetadata - * Metadata for image classification models. - * - * This object should have the same structure as [ImageClassificationModelMetadata]{@link google.cloud.automl.v1.ImageClassificationModelMetadata} - * - * @property {Object} textClassificationModelMetadata - * Metadata for text classification models. - * - * This object should have the same structure as [TextClassificationModelMetadata]{@link google.cloud.automl.v1.TextClassificationModelMetadata} - * - * @property {Object} imageObjectDetectionModelMetadata - * Metadata for image object detection models. - * - * This object should have the same structure as [ImageObjectDetectionModelMetadata]{@link google.cloud.automl.v1.ImageObjectDetectionModelMetadata} - * - * @property {Object} textExtractionModelMetadata - * Metadata for text extraction models. - * - * This object should have the same structure as [TextExtractionModelMetadata]{@link google.cloud.automl.v1.TextExtractionModelMetadata} - * - * @property {Object} textSentimentModelMetadata - * Metadata for text sentiment models. - * - * This object should have the same structure as [TextSentimentModelMetadata]{@link google.cloud.automl.v1.TextSentimentModelMetadata} - * - * @property {string} name - * Output only. Resource name of the model. - * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - * - * @property {string} displayName - * Required. The name of the model to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores - * (_), and ASCII digits 0-9. It must start with a letter. - * - * @property {string} datasetId - * Required. The resource ID of the dataset used to create the model. The dataset must - * come from the same ancestor project and location. - * - * @property {Object} createTime - * Output only. Timestamp when the model training finished and can be used for prediction. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} updateTime - * Output only. Timestamp when this model was last updated. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} deploymentState - * Output only. Deployment state of the model. A model can only serve - * prediction requests after it gets deployed. - * - * The number should be among the values of [DeploymentState]{@link google.cloud.automl.v1.DeploymentState} - * - * @property {string} etag - * Used to perform a consistent read-modify-write updates. If not set, a blind - * "overwrite" update happens. - * - * @property {Object.} labels - * Optional. The labels with user-defined metadata to organize your model. - * - * Label keys and values can be no longer than 64 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * See https://goo.gl/xmQnxf for more information on and examples of labels. - * - * @typedef Model - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.Model definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/model.proto} - */ -const Model = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Deployment state of the model. - * - * @enum {number} - * @memberof google.cloud.automl.v1 - */ - DeploymentState: { - - /** - * Should not be used, an un-set enum has this value by default. - */ - DEPLOYMENT_STATE_UNSPECIFIED: 0, - - /** - * Model is deployed. - */ - DEPLOYED: 1, - - /** - * Model is not deployed. - */ - UNDEPLOYED: 2 - } -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_model_evaluation.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_model_evaluation.js deleted file mode 100644 index c53dc4fa34d..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_model_evaluation.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020 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. - -/** - * Evaluation results of a model. - * - * @property {Object} classificationEvaluationMetrics - * Model evaluation metrics for image, text, video and tables - * classification. - * Tables problem is considered a classification when the target column - * is CATEGORY DataType. - * - * This object should have the same structure as [ClassificationEvaluationMetrics]{@link google.cloud.automl.v1.ClassificationEvaluationMetrics} - * - * @property {Object} translationEvaluationMetrics - * Model evaluation metrics for translation. - * - * This object should have the same structure as [TranslationEvaluationMetrics]{@link google.cloud.automl.v1.TranslationEvaluationMetrics} - * - * @property {Object} imageObjectDetectionEvaluationMetrics - * Model evaluation metrics for image object detection. - * - * This object should have the same structure as [ImageObjectDetectionEvaluationMetrics]{@link google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics} - * - * @property {Object} textSentimentEvaluationMetrics - * Evaluation metrics for text sentiment models. - * - * This object should have the same structure as [TextSentimentEvaluationMetrics]{@link google.cloud.automl.v1.TextSentimentEvaluationMetrics} - * - * @property {Object} textExtractionEvaluationMetrics - * Evaluation metrics for text extraction models. - * - * This object should have the same structure as [TextExtractionEvaluationMetrics]{@link google.cloud.automl.v1.TextExtractionEvaluationMetrics} - * - * @property {string} name - * Output only. Resource name of the model evaluation. - * Format: - * - * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - * - * @property {string} annotationSpecId - * Output only. The ID of the annotation spec that the model evaluation applies to. The - * The ID is empty for the overall model evaluation. - * For Tables annotation specs in the dataset do not exist and this ID is - * always not set, but for CLASSIFICATION - * - * prediction_type-s - * the - * display_name - * field is used. - * - * @property {string} displayName - * Output only. The value of - * display_name - * at the moment when the model was trained. Because this field returns a - * value at model training time, for different models trained from the same - * dataset, the values may differ, since display names could had been changed - * between the two model's trainings. For Tables CLASSIFICATION - * - * prediction_type-s - * distinct values of the target column at the moment of the model evaluation - * are populated here. - * The display_name is empty for the overall model evaluation. - * - * @property {Object} createTime - * Output only. Timestamp when this model evaluation was created. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} evaluatedExampleCount - * Output only. The number of examples used for model evaluation, i.e. for - * which ground truth from time of model creation is compared against the - * predicted annotations created by the model. - * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - * the total number of all examples used for evaluation. - * Otherwise, this is the count of examples that according to the ground - * truth were annotated by the - * - * annotation_spec_id. - * - * @typedef ModelEvaluation - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ModelEvaluation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/model_evaluation.proto} - */ -const ModelEvaluation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_prediction_service.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_prediction_service.js deleted file mode 100644 index bdd84cd2c08..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_prediction_service.js +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright 2020 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 PredictionService.Predict. - * - * @property {string} name - * Required. Name of the model requested to serve the prediction. - * - * @property {Object} payload - * Required. Payload to perform a prediction on. The payload must match the - * problem type that the model was trained to solve. - * - * This object should have the same structure as [ExamplePayload]{@link google.cloud.automl.v1.ExamplePayload} - * - * @property {Object.} params - * Additional domain-specific parameters, any string must be up to 25000 - * characters long. - * - *

AutoML Vision Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that have - * at least this confidence score. The default is 0.5. - * - *

AutoML Vision Object Detection

- * - * `score_threshold` - * : (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding - * boxes returned. The default is 100. The - * number of returned bounding boxes might be limited by the server. - * - *

AutoML Tables

- * - * `feature_importance` - * : (boolean) Whether - * - * feature_importance - * is populated in the returned list of - * TablesAnnotation - * objects. The default is false. - * - * @typedef PredictRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.PredictRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/prediction_service.proto} - */ -const PredictRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for PredictionService.Predict. - * - * @property {Object[]} payload - * Prediction result. - * AutoML Translation and AutoML Natural Language Sentiment Analysis - * return precisely one payload. - * - * This object should have the same structure as [AnnotationPayload]{@link google.cloud.automl.v1.AnnotationPayload} - * - * @property {Object} preprocessedInput - * The preprocessed example that AutoML actually makes prediction on. - * Empty if AutoML does not preprocess the input example. - * - * For AutoML Natural Language (Classification, Entity Extraction, and - * Sentiment Analysis), if the input is a document, the recognized text is - * returned in the - * document_text - * property. - * - * This object should have the same structure as [ExamplePayload]{@link google.cloud.automl.v1.ExamplePayload} - * - * @property {Object.} metadata - * Additional domain-specific prediction response metadata. - * - *

AutoML Vision Object Detection

- * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding boxes to return per image. - * - *

AutoML Natural Language Sentiment Analysis

- * - * `sentiment_score` - * : (float, deprecated) A value between -1 and 1, - * -1 maps to least positive sentiment, while 1 maps to the most positive - * one and the higher the score, the more positive the sentiment in the - * document is. Yet these values are relative to the training data, so - * e.g. if all data was positive then -1 is also positive (though - * the least). - * `sentiment_score` is not the same as "score" and "magnitude" - * from Sentiment Analysis in the Natural Language API. - * - * @typedef PredictResponse - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.PredictResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/prediction_service.proto} - */ -const PredictResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PredictionService.BatchPredict. - * - * @property {string} name - * Required. Name of the model requested to serve the batch prediction. - * - * @property {Object} inputConfig - * Required. The input configuration for batch prediction. - * - * This object should have the same structure as [BatchPredictInputConfig]{@link google.cloud.automl.v1.BatchPredictInputConfig} - * - * @property {Object} outputConfig - * Required. The Configuration specifying where output predictions should - * be written. - * - * This object should have the same structure as [BatchPredictOutputConfig]{@link google.cloud.automl.v1.BatchPredictOutputConfig} - * - * @property {Object.} params - * Additional domain-specific parameters for the predictions, any string must - * be up to 25000 characters long. - * - *

AutoML Natural Language Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for a text snippet, it will only produce results - * that have at least this confidence score. The default is 0.5. - * - * - *

AutoML Vision Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that - * have at least this confidence score. The default is 0.5. - * - *

AutoML Vision Object Detection

- * - * `score_threshold` - * : (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding - * boxes returned per image. The default is 100, the - * number of bounding boxes returned might be limited by the server. - *

AutoML Video Intelligence Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for a video, it will only produce results that - * have at least this confidence score. The default is 0.5. - * - * `segment_classification` - * : (boolean) Set to true to request - * segment-level classification. AutoML Video Intelligence returns - * labels and their confidence scores for the entire segment of the - * video that user specified in the request configuration. - * The default is true. - * - * `shot_classification` - * : (boolean) Set to true to request shot-level - * classification. AutoML Video Intelligence determines the boundaries - * for each camera shot in the entire segment of the video that user - * specified in the request configuration. AutoML Video Intelligence - * then returns labels and their confidence scores for each detected - * shot, along with the start and end time of the shot. - * The default is false. - * - * WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no metrics - * provided to describe that quality. - * - * `1s_interval_classification` - * : (boolean) Set to true to request - * classification for a video at one-second intervals. AutoML Video - * Intelligence returns labels and their confidence scores for each - * second of the entire segment of the video that user specified in the - * request configuration. The default is false. - * - * WARNING: Model evaluation is not done for this classification - * type, the quality of it depends on training data, but there are no - * metrics provided to describe that quality. - * - *

AutoML Video Intelligence Object Tracking

- * - * `score_threshold` - * : (float) When Model detects objects on video frames, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding - * boxes returned per image. The default is 100, the - * number of bounding boxes returned might be limited by the server. - * - * `min_bounding_box_size` - * : (float) Only bounding boxes with shortest edge - * at least that long as a relative value of video frame size are - * returned. Value in 0 to 1 range. Default is 0. - * - * @typedef BatchPredictRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.BatchPredictRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/prediction_service.proto} - */ -const BatchPredictRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result of the Batch Predict. This message is returned in - * response of the operation returned - * by the PredictionService.BatchPredict. - * - * @property {Object.} metadata - * Additional domain-specific prediction response metadata. - * - *

AutoML Vision Object Detection

- * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding boxes returned per image. - * - *

AutoML Video Intelligence Object Tracking

- * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding boxes returned per frame. - * - * @typedef BatchPredictResult - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.BatchPredictResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/prediction_service.proto} - */ -const BatchPredictResult = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_service.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_service.js deleted file mode 100644 index 17be4f96c14..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_service.js +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright 2020 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 AutoMl.CreateDataset. - * - * @property {string} parent - * Required. The resource name of the project to create the dataset for. - * - * @property {Object} dataset - * Required. The dataset to create. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1.Dataset} - * - * @typedef CreateDatasetRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.CreateDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const CreateDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetDataset. - * - * @property {string} name - * Required. The resource name of the dataset to retrieve. - * - * @typedef GetDatasetRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.GetDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const GetDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListDatasets. - * - * @property {string} parent - * Required. The resource name of the project from which to list datasets. - * - * @property {string} filter - * An expression for filtering the results of the request. - * - * * `dataset_metadata` - for existence of the case (e.g. - * image_classification_dataset_metadata:*). Some examples of using the filter are: - * - * * `translation_dataset_metadata:*` --> The dataset has - * translation_dataset_metadata. - * - * @property {number} pageSize - * Requested page size. Server may return fewer results than requested. - * If unspecified, server will pick a default size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return - * Typically obtained via - * ListDatasetsResponse.next_page_token of the previous - * AutoMl.ListDatasets call. - * - * @typedef ListDatasetsRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ListDatasetsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ListDatasetsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListDatasets. - * - * @property {Object[]} datasets - * The datasets read. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1.Dataset} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to ListDatasetsRequest.page_token to obtain that page. - * - * @typedef ListDatasetsResponse - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ListDatasetsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ListDatasetsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.UpdateDataset - * - * @property {Object} dataset - * Required. The dataset which replaces the resource on the server. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1.Dataset} - * - * @property {Object} updateMask - * Required. The update mask applies to the resource. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateDatasetRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.UpdateDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const UpdateDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.DeleteDataset. - * - * @property {string} name - * Required. The resource name of the dataset to delete. - * - * @typedef DeleteDatasetRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.DeleteDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const DeleteDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ImportData. - * - * @property {string} name - * Required. Dataset name. Dataset must already exist. All imported - * annotations and examples will be added. - * - * @property {Object} inputConfig - * Required. The desired input location and its domain specific semantics, - * if any. - * - * This object should have the same structure as [InputConfig]{@link google.cloud.automl.v1.InputConfig} - * - * @typedef ImportDataRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ImportDataRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ImportDataRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ExportData. - * - * @property {string} name - * Required. The resource name of the dataset. - * - * @property {Object} outputConfig - * Required. The desired output location. - * - * This object should have the same structure as [OutputConfig]{@link google.cloud.automl.v1.OutputConfig} - * - * @typedef ExportDataRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ExportDataRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ExportDataRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetAnnotationSpec. - * - * @property {string} name - * Required. The resource name of the annotation spec to retrieve. - * - * @typedef GetAnnotationSpecRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.GetAnnotationSpecRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const GetAnnotationSpecRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.CreateModel. - * - * @property {string} parent - * Required. Resource name of the parent project where the model is being created. - * - * @property {Object} model - * Required. The model to create. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1.Model} - * - * @typedef CreateModelRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.CreateModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const CreateModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetModel. - * - * @property {string} name - * Required. Resource name of the model. - * - * @typedef GetModelRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.GetModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const GetModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListModels. - * - * @property {string} parent - * Required. Resource name of the project, from which to list the models. - * - * @property {string} filter - * An expression for filtering the results of the request. - * - * * `model_metadata` - for existence of the case (e.g. - * video_classification_model_metadata:*). - * * `dataset_id` - for = or !=. Some examples of using the filter are: - * - * * `image_classification_model_metadata:*` --> The model has - * image_classification_model_metadata. - * * `dataset_id=5` --> The model was created from a dataset with ID 5. - * - * @property {number} pageSize - * Requested page size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return - * Typically obtained via - * ListModelsResponse.next_page_token of the previous - * AutoMl.ListModels call. - * - * @typedef ListModelsRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ListModelsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ListModelsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListModels. - * - * @property {Object[]} model - * List of models in the requested page. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1.Model} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to ListModelsRequest.page_token to obtain that page. - * - * @typedef ListModelsResponse - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ListModelsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ListModelsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.DeleteModel. - * - * @property {string} name - * Required. Resource name of the model being deleted. - * - * @typedef DeleteModelRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.DeleteModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const DeleteModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.UpdateModel - * - * @property {Object} model - * Required. The model which replaces the resource on the server. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1.Model} - * - * @property {Object} updateMask - * Required. The update mask applies to the resource. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateModelRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.UpdateModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const UpdateModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.DeployModel. - * - * @property {Object} imageObjectDetectionModelDeploymentMetadata - * Model deployment metadata specific to Image Object Detection. - * - * This object should have the same structure as [ImageObjectDetectionModelDeploymentMetadata]{@link google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata} - * - * @property {Object} imageClassificationModelDeploymentMetadata - * Model deployment metadata specific to Image Classification. - * - * This object should have the same structure as [ImageClassificationModelDeploymentMetadata]{@link google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata} - * - * @property {string} name - * Required. Resource name of the model to deploy. - * - * @typedef DeployModelRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.DeployModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const DeployModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.UndeployModel. - * - * @property {string} name - * Required. Resource name of the model to undeploy. - * - * @typedef UndeployModelRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.UndeployModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const UndeployModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ExportModel. - * Models need to be enabled for exporting, otherwise an error code will be - * returned. - * - * @property {string} name - * Required. The resource name of the model to export. - * - * @property {Object} outputConfig - * Required. The desired output location and configuration. - * - * This object should have the same structure as [ModelExportOutputConfig]{@link google.cloud.automl.v1.ModelExportOutputConfig} - * - * @typedef ExportModelRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ExportModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ExportModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetModelEvaluation. - * - * @property {string} name - * Required. Resource name for the model evaluation. - * - * @typedef GetModelEvaluationRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.GetModelEvaluationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const GetModelEvaluationRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListModelEvaluations. - * - * @property {string} parent - * Required. Resource name of the model to list the model evaluations for. - * If modelId is set as "-", this will list model evaluations from across all - * models of the parent location. - * - * @property {string} filter - * Required. An expression for filtering the results of the request. - * - * * `annotation_spec_id` - for =, != or existence. See example below for - * the last. - * - * Some examples of using the filter are: - * - * * `annotation_spec_id!=4` --> The model evaluation was done for - * annotation spec with ID different than 4. - * * `NOT annotation_spec_id:*` --> The model evaluation was done for - * aggregate of all annotation specs. - * - * @property {number} pageSize - * Requested page size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return. - * Typically obtained via - * ListModelEvaluationsResponse.next_page_token of the previous - * AutoMl.ListModelEvaluations call. - * - * @typedef ListModelEvaluationsRequest - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ListModelEvaluationsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ListModelEvaluationsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListModelEvaluations. - * - * @property {Object[]} modelEvaluation - * List of model evaluations in the requested page. - * - * This object should have the same structure as [ModelEvaluation]{@link google.cloud.automl.v1.ModelEvaluation} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to the ListModelEvaluationsRequest.page_token field of a new - * AutoMl.ListModelEvaluations request to obtain that page. - * - * @typedef ListModelEvaluationsResponse - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.ListModelEvaluationsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/service.proto} - */ -const ListModelEvaluationsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text.js deleted file mode 100644 index 6ca136cd227..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2020 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. - -/** - * Dataset metadata for classification. - * - * @property {number} classificationType - * Required. Type of the classification problem. - * - * The number should be among the values of [ClassificationType]{@link google.cloud.automl.v1.ClassificationType} - * - * @typedef TextClassificationDatasetMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextClassificationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text.proto} - */ -const TextClassificationDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to text classification. - * - * @property {number} classificationType - * Output only. Classification type of the dataset used to train this model. - * - * The number should be among the values of [ClassificationType]{@link google.cloud.automl.v1.ClassificationType} - * - * @typedef TextClassificationModelMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextClassificationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text.proto} - */ -const TextClassificationModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Dataset metadata that is specific to text extraction - * @typedef TextExtractionDatasetMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextExtractionDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text.proto} - */ -const TextExtractionDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to text extraction. - * @typedef TextExtractionModelMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextExtractionModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text.proto} - */ -const TextExtractionModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Dataset metadata for text sentiment. - * - * @property {number} sentimentMax - * Required. A sentiment is expressed as an integer ordinal, where higher value - * means a more positive sentiment. The range of sentiments that will be used - * is between 0 and sentiment_max (inclusive on both ends), and all the values - * in the range must be represented in the dataset before a model can be - * created. - * sentiment_max value must be between 1 and 10 (inclusive). - * - * @typedef TextSentimentDatasetMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextSentimentDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text.proto} - */ -const TextSentimentDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to text sentiment. - * @typedef TextSentimentModelMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextSentimentModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text.proto} - */ -const TextSentimentModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_extraction.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_extraction.js deleted file mode 100644 index 8d8045b89f8..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_extraction.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2020 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. - -/** - * Annotation for identifying spans of text. - * - * @property {Object} textSegment - * An entity annotation will set this, which is the part of the original - * text to which the annotation pertains. - * - * This object should have the same structure as [TextSegment]{@link google.cloud.automl.v1.TextSegment} - * - * @property {number} score - * Output only. A confidence estimate between 0.0 and 1.0. A higher value - * means greater confidence in correctness of the annotation. - * - * @typedef TextExtractionAnnotation - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextExtractionAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text_extraction.proto} - */ -const TextExtractionAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model evaluation metrics for text extraction problems. - * - * @property {number} auPrc - * Output only. The Area under precision recall curve metric. - * - * @property {Object[]} confidenceMetricsEntries - * Output only. Metrics that have confidence thresholds. - * Precision-recall curve can be derived from it. - * - * This object should have the same structure as [ConfidenceMetricsEntry]{@link google.cloud.automl.v1.ConfidenceMetricsEntry} - * - * @typedef TextExtractionEvaluationMetrics - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextExtractionEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text_extraction.proto} - */ -const TextExtractionEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Metrics for a single confidence threshold. - * - * @property {number} confidenceThreshold - * Output only. The confidence threshold value used to compute the metrics. - * Only annotations with score of at least this threshold are considered to - * be ones the model would return. - * - * @property {number} recall - * Output only. Recall under the given confidence threshold. - * - * @property {number} precision - * Output only. Precision under the given confidence threshold. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @typedef ConfidenceMetricsEntry - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text_extraction.proto} - */ - ConfidenceMetricsEntry: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_segment.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_segment.js deleted file mode 100644 index 8593dbf9040..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_segment.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2020 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 contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. - * - * @property {string} content - * Output only. The content of the TextSegment. - * - * @property {number} startOffset - * Required. Zero-based character index of the first character of the text - * segment (counting characters from the beginning of the text). - * - * @property {number} endOffset - * Required. Zero-based character index of the first character past the end of - * the text segment (counting character from the beginning of the text). - * The character at the end_offset is NOT included in the text segment. - * - * @typedef TextSegment - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text_segment.proto} - */ -const TextSegment = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_sentiment.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_sentiment.js deleted file mode 100644 index c9f57e368a8..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_text_sentiment.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020 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. - -/** - * Contains annotation details specific to text sentiment. - * - * @property {number} sentiment - * Output only. The sentiment with the semantic, as given to the - * AutoMl.ImportData when populating the dataset from which the model used - * for the prediction had been trained. - * The sentiment values are between 0 and - * Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - * with higher value meaning more positive sentiment. They are completely - * relative, i.e. 0 means least positive sentiment and sentiment_max means - * the most positive from the sentiments present in the train data. Therefore - * e.g. if train data had only negative sentiment, then sentiment_max, would - * be still negative (although least negative). - * The sentiment shouldn't be confused with "score" or "magnitude" - * from the previous Natural Language Sentiment Analysis API. - * - * @typedef TextSentimentAnnotation - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextSentimentAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text_sentiment.proto} - */ -const TextSentimentAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model evaluation metrics for text sentiment problems. - * - * @property {number} precision - * Output only. Precision. - * - * @property {number} recall - * Output only. Recall. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @property {number} meanAbsoluteError - * Output only. Mean absolute error. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {number} meanSquaredError - * Output only. Mean squared error. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {number} linearKappa - * Output only. Linear weighted kappa. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {number} quadraticKappa - * Output only. Quadratic weighted kappa. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {Object} confusionMatrix - * Output only. Confusion matrix of the evaluation. - * Only set for the overall model evaluation, not for evaluation of a single - * annotation spec. - * - * This object should have the same structure as [ConfusionMatrix]{@link google.cloud.automl.v1.ConfusionMatrix} - * - * @typedef TextSentimentEvaluationMetrics - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TextSentimentEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/text_sentiment.proto} - */ -const TextSentimentEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_translation.js b/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_translation.js deleted file mode 100644 index ff24352e6e2..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/cloud/automl/v1/doc_translation.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2020 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. - -/** - * Dataset metadata that is specific to translation. - * - * @property {string} sourceLanguageCode - * Required. The BCP-47 language code of the source language. - * - * @property {string} targetLanguageCode - * Required. The BCP-47 language code of the target language. - * - * @typedef TranslationDatasetMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TranslationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/translation.proto} - */ -const TranslationDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Evaluation metrics for the dataset. - * - * @property {number} bleuScore - * Output only. BLEU score. - * - * @property {number} baseBleuScore - * Output only. BLEU score for base model. - * - * @typedef TranslationEvaluationMetrics - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TranslationEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/translation.proto} - */ -const TranslationEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to translation. - * - * @property {string} baseModel - * The resource name of the model to use as a baseline to train the custom - * model. If unset, we use the default base model provided by Google - * Translate. Format: - * `projects/{project_id}/locations/{location_id}/models/{model_id}` - * - * @property {string} sourceLanguageCode - * Output only. Inferred from the dataset. - * The source language (The BCP-47 language code) that is used for training. - * - * @property {string} targetLanguageCode - * Output only. The target language (The BCP-47 language code) that is used - * for training. - * - * @typedef TranslationModelMetadata - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TranslationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/translation.proto} - */ -const TranslationModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Annotation details specific to translation. - * - * @property {Object} translatedContent - * Output only . The translated content. - * - * This object should have the same structure as [TextSnippet]{@link google.cloud.automl.v1.TextSnippet} - * - * @typedef TranslationAnnotation - * @memberof google.cloud.automl.v1 - * @see [google.cloud.automl.v1.TranslationAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1/translation.proto} - */ -const TranslationAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/longrunning/doc_operations.js b/packages/google-cloud-automl/src/v1/doc/google/longrunning/doc_operations.js deleted file mode 100644 index 099e418d620..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/longrunning/doc_operations.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2020 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. - -/** - * This resource represents a long-running operation that is the result of a - * network API call. - * - * @property {string} name - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * @property {Object} metadata - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @property {boolean} done - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * @property {Object} error - * The error result of the operation in case of failure or cancellation. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @property {Object} response - * The normal response of the operation in case of success. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Operation - * @memberof google.longrunning - * @see [google.longrunning.Operation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} - */ -const Operation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_any.js deleted file mode 100644 index 813682aa336..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2020 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. - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * # JSON - * - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message google.protobuf.Duration): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * - * @property {string} typeUrl - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a google.protobuf.Type - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * - * @property {Buffer} value - * Must be a valid serialized protocol buffer of the above specified type. - * - * @typedef Any - * @memberof google.protobuf - * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ -const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 59e745f36c2..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2020 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-automl/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index ad801cc9a10..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2020 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://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-automl/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-automl/src/v1/doc/google/rpc/doc_status.js deleted file mode 100644 index 750e0af7689..00000000000 --- a/packages/google-cloud-automl/src/v1/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2020 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. - -/** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). Each `Status` message contains - * three pieces of data: error code, error message, and error details. - * - * You can find out more about this error model and how to work with it in the - * [API Design Guide](https://cloud.google.com/apis/design/errors). - * - * @property {number} code - * The status code, which should be an enum value of google.rpc.Code. - * - * @property {string} message - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized by the client. - * - * @property {Object[]} details - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Status - * @memberof google.rpc - * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} - */ -const Status = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/browser.js b/packages/google-cloud-automl/src/v1/index.ts similarity index 61% rename from packages/google-cloud-automl/src/browser.js rename to packages/google-cloud-automl/src/v1/index.ts index 68dc62d25d6..bdc16537c46 100644 --- a/packages/google-cloud-automl/src/browser.js +++ b/packages/google-cloud-automl/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -11,11 +11,10 @@ // 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 {AutoMlClient} from './auto_ml_client'; +export {PredictionServiceClient} from './prediction_service_client'; diff --git a/packages/google-cloud-automl/src/v1/prediction_service_client.js b/packages/google-cloud-automl/src/v1/prediction_service_client.js deleted file mode 100644 index 50029e2bb35..00000000000 --- a/packages/google-cloud-automl/src/v1/prediction_service_client.js +++ /dev/null @@ -1,663 +0,0 @@ -// Copyright 2020 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('./prediction_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * AutoML Prediction API. - * - * On any input that is documented to expect a string parameter in - * snake_case or kebab-case, either of those cases is accepted. - * - * @class - * @memberof v1 - */ -class PredictionServiceClient { - /** - * Construct an instance of PredictionServiceClient. - * - * @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 = { - modelPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/models/{model}' - ), - }; - - const protoFilesRoot = opts.fallback - ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) - : gaxModule.protobuf.loadSync(nodejsProtoPath); - - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - this.operationsClient = new gaxModule.lro({ - auth: gaxGrpc.auth, - grpc: gaxGrpc.grpc, - }).operationsClient(opts); - - const batchPredictResponse = protoFilesRoot.lookup( - 'google.cloud.automl.v1.BatchPredictResult' - ); - const batchPredictMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1.OperationMetadata' - ); - - this._descriptors.longrunning = { - batchPredict: new gaxModule.LongrunningDescriptor( - this.operationsClient, - batchPredictResponse.decode.bind(batchPredictResponse), - batchPredictMetadata.decode.bind(batchPredictMetadata) - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.automl.v1.PredictionService', - 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.automl.v1.PredictionService. - const predictionServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.automl.v1.PredictionService') - : protos.google.cloud.automl.v1.PredictionService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const predictionServiceStubMethods = ['predict', 'batchPredict']; - for (const methodName of predictionServiceStubMethods) { - const innerCallPromise = predictionServiceStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.longrunning[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'automl.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'automl.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 -- - // ------------------- - - /** - * Perform an online prediction. The prediction result is directly - * returned in the response. - * Available for following ML scenarios, and their expected request payloads: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
AutoML Vision ClassificationAn image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.
AutoML Vision Object DetectionAn image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.
AutoML Natural Language ClassificationA TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - * .PDF, .TIF or .TIFF format with size upto 2MB.
AutoML Natural Language Entity ExtractionA TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document - * in .PDF, .TIF or .TIFF format with size upto 20MB.
AutoML Natural Language Sentiment AnalysisA TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - * .PDF, .TIF or .TIFF format with size upto 2MB.
AutoML TranslationA TextSnippet up to 25,000 characters, UTF-8 encoded.
AutoML TablesA row with column values matching - * the columns of the model, up to 5MB. Not available for FORECASTING - * `prediction_type`. - *
- * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the model requested to serve the prediction. - * @param {Object} request.payload - * Required. Payload to perform a prediction on. The payload must match the - * problem type that the model was trained to solve. - * - * This object should have the same structure as [ExamplePayload]{@link google.cloud.automl.v1.ExamplePayload} - * @param {Object.} [request.params] - * Additional domain-specific parameters, any string must be up to 25000 - * characters long. - * - *

AutoML Vision Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that have - * at least this confidence score. The default is 0.5. - * - *

AutoML Vision Object Detection

- * - * `score_threshold` - * : (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding - * boxes returned. The default is 100. The - * number of returned bounding boxes might be limited by the server. - * - *

AutoML Tables

- * - * `feature_importance` - * : (boolean) Whether - * - * feature_importance - * is populated in the returned list of - * TablesAnnotation - * objects. The default is false. - * @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 [PredictResponse]{@link google.cloud.automl.v1.PredictResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PredictResponse]{@link google.cloud.automl.v1.PredictResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.PredictionServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const payload = {}; - * const request = { - * name: formattedName, - * payload: payload, - * }; - * client.predict(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - predict(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.predict(request, options, callback); - } - - /** - * Perform a batch prediction. Unlike the online Predict, batch - * prediction result won't be immediately available in the response. Instead, - * a long running operation object is returned. User can poll the operation - * result via GetOperation - * method. Once the operation is done, BatchPredictResult is returned in - * the response field. - * Available for following ML scenarios: - * - * * AutoML Vision Classification - * * AutoML Vision Object Detection - * * AutoML Video Intelligence Classification - * * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification - * * AutoML Natural Language Entity Extraction - * * AutoML Natural Language Sentiment Analysis - * * AutoML Tables - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the model requested to serve the batch prediction. - * @param {Object} request.inputConfig - * Required. The input configuration for batch prediction. - * - * This object should have the same structure as [BatchPredictInputConfig]{@link google.cloud.automl.v1.BatchPredictInputConfig} - * @param {Object} request.outputConfig - * Required. The Configuration specifying where output predictions should - * be written. - * - * This object should have the same structure as [BatchPredictOutputConfig]{@link google.cloud.automl.v1.BatchPredictOutputConfig} - * @param {Object.} [request.params] - * Additional domain-specific parameters for the predictions, any string must - * be up to 25000 characters long. - * - *

AutoML Natural Language Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for a text snippet, it will only produce results - * that have at least this confidence score. The default is 0.5. - * - * - *

AutoML Vision Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that - * have at least this confidence score. The default is 0.5. - * - *

AutoML Vision Object Detection

- * - * `score_threshold` - * : (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding - * boxes returned per image. The default is 100, the - * number of bounding boxes returned might be limited by the server. - *

AutoML Video Intelligence Classification

- * - * `score_threshold` - * : (float) A value from 0.0 to 1.0. When the model - * makes predictions for a video, it will only produce results that - * have at least this confidence score. The default is 0.5. - * - * `segment_classification` - * : (boolean) Set to true to request - * segment-level classification. AutoML Video Intelligence returns - * labels and their confidence scores for the entire segment of the - * video that user specified in the request configuration. - * The default is true. - * - * `shot_classification` - * : (boolean) Set to true to request shot-level - * classification. AutoML Video Intelligence determines the boundaries - * for each camera shot in the entire segment of the video that user - * specified in the request configuration. AutoML Video Intelligence - * then returns labels and their confidence scores for each detected - * shot, along with the start and end time of the shot. - * The default is false. - * - * WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no metrics - * provided to describe that quality. - * - * `1s_interval_classification` - * : (boolean) Set to true to request - * classification for a video at one-second intervals. AutoML Video - * Intelligence returns labels and their confidence scores for each - * second of the entire segment of the video that user specified in the - * request configuration. The default is false. - * - * WARNING: Model evaluation is not done for this classification - * type, the quality of it depends on training data, but there are no - * metrics provided to describe that quality. - * - *

AutoML Video Intelligence Object Tracking

- * - * `score_threshold` - * : (float) When Model detects objects on video frames, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * - * `max_bounding_box_count` - * : (int64) The maximum number of bounding - * boxes returned per image. The default is 100, the - * number of bounding boxes returned might be limited by the server. - * - * `min_bounding_box_size` - * : (float) Only bounding boxes with shortest edge - * at least that long as a relative value of video frame size are - * returned. Value in 0 to 1 range. Default is 0. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('automl.v1'); - * - * const client = new automl.v1.PredictionServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const inputConfig = {}; - * const outputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.batchPredict(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const inputConfig = {}; - * const outputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.batchPredict(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const inputConfig = {}; - * const outputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.batchPredict(request); - * - * const [response] = await operation.promise(); - */ - batchPredict(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.batchPredict(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified model resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} model - * @returns {String} - */ - modelPath(project, location, model) { - return this._pathTemplates.modelPathTemplate.render({ - project: project, - location: location, - model: model, - }); - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).project; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).location; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the model. - */ - matchModelFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).model; - } -} - -module.exports = PredictionServiceClient; diff --git a/packages/google-cloud-automl/src/v1/prediction_service_client.ts b/packages/google-cloud-automl/src/v1/prediction_service_client.ts new file mode 100644 index 00000000000..d3bcf5674dd --- /dev/null +++ b/packages/google-cloud-automl/src/v1/prediction_service_client.ts @@ -0,0 +1,901 @@ +// 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, + LROperation, +} from 'google-gax'; +import * as path from 'path'; + +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './prediction_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * AutoML Prediction API. + * + * On any input that is documented to expect a string parameter in + * snake_case or kebab-case, either of those cases is accepted. + * @class + * @memberof v1 + */ +export class PredictionServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + operationsClient: gax.OperationsClient; + predictionServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PredictionServiceClient. + * + * @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 PredictionServiceClient; + 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 PredictionServiceClient).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 = { + annotationSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + datasetPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}' + ), + modelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelEvaluationPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}' + ), + }; + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback + ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) + : gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const batchPredictResponse = protoFilesRoot.lookup( + '.google.cloud.automl.v1.BatchPredictResult' + ) as gax.protobuf.Type; + const batchPredictMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this._descriptors.longrunning = { + batchPredict: new gaxModule.LongrunningDescriptor( + this.operationsClient, + batchPredictResponse.decode.bind(batchPredictResponse), + batchPredictMetadata.decode.bind(batchPredictMetadata) + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.automl.v1.PredictionService', + 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.automl.v1.PredictionService. + this.predictionServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.automl.v1.PredictionService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.automl.v1.PredictionService, + 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 predictionServiceStubMethods = ['predict', 'batchPredict']; + + for (const methodName of predictionServiceStubMethods) { + const innerCallPromise = this.predictionServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + 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 + ) => { + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'automl.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'automl.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 -- + // ------------------- + predict( + request: protosTypes.google.cloud.automl.v1.IPredictRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IPredictResponse, + protosTypes.google.cloud.automl.v1.IPredictRequest | undefined, + {} | undefined + ] + >; + predict( + request: protosTypes.google.cloud.automl.v1.IPredictRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1.IPredictResponse, + protosTypes.google.cloud.automl.v1.IPredictRequest | undefined, + {} | undefined + > + ): void; + /** + * Perform an online prediction. The prediction result is directly + * returned in the response. + * Available for following ML scenarios, and their expected request payloads: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AutoML Vision ClassificationAn image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.
AutoML Vision Object DetectionAn image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.
AutoML Natural Language ClassificationA TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + * .PDF, .TIF or .TIFF format with size upto 2MB.
AutoML Natural Language Entity ExtractionA TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + * in .PDF, .TIF or .TIFF format with size upto 20MB.
AutoML Natural Language Sentiment AnalysisA TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + * .PDF, .TIF or .TIFF format with size upto 2MB.
AutoML TranslationA TextSnippet up to 25,000 characters, UTF-8 encoded.
AutoML TablesA row with column values matching + * the columns of the model, up to 5MB. Not available for FORECASTING + * `prediction_type`. + *
+ * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the model requested to serve the prediction. + * @param {google.cloud.automl.v1.ExamplePayload} request.payload + * Required. Payload to perform a prediction on. The payload must match the + * problem type that the model was trained to solve. + * @param {number[]} request.params + * Additional domain-specific parameters, any string must be up to 25000 + * characters long. + * + *

AutoML Vision Classification

+ * + * `score_threshold` + * : (float) A value from 0.0 to 1.0. When the model + * makes predictions for an image, it will only produce results that have + * at least this confidence score. The default is 0.5. + * + *

AutoML Vision Object Detection

+ * + * `score_threshold` + * : (float) When Model detects objects on the image, + * it will only produce bounding boxes which have at least this + * confidence score. Value in 0 to 1 range, default is 0.5. + * + * `max_bounding_box_count` + * : (int64) The maximum number of bounding + * boxes returned. The default is 100. The + * number of returned bounding boxes might be limited by the server. + * + *

AutoML Tables

+ * + * `feature_importance` + * : (boolean) Whether + * + * [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + * is populated in the returned list of + * [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + * objects. The default is false. + * @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 [PredictResponse]{@link google.cloud.automl.v1.PredictResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + predict( + request: protosTypes.google.cloud.automl.v1.IPredictRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1.IPredictResponse, + protosTypes.google.cloud.automl.v1.IPredictRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1.IPredictResponse, + protosTypes.google.cloud.automl.v1.IPredictRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1.IPredictResponse, + protosTypes.google.cloud.automl.v1.IPredictRequest | 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.predict(request, options, callback); + } + + batchPredict( + request: protosTypes.google.cloud.automl.v1.IBatchPredictRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + batchPredict( + request: protosTypes.google.cloud.automl.v1.IBatchPredictRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1.PredictionService.Predict], batch + * prediction result won't be immediately available in the response. Instead, + * a long running operation object is returned. User can poll the operation + * result via [GetOperation][google.longrunning.Operations.GetOperation] + * method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1.BatchPredictResult] is returned in + * the [response][google.longrunning.Operation.response] field. + * Available for following ML scenarios: + * + * * AutoML Vision Classification + * * AutoML Vision Object Detection + * * AutoML Video Intelligence Classification + * * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + * * AutoML Natural Language Entity Extraction + * * AutoML Natural Language Sentiment Analysis + * * AutoML Tables + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the model requested to serve the batch prediction. + * @param {google.cloud.automl.v1.BatchPredictInputConfig} request.inputConfig + * Required. The input configuration for batch prediction. + * @param {google.cloud.automl.v1.BatchPredictOutputConfig} request.outputConfig + * Required. The Configuration specifying where output predictions should + * be written. + * @param {number[]} request.params + * Additional domain-specific parameters for the predictions, any string must + * be up to 25000 characters long. + * + *

AutoML Natural Language Classification

+ * + * `score_threshold` + * : (float) A value from 0.0 to 1.0. When the model + * makes predictions for a text snippet, it will only produce results + * that have at least this confidence score. The default is 0.5. + * + * + *

AutoML Vision Classification

+ * + * `score_threshold` + * : (float) A value from 0.0 to 1.0. When the model + * makes predictions for an image, it will only produce results that + * have at least this confidence score. The default is 0.5. + * + *

AutoML Vision Object Detection

+ * + * `score_threshold` + * : (float) When Model detects objects on the image, + * it will only produce bounding boxes which have at least this + * confidence score. Value in 0 to 1 range, default is 0.5. + * + * `max_bounding_box_count` + * : (int64) The maximum number of bounding + * boxes returned per image. The default is 100, the + * number of bounding boxes returned might be limited by the server. + *

AutoML Video Intelligence Classification

+ * + * `score_threshold` + * : (float) A value from 0.0 to 1.0. When the model + * makes predictions for a video, it will only produce results that + * have at least this confidence score. The default is 0.5. + * + * `segment_classification` + * : (boolean) Set to true to request + * segment-level classification. AutoML Video Intelligence returns + * labels and their confidence scores for the entire segment of the + * video that user specified in the request configuration. + * The default is true. + * + * `shot_classification` + * : (boolean) Set to true to request shot-level + * classification. AutoML Video Intelligence determines the boundaries + * for each camera shot in the entire segment of the video that user + * specified in the request configuration. AutoML Video Intelligence + * then returns labels and their confidence scores for each detected + * shot, along with the start and end time of the shot. + * The default is false. + * + * WARNING: Model evaluation is not done for this classification type, + * the quality of it depends on training data, but there are no metrics + * provided to describe that quality. + * + * `1s_interval_classification` + * : (boolean) Set to true to request + * classification for a video at one-second intervals. AutoML Video + * Intelligence returns labels and their confidence scores for each + * second of the entire segment of the video that user specified in the + * request configuration. The default is false. + * + * WARNING: Model evaluation is not done for this classification + * type, the quality of it depends on training data, but there are no + * metrics provided to describe that quality. + * + *

AutoML Video Intelligence Object Tracking

+ * + * `score_threshold` + * : (float) When Model detects objects on video frames, + * it will only produce bounding boxes which have at least this + * confidence score. Value in 0 to 1 range, default is 0.5. + * + * `max_bounding_box_count` + * : (int64) The maximum number of bounding + * boxes returned per image. The default is 100, the + * number of bounding boxes returned might be limited by the server. + * + * `min_bounding_box_size` + * : (float) Only bounding boxes with shortest edge + * at least that long as a relative value of video frame size are + * returned. Value in 0 to 1 range. Default is 0. + * + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + batchPredict( + request: protosTypes.google.cloud.automl.v1.IBatchPredictRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.cloud.automl.v1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.batchPredict(request, options, callback); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this._pathTemplates.annotationSpecPathTemplate.render({ + project, + location, + dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this._pathTemplates.datasetPathTemplate.render({ + project, + location, + dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this._pathTemplates.modelPathTemplate.render({ + project, + location, + model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} model_evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + modelEvaluation: string + ) { + return this._pathTemplates.modelEvaluationPathTemplate.render({ + project, + location, + model, + model_evaluation: modelEvaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the model_evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model_evaluation. + */ + matchModelEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model_evaluation; + } + + /** + * 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.predictionServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-automl/src/v1/prediction_service_client_config.json b/packages/google-cloud-automl/src/v1/prediction_service_client_config.json index 9a15857a044..d0cf33d835c 100644 --- a/packages/google-cloud-automl/src/v1/prediction_service_client_config.json +++ b/packages/google-cloud-automl/src/v1/prediction_service_client_config.json @@ -2,20 +2,20 @@ "interfaces": { "google.cloud.automl.v1.PredictionService": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "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.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, @@ -26,7 +26,7 @@ "retry_params_name": "default" }, "BatchPredict": { - "timeout_millis": 20000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-automl/src/v1/prediction_service_proto_list.json b/packages/google-cloud-automl/src/v1/prediction_service_proto_list.json index bd3aee0d733..f15ad4ecded 100644 --- a/packages/google-cloud-automl/src/v1/prediction_service_proto_list.json +++ b/packages/google-cloud-automl/src/v1/prediction_service_proto_list.json @@ -1,3 +1,21 @@ [ - "../../protos/google/cloud/automl/v1/prediction_service.proto" + "../../protos/google/cloud/automl/v1/annotation_payload.proto", + "../../protos/google/cloud/automl/v1/annotation_spec.proto", + "../../protos/google/cloud/automl/v1/classification.proto", + "../../protos/google/cloud/automl/v1/data_items.proto", + "../../protos/google/cloud/automl/v1/dataset.proto", + "../../protos/google/cloud/automl/v1/detection.proto", + "../../protos/google/cloud/automl/v1/geometry.proto", + "../../protos/google/cloud/automl/v1/image.proto", + "../../protos/google/cloud/automl/v1/io.proto", + "../../protos/google/cloud/automl/v1/model.proto", + "../../protos/google/cloud/automl/v1/model_evaluation.proto", + "../../protos/google/cloud/automl/v1/operations.proto", + "../../protos/google/cloud/automl/v1/prediction_service.proto", + "../../protos/google/cloud/automl/v1/service.proto", + "../../protos/google/cloud/automl/v1/text.proto", + "../../protos/google/cloud/automl/v1/text_extraction.proto", + "../../protos/google/cloud/automl/v1/text_segment.proto", + "../../protos/google/cloud/automl/v1/text_sentiment.proto", + "../../protos/google/cloud/automl/v1/translation.proto" ] diff --git a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js deleted file mode 100644 index 41d6d9fe991..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js +++ /dev/null @@ -1,3340 +0,0 @@ -// Copyright 2020 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('./auto_ml_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * AutoML Server API. - * - * The resource names are assigned by the server. - * The server never reuses names that it has created after the resources with - * those names are deleted. - * - * An ID of a resource is the last element of the item's resource name. For - * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - * the id for the item is `{dataset_id}`. - * - * Currently the only supported `location_id` is "us-central1". - * - * On any input that is documented to expect a string parameter in - * snake_case or kebab-case, either of those cases is accepted. - * - * @class - * @memberof v1beta1 - */ -class AutoMlClient { - /** - * Construct an instance of AutoMlClient. - * - * @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 = { - annotationSpecPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' - ), - columnSpecPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}' - ), - datasetPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}' - ), - locationPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - modelPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/models/{model}' - ), - modelEvaluationPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}' - ), - tableSpecPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}' - ), - }; - - // 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 = { - listDatasets: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'datasets' - ), - listModels: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'model' - ), - listModelEvaluations: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'modelEvaluation' - ), - listTableSpecs: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'tableSpecs' - ), - listColumnSpecs: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'columnSpecs' - ), - }; - - const protoFilesRoot = opts.fallback - ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) - : gaxModule.protobuf.loadSync(nodejsProtoPath); - - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - this.operationsClient = new gaxModule.lro({ - auth: gaxGrpc.auth, - grpc: gaxGrpc.grpc, - }).operationsClient(opts); - - const deleteDatasetResponse = protoFilesRoot.lookup( - 'google.protobuf.Empty' - ); - const deleteDatasetMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const importDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const importDataMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const exportDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const exportDataMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const createModelResponse = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.Model' - ); - const createModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const deleteModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const deleteModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const deployModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const deployModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const undeployModelResponse = protoFilesRoot.lookup( - 'google.protobuf.Empty' - ); - const undeployModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const exportModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - const exportModelMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - const exportEvaluatedExamplesResponse = protoFilesRoot.lookup( - 'google.protobuf.Empty' - ); - const exportEvaluatedExamplesMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - - this._descriptors.longrunning = { - deleteDataset: new gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDatasetResponse.decode.bind(deleteDatasetResponse), - deleteDatasetMetadata.decode.bind(deleteDatasetMetadata) - ), - importData: new gaxModule.LongrunningDescriptor( - this.operationsClient, - importDataResponse.decode.bind(importDataResponse), - importDataMetadata.decode.bind(importDataMetadata) - ), - exportData: new gaxModule.LongrunningDescriptor( - this.operationsClient, - exportDataResponse.decode.bind(exportDataResponse), - exportDataMetadata.decode.bind(exportDataMetadata) - ), - createModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - createModelResponse.decode.bind(createModelResponse), - createModelMetadata.decode.bind(createModelMetadata) - ), - deleteModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteModelResponse.decode.bind(deleteModelResponse), - deleteModelMetadata.decode.bind(deleteModelMetadata) - ), - deployModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - deployModelResponse.decode.bind(deployModelResponse), - deployModelMetadata.decode.bind(deployModelMetadata) - ), - undeployModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - undeployModelResponse.decode.bind(undeployModelResponse), - undeployModelMetadata.decode.bind(undeployModelMetadata) - ), - exportModel: new gaxModule.LongrunningDescriptor( - this.operationsClient, - exportModelResponse.decode.bind(exportModelResponse), - exportModelMetadata.decode.bind(exportModelMetadata) - ), - exportEvaluatedExamples: new gaxModule.LongrunningDescriptor( - this.operationsClient, - exportEvaluatedExamplesResponse.decode.bind( - exportEvaluatedExamplesResponse - ), - exportEvaluatedExamplesMetadata.decode.bind( - exportEvaluatedExamplesMetadata - ) - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.automl.v1beta1.AutoMl', - 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.automl.v1beta1.AutoMl. - const autoMlStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.automl.v1beta1.AutoMl') - : protos.google.cloud.automl.v1beta1.AutoMl, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const autoMlStubMethods = [ - 'createDataset', - 'updateDataset', - 'getDataset', - 'listDatasets', - 'deleteDataset', - 'importData', - 'exportData', - 'createModel', - 'getModel', - 'listModels', - 'deleteModel', - 'deployModel', - 'undeployModel', - 'getModelEvaluation', - 'exportModel', - 'exportEvaluatedExamples', - 'listModelEvaluations', - 'getAnnotationSpec', - 'getTableSpec', - 'listTableSpecs', - 'updateTableSpec', - 'getColumnSpec', - 'listColumnSpecs', - 'updateColumnSpec', - ]; - for (const methodName of autoMlStubMethods) { - const innerCallPromise = autoMlStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.longrunning[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'automl.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'automl.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 -- - // ------------------- - - /** - * Creates a dataset. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the project to create the dataset for. - * @param {Object} request.dataset - * Required. The dataset to create. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1beta1.Dataset} - * @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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const dataset = {}; - * const request = { - * parent: formattedParent, - * dataset: dataset, - * }; - * client.createDataset(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createDataset(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.createDataset(request, options, callback); - } - - /** - * Updates a dataset. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.dataset - * Required. The dataset which replaces the resource on the server. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1beta1.Dataset} - * @param {Object} [request.updateMask] - * The update mask applies to the resource. - * - * 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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const dataset = {}; - * client.updateDataset({dataset: dataset}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateDataset(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({ - 'dataset.name': request.dataset.name, - }); - - return this._innerApiCalls.updateDataset(request, options, callback); - } - - /** - * Gets a dataset. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataset to retrieve. - * @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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * client.getDataset({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getDataset(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.getDataset(request, options, callback); - } - - /** - * Lists datasets in a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the project from which to list datasets. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `dataset_metadata` - for existence of the case (e.g. - * image_classification_dataset_metadata:*). Some examples of using the filter are: - * - * * `translation_dataset_metadata:*` --> The dataset has - * translation_dataset_metadata. - * @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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * - * 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 [ListDatasetsResponse]{@link google.cloud.automl.v1beta1.ListDatasetsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Dataset]{@link google.cloud.automl.v1beta1.Dataset} 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 [ListDatasetsResponse]{@link google.cloud.automl.v1beta1.ListDatasetsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * - * client.listDatasets({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.locationPath('[PROJECT]', '[LOCATION]'); - * - * - * 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.listDatasets(nextRequest, options).then(callback); - * } - * } - * client.listDatasets({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listDatasets(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.listDatasets(request, options, callback); - } - - /** - * Equivalent to {@link listDatasets}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDatasets} 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 resource name of the project from which to list datasets. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `dataset_metadata` - for existence of the case (e.g. - * image_classification_dataset_metadata:*). Some examples of using the filter are: - * - * * `translation_dataset_metadata:*` --> The dataset has - * translation_dataset_metadata. - * @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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset} on 'data' event. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * client.listDatasetsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listDatasetsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listDatasets.createStream( - this._innerApiCalls.listDatasets, - request, - options - ); - } - - /** - * Deletes a dataset and all of its contents. - * Returns empty response in the - * response field when it completes, - * and `delete_details` in the - * metadata field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataset to delete. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * // Handle the operation using the promise pattern. - * client.deleteDataset({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * // Handle the operation using the event emitter pattern. - * client.deleteDataset({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.deleteDataset({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - deleteDataset(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.deleteDataset(request, options, callback); - } - - /** - * Imports data into a dataset. - * For Tables this method can only be called on an empty Dataset. - * - * For Tables: - * * A - * schema_inference_version - * parameter must be explicitly set. - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Dataset name. Dataset must already exist. All imported - * annotations and examples will be added. - * @param {Object} request.inputConfig - * Required. The desired input location and its domain specific semantics, - * if any. - * - * This object should have the same structure as [InputConfig]{@link google.cloud.automl.v1beta1.InputConfig} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const inputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.importData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const inputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.importData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const inputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.importData(request); - * - * const [response] = await operation.promise(); - */ - importData(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.importData(request, options, callback); - } - - /** - * Exports dataset's data to the provided output location. - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataset. - * @param {Object} request.outputConfig - * Required. The desired output location. - * - * This object should have the same structure as [OutputConfig]{@link google.cloud.automl.v1beta1.OutputConfig} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.exportData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.exportData(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.exportData(request); - * - * const [response] = await operation.promise(); - */ - exportData(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.exportData(request, options, callback); - } - - /** - * Creates a model. - * Returns a Model in the response - * field when it completes. - * When you create a model, several model evaluations are created for it: - * a global evaluation, and one evaluation for each annotation spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the parent project where the model is being created. - * @param {Object} request.model - * Required. The model to create. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1beta1.Model} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const model = {}; - * const request = { - * parent: formattedParent, - * model: model, - * }; - * - * // Handle the operation using the promise pattern. - * client.createModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const model = {}; - * const request = { - * parent: formattedParent, - * model: model, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.createModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const model = {}; - * const request = { - * parent: formattedParent, - * model: model, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.createModel(request); - * - * const [response] = await operation.promise(); - */ - createModel(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.createModel(request, options, callback); - } - - /** - * Gets a model. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model. - * @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 [Model]{@link google.cloud.automl.v1beta1.Model}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Model]{@link google.cloud.automl.v1beta1.Model}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * client.getModel({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getModel(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.getModel(request, options, callback); - } - - /** - * Lists models. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project, from which to list the models. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `model_metadata` - for existence of the case (e.g. - * video_classification_model_metadata:*). - * * `dataset_id` - for = or !=. Some examples of using the filter are: - * - * * `image_classification_model_metadata:*` --> The model has - * image_classification_model_metadata. - * * `dataset_id=5` --> The model was created from a dataset with ID 5. - * @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 [Model]{@link google.cloud.automl.v1beta1.Model}. - * - * 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 [ListModelsResponse]{@link google.cloud.automl.v1beta1.ListModelsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Model]{@link google.cloud.automl.v1beta1.Model}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Model]{@link google.cloud.automl.v1beta1.Model} 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 [ListModelsResponse]{@link google.cloud.automl.v1beta1.ListModelsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * - * client.listModels({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.locationPath('[PROJECT]', '[LOCATION]'); - * - * - * 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.listModels(nextRequest, options).then(callback); - * } - * } - * client.listModels({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listModels(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.listModels(request, options, callback); - } - - /** - * Equivalent to {@link listModels}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listModels} 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, from which to list the models. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `model_metadata` - for existence of the case (e.g. - * video_classification_model_metadata:*). - * * `dataset_id` - for = or !=. Some examples of using the filter are: - * - * * `image_classification_model_metadata:*` --> The model has - * image_classification_model_metadata. - * * `dataset_id=5` --> The model was created from a dataset with ID 5. - * @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 [Model]{@link google.cloud.automl.v1beta1.Model} on 'data' event. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * client.listModelsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listModelsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listModels.createStream( - this._innerApiCalls.listModels, - request, - options - ); - } - - /** - * Deletes a model. - * Returns `google.protobuf.Empty` in the - * response field when it completes, - * and `delete_details` in the - * metadata field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model being deleted. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the promise pattern. - * client.deleteModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the event emitter pattern. - * client.deleteModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.deleteModel({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - deleteModel(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.deleteModel(request, options, callback); - } - - /** - * Deploys a model. If a model is already deployed, deploying it with the - * same parameters has no effect. Deploying with different parametrs - * (as e.g. changing - * - * node_number) - * will reset the deployment state without pausing the model's availability. - * - * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - * deployment automatically. - * - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model to deploy. - * @param {Object} [request.imageObjectDetectionModelDeploymentMetadata] - * Model deployment metadata specific to Image Object Detection. - * - * This object should have the same structure as [ImageObjectDetectionModelDeploymentMetadata]{@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} - * @param {Object} [request.imageClassificationModelDeploymentMetadata] - * Model deployment metadata specific to Image Classification. - * - * This object should have the same structure as [ImageClassificationModelDeploymentMetadata]{@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the promise pattern. - * client.deployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the event emitter pattern. - * client.deployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.deployModel({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - deployModel(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.deployModel(request, options, callback); - } - - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * - * Only applicable for Text Classification, Image Object Detection and Tables; - * all other domains manage deployment automatically. - * - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the model to undeploy. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the promise pattern. - * client.undeployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the event emitter pattern. - * client.undeployModel({name: formattedName}) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * // Handle the operation using the await pattern. - * const [operation] = await client.undeployModel({name: formattedName}); - * - * const [response] = await operation.promise(); - */ - undeployModel(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.undeployModel(request, options, callback); - } - - /** - * Gets a model evaluation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name for the model evaluation. - * @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 [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelEvaluationPath('[PROJECT]', '[LOCATION]', '[MODEL]', '[MODEL_EVALUATION]'); - * client.getModelEvaluation({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getModelEvaluation(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.getModelEvaluation(request, options, callback); - } - - /** - * Exports a trained, "export-able", model to a user specified Google Cloud - * Storage location. A model is considered export-able if and only if it has - * an export format defined for it in - * - * ModelExportOutputConfig. - * - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the model to export. - * @param {Object} request.outputConfig - * Required. The desired output location and configuration. - * - * This object should have the same structure as [ModelExportOutputConfig]{@link google.cloud.automl.v1beta1.ModelExportOutputConfig} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.exportModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.exportModel(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.exportModel(request); - * - * const [response] = await operation.promise(); - */ - exportModel(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.exportModel(request, options, callback); - } - - /** - * Exports examples on which the model was evaluated (i.e. which were in the - * TEST set of the dataset the model was created from), together with their - * ground truth annotations and the annotations created (predicted) by the - * model. - * The examples, ground truth and predictions are exported in the state - * they were at the moment the model was evaluated. - * - * This export is available only for 30 days since the model evaluation is - * created. - * - * Currently only available for Tables. - * - * Returns an empty response in the - * response field when it completes. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the model whose evaluated examples are to - * be exported. - * @param {Object} request.outputConfig - * Required. The desired output location and configuration. - * - * This object should have the same structure as [ExportEvaluatedExamplesOutputConfig]{@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.exportEvaluatedExamples(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.exportEvaluatedExamples(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const outputConfig = {}; - * const request = { - * name: formattedName, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.exportEvaluatedExamples(request); - * - * const [response] = await operation.promise(); - */ - exportEvaluatedExamples(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.exportEvaluatedExamples( - request, - options, - callback - ); - } - - /** - * Lists model evaluations. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the model to list the model evaluations for. - * If modelId is set as "-", this will list model evaluations from across all - * models of the parent location. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `annotation_spec_id` - for =, != or existence. See example below for - * the last. - * - * Some examples of using the filter are: - * - * * `annotation_spec_id!=4` --> The model evaluation was done for - * annotation spec with ID different than 4. - * * `NOT annotation_spec_id:*` --> The model evaluation was done for - * aggregate of all annotation specs. - * @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 [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation}. - * - * 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 [ListModelEvaluationsResponse]{@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation} 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 [ListModelEvaluationsResponse]{@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * client.listModelEvaluations({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.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * - * - * 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.listModelEvaluations(nextRequest, options).then(callback); - * } - * } - * client.listModelEvaluations({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listModelEvaluations(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.listModelEvaluations(request, options, callback); - } - - /** - * Equivalent to {@link listModelEvaluations}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listModelEvaluations} 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 model to list the model evaluations for. - * If modelId is set as "-", this will list model evaluations from across all - * models of the parent location. - * @param {string} [request.filter] - * An expression for filtering the results of the request. - * - * * `annotation_spec_id` - for =, != or existence. See example below for - * the last. - * - * Some examples of using the filter are: - * - * * `annotation_spec_id!=4` --> The model evaluation was done for - * annotation spec with ID different than 4. - * * `NOT annotation_spec_id:*` --> The model evaluation was done for - * aggregate of all annotation specs. - * @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 [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation} on 'data' event. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * client.listModelEvaluationsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listModelEvaluationsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listModelEvaluations.createStream( - this._innerApiCalls.listModelEvaluations, - request, - options - ); - } - - /** - * Gets an annotation spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the annotation spec to retrieve. - * @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 [AnnotationSpec]{@link google.cloud.automl.v1beta1.AnnotationSpec}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotationSpec]{@link google.cloud.automl.v1beta1.AnnotationSpec}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.annotationSpecPath('[PROJECT]', '[LOCATION]', '[DATASET]', '[ANNOTATION_SPEC]'); - * client.getAnnotationSpec({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getAnnotationSpec(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.getAnnotationSpec(request, options, callback); - } - - /** - * Gets a table spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the table spec to retrieve. - * @param {Object} [request.fieldMask] - * Mask specifying which fields to read. - * - * 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 [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.tableSpecPath('[PROJECT]', '[LOCATION]', '[DATASET]', '[TABLE_SPEC]'); - * client.getTableSpec({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getTableSpec(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.getTableSpec(request, options, callback); - } - - /** - * Lists table specs in a dataset. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the dataset to list table specs from. - * @param {Object} [request.fieldMask] - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {string} [request.filter] - * Filter expression, see go/filtering. - * @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 [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. - * - * 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 [ListTableSpecsResponse]{@link google.cloud.automl.v1beta1.ListTableSpecsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec} 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 [ListTableSpecsResponse]{@link google.cloud.automl.v1beta1.ListTableSpecsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * client.listTableSpecs({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.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * - * - * 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.listTableSpecs(nextRequest, options).then(callback); - * } - * } - * client.listTableSpecs({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listTableSpecs(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.listTableSpecs(request, options, callback); - } - - /** - * Equivalent to {@link listTableSpecs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listTableSpecs} 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 resource name of the dataset to list table specs from. - * @param {Object} [request.fieldMask] - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {string} [request.filter] - * Filter expression, see go/filtering. - * @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 [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec} on 'data' event. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * client.listTableSpecsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listTableSpecsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listTableSpecs.createStream( - this._innerApiCalls.listTableSpecs, - request, - options - ); - } - - /** - * Updates a table spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.tableSpec - * Required. The table spec which replaces the resource on the server. - * - * This object should have the same structure as [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec} - * @param {Object} [request.updateMask] - * The update mask applies to the resource. - * - * 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 [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const tableSpec = {}; - * client.updateTableSpec({tableSpec: tableSpec}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateTableSpec(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({ - 'table_spec.name': request.tableSpec.name, - }); - - return this._innerApiCalls.updateTableSpec(request, options, callback); - } - - /** - * Gets a column spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the column spec to retrieve. - * @param {Object} [request.fieldMask] - * Mask specifying which fields to read. - * - * 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 [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.columnSpecPath('[PROJECT]', '[LOCATION]', '[DATASET]', '[TABLE_SPEC]', '[COLUMN_SPEC]'); - * client.getColumnSpec({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getColumnSpec(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.getColumnSpec(request, options, callback); - } - - /** - * Lists column specs in a table spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the table spec to list column specs from. - * @param {Object} [request.fieldMask] - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {string} [request.filter] - * Filter expression, see go/filtering. - * @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 [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. - * - * 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 [ListColumnSpecsResponse]{@link google.cloud.automl.v1beta1.ListColumnSpecsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} 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 [ListColumnSpecsResponse]{@link google.cloud.automl.v1beta1.ListColumnSpecsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.tableSpecPath('[PROJECT]', '[LOCATION]', '[DATASET]', '[TABLE_SPEC]'); - * - * client.listColumnSpecs({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.tableSpecPath('[PROJECT]', '[LOCATION]', '[DATASET]', '[TABLE_SPEC]'); - * - * - * 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.listColumnSpecs(nextRequest, options).then(callback); - * } - * } - * client.listColumnSpecs({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listColumnSpecs(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.listColumnSpecs(request, options, callback); - } - - /** - * Equivalent to {@link listColumnSpecs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listColumnSpecs} 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 resource name of the table spec to list column specs from. - * @param {Object} [request.fieldMask] - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {string} [request.filter] - * Filter expression, see go/filtering. - * @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 [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} on 'data' event. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.tableSpecPath('[PROJECT]', '[LOCATION]', '[DATASET]', '[TABLE_SPEC]'); - * client.listColumnSpecsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listColumnSpecsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listColumnSpecs.createStream( - this._innerApiCalls.listColumnSpecs, - request, - options - ); - } - - /** - * Updates a column spec. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.columnSpec - * Required. The column spec which replaces the resource on the server. - * - * This object should have the same structure as [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} - * @param {Object} [request.updateMask] - * The update mask applies to the resource. - * - * 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 [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.AutoMlClient({ - * // optional auth parameters. - * }); - * - * const columnSpec = {}; - * client.updateColumnSpec({columnSpec: columnSpec}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateColumnSpec(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({ - 'column_spec.name': request.columnSpec.name, - }); - - return this._innerApiCalls.updateColumnSpec(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified annotation_spec resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} dataset - * @param {String} annotationSpec - * @returns {String} - */ - annotationSpecPath(project, location, dataset, annotationSpec) { - return this._pathTemplates.annotationSpecPathTemplate.render({ - project: project, - location: location, - dataset: dataset, - annotation_spec: annotationSpec, - }); - } - - /** - * Return a fully-qualified column_spec resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} dataset - * @param {String} tableSpec - * @param {String} columnSpec - * @returns {String} - */ - columnSpecPath(project, location, dataset, tableSpec, columnSpec) { - return this._pathTemplates.columnSpecPathTemplate.render({ - project: project, - location: location, - dataset: dataset, - table_spec: tableSpec, - column_spec: columnSpec, - }); - } - - /** - * Return a fully-qualified dataset resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} dataset - * @returns {String} - */ - datasetPath(project, location, dataset) { - return this._pathTemplates.datasetPathTemplate.render({ - project: project, - location: location, - dataset: dataset, - }); - } - - /** - * 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 model resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} model - * @returns {String} - */ - modelPath(project, location, model) { - return this._pathTemplates.modelPathTemplate.render({ - project: project, - location: location, - model: model, - }); - } - - /** - * Return a fully-qualified model_evaluation resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} model - * @param {String} modelEvaluation - * @returns {String} - */ - modelEvaluationPath(project, location, model, modelEvaluation) { - return this._pathTemplates.modelEvaluationPathTemplate.render({ - project: project, - location: location, - model: model, - model_evaluation: modelEvaluation, - }); - } - - /** - * Return a fully-qualified table_spec resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} dataset - * @param {String} tableSpec - * @returns {String} - */ - tableSpecPath(project, location, dataset, tableSpec) { - return this._pathTemplates.tableSpecPathTemplate.render({ - project: project, - location: location, - dataset: dataset, - table_spec: tableSpec, - }); - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).project; - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).location; - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the dataset. - */ - matchDatasetFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).dataset; - } - - /** - * Parse the annotationSpecName from a annotation_spec resource. - * - * @param {String} annotationSpecName - * A fully-qualified path representing a annotation_spec resources. - * @returns {String} - A string representing the annotation_spec. - */ - matchAnnotationSpecFromAnnotationSpecName(annotationSpecName) { - return this._pathTemplates.annotationSpecPathTemplate.match( - annotationSpecName - ).annotation_spec; - } - - /** - * Parse the columnSpecName from a column_spec resource. - * - * @param {String} columnSpecName - * A fully-qualified path representing a column_spec resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromColumnSpecName(columnSpecName) { - return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) - .project; - } - - /** - * Parse the columnSpecName from a column_spec resource. - * - * @param {String} columnSpecName - * A fully-qualified path representing a column_spec resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromColumnSpecName(columnSpecName) { - return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) - .location; - } - - /** - * Parse the columnSpecName from a column_spec resource. - * - * @param {String} columnSpecName - * A fully-qualified path representing a column_spec resources. - * @returns {String} - A string representing the dataset. - */ - matchDatasetFromColumnSpecName(columnSpecName) { - return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) - .dataset; - } - - /** - * Parse the columnSpecName from a column_spec resource. - * - * @param {String} columnSpecName - * A fully-qualified path representing a column_spec resources. - * @returns {String} - A string representing the table_spec. - */ - matchTableSpecFromColumnSpecName(columnSpecName) { - return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) - .table_spec; - } - - /** - * Parse the columnSpecName from a column_spec resource. - * - * @param {String} columnSpecName - * A fully-qualified path representing a column_spec resources. - * @returns {String} - A string representing the column_spec. - */ - matchColumnSpecFromColumnSpecName(columnSpecName) { - return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) - .column_spec; - } - - /** - * Parse the datasetName from a dataset resource. - * - * @param {String} datasetName - * A fully-qualified path representing a dataset resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromDatasetName(datasetName) { - return this._pathTemplates.datasetPathTemplate.match(datasetName).project; - } - - /** - * Parse the datasetName from a dataset resource. - * - * @param {String} datasetName - * A fully-qualified path representing a dataset resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromDatasetName(datasetName) { - return this._pathTemplates.datasetPathTemplate.match(datasetName).location; - } - - /** - * Parse the datasetName from a dataset resource. - * - * @param {String} datasetName - * A fully-qualified path representing a dataset resources. - * @returns {String} - A string representing the dataset. - */ - matchDatasetFromDatasetName(datasetName) { - return this._pathTemplates.datasetPathTemplate.match(datasetName).dataset; - } - - /** - * 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 modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).project; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).location; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the model. - */ - matchModelFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).model; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).project; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).location; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the model. - */ - matchModelFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).model; - } - - /** - * Parse the modelEvaluationName from a model_evaluation resource. - * - * @param {String} modelEvaluationName - * A fully-qualified path representing a model_evaluation resources. - * @returns {String} - A string representing the model_evaluation. - */ - matchModelEvaluationFromModelEvaluationName(modelEvaluationName) { - return this._pathTemplates.modelEvaluationPathTemplate.match( - modelEvaluationName - ).model_evaluation; - } - - /** - * Parse the tableSpecName from a table_spec resource. - * - * @param {String} tableSpecName - * A fully-qualified path representing a table_spec resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromTableSpecName(tableSpecName) { - return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) - .project; - } - - /** - * Parse the tableSpecName from a table_spec resource. - * - * @param {String} tableSpecName - * A fully-qualified path representing a table_spec resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromTableSpecName(tableSpecName) { - return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) - .location; - } - - /** - * Parse the tableSpecName from a table_spec resource. - * - * @param {String} tableSpecName - * A fully-qualified path representing a table_spec resources. - * @returns {String} - A string representing the dataset. - */ - matchDatasetFromTableSpecName(tableSpecName) { - return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) - .dataset; - } - - /** - * Parse the tableSpecName from a table_spec resource. - * - * @param {String} tableSpecName - * A fully-qualified path representing a table_spec resources. - * @returns {String} - A string representing the table_spec. - */ - matchTableSpecFromTableSpecName(tableSpecName) { - return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) - .table_spec; - } -} - -module.exports = AutoMlClient; diff --git a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts new file mode 100644 index 00000000000..0babf3e1909 --- /dev/null +++ b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts @@ -0,0 +1,3333 @@ +// 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, + LROperation, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './auto_ml_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * AutoML Server API. + * + * The resource names are assigned by the server. + * The server never reuses names that it has created after the resources with + * those names are deleted. + * + * An ID of a resource is the last element of the item's resource name. For + * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + * the id for the item is `{dataset_id}`. + * + * Currently the only supported `location_id` is "us-central1". + * + * On any input that is documented to expect a string parameter in + * snake_case or kebab-case, either of those cases is accepted. + * @class + * @memberof v1beta1 + */ +export class AutoMlClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + operationsClient: gax.OperationsClient; + autoMlStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AutoMlClient. + * + * @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 AutoMlClient; + 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 AutoMlClient).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 = { + annotationSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + columnSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}' + ), + datasetPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}' + ), + locationPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + modelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelEvaluationPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}' + ), + tableSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}' + ), + }; + + // 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 = { + listDatasets: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'datasets' + ), + listTableSpecs: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tableSpecs' + ), + listColumnSpecs: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'columnSpecs' + ), + listModels: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'model' + ), + listModelEvaluations: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'modelEvaluation' + ), + }; + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback + ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) + : gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const deleteDatasetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteDatasetMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const importDataResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const importDataMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const exportDataResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const exportDataMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const createModelResponse = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.Model' + ) as gax.protobuf.Type; + const createModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const deployModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deployModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const undeployModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const undeployModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const exportModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const exportModelMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const exportEvaluatedExamplesResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const exportEvaluatedExamplesMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + + this._descriptors.longrunning = { + deleteDataset: new gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDatasetResponse.decode.bind(deleteDatasetResponse), + deleteDatasetMetadata.decode.bind(deleteDatasetMetadata) + ), + importData: new gaxModule.LongrunningDescriptor( + this.operationsClient, + importDataResponse.decode.bind(importDataResponse), + importDataMetadata.decode.bind(importDataMetadata) + ), + exportData: new gaxModule.LongrunningDescriptor( + this.operationsClient, + exportDataResponse.decode.bind(exportDataResponse), + exportDataMetadata.decode.bind(exportDataMetadata) + ), + createModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + createModelResponse.decode.bind(createModelResponse), + createModelMetadata.decode.bind(createModelMetadata) + ), + deleteModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteModelResponse.decode.bind(deleteModelResponse), + deleteModelMetadata.decode.bind(deleteModelMetadata) + ), + deployModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + deployModelResponse.decode.bind(deployModelResponse), + deployModelMetadata.decode.bind(deployModelMetadata) + ), + undeployModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + undeployModelResponse.decode.bind(undeployModelResponse), + undeployModelMetadata.decode.bind(undeployModelMetadata) + ), + exportModel: new gaxModule.LongrunningDescriptor( + this.operationsClient, + exportModelResponse.decode.bind(exportModelResponse), + exportModelMetadata.decode.bind(exportModelMetadata) + ), + exportEvaluatedExamples: new gaxModule.LongrunningDescriptor( + this.operationsClient, + exportEvaluatedExamplesResponse.decode.bind( + exportEvaluatedExamplesResponse + ), + exportEvaluatedExamplesMetadata.decode.bind( + exportEvaluatedExamplesMetadata + ) + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.automl.v1beta1.AutoMl', + 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.automl.v1beta1.AutoMl. + this.autoMlStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.automl.v1beta1.AutoMl' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.automl.v1beta1.AutoMl, + 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 autoMlStubMethods = [ + 'createDataset', + 'getDataset', + 'listDatasets', + 'updateDataset', + 'deleteDataset', + 'importData', + 'exportData', + 'getAnnotationSpec', + 'getTableSpec', + 'listTableSpecs', + 'updateTableSpec', + 'getColumnSpec', + 'listColumnSpecs', + 'updateColumnSpec', + 'createModel', + 'getModel', + 'listModels', + 'deleteModel', + 'deployModel', + 'undeployModel', + 'exportModel', + 'exportEvaluatedExamples', + 'getModelEvaluation', + 'listModelEvaluations', + ]; + + for (const methodName of autoMlStubMethods) { + const innerCallPromise = this.autoMlStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + 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 + ) => { + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'automl.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'automl.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 -- + // ------------------- + createDataset( + request: protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest | undefined, + {} | undefined + ] + >; + createDataset( + request: protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the project to create the dataset for. + * @param {google.cloud.automl.v1beta1.Dataset} request.dataset + * Required. The dataset 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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createDataset( + request: protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + | protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest | 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.createDataset(request, options, callback); + } + getDataset( + request: protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest | undefined, + {} | undefined + ] + >; + getDataset( + request: protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataset to retrieve. + * @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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getDataset( + request: protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + | protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest | 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.getDataset(request, options, callback); + } + updateDataset( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest | undefined, + {} | undefined + ] + >; + updateDataset( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates a dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.automl.v1beta1.Dataset} request.dataset + * Required. The dataset which replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. + * @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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateDataset( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + | protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset, + protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest | 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({ + 'dataset.name': request.dataset!.name || '', + }); + return this._innerApiCalls.updateDataset(request, options, callback); + } + getAnnotationSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IAnnotationSpec, + ( + | protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest + | undefined + ), + {} | undefined + ] + >; + getAnnotationSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IAnnotationSpec, + | protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets an annotation spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the annotation spec to retrieve. + * @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 [AnnotationSpec]{@link google.cloud.automl.v1beta1.AnnotationSpec}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getAnnotationSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IAnnotationSpec, + | protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IAnnotationSpec, + | protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IAnnotationSpec, + ( + | protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest + | 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.getAnnotationSpec(request, options, callback); + } + getTableSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest | undefined, + {} | undefined + ] + >; + getTableSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a table spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the table spec to retrieve. + * @param {google.protobuf.FieldMask} request.fieldMask + * Mask specifying which fields to read. + * @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 [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getTableSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + | protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest | 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.getTableSpec(request, options, callback); + } + updateTableSpec( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + ( + | protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest + | undefined + ), + {} | undefined + ] + >; + updateTableSpec( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + | protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates a table spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.automl.v1beta1.TableSpec} request.tableSpec + * Required. The table spec which replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. + * @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 [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateTableSpec( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + | protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + | protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.ITableSpec, + ( + | protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest + | 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({ + 'table_spec.name': request.tableSpec!.name || '', + }); + return this._innerApiCalls.updateTableSpec(request, options, callback); + } + getColumnSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest | undefined, + {} | undefined + ] + >; + getColumnSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a column spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the column spec to retrieve. + * @param {google.protobuf.FieldMask} request.fieldMask + * Mask specifying which fields to read. + * @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 [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getColumnSpec( + request: protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + | protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest | 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.getColumnSpec(request, options, callback); + } + updateColumnSpec( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + ( + | protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest + | undefined + ), + {} | undefined + ] + >; + updateColumnSpec( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + | protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates a column spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.automl.v1beta1.ColumnSpec} request.columnSpec + * Required. The column spec which replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. + * @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 [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateColumnSpec( + request: protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + | protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + | protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IColumnSpec, + ( + | protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest + | 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({ + 'column_spec.name': request.columnSpec!.name || '', + }); + return this._innerApiCalls.updateColumnSpec(request, options, callback); + } + getModel( + request: protosTypes.google.cloud.automl.v1beta1.IGetModelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IGetModelRequest | undefined, + {} | undefined + ] + >; + getModel( + request: protosTypes.google.cloud.automl.v1beta1.IGetModelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IGetModelRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the model. + * @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 [Model]{@link google.cloud.automl.v1beta1.Model}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getModel( + request: protosTypes.google.cloud.automl.v1beta1.IGetModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IGetModelRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IGetModelRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IGetModelRequest | 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.getModel(request, options, callback); + } + getModelEvaluation( + request: protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation, + ( + | protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest + | undefined + ), + {} | undefined + ] + >; + getModelEvaluation( + request: protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation, + | protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets a model evaluation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name for the model evaluation. + * @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 [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getModelEvaluation( + request: protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation, + | protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation, + | protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation, + ( + | protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest + | 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.getModelEvaluation(request, options, callback); + } + + deleteDataset( + request: protosTypes.google.cloud.automl.v1beta1.IDeleteDatasetRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteDataset( + request: protosTypes.google.cloud.automl.v1beta1.IDeleteDatasetRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Deletes a dataset and all of its contents. + * Returns empty response in the + * [response][google.longrunning.Operation.response] field when it completes, + * and `delete_details` in the + * [metadata][google.longrunning.Operation.metadata] field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataset to delete. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteDataset( + request: protosTypes.google.cloud.automl.v1beta1.IDeleteDatasetRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.deleteDataset(request, options, callback); + } + importData( + request: protosTypes.google.cloud.automl.v1beta1.IImportDataRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importData( + request: protosTypes.google.cloud.automl.v1beta1.IImportDataRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Imports data into a dataset. + * For Tables this method can only be called on an empty Dataset. + * + * For Tables: + * * A + * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] + * parameter must be explicitly set. + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Dataset name. Dataset must already exist. All imported + * annotations and examples will be added. + * @param {google.cloud.automl.v1beta1.InputConfig} request.inputConfig + * Required. The desired input location and its domain specific semantics, + * if any. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + importData( + request: protosTypes.google.cloud.automl.v1beta1.IImportDataRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.importData(request, options, callback); + } + exportData( + request: protosTypes.google.cloud.automl.v1beta1.IExportDataRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + exportData( + request: protosTypes.google.cloud.automl.v1beta1.IExportDataRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Exports dataset's data to the provided output location. + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataset. + * @param {google.cloud.automl.v1beta1.OutputConfig} request.outputConfig + * Required. The desired output location. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + exportData( + request: protosTypes.google.cloud.automl.v1beta1.IExportDataRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.exportData(request, options, callback); + } + createModel( + request: protosTypes.google.cloud.automl.v1beta1.ICreateModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createModel( + request: protosTypes.google.cloud.automl.v1beta1.ICreateModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Creates a model. + * Returns a Model in the [response][google.longrunning.Operation.response] + * field when it completes. + * When you create a model, several model evaluations are created for it: + * a global evaluation, and one evaluation for each annotation spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent project where the model is being created. + * @param {google.cloud.automl.v1beta1.Model} request.model + * Required. The model 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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createModel( + request: protosTypes.google.cloud.automl.v1beta1.ICreateModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1beta1.IModel, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.createModel(request, options, callback); + } + deleteModel( + request: protosTypes.google.cloud.automl.v1beta1.IDeleteModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteModel( + request: protosTypes.google.cloud.automl.v1beta1.IDeleteModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Deletes a model. + * Returns `google.protobuf.Empty` in the + * [response][google.longrunning.Operation.response] field when it completes, + * and `delete_details` in the + * [metadata][google.longrunning.Operation.metadata] field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the model being 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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteModel( + request: protosTypes.google.cloud.automl.v1beta1.IDeleteModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.deleteModel(request, options, callback); + } + deployModel( + request: protosTypes.google.cloud.automl.v1beta1.IDeployModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deployModel( + request: protosTypes.google.cloud.automl.v1beta1.IDeployModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Deploys a model. If a model is already deployed, deploying it with the + * same parameters has no effect. Deploying with different parametrs + * (as e.g. changing + * + * [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + * will reset the deployment state without pausing the model's availability. + * + * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + * deployment automatically. + * + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} request.imageObjectDetectionModelDeploymentMetadata + * Model deployment metadata specific to Image Object Detection. + * @param {google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} request.imageClassificationModelDeploymentMetadata + * Model deployment metadata specific to Image Classification. + * @param {string} request.name + * Required. Resource name of the model to deploy. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deployModel( + request: protosTypes.google.cloud.automl.v1beta1.IDeployModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.deployModel(request, options, callback); + } + undeployModel( + request: protosTypes.google.cloud.automl.v1beta1.IUndeployModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + undeployModel( + request: protosTypes.google.cloud.automl.v1beta1.IUndeployModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Undeploys a model. If the model is not deployed this method has no effect. + * + * Only applicable for Text Classification, Image Object Detection and Tables; + * all other domains manage deployment automatically. + * + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the model to undeploy. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + undeployModel( + request: protosTypes.google.cloud.automl.v1beta1.IUndeployModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.undeployModel(request, options, callback); + } + exportModel( + request: protosTypes.google.cloud.automl.v1beta1.IExportModelRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + exportModel( + request: protosTypes.google.cloud.automl.v1beta1.IExportModelRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Exports a trained, "export-able", model to a user specified Google Cloud + * Storage location. A model is considered export-able if and only if it has + * an export format defined for it in + * + * [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + * + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the model to export. + * @param {google.cloud.automl.v1beta1.ModelExportOutputConfig} request.outputConfig + * Required. The desired output location and configuration. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + exportModel( + request: protosTypes.google.cloud.automl.v1beta1.IExportModelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.exportModel(request, options, callback); + } + exportEvaluatedExamples( + request: protosTypes.google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + exportEvaluatedExamples( + request: protosTypes.google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Exports examples on which the model was evaluated (i.e. which were in the + * TEST set of the dataset the model was created from), together with their + * ground truth annotations and the annotations created (predicted) by the + * model. + * The examples, ground truth and predictions are exported in the state + * they were at the moment the model was evaluated. + * + * This export is available only for 30 days since the model evaluation is + * created. + * + * Currently only available for Tables. + * + * Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the model whose evaluated examples are to + * be exported. + * @param {google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} request.outputConfig + * Required. The desired output location and configuration. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + exportEvaluatedExamples( + request: protosTypes.google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.exportEvaluatedExamples( + request, + options, + callback + ); + } + listDatasets( + request: protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset[], + protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListDatasetsResponse + ] + >; + listDatasets( + request: protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset[], + protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListDatasetsResponse + > + ): void; + /** + * Lists datasets in a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the project from which to list datasets. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `dataset_metadata` - for existence of the case (e.g. + * image_classification_dataset_metadata:*). Some examples of using the filter are: + * + * * `translation_dataset_metadata:*` --> The dataset has + * translation_dataset_metadata. + * @param {number} request.pageSize + * Requested page size. Server may return fewer results than requested. + * If unspecified, server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous + * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call. + * @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 Array of [Dataset]{@link google.cloud.automl.v1beta1.Dataset}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Dataset]{@link google.cloud.automl.v1beta1.Dataset} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListDatasetsRequest]{@link google.cloud.automl.v1beta1.ListDatasetsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListDatasetsResponse]{@link google.cloud.automl.v1beta1.ListDatasetsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listDatasets( + request: protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset[], + protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListDatasetsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IDataset[], + protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListDatasetsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IDataset[], + protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListDatasetsResponse + ] + > | 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.listDatasets(request, options, callback); + } + + /** + * Equivalent to {@link listDatasets}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDatasets} 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 resource name of the project from which to list datasets. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `dataset_metadata` - for existence of the case (e.g. + * image_classification_dataset_metadata:*). Some examples of using the filter are: + * + * * `translation_dataset_metadata:*` --> The dataset has + * translation_dataset_metadata. + * @param {number} request.pageSize + * Requested page size. Server may return fewer results than requested. + * If unspecified, server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous + * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call. + * @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 [Dataset]{@link google.cloud.automl.v1beta1.Dataset} on 'data' event. + */ + listDatasetsStream( + request?: protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listDatasets.createStream( + this._innerApiCalls.listDatasets as gax.GaxCall, + request, + callSettings + ); + } + listTableSpecs( + request: protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.ITableSpec[], + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsResponse + ] + >; + listTableSpecs( + request: protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec[], + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsResponse + > + ): void; + /** + * Lists table specs in a dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the dataset to list table specs from. + * @param {google.protobuf.FieldMask} request.fieldMask + * Mask specifying which fields to read. + * @param {string} request.filter + * Filter expression, see go/filtering. + * @param {number} request.pageSize + * Requested page size. The server can return fewer results than requested. + * If unspecified, the server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained from the + * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous + * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call. + * @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 Array of [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListTableSpecsRequest]{@link google.cloud.automl.v1beta1.ListTableSpecsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListTableSpecsResponse]{@link google.cloud.automl.v1beta1.ListTableSpecsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listTableSpecs( + request: protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec[], + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.ITableSpec[], + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.ITableSpec[], + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListTableSpecsResponse + ] + > | 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.listTableSpecs(request, options, callback); + } + + /** + * Equivalent to {@link listTableSpecs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listTableSpecs} 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 resource name of the dataset to list table specs from. + * @param {google.protobuf.FieldMask} request.fieldMask + * Mask specifying which fields to read. + * @param {string} request.filter + * Filter expression, see go/filtering. + * @param {number} request.pageSize + * Requested page size. The server can return fewer results than requested. + * If unspecified, the server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained from the + * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous + * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call. + * @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 [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec} on 'data' event. + */ + listTableSpecsStream( + request?: protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listTableSpecs.createStream( + this._innerApiCalls.listTableSpecs as gax.GaxCall, + request, + callSettings + ); + } + listColumnSpecs( + request: protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IColumnSpec[], + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsResponse + ] + >; + listColumnSpecs( + request: protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec[], + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsResponse + > + ): void; + /** + * Lists column specs in a table spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the table spec to list column specs from. + * @param {google.protobuf.FieldMask} request.fieldMask + * Mask specifying which fields to read. + * @param {string} request.filter + * Filter expression, see go/filtering. + * @param {number} request.pageSize + * Requested page size. The server can return fewer results than requested. + * If unspecified, the server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained from the + * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous + * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call. + * @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 Array of [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListColumnSpecsRequest]{@link google.cloud.automl.v1beta1.ListColumnSpecsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListColumnSpecsResponse]{@link google.cloud.automl.v1beta1.ListColumnSpecsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listColumnSpecs( + request: protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec[], + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IColumnSpec[], + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IColumnSpec[], + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsResponse + ] + > | 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.listColumnSpecs(request, options, callback); + } + + /** + * Equivalent to {@link listColumnSpecs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listColumnSpecs} 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 resource name of the table spec to list column specs from. + * @param {google.protobuf.FieldMask} request.fieldMask + * Mask specifying which fields to read. + * @param {string} request.filter + * Filter expression, see go/filtering. + * @param {number} request.pageSize + * Requested page size. The server can return fewer results than requested. + * If unspecified, the server will pick a default size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained from the + * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous + * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call. + * @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 [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} on 'data' event. + */ + listColumnSpecsStream( + request?: protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listColumnSpecs.createStream( + this._innerApiCalls.listColumnSpecs as gax.GaxCall, + request, + callSettings + ); + } + listModels( + request: protosTypes.google.cloud.automl.v1beta1.IListModelsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModel[], + protosTypes.google.cloud.automl.v1beta1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelsResponse + ] + >; + listModels( + request: protosTypes.google.cloud.automl.v1beta1.IListModelsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IModel[], + protosTypes.google.cloud.automl.v1beta1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelsResponse + > + ): void; + /** + * Lists models. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project, from which to list the models. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `model_metadata` - for existence of the case (e.g. + * video_classification_model_metadata:*). + * * `dataset_id` - for = or !=. Some examples of using the filter are: + * + * * `image_classification_model_metadata:*` --> The model has + * image_classification_model_metadata. + * * `dataset_id=5` --> The model was created from a dataset with ID 5. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous + * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call. + * @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 Array of [Model]{@link google.cloud.automl.v1beta1.Model}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Model]{@link google.cloud.automl.v1beta1.Model} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListModelsRequest]{@link google.cloud.automl.v1beta1.ListModelsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListModelsResponse]{@link google.cloud.automl.v1beta1.ListModelsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listModels( + request: protosTypes.google.cloud.automl.v1beta1.IListModelsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IModel[], + protosTypes.google.cloud.automl.v1beta1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IModel[], + protosTypes.google.cloud.automl.v1beta1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModel[], + protosTypes.google.cloud.automl.v1beta1.IListModelsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelsResponse + ] + > | 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.listModels(request, options, callback); + } + + /** + * Equivalent to {@link listModels}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listModels} 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, from which to list the models. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `model_metadata` - for existence of the case (e.g. + * video_classification_model_metadata:*). + * * `dataset_id` - for = or !=. Some examples of using the filter are: + * + * * `image_classification_model_metadata:*` --> The model has + * image_classification_model_metadata. + * * `dataset_id=5` --> The model was created from a dataset with ID 5. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return + * Typically obtained via + * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous + * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call. + * @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 [Model]{@link google.cloud.automl.v1beta1.Model} on 'data' event. + */ + listModelsStream( + request?: protosTypes.google.cloud.automl.v1beta1.IListModelsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listModels.createStream( + this._innerApiCalls.listModels as gax.GaxCall, + request, + callSettings + ); + } + listModelEvaluations( + request: protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsResponse + ] + >; + listModelEvaluations( + request: protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsResponse + > + ): void; + /** + * Lists model evaluations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the model to list the model evaluations for. + * If modelId is set as "-", this will list model evaluations from across all + * models of the parent location. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `annotation_spec_id` - for =, != or existence. See example below for + * the last. + * + * Some examples of using the filter are: + * + * * `annotation_spec_id!=4` --> The model evaluation was done for + * annotation spec with ID different than 4. + * * `NOT annotation_spec_id:*` --> The model evaluation was done for + * aggregate of all annotation specs. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous + * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call. + * @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 Array of [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListModelEvaluationsRequest]{@link google.cloud.automl.v1beta1.ListModelEvaluationsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListModelEvaluationsResponse]{@link google.cloud.automl.v1beta1.ListModelEvaluationsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listModelEvaluations( + request: protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsResponse + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsResponse + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IModelEvaluation[], + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest | null, + protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsResponse + ] + > | 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.listModelEvaluations(request, options, callback); + } + + /** + * Equivalent to {@link listModelEvaluations}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listModelEvaluations} 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 model to list the model evaluations for. + * If modelId is set as "-", this will list model evaluations from across all + * models of the parent location. + * @param {string} request.filter + * An expression for filtering the results of the request. + * + * * `annotation_spec_id` - for =, != or existence. See example below for + * the last. + * + * Some examples of using the filter are: + * + * * `annotation_spec_id!=4` --> The model evaluation was done for + * annotation spec with ID different than 4. + * * `NOT annotation_spec_id:*` --> The model evaluation was done for + * aggregate of all annotation specs. + * @param {number} request.pageSize + * Requested page size. + * @param {string} request.pageToken + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous + * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call. + * @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 [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation} on 'data' event. + */ + listModelEvaluationsStream( + request?: protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest, + options?: gax.CallOptions + ): Transform { + 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 || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listModelEvaluations.createStream( + this._innerApiCalls.listModelEvaluations as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this._pathTemplates.annotationSpecPathTemplate.render({ + project, + location, + dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified columnSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} table_spec + * @param {string} column_spec + * @returns {string} Resource name string. + */ + columnSpecPath( + project: string, + location: string, + dataset: string, + tableSpec: string, + columnSpec: string + ) { + return this._pathTemplates.columnSpecPathTemplate.render({ + project, + location, + dataset, + table_spec: tableSpec, + column_spec: columnSpec, + }); + } + + /** + * Parse the project from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .project; + } + + /** + * Parse the location from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .location; + } + + /** + * Parse the dataset from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .dataset; + } + + /** + * Parse the table_spec from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the table_spec. + */ + matchTableSpecFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .table_spec; + } + + /** + * Parse the column_spec from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the column_spec. + */ + matchColumnSpecFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .column_spec; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this._pathTemplates.datasetPathTemplate.render({ + project, + location, + dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this._pathTemplates.locationPathTemplate.render({ + project, + location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName) + .location; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this._pathTemplates.modelPathTemplate.render({ + project, + location, + model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} model_evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + modelEvaluation: string + ) { + return this._pathTemplates.modelEvaluationPathTemplate.render({ + project, + location, + model, + model_evaluation: modelEvaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the model_evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model_evaluation. + */ + matchModelEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model_evaluation; + } + + /** + * Return a fully-qualified tableSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} table_spec + * @returns {string} Resource name string. + */ + tableSpecPath( + project: string, + location: string, + dataset: string, + tableSpec: string + ) { + return this._pathTemplates.tableSpecPathTemplate.render({ + project, + location, + dataset, + table_spec: tableSpec, + }); + } + + /** + * Parse the project from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .project; + } + + /** + * Parse the location from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .location; + } + + /** + * Parse the dataset from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .dataset; + } + + /** + * Parse the table_spec from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the table_spec. + */ + matchTableSpecFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .table_spec; + } + + /** + * 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.autoMlStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-automl/src/v1beta1/auto_ml_client_config.json b/packages/google-cloud-automl/src/v1beta1/auto_ml_client_config.json index b7bdb57d9dc..019742ff974 100644 --- a/packages/google-cloud-automl/src/v1beta1/auto_ml_client_config.json +++ b/packages/google-cloud-automl/src/v1beta1/auto_ml_client_config.json @@ -2,20 +2,20 @@ "interfaces": { "google.cloud.automl.v1beta1.AutoMl": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "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.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, @@ -25,28 +25,28 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "UpdateDataset": { - "timeout_millis": 5000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "GetDataset": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListDatasets": { - "timeout_millis": 50000, + "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "UpdateDataset": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "DeleteDataset": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ImportData": { - "timeout_millis": 20000, + "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -55,87 +55,87 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "CreateModel": { - "timeout_millis": 20000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetModel": { + "GetAnnotationSpec": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "ListModels": { - "timeout_millis": 50000, + "GetTableSpec": { + "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "DeleteModel": { + "ListTableSpecs": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "DeployModel": { + "UpdateTableSpec": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "UndeployModel": { + "GetColumnSpec": { "timeout_millis": 5000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "GetModelEvaluation": { + "ListColumnSpecs": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "ExportModel": { + "UpdateColumnSpec": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "ExportEvaluatedExamples": { + "CreateModel": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "ListModelEvaluations": { - "timeout_millis": 50000, - "retry_codes_name": "non_idempotent", + "GetModel": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "GetAnnotationSpec": { + "ListModels": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "GetTableSpec": { + "DeleteModel": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "ListTableSpecs": { + "DeployModel": { "timeout_millis": 5000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "UpdateTableSpec": { + "UndeployModel": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "GetColumnSpec": { + "ExportModel": { "timeout_millis": 5000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "ListColumnSpecs": { + "ExportEvaluatedExamples": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetModelEvaluation": { "timeout_millis": 5000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "UpdateColumnSpec": { + "ListModelEvaluations": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-automl/src/v1beta1/auto_ml_proto_list.json b/packages/google-cloud-automl/src/v1beta1/auto_ml_proto_list.json index fd344c9ed05..3a493dbb13a 100644 --- a/packages/google-cloud-automl/src/v1beta1/auto_ml_proto_list.json +++ b/packages/google-cloud-automl/src/v1beta1/auto_ml_proto_list.json @@ -1,3 +1,30 @@ [ - "../../protos/google/cloud/automl/v1beta1/service.proto" + "../../protos/google/cloud/automl/v1beta1/annotation_payload.proto", + "../../protos/google/cloud/automl/v1beta1/annotation_spec.proto", + "../../protos/google/cloud/automl/v1beta1/classification.proto", + "../../protos/google/cloud/automl/v1beta1/column_spec.proto", + "../../protos/google/cloud/automl/v1beta1/data_items.proto", + "../../protos/google/cloud/automl/v1beta1/data_stats.proto", + "../../protos/google/cloud/automl/v1beta1/data_types.proto", + "../../protos/google/cloud/automl/v1beta1/dataset.proto", + "../../protos/google/cloud/automl/v1beta1/detection.proto", + "../../protos/google/cloud/automl/v1beta1/geometry.proto", + "../../protos/google/cloud/automl/v1beta1/image.proto", + "../../protos/google/cloud/automl/v1beta1/io.proto", + "../../protos/google/cloud/automl/v1beta1/model.proto", + "../../protos/google/cloud/automl/v1beta1/model_evaluation.proto", + "../../protos/google/cloud/automl/v1beta1/operations.proto", + "../../protos/google/cloud/automl/v1beta1/prediction_service.proto", + "../../protos/google/cloud/automl/v1beta1/ranges.proto", + "../../protos/google/cloud/automl/v1beta1/regression.proto", + "../../protos/google/cloud/automl/v1beta1/service.proto", + "../../protos/google/cloud/automl/v1beta1/table_spec.proto", + "../../protos/google/cloud/automl/v1beta1/tables.proto", + "../../protos/google/cloud/automl/v1beta1/temporal.proto", + "../../protos/google/cloud/automl/v1beta1/text.proto", + "../../protos/google/cloud/automl/v1beta1/text_extraction.proto", + "../../protos/google/cloud/automl/v1beta1/text_segment.proto", + "../../protos/google/cloud/automl/v1beta1/text_sentiment.proto", + "../../protos/google/cloud/automl/v1beta1/translation.proto", + "../../protos/google/cloud/automl/v1beta1/video.proto" ] diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_payload.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_payload.js deleted file mode 100644 index 15c9d6f08df..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_payload.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2020 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. - -/** - * Contains annotation information that is relevant to AutoML. - * - * @property {Object} translation - * Annotation details for translation. - * - * This object should have the same structure as [TranslationAnnotation]{@link google.cloud.automl.v1beta1.TranslationAnnotation} - * - * @property {Object} classification - * Annotation details for content or image classification. - * - * This object should have the same structure as [ClassificationAnnotation]{@link google.cloud.automl.v1beta1.ClassificationAnnotation} - * - * @property {Object} imageObjectDetection - * Annotation details for image object detection. - * - * This object should have the same structure as [ImageObjectDetectionAnnotation]{@link google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} - * - * @property {Object} videoClassification - * Annotation details for video classification. - * Returned for Video Classification predictions. - * - * This object should have the same structure as [VideoClassificationAnnotation]{@link google.cloud.automl.v1beta1.VideoClassificationAnnotation} - * - * @property {Object} videoObjectTracking - * Annotation details for video object tracking. - * - * This object should have the same structure as [VideoObjectTrackingAnnotation]{@link google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} - * - * @property {Object} textExtraction - * Annotation details for text extraction. - * - * This object should have the same structure as [TextExtractionAnnotation]{@link google.cloud.automl.v1beta1.TextExtractionAnnotation} - * - * @property {Object} textSentiment - * Annotation details for text sentiment. - * - * This object should have the same structure as [TextSentimentAnnotation]{@link google.cloud.automl.v1beta1.TextSentimentAnnotation} - * - * @property {Object} tables - * Annotation details for Tables. - * - * This object should have the same structure as [TablesAnnotation]{@link google.cloud.automl.v1beta1.TablesAnnotation} - * - * @property {string} annotationSpecId - * Output only . The resource ID of the annotation spec that - * this annotation pertains to. The annotation spec comes from either an - * ancestor dataset, or the dataset that was used to train the model in use. - * - * @property {string} displayName - * Output only. The value of - * display_name - * when the model was trained. Because this field returns a value at model - * training time, for different models trained using the same dataset, the - * returned value could be different as model owner could update the - * `display_name` between any two model training. - * - * @typedef AnnotationPayload - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.AnnotationPayload definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/annotation_payload.proto} - */ -const AnnotationPayload = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_spec.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_spec.js deleted file mode 100644 index daf48615bce..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_spec.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 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 definition of an annotation spec. - * - * @property {string} name - * Output only. Resource name of the annotation spec. - * Form: - * - * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}' - * - * @property {string} displayName - * Required. The name of the annotation spec to show in the interface. The name can be - * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - * - * @property {number} exampleCount - * Output only. The number of examples in the parent dataset - * labeled by the annotation spec. - * - * @typedef AnnotationSpec - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.AnnotationSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/annotation_spec.proto} - */ -const AnnotationSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_classification.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_classification.js deleted file mode 100644 index e22846be32e..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_classification.js +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright 2020 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. - -/** - * Contains annotation details specific to classification. - * - * @property {number} score - * Output only. A confidence estimate between 0.0 and 1.0. A higher value - * means greater confidence that the annotation is positive. If a user - * approves an annotation as negative or positive, the score value remains - * unchanged. If a user creates an annotation, the score is 0 for negative or - * 1 for positive. - * - * @typedef ClassificationAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ClassificationAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} - */ -const ClassificationAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Contains annotation details specific to video classification. - * - * @property {string} type - * Output only. Expresses the type of video classification. Possible values: - * - * * `segment` - Classification done on a specified by user - * time segment of a video. AnnotationSpec is answered to be present - * in that time segment, if it is present in any part of it. The video - * ML model evaluations are done only for this type of classification. - * - * * `shot`- Shot-level classification. - * AutoML Video Intelligence determines the boundaries - * for each camera shot in the entire segment of the video that user - * specified in the request configuration. AutoML Video Intelligence - * then returns labels and their confidence scores for each detected - * shot, along with the start and end time of the shot. - * WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no - * metrics provided to describe that quality. - * - * * `1s_interval` - AutoML Video Intelligence returns labels and their - * confidence scores for each second of the entire segment of the video - * that user specified in the request configuration. - * WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no - * metrics provided to describe that quality. - * - * @property {Object} classificationAnnotation - * Output only . The classification details of this annotation. - * - * This object should have the same structure as [ClassificationAnnotation]{@link google.cloud.automl.v1beta1.ClassificationAnnotation} - * - * @property {Object} timeSegment - * Output only . The time segment of the video to which the - * annotation applies. - * - * This object should have the same structure as [TimeSegment]{@link google.cloud.automl.v1beta1.TimeSegment} - * - * @typedef VideoClassificationAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.VideoClassificationAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} - */ -const VideoClassificationAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model evaluation metrics for classification problems. - * Note: For Video Classification this metrics only describe quality of the - * Video Classification predictions of "segment_classification" type. - * - * @property {number} auPrc - * Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - * for the overall evaluation. - * - * @property {number} baseAuPrc - * Output only. The Area Under Precision-Recall Curve metric based on priors. - * Micro-averaged for the overall evaluation. - * Deprecated. - * - * @property {number} auRoc - * Output only. The Area Under Receiver Operating Characteristic curve metric. - * Micro-averaged for the overall evaluation. - * - * @property {number} logLoss - * Output only. The Log Loss metric. - * - * @property {Object[]} confidenceMetricsEntry - * Output only. Metrics for each confidence_threshold in - * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - * position_threshold = INT32_MAX_VALUE. - * ROC and precision-recall curves, and other aggregated metrics are derived - * from them. The confidence metrics entries may also be supplied for - * additional values of position_threshold, but from these no aggregated - * metrics are computed. - * - * This object should have the same structure as [ConfidenceMetricsEntry]{@link google.cloud.automl.v1beta1.ConfidenceMetricsEntry} - * - * @property {Object} confusionMatrix - * Output only. Confusion matrix of the evaluation. - * Only set for MULTICLASS classification problems where number - * of labels is no more than 10. - * Only set for model level evaluation, not for evaluation per label. - * - * This object should have the same structure as [ConfusionMatrix]{@link google.cloud.automl.v1beta1.ConfusionMatrix} - * - * @property {string[]} annotationSpecId - * Output only. The annotation spec ids used for this evaluation. - * - * @typedef ClassificationEvaluationMetrics - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ClassificationEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} - */ -const ClassificationEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Metrics for a single confidence threshold. - * - * @property {number} confidenceThreshold - * Output only. Metrics are computed with an assumption that the model - * never returns predictions with score lower than this value. - * - * @property {number} positionThreshold - * Output only. Metrics are computed with an assumption that the model - * always returns at most this many predictions (ordered by their score, - * descendingly), but they all still need to meet the confidence_threshold. - * - * @property {number} recall - * Output only. Recall (True Positive Rate) for the given confidence - * threshold. - * - * @property {number} precision - * Output only. Precision for the given confidence threshold. - * - * @property {number} falsePositiveRate - * Output only. False Positive Rate for the given confidence threshold. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @property {number} recallAt1 - * Output only. The Recall (True Positive Rate) when only considering the - * label that has the highest prediction score and not below the confidence - * threshold for each example. - * - * @property {number} precisionAt1 - * Output only. The precision when only considering the label that has the - * highest prediction score and not below the confidence threshold for each - * example. - * - * @property {number} falsePositiveRateAt1 - * Output only. The False Positive Rate when only considering the label that - * has the highest prediction score and not below the confidence threshold - * for each example. - * - * @property {number} f1ScoreAt1 - * Output only. The harmonic mean of recall_at1 and precision_at1. - * - * @property {number} truePositiveCount - * Output only. The number of model created labels that match a ground truth - * label. - * - * @property {number} falsePositiveCount - * Output only. The number of model created labels that do not match a - * ground truth label. - * - * @property {number} falseNegativeCount - * Output only. The number of ground truth labels that are not matched - * by a model created label. - * - * @property {number} trueNegativeCount - * Output only. The number of labels that were not created by the model, - * but if they would, they would not match a ground truth label. - * - * @typedef ConfidenceMetricsEntry - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} - */ - ConfidenceMetricsEntry: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Confusion matrix of the model running the classification. - * - * @property {string[]} annotationSpecId - * Output only. IDs of the annotation specs used in the confusion matrix. - * For Tables CLASSIFICATION - * - * prediction_type - * only list of annotation_spec_display_name-s is populated. - * - * @property {string[]} displayName - * Output only. Display name of the annotation specs used in the confusion - * matrix, as they were at the moment of the evaluation. For Tables - * CLASSIFICATION - * - * prediction_type-s, - * distinct values of the target column at the moment of the model - * evaluation are populated here. - * - * @property {Object[]} row - * Output only. Rows in the confusion matrix. The number of rows is equal to - * the size of `annotation_spec_id`. - * `row[i].example_count[j]` is the number of examples that have ground - * truth of the `annotation_spec_id[i]` and are predicted as - * `annotation_spec_id[j]` by the model being evaluated. - * - * This object should have the same structure as [Row]{@link google.cloud.automl.v1beta1.Row} - * - * @typedef ConfusionMatrix - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} - */ - ConfusionMatrix: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Output only. A row in the confusion matrix. - * - * @property {number[]} exampleCount - * Output only. Value of the specific cell in the confusion matrix. - * The number of values each row has (i.e. the length of the row) is equal - * to the length of the `annotation_spec_id` field or, if that one is not - * populated, length of the display_name field. - * - * @typedef Row - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} - */ - Row: { - // This is for documentation. Actual contents will be loaded by gRPC. - } - } -}; - -/** - * Type of the classification problem. - * - * @enum {number} - * @memberof google.cloud.automl.v1beta1 - */ -const ClassificationType = { - - /** - * An un-set value of this enum. - */ - CLASSIFICATION_TYPE_UNSPECIFIED: 0, - - /** - * At most one label is allowed per example. - */ - MULTICLASS: 1, - - /** - * Multiple labels are allowed for one example. - */ - MULTILABEL: 2 -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_column_spec.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_column_spec.js deleted file mode 100644 index caa73f16bde..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_column_spec.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2020 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 representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were - * given on import . - * Used by: - * * Tables - * - * @property {string} name - * Output only. The resource name of the column specs. - * Form: - * - * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` - * - * @property {Object} dataType - * The data type of elements stored in the column. - * - * This object should have the same structure as [DataType]{@link google.cloud.automl.v1beta1.DataType} - * - * @property {string} displayName - * Output only. The name of the column to show in the interface. The name can - * be up to 100 characters long and can consist only of ASCII Latin letters - * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and - * must start with a letter or a digit. - * - * @property {Object} dataStats - * Output only. Stats of the series of values in the column. - * This field may be stale, see the ancestor's - * Dataset.tables_dataset_metadata.stats_update_time field - * for the timestamp at which these stats were last updated. - * - * This object should have the same structure as [DataStats]{@link google.cloud.automl.v1beta1.DataStats} - * - * @property {Object[]} topCorrelatedColumns - * Deprecated. - * - * This object should have the same structure as [CorrelatedColumn]{@link google.cloud.automl.v1beta1.CorrelatedColumn} - * - * @property {string} etag - * Used to perform consistent read-modify-write updates. If not set, a blind - * "overwrite" update happens. - * - * @typedef ColumnSpec - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ColumnSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/column_spec.proto} - */ -const ColumnSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Identifies the table's column, and its correlation with the column this - * ColumnSpec describes. - * - * @property {string} columnSpecId - * The column_spec_id of the correlated column, which belongs to the same - * table as the in-context column. - * - * @property {Object} correlationStats - * Correlation between this and the in-context column. - * - * This object should have the same structure as [CorrelationStats]{@link google.cloud.automl.v1beta1.CorrelationStats} - * - * @typedef CorrelatedColumn - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/column_spec.proto} - */ - CorrelatedColumn: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_items.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_items.js deleted file mode 100644 index 6943536ec86..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_items.js +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright 2020 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 representation of an image. - * Only images up to 30MB in size are supported. - * - * @property {Buffer} imageBytes - * Image content represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * - * @property {Object} inputConfig - * An input config specifying the content of the image. - * - * This object should have the same structure as [InputConfig]{@link google.cloud.automl.v1beta1.InputConfig} - * - * @property {string} thumbnailUri - * Output only. HTTP URI to the thumbnail image. - * - * @typedef Image - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Image definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} - */ -const Image = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A representation of a text snippet. - * - * @property {string} content - * Required. The content of the text snippet as a string. Up to 250000 - * characters long. - * - * @property {string} mimeType - * Optional. The format of content. Currently the only two allowed - * values are "text/html" and "text/plain". If left blank, the format is - * automatically determined from the type of the uploaded content. - * - * @property {string} contentUri - * Output only. HTTP URI where you can download the content. - * - * @typedef TextSnippet - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextSnippet definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} - */ -const TextSnippet = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Message that describes dimension of a document. - * - * @property {number} unit - * Unit of the dimension. - * - * The number should be among the values of [DocumentDimensionUnit]{@link google.cloud.automl.v1beta1.DocumentDimensionUnit} - * - * @property {number} width - * Width value of the document, works together with the unit. - * - * @property {number} height - * Height value of the document, works together with the unit. - * - * @typedef DocumentDimensions - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DocumentDimensions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} - */ -const DocumentDimensions = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Unit of the document dimension. - * - * @enum {number} - * @memberof google.cloud.automl.v1beta1 - */ - DocumentDimensionUnit: { - - /** - * Should not be used. - */ - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED: 0, - - /** - * Document dimension is measured in inches. - */ - INCH: 1, - - /** - * Document dimension is measured in centimeters. - */ - CENTIMETER: 2, - - /** - * Document dimension is measured in points. 72 points = 1 inch. - */ - POINT: 3 - } -}; - -/** - * A structured text document e.g. a PDF. - * - * @property {Object} inputConfig - * An input config specifying the content of the document. - * - * This object should have the same structure as [DocumentInputConfig]{@link google.cloud.automl.v1beta1.DocumentInputConfig} - * - * @property {Object} documentText - * The plain text version of this document. - * - * This object should have the same structure as [TextSnippet]{@link google.cloud.automl.v1beta1.TextSnippet} - * - * @property {Object[]} layout - * Describes the layout of the document. - * Sorted by page_number. - * - * This object should have the same structure as [Layout]{@link google.cloud.automl.v1beta1.Layout} - * - * @property {Object} documentDimensions - * The dimensions of the page in the document. - * - * This object should have the same structure as [DocumentDimensions]{@link google.cloud.automl.v1beta1.DocumentDimensions} - * - * @property {number} pageCount - * Number of pages in the document. - * - * @typedef Document - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} - */ -const Document = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Describes the layout information of a text_segment in the document. - * - * @property {Object} textSegment - * Text Segment that represents a segment in - * document_text. - * - * This object should have the same structure as [TextSegment]{@link google.cloud.automl.v1beta1.TextSegment} - * - * @property {number} pageNumber - * Page number of the text_segment in the original document, starts - * from 1. - * - * @property {Object} boundingPoly - * The position of the text_segment in the page. - * Contains exactly 4 - * - * normalized_vertices - * and they are connected by edges in the order provided, which will - * represent a rectangle parallel to the frame. The - * NormalizedVertex-s are - * relative to the page. - * Coordinates are based on top-left as point (0,0). - * - * This object should have the same structure as [BoundingPoly]{@link google.cloud.automl.v1beta1.BoundingPoly} - * - * @property {number} textSegmentType - * The type of the text_segment in document. - * - * The number should be among the values of [TextSegmentType]{@link google.cloud.automl.v1beta1.TextSegmentType} - * - * @typedef Layout - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Document.Layout definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} - */ - Layout: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The type of TextSegment in the context of the original document. - * - * @enum {number} - * @memberof google.cloud.automl.v1beta1 - */ - TextSegmentType: { - - /** - * Should not be used. - */ - TEXT_SEGMENT_TYPE_UNSPECIFIED: 0, - - /** - * The text segment is a token. e.g. word. - */ - TOKEN: 1, - - /** - * The text segment is a paragraph. - */ - PARAGRAPH: 2, - - /** - * The text segment is a form field. - */ - FORM_FIELD: 3, - - /** - * The text segment is the name part of a form field. It will be treated - * as child of another FORM_FIELD TextSegment if its span is subspan of - * another TextSegment with type FORM_FIELD. - */ - FORM_FIELD_NAME: 4, - - /** - * The text segment is the text content part of a form field. It will be - * treated as child of another FORM_FIELD TextSegment if its span is - * subspan of another TextSegment with type FORM_FIELD. - */ - FORM_FIELD_CONTENTS: 5, - - /** - * The text segment is a whole table, including headers, and all rows. - */ - TABLE: 6, - - /** - * The text segment is a table's headers. It will be treated as child of - * another TABLE TextSegment if its span is subspan of another TextSegment - * with type TABLE. - */ - TABLE_HEADER: 7, - - /** - * The text segment is a row in table. It will be treated as child of - * another TABLE TextSegment if its span is subspan of another TextSegment - * with type TABLE. - */ - TABLE_ROW: 8, - - /** - * The text segment is a cell in table. It will be treated as child of - * another TABLE_ROW TextSegment if its span is subspan of another - * TextSegment with type TABLE_ROW. - */ - TABLE_CELL: 9 - } - } -}; - -/** - * A representation of a row in a relational table. - * - * @property {string[]} columnSpecIds - * The resource IDs of the column specs describing the columns of the row. - * If set must contain, but possibly in a different order, all input - * feature - * - * column_spec_ids - * of the Model this row is being passed to. - * Note: The below `values` field must match order of this field, if this - * field is set. - * - * @property {Object[]} values - * Required. The values of the row cells, given in the same order as the - * column_spec_ids, or, if not set, then in the same order as input - * feature - * - * column_specs - * of the Model this row is being passed to. - * - * This object should have the same structure as [Value]{@link google.protobuf.Value} - * - * @typedef Row - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Row definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} - */ -const Row = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Example data used for training or prediction. - * - * @property {Object} image - * Example image. - * - * This object should have the same structure as [Image]{@link google.cloud.automl.v1beta1.Image} - * - * @property {Object} textSnippet - * Example text. - * - * This object should have the same structure as [TextSnippet]{@link google.cloud.automl.v1beta1.TextSnippet} - * - * @property {Object} document - * Example document. - * - * This object should have the same structure as [Document]{@link google.cloud.automl.v1beta1.Document} - * - * @property {Object} row - * Example relational table row. - * - * This object should have the same structure as [Row]{@link google.cloud.automl.v1beta1.Row} - * - * @typedef ExamplePayload - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ExamplePayload definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} - */ -const ExamplePayload = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_stats.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_stats.js deleted file mode 100644 index a4a86dc3ece..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_stats.js +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright 2020 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. - -/** - * The data statistics of a series of values that share the same DataType. - * - * @property {Object} float64Stats - * The statistics for FLOAT64 DataType. - * - * This object should have the same structure as [Float64Stats]{@link google.cloud.automl.v1beta1.Float64Stats} - * - * @property {Object} stringStats - * The statistics for STRING DataType. - * - * This object should have the same structure as [StringStats]{@link google.cloud.automl.v1beta1.StringStats} - * - * @property {Object} timestampStats - * The statistics for TIMESTAMP DataType. - * - * This object should have the same structure as [TimestampStats]{@link google.cloud.automl.v1beta1.TimestampStats} - * - * @property {Object} arrayStats - * The statistics for ARRAY DataType. - * - * This object should have the same structure as [ArrayStats]{@link google.cloud.automl.v1beta1.ArrayStats} - * - * @property {Object} structStats - * The statistics for STRUCT DataType. - * - * This object should have the same structure as [StructStats]{@link google.cloud.automl.v1beta1.StructStats} - * - * @property {Object} categoryStats - * The statistics for CATEGORY DataType. - * - * This object should have the same structure as [CategoryStats]{@link google.cloud.automl.v1beta1.CategoryStats} - * - * @property {number} distinctValueCount - * The number of distinct values. - * - * @property {number} nullValueCount - * The number of values that are null. - * - * @property {number} validValueCount - * The number of values that are valid. - * - * @typedef DataStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DataStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const DataStats = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The data statistics of a series of FLOAT64 values. - * - * @property {number} mean - * The mean of the series. - * - * @property {number} standardDeviation - * The standard deviation of the series. - * - * @property {number[]} quantiles - * Ordered from 0 to k k-quantile values of the data series of n values. - * The value at index i is, approximately, the i*n/k-th smallest value in the - * series; for i = 0 and i = k these are, respectively, the min and max - * values. - * - * @property {Object[]} histogramBuckets - * Histogram buckets of the data series. Sorted by the min value of the - * bucket, ascendingly, and the number of the buckets is dynamically - * generated. The buckets are non-overlapping and completely cover whole - * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of - * the last one being `"Infinity"`. - * - * This object should have the same structure as [HistogramBucket]{@link google.cloud.automl.v1beta1.HistogramBucket} - * - * @typedef Float64Stats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Float64Stats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const Float64Stats = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * A bucket of a histogram. - * - * @property {number} min - * The minimum value of the bucket, inclusive. - * - * @property {number} max - * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in - * which case it's inclusive. - * - * @property {number} count - * The number of data values that are in the bucket, i.e. are between - * min and max values. - * - * @typedef HistogramBucket - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Float64Stats.HistogramBucket definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ - HistogramBucket: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * The data statistics of a series of STRING values. - * - * @property {Object[]} topUnigramStats - * The statistics of the top 20 unigrams, ordered by - * count. - * - * This object should have the same structure as [UnigramStats]{@link google.cloud.automl.v1beta1.UnigramStats} - * - * @typedef StringStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.StringStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const StringStats = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The statistics of a unigram. - * - * @property {string} value - * The unigram. - * - * @property {number} count - * The number of occurrences of this unigram in the series. - * - * @typedef UnigramStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.StringStats.UnigramStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ - UnigramStats: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * The data statistics of a series of TIMESTAMP values. - * - * @property {Object.} granularStats - * The string key is the pre-defined granularity. Currently supported: - * hour_of_day, day_of_week, month_of_year. - * Granularities finer that the granularity of timestamp data are not - * populated (e.g. if timestamps are at day granularity, then hour_of_day - * is not populated). - * - * @typedef TimestampStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TimestampStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const TimestampStats = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Stats split by a defined in context granularity. - * - * @property {Object.} buckets - * A map from granularity key to example count for that key. - * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). - * - * @typedef GranularStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TimestampStats.GranularStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ - GranularStats: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * The data statistics of a series of ARRAY values. - * - * @property {Object} memberStats - * Stats of all the values of all arrays, as if they were a single long - * series of data. The type depends on the element type of the array. - * - * This object should have the same structure as [DataStats]{@link google.cloud.automl.v1beta1.DataStats} - * - * @typedef ArrayStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ArrayStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const ArrayStats = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The data statistics of a series of STRUCT values. - * - * @property {Object.} fieldStats - * Map from a field name of the struct to data stats aggregated over series - * of all data in that field across all the structs. - * - * @typedef StructStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.StructStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const StructStats = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The data statistics of a series of CATEGORY values. - * - * @property {Object[]} topCategoryStats - * The statistics of the top 20 CATEGORY values, ordered by - * - * count. - * - * This object should have the same structure as [SingleCategoryStats]{@link google.cloud.automl.v1beta1.SingleCategoryStats} - * - * @typedef CategoryStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.CategoryStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const CategoryStats = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The statistics of a single CATEGORY value. - * - * @property {string} value - * The CATEGORY value. - * - * @property {number} count - * The number of occurrences of this value in the series. - * - * @typedef SingleCategoryStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ - SingleCategoryStats: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * A correlation statistics between two series of DataType values. The series - * may have differing DataType-s, but within a single series the DataType must - * be the same. - * - * @property {number} cramersV - * The correlation value using the Cramer's V measure. - * - * @typedef CorrelationStats - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.CorrelationStats definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_stats.proto} - */ -const CorrelationStats = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_types.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_types.js deleted file mode 100644 index 050b066f13a..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_types.js +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2020 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. - -/** - * Indicated the type of data that can be stored in a structured data entity - * (e.g. a table). - * - * @property {Object} listElementType - * If type_code == ARRAY, - * then `list_element_type` is the type of the elements. - * - * This object should have the same structure as [DataType]{@link google.cloud.automl.v1beta1.DataType} - * - * @property {Object} structType - * If type_code == STRUCT, then `struct_type` - * provides type information for the struct's fields. - * - * This object should have the same structure as [StructType]{@link google.cloud.automl.v1beta1.StructType} - * - * @property {string} timeFormat - * If type_code == TIMESTAMP - * then `time_format` provides the format in which that time field is - * expressed. The time_format must either be one of: - * * `UNIX_SECONDS` - * * `UNIX_MILLISECONDS` - * * `UNIX_MICROSECONDS` - * * `UNIX_NANOSECONDS` - * (for respectively number of seconds, milliseconds, microseconds and - * nanoseconds since start of the Unix epoch); - * or be written in `strftime` syntax. If time_format is not set, then the - * default format as described on the type_code is used. - * - * @property {number} typeCode - * Required. The TypeCode for this type. - * - * The number should be among the values of [TypeCode]{@link google.cloud.automl.v1beta1.TypeCode} - * - * @property {boolean} nullable - * If true, this DataType can also be `NULL`. In .CSV files `NULL` value is - * expressed as an empty string. - * - * @typedef DataType - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DataType definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_types.proto} - */ -const DataType = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `StructType` defines the DataType-s of a STRUCT type. - * - * @property {Object.} fields - * Unordered map of struct field names to their data types. - * Fields cannot be added or removed via Update. Their names and - * data types are still mutable. - * - * @typedef StructType - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.StructType definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_types.proto} - */ -const StructType = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `TypeCode` is used as a part of - * DataType. - * - * @enum {number} - * @memberof google.cloud.automl.v1beta1 - */ -const TypeCode = { - - /** - * Not specified. Should not be used. - */ - TYPE_CODE_UNSPECIFIED: 0, - - /** - * Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or - * `"-Infinity"`. - */ - FLOAT64: 3, - - /** - * Must be between 0AD and 9999AD. Encoded as `string` according to - * time_format, or, if - * that format is not set, then in RFC 3339 `date-time` format, where - * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). - */ - TIMESTAMP: 4, - - /** - * Encoded as `string`. - */ - STRING: 6, - - /** - * Encoded as `list`, where the list elements are represented according to - * - * list_element_type. - */ - ARRAY: 8, - - /** - * Encoded as `struct`, where field values are represented according to - * struct_type. - */ - STRUCT: 9, - - /** - * Values of this type are not further understood by AutoML, - * e.g. AutoML is unable to tell the order of values (as it could with - * FLOAT64), or is unable to say if one value contains another (as it - * could with STRING). - * Encoded as `string` (bytes should be base64-encoded, as described in RFC - * 4648, section 4). - */ - CATEGORY: 10 -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_dataset.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_dataset.js deleted file mode 100644 index 16667f2472c..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_dataset.js +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2020 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 workspace for solving a single, particular machine learning (ML) problem. - * A workspace contains examples that may be annotated. - * - * @property {Object} translationDatasetMetadata - * Metadata for a dataset used for translation. - * - * This object should have the same structure as [TranslationDatasetMetadata]{@link google.cloud.automl.v1beta1.TranslationDatasetMetadata} - * - * @property {Object} imageClassificationDatasetMetadata - * Metadata for a dataset used for image classification. - * - * This object should have the same structure as [ImageClassificationDatasetMetadata]{@link google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} - * - * @property {Object} textClassificationDatasetMetadata - * Metadata for a dataset used for text classification. - * - * This object should have the same structure as [TextClassificationDatasetMetadata]{@link google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} - * - * @property {Object} imageObjectDetectionDatasetMetadata - * Metadata for a dataset used for image object detection. - * - * This object should have the same structure as [ImageObjectDetectionDatasetMetadata]{@link google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} - * - * @property {Object} videoClassificationDatasetMetadata - * Metadata for a dataset used for video classification. - * - * This object should have the same structure as [VideoClassificationDatasetMetadata]{@link google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} - * - * @property {Object} videoObjectTrackingDatasetMetadata - * Metadata for a dataset used for video object tracking. - * - * This object should have the same structure as [VideoObjectTrackingDatasetMetadata]{@link google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} - * - * @property {Object} textExtractionDatasetMetadata - * Metadata for a dataset used for text extraction. - * - * This object should have the same structure as [TextExtractionDatasetMetadata]{@link google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} - * - * @property {Object} textSentimentDatasetMetadata - * Metadata for a dataset used for text sentiment. - * - * This object should have the same structure as [TextSentimentDatasetMetadata]{@link google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} - * - * @property {Object} tablesDatasetMetadata - * Metadata for a dataset used for Tables. - * - * This object should have the same structure as [TablesDatasetMetadata]{@link google.cloud.automl.v1beta1.TablesDatasetMetadata} - * - * @property {string} name - * Output only. The resource name of the dataset. - * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - * - * @property {string} displayName - * Required. The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores - * (_), and ASCII digits 0-9. - * - * @property {string} description - * User-provided description of the dataset. The description can be up to - * 25000 characters long. - * - * @property {number} exampleCount - * Output only. The number of examples in the dataset. - * - * @property {Object} createTime - * Output only. Timestamp when this dataset was created. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {string} etag - * Used to perform consistent read-modify-write updates. If not set, a blind - * "overwrite" update happens. - * - * @typedef Dataset - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Dataset definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/dataset.proto} - */ -const Dataset = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_detection.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_detection.js deleted file mode 100644 index 8292014e91c..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_detection.js +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2020 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. - -/** - * Annotation details for image object detection. - * - * @property {Object} boundingBox - * Output only. The rectangle representing the object location. - * - * This object should have the same structure as [BoundingPoly]{@link google.cloud.automl.v1beta1.BoundingPoly} - * - * @property {number} score - * Output only. The confidence that this annotation is positive for the parent example, - * value in [0, 1], higher means higher positivity confidence. - * - * @typedef ImageObjectDetectionAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/detection.proto} - */ -const ImageObjectDetectionAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Annotation details for video object tracking. - * - * @property {string} instanceId - * Optional. The instance of the object, expressed as a positive integer. Used to tell - * apart objects of the same type (i.e. AnnotationSpec) when multiple are - * present on a single example. - * NOTE: Instance ID prediction quality is not a part of model evaluation and - * is done as best effort. Especially in cases when an entity goes - * off-screen for a longer time (minutes), when it comes back it may be given - * a new instance ID. - * - * @property {Object} timeOffset - * Required. A time (frame) of a video to which this annotation pertains. - * Represented as the duration since the video's start. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} boundingBox - * Required. The rectangle representing the object location on the frame (i.e. - * at the time_offset of the video). - * - * This object should have the same structure as [BoundingPoly]{@link google.cloud.automl.v1beta1.BoundingPoly} - * - * @property {number} score - * Output only. The confidence that this annotation is positive for the video at - * the time_offset, value in [0, 1], higher means higher positivity - * confidence. For annotations created by the user the score is 1. When - * user approves an annotation, the original float score is kept (and not - * changed to 1). - * - * @typedef VideoObjectTrackingAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/detection.proto} - */ -const VideoObjectTrackingAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Bounding box matching model metrics for a single intersection-over-union - * threshold and multiple label match confidence thresholds. - * - * @property {number} iouThreshold - * Output only. The intersection-over-union threshold value used to compute - * this metrics entry. - * - * @property {number} meanAveragePrecision - * Output only. The mean average precision, most often close to au_prc. - * - * @property {Object[]} confidenceMetricsEntries - * Output only. Metrics for each label-match confidence_threshold from - * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - * derived from them. - * - * This object should have the same structure as [ConfidenceMetricsEntry]{@link google.cloud.automl.v1beta1.ConfidenceMetricsEntry} - * - * @typedef BoundingBoxMetricsEntry - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BoundingBoxMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/detection.proto} - */ -const BoundingBoxMetricsEntry = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Metrics for a single confidence threshold. - * - * @property {number} confidenceThreshold - * Output only. The confidence threshold value used to compute the metrics. - * - * @property {number} recall - * Output only. Recall under the given confidence threshold. - * - * @property {number} precision - * Output only. Precision under the given confidence threshold. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @typedef ConfidenceMetricsEntry - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/detection.proto} - */ - ConfidenceMetricsEntry: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * Model evaluation metrics for image object detection problems. - * Evaluates prediction quality of labeled bounding boxes. - * - * @property {number} evaluatedBoundingBoxCount - * Output only. The total number of bounding boxes (i.e. summed over all - * images) the ground truth used to create this evaluation had. - * - * @property {Object[]} boundingBoxMetricsEntries - * Output only. The bounding boxes match metrics for each - * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - * pair. - * - * This object should have the same structure as [BoundingBoxMetricsEntry]{@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} - * - * @property {number} boundingBoxMeanAveragePrecision - * Output only. The single metric for bounding boxes evaluation: - * the mean_average_precision averaged over all bounding_box_metrics_entries. - * - * @typedef ImageObjectDetectionEvaluationMetrics - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/detection.proto} - */ -const ImageObjectDetectionEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model evaluation metrics for video object tracking problems. - * Evaluates prediction quality of both labeled bounding boxes and labeled - * tracks (i.e. series of bounding boxes sharing same label and instance ID). - * - * @property {number} evaluatedFrameCount - * Output only. The number of video frames used to create this evaluation. - * - * @property {number} evaluatedBoundingBoxCount - * Output only. The total number of bounding boxes (i.e. summed over all - * frames) the ground truth used to create this evaluation had. - * - * @property {Object[]} boundingBoxMetricsEntries - * Output only. The bounding boxes match metrics for each - * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - * pair. - * - * This object should have the same structure as [BoundingBoxMetricsEntry]{@link google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} - * - * @property {number} boundingBoxMeanAveragePrecision - * Output only. The single metric for bounding boxes evaluation: - * the mean_average_precision averaged over all bounding_box_metrics_entries. - * - * @typedef VideoObjectTrackingEvaluationMetrics - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/detection.proto} - */ -const VideoObjectTrackingEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_geometry.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_geometry.js deleted file mode 100644 index ccfc4a2c9a0..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_geometry.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2020 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 vertex represents a 2D point in the image. - * The normalized vertex coordinates are between 0 to 1 fractions relative to - * the original plane (image, video). E.g. if the plane (e.g. whole image) would - * have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would - * be at the position (1, 6) on that plane. - * - * @property {number} x - * Required. Horizontal coordinate. - * - * @property {number} y - * Required. Vertical coordinate. - * - * @typedef NormalizedVertex - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.NormalizedVertex definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/geometry.proto} - */ -const NormalizedVertex = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A bounding polygon of a detected object on a plane. - * On output both vertices and normalized_vertices are provided. - * The polygon is formed by connecting vertices in the order they are listed. - * - * @property {Object[]} normalizedVertices - * Output only . The bounding polygon normalized vertices. - * - * This object should have the same structure as [NormalizedVertex]{@link google.cloud.automl.v1beta1.NormalizedVertex} - * - * @typedef BoundingPoly - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BoundingPoly definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/geometry.proto} - */ -const BoundingPoly = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_image.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_image.js deleted file mode 100644 index 6e540b59d11..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_image.js +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2020 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. - -/** - * Dataset metadata that is specific to image classification. - * - * @property {number} classificationType - * Required. Type of the classification problem. - * - * The number should be among the values of [ClassificationType]{@link google.cloud.automl.v1beta1.ClassificationType} - * - * @typedef ImageClassificationDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} - */ -const ImageClassificationDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Dataset metadata specific to image object detection. - * @typedef ImageObjectDetectionDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} - */ -const ImageObjectDetectionDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata for image classification. - * - * @property {string} baseModelId - * Optional. The ID of the `base` model. If it is specified, the new model - * will be created based on the `base` model. Otherwise, the new model will be - * created from scratch. The `base` model must be in the same - * `project` and `location` as the new model to create, and have the same - * `model_type`. - * - * @property {number} trainBudget - * Required. The train budget of creating this model, expressed in hours. The - * actual `train_cost` will be equal or less than this value. - * - * @property {number} trainCost - * Output only. The actual train cost of creating this model, expressed in - * hours. If this model is created from a `base` model, the train cost used - * to create the `base` model are not included. - * - * @property {string} stopReason - * Output only. The reason that this create model operation stopped, - * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - * - * @property {string} modelType - * Optional. Type of the model. The available values are: - * * `cloud` - Model to be used via prediction calls to AutoML API. - * This is the default value. - * * `mobile-low-latency-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. - * * `mobile-versatile-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. - * * `mobile-high-accuracy-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. - * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. - * * `mobile-core-ml-versatile-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile device with Core - * ML afterwards. - * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - * providing prediction via AutoML API, can also be exported - * (see AutoMl.ExportModel) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. - * - * @property {number} nodeQps - * Output only. An approximate number of online prediction QPS that can - * be supported by this model per each node on which it is deployed. - * - * @property {number} nodeCount - * Output only. The number of nodes this model is deployed on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the node_qps field. - * - * @typedef ImageClassificationModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageClassificationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} - */ -const ImageClassificationModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata specific to image object detection. - * - * @property {string} modelType - * Optional. Type of the model. The available values are: - * * `cloud-high-accuracy-1` - (default) A model to be used via prediction - * calls to AutoML API. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. - * * `cloud-low-latency-1` - A model to be used via prediction - * calls to AutoML API. Expected to have low latency, but may - * have lower prediction quality than other models. - * * `mobile-low-latency-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. - * * `mobile-versatile-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. - * * `mobile-high-accuracy-1` - A model that, in addition to providing - * prediction via AutoML API, can also be exported (see - * AutoMl.ExportModel) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. - * - * @property {number} nodeCount - * Output only. The number of nodes this model is deployed on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the qps_per_node field. - * - * @property {number} nodeQps - * Output only. An approximate number of online prediction QPS that can - * be supported by this model per each node on which it is deployed. - * - * @property {string} stopReason - * Output only. The reason that this create model operation stopped, - * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - * - * @property {number} trainBudgetMilliNodeHours - * The train budget of creating this model, expressed in milli node - * hours i.e. 1,000 value in this field means 1 node hour. The actual - * `train_cost` will be equal or less than this value. If further model - * training ceases to provide any improvements, it will stop without using - * full budget and the stop_reason will be `MODEL_CONVERGED`. - * Note, node_hour = actual_hour * number_of_nodes_invovled. - * For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - * the train budget must be between 20,000 and 900,000 milli node hours, - * inclusive. The default value is 216, 000 which represents one day in - * wall time. - * For model type `mobile-low-latency-1`, `mobile-versatile-1`, - * `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - * `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - * budget must be between 1,000 and 100,000 milli node hours, inclusive. - * The default value is 24, 000 which represents one day in wall time. - * - * @property {number} trainCostMilliNodeHours - * Output only. The actual train cost of creating this model, expressed in - * milli node hours, i.e. 1,000 value in this field means 1 node hour. - * Guaranteed to not exceed the train budget. - * - * @typedef ImageObjectDetectionModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} - */ -const ImageObjectDetectionModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model deployment metadata specific to Image Classification. - * - * @property {number} nodeCount - * Input only. The number of nodes to deploy the model on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the model's - * - * node_qps. - * Must be between 1 and 100, inclusive on both ends. - * - * @typedef ImageClassificationModelDeploymentMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} - */ -const ImageClassificationModelDeploymentMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model deployment metadata specific to Image Object Detection. - * - * @property {number} nodeCount - * Input only. The number of nodes to deploy the model on. A node is an - * abstraction of a machine resource, which can handle online prediction QPS - * as given in the model's - * - * qps_per_node. - * Must be between 1 and 100, inclusive on both ends. - * - * @typedef ImageObjectDetectionModelDeploymentMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} - */ -const ImageObjectDetectionModelDeploymentMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_io.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_io.js deleted file mode 100644 index 554d1f33232..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_io.js +++ /dev/null @@ -1,1224 +0,0 @@ -// Copyright 2020 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. - -/** - * Input configuration for ImportData Action. - * - * The format of input depends on dataset_metadata the Dataset into which - * the import is happening has. As input source the - * gcs_source - * is expected, unless specified otherwise. Additionally any input .CSV file - * by itself must be 100MB or smaller, unless specified otherwise. - * If an "example" file (that is, image, video etc.) with identical content - * (even if it had different GCS_FILE_PATH) is mentioned multiple times, then - * its label, bounding boxes etc. are appended. The same file should be always - * provided with the same ML_USE and GCS_FILE_PATH, if it is not, then - * these values are nondeterministically selected from the given ones. - * - * The formats are represented in EBNF with commas being literal and with - * non-terminal symbols defined near the end of this comment. The formats are: - * - * * For Image Classification: - * CSV file(s) with each line in format: - * ML_USE,GCS_FILE_PATH,LABEL,LABEL,... - * GCS_FILE_PATH leads to image of up to 30MB in size. Supported - * extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO - * For MULTICLASS classification type, at most one LABEL is allowed - * per image. If an image has not yet been labeled, then it should be - * mentioned just once with no LABEL. - * Some sample rows: - * TRAIN,gs://folder/image1.jpg,daisy - * TEST,gs://folder/image2.jpg,dandelion,tulip,rose - * UNASSIGNED,gs://folder/image3.jpg,daisy - * UNASSIGNED,gs://folder/image4.jpg - * - * * For Image Object Detection: - * CSV file(s) with each line in format: - * ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) - * GCS_FILE_PATH leads to image of up to 30MB in size. Supported - * extensions: .JPEG, .GIF, .PNG. - * Each image is assumed to be exhaustively labeled. The minimum - * allowed BOUNDING_BOX edge length is 0.01, and no more than 500 - * BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined - * per line). If an image has not yet been labeled, then it should be - * mentioned just once with no LABEL and the ",,,,,,," in place of the - * BOUNDING_BOX. For images which are known to not contain any - * bounding boxes, they should be labelled explictly as - * "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the - * BOUNDING_BOX. - * Sample rows: - * TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, - * TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, - * UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 - * TEST,gs://folder/im3.png,,,,,,,,, - * TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, - * - * * For Video Classification: - * CSV file(s) with each line in format: - * ML_USE,GCS_FILE_PATH - * where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - * should lead to another .csv file which describes examples that have - * given ML_USE, using the following row format: - * GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) - * Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - * to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - * length of the video, and end has to be after the start. Any segment - * of a video which has one or more labels on it, is considered a - * hard negative for all other labels. Any segment with no labels on - * it is considered to be unknown. If a whole video is unknown, then - * it shuold be mentioned just once with ",," in place of LABEL, - * TIME_SEGMENT_START,TIME_SEGMENT_END. - * Sample top level CSV file: - * TRAIN,gs://folder/train_videos.csv - * TEST,gs://folder/test_videos.csv - * UNASSIGNED,gs://folder/other_videos.csv - * Sample rows of a CSV file for a particular ML_USE: - * gs://folder/video1.avi,car,120,180.000021 - * gs://folder/video1.avi,bike,150,180.000021 - * gs://folder/vid2.avi,car,0,60.5 - * gs://folder/vid3.avi,,, - * - * * For Video Object Tracking: - * CSV file(s) with each line in format: - * ML_USE,GCS_FILE_PATH - * where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - * should lead to another .csv file which describes examples that have - * given ML_USE, using one of the following row format: - * GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX - * or - * GCS_FILE_PATH,,,,,,,,,, - * Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - * to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * Providing INSTANCE_IDs can help to obtain a better model. When - * a specific labeled entity leaves the video frame, and shows up - * afterwards it is not required, albeit preferable, that the same - * INSTANCE_ID is given to it. - * TIMESTAMP must be within the length of the video, the - * BOUNDING_BOX is assumed to be drawn on the closest video's frame - * to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected - * to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per - * frame are allowed. If a whole video is unknown, then it should be - * mentioned just once with ",,,,,,,,,," in place of LABEL, - * [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. - * Sample top level CSV file: - * TRAIN,gs://folder/train_videos.csv - * TEST,gs://folder/test_videos.csv - * UNASSIGNED,gs://folder/other_videos.csv - * Seven sample rows of a CSV file for a particular ML_USE: - * gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 - * gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 - * gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 - * gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, - * gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, - * gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, - * gs://folder/video2.avi,,,,,,,,,,, - * * For Text Extraction: - * CSV file(s) with each line in format: - * ML_USE,GCS_FILE_PATH - * GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which - * either imports text in-line or as documents. Any given - * .JSONL file must be 100MB or smaller. - * The in-line .JSONL file contains, per line, a proto that wraps a - * TextSnippet proto (in json representation) followed by one or more - * AnnotationPayload protos (called annotations), which have - * display_name and text_extraction detail populated. The given text - * is expected to be annotated exhaustively, for example, if you look - * for animals and text contains "dolphin" that is not labeled, then - * "dolphin" is assumed to not be an animal. Any given text snippet - * content must be 10KB or smaller, and also be UTF-8 NFC encoded - * (ASCII already is). - * The document .JSONL file contains, per line, a proto that wraps a - * Document proto. The Document proto must have either document_text - * or input_config set. In document_text case, the Document proto may - * also contain the spatial information of the document, including - * layout, document dimension and page number. In input_config case, - * only PDF documents are supported now, and each document may be up - * to 2MB large. Currently, annotations on documents cannot be - * specified at import. - * Three sample CSV rows: - * TRAIN,gs://folder/file1.jsonl - * VALIDATE,gs://folder/file2.jsonl - * TEST,gs://folder/file3.jsonl - * Sample in-line JSON Lines file for entity extraction (presented here - * with artificial line breaks, but the only actual line break is - * denoted by \n).: - * { - * "document": { - * "document_text": {"content": "dog cat"} - * "layout": [ - * { - * "text_segment": { - * "start_offset": 0, - * "end_offset": 3, - * }, - * "page_number": 1, - * "bounding_poly": { - * "normalized_vertices": [ - * {"x": 0.1, "y": 0.1}, - * {"x": 0.1, "y": 0.3}, - * {"x": 0.3, "y": 0.3}, - * {"x": 0.3, "y": 0.1}, - * ], - * }, - * "text_segment_type": TOKEN, - * }, - * { - * "text_segment": { - * "start_offset": 4, - * "end_offset": 7, - * }, - * "page_number": 1, - * "bounding_poly": { - * "normalized_vertices": [ - * {"x": 0.4, "y": 0.1}, - * {"x": 0.4, "y": 0.3}, - * {"x": 0.8, "y": 0.3}, - * {"x": 0.8, "y": 0.1}, - * ], - * }, - * "text_segment_type": TOKEN, - * } - * - * ], - * "document_dimensions": { - * "width": 8.27, - * "height": 11.69, - * "unit": INCH, - * } - * "page_count": 1, - * }, - * "annotations": [ - * { - * "display_name": "animal", - * "text_extraction": {"text_segment": {"start_offset": 0, - * "end_offset": 3}} - * }, - * { - * "display_name": "animal", - * "text_extraction": {"text_segment": {"start_offset": 4, - * "end_offset": 7}} - * } - * ], - * }\n - * { - * "text_snippet": { - * "content": "This dog is good." - * }, - * "annotations": [ - * { - * "display_name": "animal", - * "text_extraction": { - * "text_segment": {"start_offset": 5, "end_offset": 8} - * } - * } - * ] - * } - * Sample document JSON Lines file (presented here with artificial line - * breaks, but the only actual line break is denoted by \n).: - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - * } - * } - * } - * }\n - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - * } - * } - * } - * } - * - * * For Text Classification: - * CSV file(s) with each line in format: - * ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... - * TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - * the column content is a valid gcs file path, i.e. prefixed by - * "gs://", it will be treated as a GCS_FILE_PATH, else if the content - * is enclosed within double quotes (""), it is - * treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - * must lead to a .txt file with UTF-8 encoding, for example, - * "gs://folder/content.txt", and the content in it is extracted - * as a text snippet. In TEXT_SNIPPET case, the column content - * excluding quotes is treated as to be imported text snippet. In - * both cases, the text snippet/file size must be within 128kB. - * Maximum 100 unique labels are allowed per CSV row. - * Sample rows: - * TRAIN,"They have bad food and very rude",RudeService,BadFood - * TRAIN,gs://folder/content.txt,SlowService - * TEST,"Typically always bad service there.",RudeService - * VALIDATE,"Stomach ache to go.",BadFood - * - * * For Text Sentiment: - * CSV file(s) with each line in format: - * ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT - * TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - * the column content is a valid gcs file path, that is, prefixed by - * "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated - * as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - * must lead to a .txt file with UTF-8 encoding, for example, - * "gs://folder/content.txt", and the content in it is extracted - * as a text snippet. In TEXT_SNIPPET case, the column content itself - * is treated as to be imported text snippet. In both cases, the - * text snippet must be up to 500 characters long. - * Sample rows: - * TRAIN,"@freewrytin this is way too good for your product",2 - * TRAIN,"I need this product so bad",3 - * TEST,"Thank you for this product.",4 - * VALIDATE,gs://folder/content.txt,2 - * - * * For Tables: - * Either - * gcs_source or - * - * bigquery_source - * can be used. All inputs is concatenated into a single - * - * primary_table - * For gcs_source: - * CSV file(s), where the first row of the first file is the header, - * containing unique column names. If the first row of a subsequent - * file is the same as the header, then it is also treated as a - * header. All other rows contain values for the corresponding - * columns. - * Each .CSV file by itself must be 10GB or smaller, and their total - * size must be 100GB or smaller. - * First three sample rows of a CSV file: - * "Id","First Name","Last Name","Dob","Addresses" - * - * "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - * - * "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - * For bigquery_source: - * An URI of a BigQuery table. The user data size of the BigQuery - * table must be 100GB or smaller. - * An imported table must have between 2 and 1,000 columns, inclusive, - * and between 1000 and 100,000,000 rows, inclusive. There are at most 5 - * import data running in parallel. - * Definitions: - * ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" - * Describes how the given example (file) should be used for model - * training. "UNASSIGNED" can be used when user has no preference. - * GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". - * LABEL = A display name of an object on an image, video etc., e.g. "dog". - * Must be up to 32 characters long and can consist only of ASCII - * Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. - * For each label an AnnotationSpec is created which display_name - * becomes the label; AnnotationSpecs are given back in predictions. - * INSTANCE_ID = A positive integer that identifies a specific instance of a - * labeled entity on an example. Used e.g. to track two cars on - * a video while being able to tell apart which one is which. - * BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, - * A rectangle parallel to the frame of the example (image, - * video). If 4 vertices are given they are connected by edges - * in the order provided, if 2 are given they are recognized - * as diagonally opposite vertices of the rectangle. - * VERTEX = COORDINATE,COORDINATE - * First coordinate is horizontal (x), the second is vertical (y). - * COORDINATE = A float in 0 to 1 range, relative to total length of - * image or video in given dimension. For fractions the - * leading non-decimal 0 can be omitted (i.e. 0.3 = .3). - * Point 0,0 is in top left. - * TIME_SEGMENT_START = TIME_OFFSET - * Expresses a beginning, inclusive, of a time segment - * within an example that has a time dimension - * (e.g. video). - * TIME_SEGMENT_END = TIME_OFFSET - * Expresses an end, exclusive, of a time segment within - * an example that has a time dimension (e.g. video). - * TIME_OFFSET = A number of seconds as measured from the start of an - * example (e.g. video). Fractions are allowed, up to a - * microsecond precision. "inf" is allowed, and it means the end - * of the example. - * TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - * double quotes (""). - * SENTIMENT = An integer between 0 and - * Dataset.text_sentiment_dataset_metadata.sentiment_max - * (inclusive). Describes the ordinal of the sentiment - higher - * value means a more positive sentiment. All the values are - * completely relative, i.e. neither 0 needs to mean a negative or - * neutral sentiment nor sentiment_max needs to mean a positive one - * - it is just required that 0 is the least positive sentiment - * in the data, and sentiment_max is the most positive one. - * The SENTIMENT shouldn't be confused with "score" or "magnitude" - * from the previous Natural Language Sentiment Analysis API. - * All SENTIMENT values between 0 and sentiment_max must be - * represented in the imported data. On prediction the same 0 to - * sentiment_max range will be used. The difference between - * neighboring sentiment values needs not to be uniform, e.g. 1 and - * 2 may be similar whereas the difference between 2 and 3 may be - * huge. - * - * Errors: - * If any of the provided CSV files can't be parsed or if more than certain - * percent of CSV rows cannot be processed then the operation fails and - * nothing is imported. Regardless of overall success or failure the per-row - * failures, up to a certain count cap, is listed in - * Operation.metadata.partial_failures. - * - * @property {Object} gcsSource - * The Google Cloud Storage location for the input content. - * In ImportData, the gcs_source points to a csv with structure described in - * the comment. - * - * This object should have the same structure as [GcsSource]{@link google.cloud.automl.v1beta1.GcsSource} - * - * @property {Object} bigquerySource - * The BigQuery location for the input content. - * - * This object should have the same structure as [BigQuerySource]{@link google.cloud.automl.v1beta1.BigQuerySource} - * - * @property {Object.} params - * Additional domain-specific parameters describing the semantic of the - * imported data, any string must be up to 25000 - * characters long. - * - * * For Tables: - * `schema_inference_version` - (integer) Required. The version of the - * algorithm that should be used for the initial inference of the - * schema (columns' DataTypes) of the table the data is being imported - * into. Allowed values: "1". - * - * @typedef InputConfig - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.InputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const InputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Input configuration for BatchPredict Action. - * - * The format of input depends on the ML problem of the model used for - * prediction. As input source the - * gcs_source - * is expected, unless specified otherwise. - * - * The formats are represented in EBNF with commas being literal and with - * non-terminal symbols defined near the end of this comment. The formats - * are: - * - * * For Image Classification: - * CSV file(s) with each line having just a single column: - * GCS_FILE_PATH - * which leads to image of up to 30MB in size. Supported - * extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - * the Batch predict output. - * Three sample rows: - * gs://folder/image1.jpeg - * gs://folder/image2.gif - * gs://folder/image3.png - * - * * For Image Object Detection: - * CSV file(s) with each line having just a single column: - * GCS_FILE_PATH - * which leads to image of up to 30MB in size. Supported - * extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - * the Batch predict output. - * Three sample rows: - * gs://folder/image1.jpeg - * gs://folder/image2.gif - * gs://folder/image3.png - * * For Video Classification: - * CSV file(s) with each line in format: - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - * GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - * duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - * length of the video, and end has to be after the start. - * Three sample rows: - * gs://folder/video1.mp4,10,40 - * gs://folder/video1.mp4,20,60 - * gs://folder/vid2.mov,0,inf - * - * * For Video Object Tracking: - * CSV file(s) with each line in format: - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - * GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - * duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - * TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - * length of the video, and end has to be after the start. - * Three sample rows: - * gs://folder/video1.mp4,10,240 - * gs://folder/video1.mp4,300,360 - * gs://folder/vid2.mov,0,inf - * * For Text Classification: - * CSV file(s) with each line having just a single column: - * GCS_FILE_PATH | TEXT_SNIPPET - * Any given text file can have size upto 128kB. - * Any given text snippet content must have 60,000 characters or less. - * Three sample rows: - * gs://folder/text1.txt - * "Some text content to predict" - * gs://folder/text3.pdf - * Supported file extensions: .txt, .pdf - * - * * For Text Sentiment: - * CSV file(s) with each line having just a single column: - * GCS_FILE_PATH | TEXT_SNIPPET - * Any given text file can have size upto 128kB. - * Any given text snippet content must have 500 characters or less. - * Three sample rows: - * gs://folder/text1.txt - * "Some text content to predict" - * gs://folder/text3.pdf - * Supported file extensions: .txt, .pdf - * - * * For Text Extraction - * .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or - * as documents (for a single BatchPredict call only one of the these - * formats may be used). - * The in-line .JSONL file(s) contain per line a proto that - * wraps a temporary user-assigned TextSnippet ID (string up to 2000 - * characters long) called "id", a TextSnippet proto (in - * json representation) and zero or more TextFeature protos. Any given - * text snippet content must have 30,000 characters or less, and also - * be UTF-8 NFC encoded (ASCII already is). The IDs provided should be - * unique. - * The document .JSONL file(s) contain, per line, a proto that wraps a - * Document proto with input_config set. Only PDF documents are - * supported now, and each document must be up to 2MB large. - * Any given .JSONL file must be 100MB or smaller, and no more than 20 - * files may be given. - * Sample in-line JSON Lines file (presented here with artificial line - * breaks, but the only actual line break is denoted by \n): - * { - * "id": "my_first_id", - * "text_snippet": { "content": "dog car cat"}, - * "text_features": [ - * { - * "text_segment": {"start_offset": 4, "end_offset": 6}, - * "structural_type": PARAGRAPH, - * "bounding_poly": { - * "normalized_vertices": [ - * {"x": 0.1, "y": 0.1}, - * {"x": 0.1, "y": 0.3}, - * {"x": 0.3, "y": 0.3}, - * {"x": 0.3, "y": 0.1}, - * ] - * }, - * } - * ], - * }\n - * { - * "id": "2", - * "text_snippet": { - * "content": "An elaborate content", - * "mime_type": "text/plain" - * } - * } - * Sample document JSON Lines file (presented here with artificial line - * breaks, but the only actual line break is denoted by \n).: - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - * } - * } - * } - * }\n - * { - * "document": { - * "input_config": { - * "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - * } - * } - * } - * } - * - * * For Tables: - * Either - * gcs_source or - * - * bigquery_source. - * GCS case: - * CSV file(s), each by itself 10GB or smaller and total size must be - * 100GB or smaller, where first file must have a header containing - * column names. If the first row of a subsequent file is the same as - * the header, then it is also treated as a header. All other rows - * contain values for the corresponding columns. - * The column names must contain the model's - * - * input_feature_column_specs' - * - * display_name-s - * (order doesn't matter). The columns corresponding to the model's - * input feature column specs must contain values compatible with the - * column spec's data types. Prediction on all the rows, i.e. the CSV - * lines, will be attempted. For FORECASTING - * - * prediction_type: - * all columns having - * - * TIME_SERIES_AVAILABLE_PAST_ONLY - * type will be ignored. - * First three sample rows of a CSV file: - * "First Name","Last Name","Dob","Addresses" - * - * "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - * - * "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - * BigQuery case: - * An URI of a BigQuery table. The user data size of the BigQuery - * table must be 100GB or smaller. - * The column names must contain the model's - * - * input_feature_column_specs' - * - * display_name-s - * (order doesn't matter). The columns corresponding to the model's - * input feature column specs must contain values compatible with the - * column spec's data types. Prediction on all the rows of the table - * will be attempted. For FORECASTING - * - * prediction_type: - * all columns having - * - * TIME_SERIES_AVAILABLE_PAST_ONLY - * type will be ignored. - * - * Definitions: - * GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". - * TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - * double quotes ("") - * TIME_SEGMENT_START = TIME_OFFSET - * Expresses a beginning, inclusive, of a time segment - * within an - * example that has a time dimension (e.g. video). - * TIME_SEGMENT_END = TIME_OFFSET - * Expresses an end, exclusive, of a time segment within - * an example that has a time dimension (e.g. video). - * TIME_OFFSET = A number of seconds as measured from the start of an - * example (e.g. video). Fractions are allowed, up to a - * microsecond precision. "inf" is allowed and it means the end - * of the example. - * - * Errors: - * If any of the provided CSV files can't be parsed or if more than certain - * percent of CSV rows cannot be processed then the operation fails and - * prediction does not happen. Regardless of overall success or failure the - * per-row failures, up to a certain count cap, will be listed in - * Operation.metadata.partial_failures. - * - * @property {Object} gcsSource - * The Google Cloud Storage location for the input content. - * - * This object should have the same structure as [GcsSource]{@link google.cloud.automl.v1beta1.GcsSource} - * - * @property {Object} bigquerySource - * The BigQuery location for the input content. - * - * This object should have the same structure as [BigQuerySource]{@link google.cloud.automl.v1beta1.BigQuerySource} - * - * @typedef BatchPredictInputConfig - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BatchPredictInputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const BatchPredictInputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Input configuration of a Document. - * - * @property {Object} gcsSource - * The Google Cloud Storage location of the document file. Only a single path - * should be given. - * Max supported size: 512MB. - * Supported extensions: .PDF. - * - * This object should have the same structure as [GcsSource]{@link google.cloud.automl.v1beta1.GcsSource} - * - * @typedef DocumentInputConfig - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DocumentInputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const DocumentInputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * * For Translation: - * CSV file `translation.csv`, with each line in format: - * ML_USE,GCS_FILE_PATH - * GCS_FILE_PATH leads to a .TSV file which describes examples that have - * given ML_USE, using the following row format per line: - * TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target - * language) - * - * * For Tables: - * Output depends on whether the dataset was imported from GCS or - * BigQuery. - * GCS case: - * - * gcs_destination - * must be set. Exported are CSV file(s) `tables_1.csv`, - * `tables_2.csv`,...,`tables_N.csv` with each having as header line - * the table's column names, and all other lines contain values for - * the header columns. - * BigQuery case: - * - * bigquery_destination - * pointing to a BigQuery project must be set. In the given project a - * new dataset will be created with name - * - * `export_data__` - * where will be made - * BigQuery-dataset-name compatible (e.g. most special characters will - * become underscores), and timestamp will be in - * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that - * dataset a new table called `primary_table` will be created, and - * filled with precisely the same data as this obtained on import. - * - * @property {Object} gcsDestination - * The Google Cloud Storage location where the output is to be written to. - * For Image Object Detection, Text Extraction, Video Classification and - * Tables, in the given directory a new directory will be created with name: - * export_data-- where - * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - * output will be written into that directory. - * - * This object should have the same structure as [GcsDestination]{@link google.cloud.automl.v1beta1.GcsDestination} - * - * @property {Object} bigqueryDestination - * The BigQuery location where the output is to be written to. - * - * This object should have the same structure as [BigQueryDestination]{@link google.cloud.automl.v1beta1.BigQueryDestination} - * - * @typedef OutputConfig - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.OutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const OutputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Output configuration for BatchPredict Action. - * - * As destination the - * - * gcs_destination - * must be set unless specified otherwise for a domain. If gcs_destination is - * set then in the given directory a new directory is created. Its name - * will be - * "prediction--", - * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents - * of it depends on the ML problem the predictions are made for. - * - * * For Image Classification: - * In the created directory files `image_classification_1.jsonl`, - * `image_classification_2.jsonl`,...,`image_classification_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of the successfully predicted images and annotations. - * A single image will be listed only once with all its annotations, - * and its annotations will never be split across files. - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps image's "ID" : "" followed by a list of - * zero or more AnnotationPayload protos (called annotations), which - * have classification detail populated. - * If prediction for any image failed (partially or completely), then an - * additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - * files will be created (N depends on total number of failed - * predictions). These files will have a JSON representation of a proto - * that wraps the same "ID" : "" but here followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`fields. - * - * * For Image Object Detection: - * In the created directory files `image_object_detection_1.jsonl`, - * `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of the successfully predicted images and annotations. - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps image's "ID" : "" followed by a list of - * zero or more AnnotationPayload protos (called annotations), which - * have image_object_detection detail populated. A single image will - * be listed only once with all its annotations, and its annotations - * will never be split across files. - * If prediction for any image failed (partially or completely), then - * additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - * files will be created (N depends on total number of failed - * predictions). These files will have a JSON representation of a proto - * that wraps the same "ID" : "" but here followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`fields. - * * For Video Classification: - * In the created directory a video_classification.csv file, and a .JSON - * file per each video classification requested in the input (i.e. each - * line in given CSV(s)), will be created. - * - * The format of video_classification.csv is: - * - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - * where: - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - * the prediction input lines (i.e. video_classification.csv has - * precisely the same number of lines as the prediction input had.) - * JSON_FILE_NAME = Name of .JSON file in the output directory, which - * contains prediction responses for the video time segment. - * STATUS = "OK" if prediction completed successfully, or an error code - * with message otherwise. If STATUS is not "OK" then the .JSON file - * for that line may not exist or be empty. - * - * Each .JSON file, assuming STATUS is "OK", will contain a list of - * AnnotationPayload protos in JSON format, which are the predictions - * for the video time segment the file is assigned to in the - * video_classification.csv. All AnnotationPayload protos will have - * video_classification field set, and will be sorted by - * video_classification.type field (note that the returned types are - * governed by `classifaction_types` parameter in - * PredictService.BatchPredictRequest.params). - * - * * For Video Object Tracking: - * In the created directory a video_object_tracking.csv file will be - * created, and multiple files video_object_trackinng_1.json, - * video_object_trackinng_2.json,..., video_object_trackinng_N.json, - * where N is the number of requests in the input (i.e. the number of - * lines in given CSV(s)). - * - * The format of video_object_tracking.csv is: - * - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - * where: - * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - * the prediction input lines (i.e. video_object_tracking.csv has - * precisely the same number of lines as the prediction input had.) - * JSON_FILE_NAME = Name of .JSON file in the output directory, which - * contains prediction responses for the video time segment. - * STATUS = "OK" if prediction completed successfully, or an error - * code with message otherwise. If STATUS is not "OK" then the .JSON - * file for that line may not exist or be empty. - * - * Each .JSON file, assuming STATUS is "OK", will contain a list of - * AnnotationPayload protos in JSON format, which are the predictions - * for each frame of the video time segment the file is assigned to in - * video_object_tracking.csv. All AnnotationPayload protos will have - * video_object_tracking field set. - * * For Text Classification: - * In the created directory files `text_classification_1.jsonl`, - * `text_classification_2.jsonl`,...,`text_classification_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of inputs and annotations found. - * - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps input text snippet or input text file and a list of - * zero or more AnnotationPayload protos (called annotations), which - * have classification detail populated. A single text snippet or file - * will be listed only once with all its annotations, and its - * annotations will never be split across files. - * - * If prediction for any text snippet or file failed (partially or - * completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - * `errors_N.jsonl` files will be created (N depends on total number of - * failed predictions). These files will have a JSON representation of a - * proto that wraps input text snippet or input text file followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`. - * - * * For Text Sentiment: - * In the created directory files `text_sentiment_1.jsonl`, - * `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of inputs and annotations found. - * - * Each .JSONL file will contain, per line, a JSON representation of a - * proto that wraps input text snippet or input text file and a list of - * zero or more AnnotationPayload protos (called annotations), which - * have text_sentiment detail populated. A single text snippet or file - * will be listed only once with all its annotations, and its - * annotations will never be split across files. - * - * If prediction for any text snippet or file failed (partially or - * completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - * `errors_N.jsonl` files will be created (N depends on total number of - * failed predictions). These files will have a JSON representation of a - * proto that wraps input text snippet or input text file followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`. - * - * * For Text Extraction: - * In the created directory files `text_extraction_1.jsonl`, - * `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` - * will be created, where N may be 1, and depends on the - * total number of inputs and annotations found. - * The contents of these .JSONL file(s) depend on whether the input - * used inline text, or documents. - * If input was inline, then each .JSONL file will contain, per line, - * a JSON representation of a proto that wraps given in request text - * snippet's "id" (if specified), followed by input text snippet, - * and a list of zero or more - * AnnotationPayload protos (called annotations), which have - * text_extraction detail populated. A single text snippet will be - * listed only once with all its annotations, and its annotations will - * never be split across files. - * If input used documents, then each .JSONL file will contain, per - * line, a JSON representation of a proto that wraps given in request - * document proto, followed by its OCR-ed representation in the form - * of a text snippet, finally followed by a list of zero or more - * AnnotationPayload protos (called annotations), which have - * text_extraction detail populated and refer, via their indices, to - * the OCR-ed text snippet. A single document (and its text snippet) - * will be listed only once with all its annotations, and its - * annotations will never be split across files. - * If prediction for any text snippet failed (partially or completely), - * then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - * `errors_N.jsonl` files will be created (N depends on total number of - * failed predictions). These files will have a JSON representation of a - * proto that wraps either the "id" : "" (in case of inline) - * or the document proto (in case of document) but here followed by - * exactly one - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * containing only `code` and `message`. - * - * * For Tables: - * Output depends on whether - * - * gcs_destination - * or - * - * bigquery_destination - * is set (either is allowed). - * GCS case: - * In the created directory files `tables_1.csv`, `tables_2.csv`,..., - * `tables_N.csv` will be created, where N may be 1, and depends on - * the total number of the successfully predicted rows. - * For all CLASSIFICATION - * - * prediction_type-s: - * Each .csv file will contain a header, listing all columns' - * - * display_name-s - * given on input followed by M target column names in the format of - * - * "__score" where M is the number of distinct target values, - * i.e. number of distinct values in the target column of the table - * used to train the model. Subsequent lines will contain the - * respective values of successfully predicted rows, with the last, - * i.e. the target, columns having the corresponding prediction - * scores. - * For REGRESSION and FORECASTING - * - * prediction_type-s: - * Each .csv file will contain a header, listing all columns' - * display_name-s given - * on input followed by the predicted target column with name in the - * format of - * - * "predicted_" - * Subsequent lines will contain the respective values of - * successfully predicted rows, with the last, i.e. the target, - * column having the predicted target value. - * If prediction for any rows failed, then an additional - * `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be - * created (N depends on total number of failed rows). These files - * will have analogous format as `tables_*.csv`, but always with a - * single target column having - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * represented as a JSON string, and containing only `code` and - * `message`. - * BigQuery case: - * - * bigquery_destination - * pointing to a BigQuery project must be set. In the given project a - * new dataset will be created with name - * `prediction__` - * where will be made - * BigQuery-dataset-name compatible (e.g. most special characters will - * become underscores), and timestamp will be in - * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset - * two tables will be created, `predictions`, and `errors`. - * The `predictions` table's column names will be the input columns' - * - * display_name-s - * followed by the target column with name in the format of - * - * "predicted_" - * The input feature columns will contain the respective values of - * successfully predicted rows, with the target column having an - * ARRAY of - * - * AnnotationPayloads, - * represented as STRUCT-s, containing - * TablesAnnotation. - * The `errors` table contains rows for which the prediction has - * failed, it has analogous input columns while the target column name - * is in the format of - * - * "errors_", - * and as a value has - * - * [`google.rpc.Status`](https: - * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - * represented as a STRUCT, and containing only `code` and `message`. - * - * @property {Object} gcsDestination - * The Google Cloud Storage location of the directory where the output is to - * be written to. - * - * This object should have the same structure as [GcsDestination]{@link google.cloud.automl.v1beta1.GcsDestination} - * - * @property {Object} bigqueryDestination - * The BigQuery location where the output is to be written to. - * - * This object should have the same structure as [BigQueryDestination]{@link google.cloud.automl.v1beta1.BigQueryDestination} - * - * @typedef BatchPredictOutputConfig - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BatchPredictOutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const BatchPredictOutputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Output configuration for ModelExport Action. - * - * @property {Object} gcsDestination - * The Google Cloud Storage location where the model is to be written to. - * This location may only be set for the following model formats: - * "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - * - * Under the directory given as the destination a new one with name - * "model-export--", - * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, - * will be created. Inside the model and any of its supporting files - * will be written. - * - * This object should have the same structure as [GcsDestination]{@link google.cloud.automl.v1beta1.GcsDestination} - * - * @property {Object} gcrDestination - * The GCR location where model image is to be pushed to. This location - * may only be set for the following model formats: - * "docker". - * - * The model image will be created under the given URI. - * - * This object should have the same structure as [GcrDestination]{@link google.cloud.automl.v1beta1.GcrDestination} - * - * @property {string} modelFormat - * The format in which the model must be exported. The available, and default, - * formats depend on the problem and model type (if given problem and type - * combination doesn't have a format listed, it means its models are not - * exportable): - * - * * For Image Classification mobile-low-latency-1, mobile-versatile-1, - * mobile-high-accuracy-1: - * "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - * "docker". - * - * * For Image Classification mobile-core-ml-low-latency-1, - * mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - * "core_ml" (default). - * Formats description: - * - * * tflite - Used for Android mobile devices. - * * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) - * devices. - * * tf_saved_model - A tensorflow model in SavedModel format. - * * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can - * be used in the browser and in Node.js using JavaScript. - * * docker - Used for Docker containers. Use the params field to customize - * the container. The container is verified to work correctly on - * ubuntu 16.04 operating system. See more at - * [containers - * - * quickstart](https: - * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - * * core_ml - Used for iOS mobile devices. - * - * @property {Object.} params - * Additional model-type and format specific parameters describing the - * requirements for the to be exported model files, any string must be up to - * 25000 characters long. - * - * * For `docker` format: - * `cpu_architecture` - (string) "x86_64" (default). - * `gpu_architecture` - (string) "none" (default), "nvidia". - * - * @typedef ModelExportOutputConfig - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ModelExportOutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const ModelExportOutputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Output configuration for ExportEvaluatedExamples Action. Note that this call - * is available only for 30 days since the moment the model was evaluated. - * The output depends on the domain, as follows (note that only examples from - * the TEST set are exported): - * - * * For Tables: - * - * bigquery_destination - * pointing to a BigQuery project must be set. In the given project a - * new dataset will be created with name - * - * `export_evaluated_examples__` - * where will be made BigQuery-dataset-name - * compatible (e.g. most special characters will become underscores), - * and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" - * format. In the dataset an `evaluated_examples` table will be - * created. It will have all the same columns as the - * - * primary_table - * of the - * dataset from which - * the model was created, as they were at the moment of model's - * evaluation (this includes the target column with its ground - * truth), followed by a column called "predicted_". That - * last column will contain the model's prediction result for each - * respective row, given as ARRAY of - * AnnotationPayloads, - * represented as STRUCT-s, containing - * TablesAnnotation. - * - * @property {Object} bigqueryDestination - * The BigQuery location where the output is to be written to. - * - * This object should have the same structure as [BigQueryDestination]{@link google.cloud.automl.v1beta1.BigQueryDestination} - * - * @typedef ExportEvaluatedExamplesOutputConfig - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const ExportEvaluatedExamplesOutputConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The Google Cloud Storage location for the input content. - * - * @property {string[]} inputUris - * Required. Google Cloud Storage URIs to input files, up to 2000 characters - * long. Accepted forms: - * * Full object path, e.g. gs://bucket/directory/object.csv - * - * @typedef GcsSource - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GcsSource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const GcsSource = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The BigQuery location for the input content. - * - * @property {string} inputUri - * Required. BigQuery URI to a table, up to 2000 characters long. - * Accepted forms: - * * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId - * - * @typedef BigQuerySource - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BigQuerySource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const BigQuerySource = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The Google Cloud Storage location where the output is to be written to. - * - * @property {string} outputUriPrefix - * Required. Google Cloud Storage URI to output directory, up to 2000 - * characters long. - * Accepted forms: - * * Prefix path: gs://bucket/directory - * The requesting user must have write permission to the bucket. - * The directory is created if it doesn't exist. - * - * @typedef GcsDestination - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GcsDestination definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const GcsDestination = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The BigQuery location for the output content. - * - * @property {string} outputUri - * Required. BigQuery URI to a project, up to 2000 characters long. - * Accepted forms: - * * BigQuery path e.g. bq://projectId - * - * @typedef BigQueryDestination - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BigQueryDestination definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const BigQueryDestination = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The GCR location where the image must be pushed to. - * - * @property {string} outputUri - * Required. Google Contained Registry URI of the new image, up to 2000 - * characters long. See - * - * https: - * //cloud.google.com/container-registry/do - * // cs/pushing-and-pulling#pushing_an_image_to_a_registry - * Accepted forms: - * * [HOSTNAME]/[PROJECT-ID]/[IMAGE] - * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] - * - * The requesting user must have permission to push images the project. - * - * @typedef GcrDestination - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GcrDestination definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} - */ -const GcrDestination = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model.js deleted file mode 100644 index 9398151e95a..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model.js +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2020 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. - -/** - * API proto representing a trained machine learning model. - * - * @property {Object} translationModelMetadata - * Metadata for translation models. - * - * This object should have the same structure as [TranslationModelMetadata]{@link google.cloud.automl.v1beta1.TranslationModelMetadata} - * - * @property {Object} imageClassificationModelMetadata - * Metadata for image classification models. - * - * This object should have the same structure as [ImageClassificationModelMetadata]{@link google.cloud.automl.v1beta1.ImageClassificationModelMetadata} - * - * @property {Object} textClassificationModelMetadata - * Metadata for text classification models. - * - * This object should have the same structure as [TextClassificationModelMetadata]{@link google.cloud.automl.v1beta1.TextClassificationModelMetadata} - * - * @property {Object} imageObjectDetectionModelMetadata - * Metadata for image object detection models. - * - * This object should have the same structure as [ImageObjectDetectionModelMetadata]{@link google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} - * - * @property {Object} videoClassificationModelMetadata - * Metadata for video classification models. - * - * This object should have the same structure as [VideoClassificationModelMetadata]{@link google.cloud.automl.v1beta1.VideoClassificationModelMetadata} - * - * @property {Object} videoObjectTrackingModelMetadata - * Metadata for video object tracking models. - * - * This object should have the same structure as [VideoObjectTrackingModelMetadata]{@link google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} - * - * @property {Object} textExtractionModelMetadata - * Metadata for text extraction models. - * - * This object should have the same structure as [TextExtractionModelMetadata]{@link google.cloud.automl.v1beta1.TextExtractionModelMetadata} - * - * @property {Object} tablesModelMetadata - * Metadata for Tables models. - * - * This object should have the same structure as [TablesModelMetadata]{@link google.cloud.automl.v1beta1.TablesModelMetadata} - * - * @property {Object} textSentimentModelMetadata - * Metadata for text sentiment models. - * - * This object should have the same structure as [TextSentimentModelMetadata]{@link google.cloud.automl.v1beta1.TextSentimentModelMetadata} - * - * @property {string} name - * Output only. Resource name of the model. - * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - * - * @property {string} displayName - * Required. The name of the model to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores - * (_), and ASCII digits 0-9. It must start with a letter. - * - * @property {string} datasetId - * Required. The resource ID of the dataset used to create the model. The dataset must - * come from the same ancestor project and location. - * - * @property {Object} createTime - * Output only. Timestamp when the model training finished and can be used for prediction. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} updateTime - * Output only. Timestamp when this model was last updated. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} deploymentState - * Output only. Deployment state of the model. A model can only serve - * prediction requests after it gets deployed. - * - * The number should be among the values of [DeploymentState]{@link google.cloud.automl.v1beta1.DeploymentState} - * - * @typedef Model - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.Model definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/model.proto} - */ -const Model = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Deployment state of the model. - * - * @enum {number} - * @memberof google.cloud.automl.v1beta1 - */ - DeploymentState: { - - /** - * Should not be used, an un-set enum has this value by default. - */ - DEPLOYMENT_STATE_UNSPECIFIED: 0, - - /** - * Model is deployed. - */ - DEPLOYED: 1, - - /** - * Model is not deployed. - */ - UNDEPLOYED: 2 - } -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model_evaluation.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model_evaluation.js deleted file mode 100644 index 790f5ecf15d..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model_evaluation.js +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2020 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. - -/** - * Evaluation results of a model. - * - * @property {Object} classificationEvaluationMetrics - * Model evaluation metrics for image, text, video and tables - * classification. - * Tables problem is considered a classification when the target column - * is CATEGORY DataType. - * - * This object should have the same structure as [ClassificationEvaluationMetrics]{@link google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} - * - * @property {Object} regressionEvaluationMetrics - * Model evaluation metrics for Tables regression. - * Tables problem is considered a regression when the target column - * has FLOAT64 DataType. - * - * This object should have the same structure as [RegressionEvaluationMetrics]{@link google.cloud.automl.v1beta1.RegressionEvaluationMetrics} - * - * @property {Object} translationEvaluationMetrics - * Model evaluation metrics for translation. - * - * This object should have the same structure as [TranslationEvaluationMetrics]{@link google.cloud.automl.v1beta1.TranslationEvaluationMetrics} - * - * @property {Object} imageObjectDetectionEvaluationMetrics - * Model evaluation metrics for image object detection. - * - * This object should have the same structure as [ImageObjectDetectionEvaluationMetrics]{@link google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} - * - * @property {Object} videoObjectTrackingEvaluationMetrics - * Model evaluation metrics for video object tracking. - * - * This object should have the same structure as [VideoObjectTrackingEvaluationMetrics]{@link google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} - * - * @property {Object} textSentimentEvaluationMetrics - * Evaluation metrics for text sentiment models. - * - * This object should have the same structure as [TextSentimentEvaluationMetrics]{@link google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} - * - * @property {Object} textExtractionEvaluationMetrics - * Evaluation metrics for text extraction models. - * - * This object should have the same structure as [TextExtractionEvaluationMetrics]{@link google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} - * - * @property {string} name - * Output only. Resource name of the model evaluation. - * Format: - * - * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - * - * @property {string} annotationSpecId - * Output only. The ID of the annotation spec that the model evaluation applies to. The - * The ID is empty for the overall model evaluation. - * For Tables annotation specs in the dataset do not exist and this ID is - * always not set, but for CLASSIFICATION - * - * prediction_type-s - * the - * display_name - * field is used. - * - * @property {string} displayName - * Output only. The value of - * display_name at - * the moment when the model was trained. Because this field returns a value - * at model training time, for different models trained from the same dataset, - * the values may differ, since display names could had been changed between - * the two model's trainings. - * For Tables CLASSIFICATION - * - * prediction_type-s - * distinct values of the target column at the moment of the model evaluation - * are populated here. - * The display_name is empty for the overall model evaluation. - * - * @property {Object} createTime - * Output only. Timestamp when this model evaluation was created. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} evaluatedExampleCount - * Output only. The number of examples used for model evaluation, i.e. for - * which ground truth from time of model creation is compared against the - * predicted annotations created by the model. - * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - * the total number of all examples used for evaluation. - * Otherwise, this is the count of examples that according to the ground - * truth were annotated by the - * - * annotation_spec_id. - * - * @typedef ModelEvaluation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ModelEvaluation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/model_evaluation.proto} - */ -const ModelEvaluation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_prediction_service.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_prediction_service.js deleted file mode 100644 index 24208c52003..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_prediction_service.js +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2020 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 PredictionService.Predict. - * - * @property {string} name - * Required. Name of the model requested to serve the prediction. - * - * @property {Object} payload - * Required. Payload to perform a prediction on. The payload must match the - * problem type that the model was trained to solve. - * - * This object should have the same structure as [ExamplePayload]{@link google.cloud.automl.v1beta1.ExamplePayload} - * - * @property {Object.} params - * Additional domain-specific parameters, any string must be up to 25000 - * characters long. - * - * * For Image Classification: - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that have - * at least this confidence score. The default is 0.5. - * - * * For Image Object Detection: - * `score_threshold` - (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be returned in the response. Default is 100, the - * requested value may be limited by server. - * * For Tables: - * feature_importance - (boolean) Whether feature importance - * should be populated in the returned TablesAnnotation. - * The default is false. - * - * @typedef PredictRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.PredictRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/prediction_service.proto} - */ -const PredictRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for PredictionService.Predict. - * - * @property {Object[]} payload - * Prediction result. - * Translation and Text Sentiment will return precisely one payload. - * - * This object should have the same structure as [AnnotationPayload]{@link google.cloud.automl.v1beta1.AnnotationPayload} - * - * @property {Object} preprocessedInput - * The preprocessed example that AutoML actually makes prediction on. - * Empty if AutoML does not preprocess the input example. - * * For Text Extraction: - * If the input is a .pdf file, the OCR'ed text will be provided in - * document_text. - * - * This object should have the same structure as [ExamplePayload]{@link google.cloud.automl.v1beta1.ExamplePayload} - * - * @property {Object.} metadata - * Additional domain-specific prediction response metadata. - * - * * For Image Object Detection: - * `max_bounding_box_count` - (int64) At most that many bounding boxes per - * image could have been returned. - * - * * For Text Sentiment: - * `sentiment_score` - (float, deprecated) A value between -1 and 1, - * -1 maps to least positive sentiment, while 1 maps to the most positive - * one and the higher the score, the more positive the sentiment in the - * document is. Yet these values are relative to the training data, so - * e.g. if all data was positive then -1 will be also positive (though - * the least). - * The sentiment_score shouldn't be confused with "score" or "magnitude" - * from the previous Natural Language Sentiment Analysis API. - * - * @typedef PredictResponse - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.PredictResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/prediction_service.proto} - */ -const PredictResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PredictionService.BatchPredict. - * - * @property {string} name - * Required. Name of the model requested to serve the batch prediction. - * - * @property {Object} inputConfig - * Required. The input configuration for batch prediction. - * - * This object should have the same structure as [BatchPredictInputConfig]{@link google.cloud.automl.v1beta1.BatchPredictInputConfig} - * - * @property {Object} outputConfig - * Required. The Configuration specifying where output predictions should - * be written. - * - * This object should have the same structure as [BatchPredictOutputConfig]{@link google.cloud.automl.v1beta1.BatchPredictOutputConfig} - * - * @property {Object.} params - * Required. Additional domain-specific parameters for the predictions, any string must - * be up to 25000 characters long. - * - * * For Text Classification: - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for a text snippet, it will only produce results - * that have at least this confidence score. The default is 0.5. - * - * * For Image Classification: - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that - * have at least this confidence score. The default is 0.5. - * - * * For Image Object Detection: - * - * `score_threshold` - (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be produced per image. Default is 100, the - * requested value may be limited by server. - * - * * For Video Classification : - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for a video, it will only produce results that - * have at least this confidence score. The default is 0.5. - * `segment_classification` - (boolean) Set to true to request - * segment-level classification. AutoML Video Intelligence returns - * labels and their confidence scores for the entire segment of the - * video that user specified in the request configuration. - * The default is "true". - * `shot_classification` - (boolean) Set to true to request shot-level - * classification. AutoML Video Intelligence determines the boundaries - * for each camera shot in the entire segment of the video that user - * specified in the request configuration. AutoML Video Intelligence - * then returns labels and their confidence scores for each detected - * shot, along with the start and end time of the shot. - * WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no metrics - * provided to describe that quality. The default is "false". - * `1s_interval_classification` - (boolean) Set to true to request - * classification for a video at one-second intervals. AutoML Video - * Intelligence returns labels and their confidence scores for each - * second of the entire segment of the video that user specified in the - * request configuration. - * WARNING: Model evaluation is not done for this classification - * type, the quality of it depends on training data, but there are no - * metrics provided to describe that quality. The default is - * "false". - * - * * For Tables: - * - * feature_importance - (boolean) Whether feature importance - * should be populated in the returned TablesAnnotations. The - * default is false. - * - * * For Video Object Tracking: - * - * `score_threshold` - (float) When Model detects objects on video frames, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be returned per frame. Default is 100, the requested - * value may be limited by server. - * `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - * at least that long as a relative value of video frame size will be - * returned. Value in 0 to 1 range. Default is 0. - * - * @typedef BatchPredictRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BatchPredictRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/prediction_service.proto} - */ -const BatchPredictRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result of the Batch Predict. This message is returned in - * response of the operation returned - * by the PredictionService.BatchPredict. - * - * @property {Object.} metadata - * Additional domain-specific prediction response metadata. - * - * * For Image Object Detection: - * `max_bounding_box_count` - (int64) At most that many bounding boxes per - * image could have been returned. - * - * * For Video Object Tracking: - * `max_bounding_box_count` - (int64) At most that many bounding boxes per - * frame could have been returned. - * - * @typedef BatchPredictResult - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.BatchPredictResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/prediction_service.proto} - */ -const BatchPredictResult = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_ranges.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_ranges.js deleted file mode 100644 index 0f84453c629..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_ranges.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020 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 range between two double numbers. - * - * @property {number} start - * Start of the range, inclusive. - * - * @property {number} end - * End of the range, exclusive. - * - * @typedef DoubleRange - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DoubleRange definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/ranges.proto} - */ -const DoubleRange = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_regression.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_regression.js deleted file mode 100644 index 2ac76c0caaa..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_regression.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020 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. - -/** - * Metrics for regression problems. - * - * @property {number} rootMeanSquaredError - * Output only. Root Mean Squared Error (RMSE). - * - * @property {number} meanAbsoluteError - * Output only. Mean Absolute Error (MAE). - * - * @property {number} meanAbsolutePercentageError - * Output only. Mean absolute percentage error. Only set if all ground truth - * values are are positive. - * - * @property {number} rSquared - * Output only. R squared. - * - * @property {number} rootMeanSquaredLogError - * Output only. Root mean squared log error. - * - * @typedef RegressionEvaluationMetrics - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.RegressionEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/regression.proto} - */ -const RegressionEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_service.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_service.js deleted file mode 100644 index 8b7570dc4bd..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_service.js +++ /dev/null @@ -1,628 +0,0 @@ -// Copyright 2020 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 AutoMl.CreateDataset. - * - * @property {string} parent - * Required. The resource name of the project to create the dataset for. - * - * @property {Object} dataset - * Required. The dataset to create. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1beta1.Dataset} - * - * @typedef CreateDatasetRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.CreateDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const CreateDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetDataset. - * - * @property {string} name - * Required. The resource name of the dataset to retrieve. - * - * @typedef GetDatasetRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GetDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const GetDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListDatasets. - * - * @property {string} parent - * Required. The resource name of the project from which to list datasets. - * - * @property {string} filter - * An expression for filtering the results of the request. - * - * * `dataset_metadata` - for existence of the case (e.g. - * image_classification_dataset_metadata:*). Some examples of using the filter are: - * - * * `translation_dataset_metadata:*` --> The dataset has - * translation_dataset_metadata. - * - * @property {number} pageSize - * Requested page size. Server may return fewer results than requested. - * If unspecified, server will pick a default size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return - * Typically obtained via - * ListDatasetsResponse.next_page_token of the previous - * AutoMl.ListDatasets call. - * - * @typedef ListDatasetsRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListDatasetsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListDatasetsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListDatasets. - * - * @property {Object[]} datasets - * The datasets read. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1beta1.Dataset} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to ListDatasetsRequest.page_token to obtain that page. - * - * @typedef ListDatasetsResponse - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListDatasetsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListDatasetsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.UpdateDataset - * - * @property {Object} dataset - * Required. The dataset which replaces the resource on the server. - * - * This object should have the same structure as [Dataset]{@link google.cloud.automl.v1beta1.Dataset} - * - * @property {Object} updateMask - * The update mask applies to the resource. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateDatasetRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.UpdateDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const UpdateDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.DeleteDataset. - * - * @property {string} name - * Required. The resource name of the dataset to delete. - * - * @typedef DeleteDatasetRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DeleteDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const DeleteDatasetRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ImportData. - * - * @property {string} name - * Required. Dataset name. Dataset must already exist. All imported - * annotations and examples will be added. - * - * @property {Object} inputConfig - * Required. The desired input location and its domain specific semantics, - * if any. - * - * This object should have the same structure as [InputConfig]{@link google.cloud.automl.v1beta1.InputConfig} - * - * @typedef ImportDataRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ImportDataRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ImportDataRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ExportData. - * - * @property {string} name - * Required. The resource name of the dataset. - * - * @property {Object} outputConfig - * Required. The desired output location. - * - * This object should have the same structure as [OutputConfig]{@link google.cloud.automl.v1beta1.OutputConfig} - * - * @typedef ExportDataRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ExportDataRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ExportDataRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetAnnotationSpec. - * - * @property {string} name - * Required. The resource name of the annotation spec to retrieve. - * - * @typedef GetAnnotationSpecRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GetAnnotationSpecRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const GetAnnotationSpecRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetTableSpec. - * - * @property {string} name - * Required. The resource name of the table spec to retrieve. - * - * @property {Object} fieldMask - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef GetTableSpecRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GetTableSpecRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const GetTableSpecRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListTableSpecs. - * - * @property {string} parent - * Required. The resource name of the dataset to list table specs from. - * - * @property {Object} fieldMask - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @property {string} filter - * Filter expression, see go/filtering. - * - * @property {number} pageSize - * Requested page size. The server can return fewer results than requested. - * If unspecified, the server will pick a default size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return. - * Typically obtained from the - * ListTableSpecsResponse.next_page_token field of the previous - * AutoMl.ListTableSpecs call. - * - * @typedef ListTableSpecsRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListTableSpecsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListTableSpecsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListTableSpecs. - * - * @property {Object[]} tableSpecs - * The table specs read. - * - * This object should have the same structure as [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to ListTableSpecsRequest.page_token to obtain that page. - * - * @typedef ListTableSpecsResponse - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListTableSpecsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListTableSpecsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.UpdateTableSpec - * - * @property {Object} tableSpec - * Required. The table spec which replaces the resource on the server. - * - * This object should have the same structure as [TableSpec]{@link google.cloud.automl.v1beta1.TableSpec} - * - * @property {Object} updateMask - * The update mask applies to the resource. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateTableSpecRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.UpdateTableSpecRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const UpdateTableSpecRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetColumnSpec. - * - * @property {string} name - * Required. The resource name of the column spec to retrieve. - * - * @property {Object} fieldMask - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef GetColumnSpecRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GetColumnSpecRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const GetColumnSpecRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListColumnSpecs. - * - * @property {string} parent - * Required. The resource name of the table spec to list column specs from. - * - * @property {Object} fieldMask - * Mask specifying which fields to read. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @property {string} filter - * Filter expression, see go/filtering. - * - * @property {number} pageSize - * Requested page size. The server can return fewer results than requested. - * If unspecified, the server will pick a default size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return. - * Typically obtained from the - * ListColumnSpecsResponse.next_page_token field of the previous - * AutoMl.ListColumnSpecs call. - * - * @typedef ListColumnSpecsRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListColumnSpecsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListColumnSpecsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListColumnSpecs. - * - * @property {Object[]} columnSpecs - * The column specs read. - * - * This object should have the same structure as [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to ListColumnSpecsRequest.page_token to obtain that page. - * - * @typedef ListColumnSpecsResponse - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListColumnSpecsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListColumnSpecsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.UpdateColumnSpec - * - * @property {Object} columnSpec - * Required. The column spec which replaces the resource on the server. - * - * This object should have the same structure as [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} - * - * @property {Object} updateMask - * The update mask applies to the resource. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateColumnSpecRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.UpdateColumnSpecRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const UpdateColumnSpecRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.CreateModel. - * - * @property {string} parent - * Required. Resource name of the parent project where the model is being created. - * - * @property {Object} model - * Required. The model to create. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1beta1.Model} - * - * @typedef CreateModelRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.CreateModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const CreateModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetModel. - * - * @property {string} name - * Required. Resource name of the model. - * - * @typedef GetModelRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GetModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const GetModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListModels. - * - * @property {string} parent - * Required. Resource name of the project, from which to list the models. - * - * @property {string} filter - * An expression for filtering the results of the request. - * - * * `model_metadata` - for existence of the case (e.g. - * video_classification_model_metadata:*). - * * `dataset_id` - for = or !=. Some examples of using the filter are: - * - * * `image_classification_model_metadata:*` --> The model has - * image_classification_model_metadata. - * * `dataset_id=5` --> The model was created from a dataset with ID 5. - * - * @property {number} pageSize - * Requested page size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return - * Typically obtained via - * ListModelsResponse.next_page_token of the previous - * AutoMl.ListModels call. - * - * @typedef ListModelsRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListModelsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListModelsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListModels. - * - * @property {Object[]} model - * List of models in the requested page. - * - * This object should have the same structure as [Model]{@link google.cloud.automl.v1beta1.Model} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to ListModelsRequest.page_token to obtain that page. - * - * @typedef ListModelsResponse - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListModelsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListModelsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.DeleteModel. - * - * @property {string} name - * Required. Resource name of the model being deleted. - * - * @typedef DeleteModelRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DeleteModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const DeleteModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.DeployModel. - * - * @property {Object} imageObjectDetectionModelDeploymentMetadata - * Model deployment metadata specific to Image Object Detection. - * - * This object should have the same structure as [ImageObjectDetectionModelDeploymentMetadata]{@link google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} - * - * @property {Object} imageClassificationModelDeploymentMetadata - * Model deployment metadata specific to Image Classification. - * - * This object should have the same structure as [ImageClassificationModelDeploymentMetadata]{@link google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} - * - * @property {string} name - * Required. Resource name of the model to deploy. - * - * @typedef DeployModelRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.DeployModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const DeployModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.UndeployModel. - * - * @property {string} name - * Required. Resource name of the model to undeploy. - * - * @typedef UndeployModelRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.UndeployModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const UndeployModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ExportModel. - * Models need to be enabled for exporting, otherwise an error code will be - * returned. - * - * @property {string} name - * Required. The resource name of the model to export. - * - * @property {Object} outputConfig - * Required. The desired output location and configuration. - * - * This object should have the same structure as [ModelExportOutputConfig]{@link google.cloud.automl.v1beta1.ModelExportOutputConfig} - * - * @typedef ExportModelRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ExportModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ExportModelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ExportEvaluatedExamples. - * - * @property {string} name - * Required. The resource name of the model whose evaluated examples are to - * be exported. - * - * @property {Object} outputConfig - * Required. The desired output location and configuration. - * - * This object should have the same structure as [ExportEvaluatedExamplesOutputConfig]{@link google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} - * - * @typedef ExportEvaluatedExamplesRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ExportEvaluatedExamplesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.GetModelEvaluation. - * - * @property {string} name - * Required. Resource name for the model evaluation. - * - * @typedef GetModelEvaluationRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.GetModelEvaluationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const GetModelEvaluationRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for AutoMl.ListModelEvaluations. - * - * @property {string} parent - * Required. Resource name of the model to list the model evaluations for. - * If modelId is set as "-", this will list model evaluations from across all - * models of the parent location. - * - * @property {string} filter - * An expression for filtering the results of the request. - * - * * `annotation_spec_id` - for =, != or existence. See example below for - * the last. - * - * Some examples of using the filter are: - * - * * `annotation_spec_id!=4` --> The model evaluation was done for - * annotation spec with ID different than 4. - * * `NOT annotation_spec_id:*` --> The model evaluation was done for - * aggregate of all annotation specs. - * - * @property {number} pageSize - * Requested page size. - * - * @property {string} pageToken - * A token identifying a page of results for the server to return. - * Typically obtained via - * ListModelEvaluationsResponse.next_page_token of the previous - * AutoMl.ListModelEvaluations call. - * - * @typedef ListModelEvaluationsRequest - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListModelEvaluationsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListModelEvaluationsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for AutoMl.ListModelEvaluations. - * - * @property {Object[]} modelEvaluation - * List of model evaluations in the requested page. - * - * This object should have the same structure as [ModelEvaluation]{@link google.cloud.automl.v1beta1.ModelEvaluation} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * Pass to the ListModelEvaluationsRequest.page_token field of a new - * AutoMl.ListModelEvaluations request to obtain that page. - * - * @typedef ListModelEvaluationsResponse - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.ListModelEvaluationsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} - */ -const ListModelEvaluationsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_table_spec.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_table_spec.js deleted file mode 100644 index a5ad38a96d8..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_table_spec.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020 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 specification of a relational table. - * The table's schema is represented via its child column specs. It is - * pre-populated as part of ImportData by schema inference algorithm, the - * version of which is a required parameter of ImportData InputConfig. - * Note: While working with a table, at times the schema may be - * inconsistent with the data in the table (e.g. string in a FLOAT64 column). - * The consistency validation is done upon creation of a model. - * Used by: - * * Tables - * - * @property {string} name - * Output only. The resource name of the table spec. - * Form: - * - * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` - * - * @property {string} timeColumnSpecId - * column_spec_id of the time column. Only used if the parent dataset's - * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE - * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and - * those in between to VALIDATE. - * Required type: TIMESTAMP. - * If both this column and ml_use_column are not set, then ML use of all rows - * will be assigned by AutoML. NOTE: Updates of this field will instantly - * affect any other users concurrently working with the dataset. - * - * @property {number} rowCount - * Output only. The number of rows (i.e. examples) in the table. - * - * @property {number} validRowCount - * Output only. The number of valid rows (i.e. without values that don't match - * DataType-s of their columns). - * - * @property {number} columnCount - * Output only. The number of columns of the table. That is, the number of - * child ColumnSpec-s. - * - * @property {Object[]} inputConfigs - * Output only. Input configs via which data currently residing in the table - * had been imported. - * - * This object should have the same structure as [InputConfig]{@link google.cloud.automl.v1beta1.InputConfig} - * - * @property {string} etag - * Used to perform consistent read-modify-write updates. If not set, a blind - * "overwrite" update happens. - * - * @typedef TableSpec - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TableSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/table_spec.proto} - */ -const TableSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_tables.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_tables.js deleted file mode 100644 index fd3316591db..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_tables.js +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright 2020 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. - -/** - * Metadata for a dataset used for AutoML Tables. - * - * @property {string} primaryTableSpecId - * Output only. The table_spec_id of the primary table of this dataset. - * - * @property {string} targetColumnSpecId - * column_spec_id of the primary table's column that should be used as the - * training & prediction target. - * This column must be non-nullable and have one of following data types - * (otherwise model creation will error): - * - * * CATEGORY - * - * * FLOAT64 - * - * If the type is CATEGORY , only up to - * 100 unique values may exist in that column across all rows. - * - * NOTE: Updates of this field will instantly affect any other users - * concurrently working with the dataset. - * - * @property {string} weightColumnSpecId - * column_spec_id of the primary table's column that should be used as the - * weight column, i.e. the higher the value the more important the row will be - * during model training. - * Required type: FLOAT64. - * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is - * ignored for training. - * If not set all rows are assumed to have equal weight of 1. - * NOTE: Updates of this field will instantly affect any other users - * concurrently working with the dataset. - * - * @property {string} mlUseColumnSpecId - * column_spec_id of the primary table column which specifies a possible ML - * use of the row, i.e. the column will be used to split the rows into TRAIN, - * VALIDATE and TEST sets. - * Required type: STRING. - * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` - * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter - * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note - * that if a given ml use distribution makes it impossible to create a "good" - * model, that call will error describing the issue. - * If both this column_spec_id and primary table's time_column_spec_id are not - * set, then all rows are treated as `UNASSIGNED`. - * NOTE: Updates of this field will instantly affect any other users - * concurrently working with the dataset. - * - * @property {Object.} targetColumnCorrelations - * Output only. Correlations between - * - * TablesDatasetMetadata.target_column_spec_id, - * and other columns of the - * - * TablesDatasetMetadataprimary_table. - * Only set if the target column is set. Mapping from other column spec id to - * its CorrelationStats with the target column. - * This field may be stale, see the stats_update_time field for - * for the timestamp at which these stats were last updated. - * - * @property {Object} statsUpdateTime - * Output only. The most recent timestamp when target_column_correlations - * field and all descendant ColumnSpec.data_stats and - * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any - * changes that happened to the dataset afterwards are not reflected in these - * fields values. The regeneration happens in the background on a best effort - * basis. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef TablesDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TablesDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/tables.proto} - */ -const TablesDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata specific to AutoML Tables. - * - * @property {number} optimizationObjectiveRecallValue - * Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". - * Must be between 0 and 1, inclusive. - * - * @property {number} optimizationObjectivePrecisionValue - * Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". - * Must be between 0 and 1, inclusive. - * - * @property {Object} targetColumnSpec - * Column spec of the dataset's primary table's column the model is - * predicting. Snapshotted when model creation started. - * Only 3 fields are used: - * name - May be set on CreateModel, if it's not then the ColumnSpec - * corresponding to the current target_column_spec_id of the dataset - * the model is trained from is used. - * If neither is set, CreateModel will error. - * display_name - Output only. - * data_type - Output only. - * - * This object should have the same structure as [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} - * - * @property {Object[]} inputFeatureColumnSpecs - * Column specs of the dataset's primary table's columns, on which - * the model is trained and which are used as the input for predictions. - * The - * - * target_column - * as well as, according to dataset's state upon model creation, - * - * weight_column, - * and - * - * ml_use_column - * must never be included here. - * - * Only 3 fields are used: - * - * * name - May be set on CreateModel, if set only the columns specified are - * used, otherwise all primary table's columns (except the ones listed - * above) are used for the training and prediction input. - * - * * display_name - Output only. - * - * * data_type - Output only. - * - * This object should have the same structure as [ColumnSpec]{@link google.cloud.automl.v1beta1.ColumnSpec} - * - * @property {string} optimizationObjective - * Objective function the model is optimizing towards. The training process - * creates a model that maximizes/minimizes the value of the objective - * function over the validation set. - * - * The supported optimization objectives depend on the prediction type. - * If the field is not set, a default objective function is used. - * - * CLASSIFICATION_BINARY: - * "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver - * operating characteristic (ROC) curve. - * "MINIMIZE_LOG_LOSS" - Minimize log loss. - * "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. - * "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified - * recall value. - * "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified - * precision value. - * - * CLASSIFICATION_MULTI_CLASS : - * "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. - * - * - * REGRESSION: - * "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). - * "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). - * "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). - * - * @property {Object[]} tablesModelColumnInfo - * Output only. Auxiliary information for each of the - * input_feature_column_specs with respect to this particular model. - * - * This object should have the same structure as [TablesModelColumnInfo]{@link google.cloud.automl.v1beta1.TablesModelColumnInfo} - * - * @property {number} trainBudgetMilliNodeHours - * Required. The train budget of creating this model, expressed in milli node - * hours i.e. 1,000 value in this field means 1 node hour. - * - * The training cost of the model will not exceed this budget. The final cost - * will be attempted to be close to the budget, though may end up being (even) - * noticeably smaller - at the backend's discretion. This especially may - * happen when further model training ceases to provide any improvements. - * - * If the budget is set to a value known to be insufficient to train a - * model for the given dataset, the training won't be attempted and - * will error. - * - * The train budget must be between 1,000 and 72,000 milli node hours, - * inclusive. - * - * @property {number} trainCostMilliNodeHours - * Output only. The actual training cost of the model, expressed in milli - * node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed - * to not exceed the train budget. - * - * @property {boolean} disableEarlyStopping - * Use the entire training budget. This disables the early stopping feature. - * By default, the early stopping feature is enabled, which means that AutoML - * Tables might stop training before the entire training budget has been used. - * - * @typedef TablesModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TablesModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/tables.proto} - */ -const TablesModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Contains annotation details specific to Tables. - * - * @property {number} score - * Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher - * value means greater confidence in the returned value. - * For - * - * target_column_spec - * of FLOAT64 data type the score is not populated. - * - * @property {Object} predictionInterval - * Output only. Only populated when - * - * target_column_spec - * has FLOAT64 data type. An interval in which the exactly correct target - * value has 95% chance to be in. - * - * This object should have the same structure as [DoubleRange]{@link google.cloud.automl.v1beta1.DoubleRange} - * - * @property {Object} value - * The predicted value of the row's - * - * target_column. - * The value depends on the column's DataType: - * - * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY - * value. - * - * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. - * - * This object should have the same structure as [Value]{@link google.protobuf.Value} - * - * @property {Object[]} tablesModelColumnInfo - * Output only. Auxiliary information for each of the model's - * - * input_feature_column_specs - * with respect to this particular prediction. - * If no other fields than - * - * column_spec_name - * and - * - * column_display_name - * would be populated, then this whole field is not. - * - * This object should have the same structure as [TablesModelColumnInfo]{@link google.cloud.automl.v1beta1.TablesModelColumnInfo} - * - * @property {number} baselineScore - * Output only. Stores the prediction score for the baseline example, which - * is defined as the example with all values set to their baseline values. - * This is used as part of the Sampled Shapley explanation of the model's - * prediction. This field is populated only when feature importance is - * requested. For regression models, this holds the baseline prediction for - * the baseline example. For classification models, this holds the baseline - * prediction for the baseline example for the argmax class. - * - * @typedef TablesAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TablesAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/tables.proto} - */ -const TablesAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * An information specific to given column and Tables Model, in context - * of the Model and the predictions created by it. - * - * @property {string} columnSpecName - * Output only. The name of the ColumnSpec describing the column. Not - * populated when this proto is outputted to BigQuery. - * - * @property {string} columnDisplayName - * Output only. The display name of the column (same as the display_name of - * its ColumnSpec). - * - * @property {number} featureImportance - * Output only. When given as part of a Model (always populated): - * Measurement of how much model predictions correctness on the TEST data - * depend on values in this column. A value between 0 and 1, higher means - * higher influence. These values are normalized - for all input feature - * columns of a given model they add to 1. - * - * When given back by Predict (populated iff - * feature_importance - * param is set) or Batch - * Predict (populated iff - * feature_importance - * param is set): - * Measurement of how impactful for the prediction returned for the given row - * the value in this column was. Specifically, the feature importance - * specifies the marginal contribution that the feature made to the prediction - * score compared to the baseline score. These values are computed using the - * Sampled Shapley method. - * - * @typedef TablesModelColumnInfo - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TablesModelColumnInfo definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/tables.proto} - */ -const TablesModelColumnInfo = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_temporal.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_temporal.js deleted file mode 100644 index 19f0df3d344..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_temporal.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2020 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 time period inside of an example that has a time dimension (e.g. video). - * - * @property {Object} startTimeOffset - * Start of the time segment (inclusive), represented as the duration since - * the example start. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} endTimeOffset - * End of the time segment (exclusive), represented as the duration since the - * example start. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @typedef TimeSegment - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TimeSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/temporal.proto} - */ -const TimeSegment = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text.js deleted file mode 100644 index 168bd6c5754..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2020 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. - -/** - * Dataset metadata for classification. - * - * @property {number} classificationType - * Required. Type of the classification problem. - * - * The number should be among the values of [ClassificationType]{@link google.cloud.automl.v1beta1.ClassificationType} - * - * @typedef TextClassificationDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextClassificationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} - */ -const TextClassificationDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to text classification. - * - * @property {number} classificationType - * Output only. Classification type of the dataset used to train this model. - * - * The number should be among the values of [ClassificationType]{@link google.cloud.automl.v1beta1.ClassificationType} - * - * @typedef TextClassificationModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextClassificationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} - */ -const TextClassificationModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Dataset metadata that is specific to text extraction - * @typedef TextExtractionDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextExtractionDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} - */ -const TextExtractionDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to text extraction. - * @typedef TextExtractionModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextExtractionModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} - */ -const TextExtractionModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Dataset metadata for text sentiment. - * - * @property {number} sentimentMax - * Required. A sentiment is expressed as an integer ordinal, where higher value - * means a more positive sentiment. The range of sentiments that will be used - * is between 0 and sentiment_max (inclusive on both ends), and all the values - * in the range must be represented in the dataset before a model can be - * created. - * sentiment_max value must be between 1 and 10 (inclusive). - * - * @typedef TextSentimentDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextSentimentDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} - */ -const TextSentimentDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to text sentiment. - * @typedef TextSentimentModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextSentimentModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} - */ -const TextSentimentModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_extraction.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_extraction.js deleted file mode 100644 index 257751e998c..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_extraction.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2020 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. - -/** - * Annotation for identifying spans of text. - * - * @property {Object} textSegment - * An entity annotation will set this, which is the part of the original - * text to which the annotation pertains. - * - * This object should have the same structure as [TextSegment]{@link google.cloud.automl.v1beta1.TextSegment} - * - * @property {number} score - * Output only. A confidence estimate between 0.0 and 1.0. A higher value - * means greater confidence in correctness of the annotation. - * - * @typedef TextExtractionAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextExtractionAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text_extraction.proto} - */ -const TextExtractionAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model evaluation metrics for text extraction problems. - * - * @property {number} auPrc - * Output only. The Area under precision recall curve metric. - * - * @property {Object[]} confidenceMetricsEntries - * Output only. Metrics that have confidence thresholds. - * Precision-recall curve can be derived from it. - * - * This object should have the same structure as [ConfidenceMetricsEntry]{@link google.cloud.automl.v1beta1.ConfidenceMetricsEntry} - * - * @typedef TextExtractionEvaluationMetrics - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text_extraction.proto} - */ -const TextExtractionEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Metrics for a single confidence threshold. - * - * @property {number} confidenceThreshold - * Output only. The confidence threshold value used to compute the metrics. - * Only annotations with score of at least this threshold are considered to - * be ones the model would return. - * - * @property {number} recall - * Output only. Recall under the given confidence threshold. - * - * @property {number} precision - * Output only. Precision under the given confidence threshold. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @typedef ConfidenceMetricsEntry - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text_extraction.proto} - */ - ConfidenceMetricsEntry: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_segment.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_segment.js deleted file mode 100644 index bbd21160e6c..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_segment.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2020 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 contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. - * - * @property {string} content - * Output only. The content of the TextSegment. - * - * @property {number} startOffset - * Required. Zero-based character index of the first character of the text - * segment (counting characters from the beginning of the text). - * - * @property {number} endOffset - * Required. Zero-based character index of the first character past the end of - * the text segment (counting character from the beginning of the text). - * The character at the end_offset is NOT included in the text segment. - * - * @typedef TextSegment - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text_segment.proto} - */ -const TextSegment = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_sentiment.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_sentiment.js deleted file mode 100644 index a5db6173ced..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text_sentiment.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2020 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. - -/** - * Contains annotation details specific to text sentiment. - * - * @property {number} sentiment - * Output only. The sentiment with the semantic, as given to the - * AutoMl.ImportData when populating the dataset from which the model used - * for the prediction had been trained. - * The sentiment values are between 0 and - * Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - * with higher value meaning more positive sentiment. They are completely - * relative, i.e. 0 means least positive sentiment and sentiment_max means - * the most positive from the sentiments present in the train data. Therefore - * e.g. if train data had only negative sentiment, then sentiment_max, would - * be still negative (although least negative). - * The sentiment shouldn't be confused with "score" or "magnitude" - * from the previous Natural Language Sentiment Analysis API. - * - * @typedef TextSentimentAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextSentimentAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text_sentiment.proto} - */ -const TextSentimentAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model evaluation metrics for text sentiment problems. - * - * @property {number} precision - * Output only. Precision. - * - * @property {number} recall - * Output only. Recall. - * - * @property {number} f1Score - * Output only. The harmonic mean of recall and precision. - * - * @property {number} meanAbsoluteError - * Output only. Mean absolute error. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {number} meanSquaredError - * Output only. Mean squared error. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {number} linearKappa - * Output only. Linear weighted kappa. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {number} quadraticKappa - * Output only. Quadratic weighted kappa. Only set for the overall model - * evaluation, not for evaluation of a single annotation spec. - * - * @property {Object} confusionMatrix - * Output only. Confusion matrix of the evaluation. - * Only set for the overall model evaluation, not for evaluation of a single - * annotation spec. - * - * This object should have the same structure as [ConfusionMatrix]{@link google.cloud.automl.v1beta1.ConfusionMatrix} - * - * @property {string[]} annotationSpecId - * Output only. The annotation spec ids used for this evaluation. - * Deprecated . - * - * @typedef TextSentimentEvaluationMetrics - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text_sentiment.proto} - */ -const TextSentimentEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_translation.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_translation.js deleted file mode 100644 index 996c0e46bb5..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_translation.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2020 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. - -/** - * Dataset metadata that is specific to translation. - * - * @property {string} sourceLanguageCode - * Required. The BCP-47 language code of the source language. - * - * @property {string} targetLanguageCode - * Required. The BCP-47 language code of the target language. - * - * @typedef TranslationDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TranslationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} - */ -const TranslationDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Evaluation metrics for the dataset. - * - * @property {number} bleuScore - * Output only. BLEU score. - * - * @property {number} baseBleuScore - * Output only. BLEU score for base model. - * - * @typedef TranslationEvaluationMetrics - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TranslationEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} - */ -const TranslationEvaluationMetrics = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata that is specific to translation. - * - * @property {string} baseModel - * The resource name of the model to use as a baseline to train the custom - * model. If unset, we use the default base model provided by Google - * Translate. Format: - * `projects/{project_id}/locations/{location_id}/models/{model_id}` - * - * @property {string} sourceLanguageCode - * Output only. Inferred from the dataset. - * The source languge (The BCP-47 language code) that is used for training. - * - * @property {string} targetLanguageCode - * Output only. The target languge (The BCP-47 language code) that is used for - * training. - * - * @typedef TranslationModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TranslationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} - */ -const TranslationModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Annotation details specific to translation. - * - * @property {Object} translatedContent - * Output only . The translated content. - * - * This object should have the same structure as [TextSnippet]{@link google.cloud.automl.v1beta1.TextSnippet} - * - * @typedef TranslationAnnotation - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.TranslationAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} - */ -const TranslationAnnotation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_video.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_video.js deleted file mode 100644 index 6695066e04f..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_video.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2020 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. - -/** - * Dataset metadata specific to video classification. - * All Video Classification datasets are treated as multi label. - * @typedef VideoClassificationDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/video.proto} - */ -const VideoClassificationDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Dataset metadata specific to video object tracking. - * @typedef VideoObjectTrackingDatasetMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/video.proto} - */ -const VideoObjectTrackingDatasetMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata specific to video classification. - * @typedef VideoClassificationModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.VideoClassificationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/video.proto} - */ -const VideoClassificationModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Model metadata specific to video object tracking. - * @typedef VideoObjectTrackingModelMetadata - * @memberof google.cloud.automl.v1beta1 - * @see [google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/video.proto} - */ -const VideoObjectTrackingModelMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/longrunning/doc_operations.js b/packages/google-cloud-automl/src/v1beta1/doc/google/longrunning/doc_operations.js deleted file mode 100644 index 099e418d620..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/longrunning/doc_operations.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2020 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. - -/** - * This resource represents a long-running operation that is the result of a - * network API call. - * - * @property {string} name - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * @property {Object} metadata - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @property {boolean} done - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * @property {Object} error - * The error result of the operation in case of failure or cancellation. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @property {Object} response - * The normal response of the operation in case of success. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Operation - * @memberof google.longrunning - * @see [google.longrunning.Operation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} - */ -const Operation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_any.js b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_any.js deleted file mode 100644 index 813682aa336..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2020 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. - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * # JSON - * - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message google.protobuf.Duration): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * - * @property {string} typeUrl - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a google.protobuf.Type - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * - * @property {Buffer} value - * Must be a valid serialized protocol buffer of the above specified type. - * - * @typedef Any - * @memberof google.protobuf - * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ -const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_duration.js b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_duration.js deleted file mode 100644 index bd4b4ee6067..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_duration.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2020 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 Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - * - * @property {number} seconds - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - * - * @property {number} nanos - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * - * @typedef Duration - * @memberof google.protobuf - * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} - */ -const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 59e745f36c2..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2020 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-automl/src/v1beta1/doc/google/protobuf/doc_struct.js b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_struct.js deleted file mode 100644 index a143b9a6d2d..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_struct.js +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2020 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. - -/** - * `Struct` represents a structured data value, consisting of fields - * which map to dynamically typed values. In some languages, `Struct` - * might be supported by a native representation. For example, in - * scripting languages like JS a struct is represented as an - * object. The details of that representation are described together - * with the proto support for the language. - * - * The JSON representation for `Struct` is JSON object. - * - * @property {Object.} fields - * Unordered map of dynamically typed values. - * - * @typedef Struct - * @memberof google.protobuf - * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} - */ -const Struct = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `Value` represents a dynamically typed value which can be either - * null, a number, a string, a boolean, a recursive struct value, or a - * list of values. A producer of value is expected to set one of that - * variants, absence of any variant indicates an error. - * - * The JSON representation for `Value` is JSON value. - * - * @property {number} nullValue - * Represents a null value. - * - * The number should be among the values of [NullValue]{@link google.protobuf.NullValue} - * - * @property {number} numberValue - * Represents a double value. - * - * @property {string} stringValue - * Represents a string value. - * - * @property {boolean} boolValue - * Represents a boolean value. - * - * @property {Object} structValue - * Represents a structured value. - * - * This object should have the same structure as [Struct]{@link google.protobuf.Struct} - * - * @property {Object} listValue - * Represents a repeated `Value`. - * - * This object should have the same structure as [ListValue]{@link google.protobuf.ListValue} - * - * @typedef Value - * @memberof google.protobuf - * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} - */ -const Value = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `ListValue` is a wrapper around a repeated field of values. - * - * The JSON representation for `ListValue` is JSON array. - * - * @property {Object[]} values - * Repeated field of dynamically typed values. - * - * This object should have the same structure as [Value]{@link google.protobuf.Value} - * - * @typedef ListValue - * @memberof google.protobuf - * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} - */ -const ListValue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `NullValue` is a singleton enumeration to represent the null value for the - * `Value` type union. - * - * The JSON representation for `NullValue` is JSON `null`. - * - * @enum {number} - * @memberof google.protobuf - */ -const NullValue = { - - /** - * Null value. - */ - NULL_VALUE: 0 -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index ad801cc9a10..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2020 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://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-automl/src/v1beta1/doc/google/rpc/doc_status.js b/packages/google-cloud-automl/src/v1beta1/doc/google/rpc/doc_status.js deleted file mode 100644 index 750e0af7689..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2020 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. - -/** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). Each `Status` message contains - * three pieces of data: error code, error message, and error details. - * - * You can find out more about this error model and how to work with it in the - * [API Design Guide](https://cloud.google.com/apis/design/errors). - * - * @property {number} code - * The status code, which should be an enum value of google.rpc.Code. - * - * @property {string} message - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized by the client. - * - * @property {Object[]} details - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Status - * @memberof google.rpc - * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} - */ -const Status = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/index.js b/packages/google-cloud-automl/src/v1beta1/index.ts similarity index 61% rename from packages/google-cloud-automl/src/v1beta1/index.js rename to packages/google-cloud-automl/src/v1beta1/index.ts index 26633ce3a80..bdc16537c46 100644 --- a/packages/google-cloud-automl/src/v1beta1/index.js +++ b/packages/google-cloud-automl/src/v1beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -11,11 +11,10 @@ // 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 AutoMlClient = require('./auto_ml_client'); -const PredictionServiceClient = require('./prediction_service_client'); - -module.exports.AutoMlClient = AutoMlClient; -module.exports.PredictionServiceClient = PredictionServiceClient; +export {AutoMlClient} from './auto_ml_client'; +export {PredictionServiceClient} from './prediction_service_client'; diff --git a/packages/google-cloud-automl/src/v1beta1/prediction_service_client.js b/packages/google-cloud-automl/src/v1beta1/prediction_service_client.js deleted file mode 100644 index 5f5bf45ac61..00000000000 --- a/packages/google-cloud-automl/src/v1beta1/prediction_service_client.js +++ /dev/null @@ -1,615 +0,0 @@ -// Copyright 2020 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('./prediction_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * AutoML Prediction API. - * - * On any input that is documented to expect a string parameter in - * snake_case or kebab-case, either of those cases is accepted. - * - * @class - * @memberof v1beta1 - */ -class PredictionServiceClient { - /** - * Construct an instance of PredictionServiceClient. - * - * @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 = { - modelPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/models/{model}' - ), - }; - - const protoFilesRoot = opts.fallback - ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) - : gaxModule.protobuf.loadSync(nodejsProtoPath); - - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - this.operationsClient = new gaxModule.lro({ - auth: gaxGrpc.auth, - grpc: gaxGrpc.grpc, - }).operationsClient(opts); - - const batchPredictResponse = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.BatchPredictResult' - ); - const batchPredictMetadata = protoFilesRoot.lookup( - 'google.cloud.automl.v1beta1.OperationMetadata' - ); - - this._descriptors.longrunning = { - batchPredict: new gaxModule.LongrunningDescriptor( - this.operationsClient, - batchPredictResponse.decode.bind(batchPredictResponse), - batchPredictMetadata.decode.bind(batchPredictMetadata) - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.automl.v1beta1.PredictionService', - 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.automl.v1beta1.PredictionService. - const predictionServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.automl.v1beta1.PredictionService') - : protos.google.cloud.automl.v1beta1.PredictionService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const predictionServiceStubMethods = ['predict', 'batchPredict']; - for (const methodName of predictionServiceStubMethods) { - const innerCallPromise = predictionServiceStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.longrunning[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'automl.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'automl.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 -- - // ------------------- - - /** - * Perform an online prediction. The prediction result will be directly - * returned in the response. - * Available for following ML problems, and their expected request payloads: - * * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - * up to 30MB. - * * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - * up to 30MB. - * * Text Classification - TextSnippet, content up to 60,000 characters, - * UTF-8 encoded. - * * Text Extraction - TextSnippet, content up to 30,000 characters, - * UTF-8 NFC encoded. - * * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - * encoded. - * * Tables - Row, with column values matching the columns of the model, - * up to 5MB. Not available for FORECASTING - * - * prediction_type. - * * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - * encoded. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the model requested to serve the prediction. - * @param {Object} request.payload - * Required. Payload to perform a prediction on. The payload must match the - * problem type that the model was trained to solve. - * - * This object should have the same structure as [ExamplePayload]{@link google.cloud.automl.v1beta1.ExamplePayload} - * @param {Object.} [request.params] - * Additional domain-specific parameters, any string must be up to 25000 - * characters long. - * - * * For Image Classification: - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that have - * at least this confidence score. The default is 0.5. - * - * * For Image Object Detection: - * `score_threshold` - (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be returned in the response. Default is 100, the - * requested value may be limited by server. - * * For Tables: - * feature_importance - (boolean) Whether feature importance - * should be populated in the returned TablesAnnotation. - * The default is false. - * @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 [PredictResponse]{@link google.cloud.automl.v1beta1.PredictResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PredictResponse]{@link google.cloud.automl.v1beta1.PredictResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.PredictionServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const payload = {}; - * const request = { - * name: formattedName, - * payload: payload, - * }; - * client.predict(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - predict(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.predict(request, options, callback); - } - - /** - * Perform a batch prediction. Unlike the online Predict, batch - * prediction result won't be immediately available in the response. Instead, - * a long running operation object is returned. User can poll the operation - * result via GetOperation - * method. Once the operation is done, BatchPredictResult is returned in - * the response field. - * Available for following ML problems: - * * Image Classification - * * Image Object Detection - * * Video Classification - * * Video Object Tracking * Text Extraction - * * Tables - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the model requested to serve the batch prediction. - * @param {Object} request.inputConfig - * Required. The input configuration for batch prediction. - * - * This object should have the same structure as [BatchPredictInputConfig]{@link google.cloud.automl.v1beta1.BatchPredictInputConfig} - * @param {Object} request.outputConfig - * Required. The Configuration specifying where output predictions should - * be written. - * - * This object should have the same structure as [BatchPredictOutputConfig]{@link google.cloud.automl.v1beta1.BatchPredictOutputConfig} - * @param {Object.} [request.params] - * Required. Additional domain-specific parameters for the predictions, any string must - * be up to 25000 characters long. - * - * * For Text Classification: - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for a text snippet, it will only produce results - * that have at least this confidence score. The default is 0.5. - * - * * For Image Classification: - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for an image, it will only produce results that - * have at least this confidence score. The default is 0.5. - * - * * For Image Object Detection: - * - * `score_threshold` - (float) When Model detects objects on the image, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be produced per image. Default is 100, the - * requested value may be limited by server. - * - * * For Video Classification : - * - * `score_threshold` - (float) A value from 0.0 to 1.0. When the model - * makes predictions for a video, it will only produce results that - * have at least this confidence score. The default is 0.5. - * `segment_classification` - (boolean) Set to true to request - * segment-level classification. AutoML Video Intelligence returns - * labels and their confidence scores for the entire segment of the - * video that user specified in the request configuration. - * The default is "true". - * `shot_classification` - (boolean) Set to true to request shot-level - * classification. AutoML Video Intelligence determines the boundaries - * for each camera shot in the entire segment of the video that user - * specified in the request configuration. AutoML Video Intelligence - * then returns labels and their confidence scores for each detected - * shot, along with the start and end time of the shot. - * WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no metrics - * provided to describe that quality. The default is "false". - * `1s_interval_classification` - (boolean) Set to true to request - * classification for a video at one-second intervals. AutoML Video - * Intelligence returns labels and their confidence scores for each - * second of the entire segment of the video that user specified in the - * request configuration. - * WARNING: Model evaluation is not done for this classification - * type, the quality of it depends on training data, but there are no - * metrics provided to describe that quality. The default is - * "false". - * - * * For Tables: - * - * feature_importance - (boolean) Whether feature importance - * should be populated in the returned TablesAnnotations. The - * default is false. - * - * * For Video Object Tracking: - * - * `score_threshold` - (float) When Model detects objects on video frames, - * it will only produce bounding boxes which have at least this - * confidence score. Value in 0 to 1 range, default is 0.5. - * `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be returned per frame. Default is 100, the requested - * value may be limited by server. - * `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - * at least that long as a relative value of video frame size will be - * returned. Value in 0 to 1 range. Default is 0. - * @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 a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const automl = require('@google-cloud/automl'); - * - * const client = new automl.v1beta1.PredictionServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const inputConfig = {}; - * const outputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the promise pattern. - * client.batchPredict(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Operation#promise starts polling for the completion of the LRO. - * return operation.promise(); - * }) - * .then(responses => { - * const result = responses[0]; - * const metadata = responses[1]; - * const finalApiResponse = responses[2]; - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const inputConfig = {}; - * const outputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the event emitter pattern. - * client.batchPredict(request) - * .then(responses => { - * const [operation, initialApiResponse] = responses; - * - * // Adding a listener for the "complete" event starts polling for the - * // completion of the operation. - * operation.on('complete', (result, metadata, finalApiResponse) => { - * // doSomethingWith(result); - * }); - * - * // Adding a listener for the "progress" event causes the callback to be - * // called on any change in metadata when the operation is polled. - * operation.on('progress', (metadata, apiResponse) => { - * // doSomethingWith(metadata) - * }); - * - * // Adding a listener for the "error" event handles any errors found during polling. - * operation.on('error', err => { - * // throw(err); - * }); - * }) - * .catch(err => { - * console.error(err); - * }); - * - * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * const inputConfig = {}; - * const outputConfig = {}; - * const request = { - * name: formattedName, - * inputConfig: inputConfig, - * outputConfig: outputConfig, - * }; - * - * // Handle the operation using the await pattern. - * const [operation] = await client.batchPredict(request); - * - * const [response] = await operation.promise(); - */ - batchPredict(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.batchPredict(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified model resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} model - * @returns {String} - */ - modelPath(project, location, model) { - return this._pathTemplates.modelPathTemplate.render({ - project: project, - location: location, - model: model, - }); - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).project; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).location; - } - - /** - * Parse the modelName from a model resource. - * - * @param {String} modelName - * A fully-qualified path representing a model resources. - * @returns {String} - A string representing the model. - */ - matchModelFromModelName(modelName) { - return this._pathTemplates.modelPathTemplate.match(modelName).model; - } -} - -module.exports = PredictionServiceClient; diff --git a/packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts b/packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts new file mode 100644 index 00000000000..ef590a33afe --- /dev/null +++ b/packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts @@ -0,0 +1,1015 @@ +// 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, + LROperation, +} from 'google-gax'; +import * as path from 'path'; + +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './prediction_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * AutoML Prediction API. + * + * On any input that is documented to expect a string parameter in + * snake_case or kebab-case, either of those cases is accepted. + * @class + * @memberof v1beta1 + */ +export class PredictionServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + operationsClient: gax.OperationsClient; + predictionServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PredictionServiceClient. + * + * @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 PredictionServiceClient; + 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 PredictionServiceClient).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 = { + annotationSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + columnSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}' + ), + datasetPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}' + ), + modelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelEvaluationPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}' + ), + tableSpecPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}' + ), + }; + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback + ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) + : gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const batchPredictResponse = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.BatchPredictResult' + ) as gax.protobuf.Type; + const batchPredictMetadata = protoFilesRoot.lookup( + '.google.cloud.automl.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + + this._descriptors.longrunning = { + batchPredict: new gaxModule.LongrunningDescriptor( + this.operationsClient, + batchPredictResponse.decode.bind(batchPredictResponse), + batchPredictMetadata.decode.bind(batchPredictMetadata) + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.automl.v1beta1.PredictionService', + 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.automl.v1beta1.PredictionService. + this.predictionServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.automl.v1beta1.PredictionService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.automl.v1beta1.PredictionService, + 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 predictionServiceStubMethods = ['predict', 'batchPredict']; + + for (const methodName of predictionServiceStubMethods) { + const innerCallPromise = this.predictionServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + 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 + ) => { + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'automl.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'automl.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 -- + // ------------------- + predict( + request: protosTypes.google.cloud.automl.v1beta1.IPredictRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IPredictResponse, + protosTypes.google.cloud.automl.v1beta1.IPredictRequest | undefined, + {} | undefined + ] + >; + predict( + request: protosTypes.google.cloud.automl.v1beta1.IPredictRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.automl.v1beta1.IPredictResponse, + protosTypes.google.cloud.automl.v1beta1.IPredictRequest | undefined, + {} | undefined + > + ): void; + /** + * Perform an online prediction. The prediction result will be directly + * returned in the response. + * Available for following ML problems, and their expected request payloads: + * * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + * up to 30MB. + * * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + * up to 30MB. + * * Text Classification - TextSnippet, content up to 60,000 characters, + * UTF-8 encoded. + * * Text Extraction - TextSnippet, content up to 30,000 characters, + * UTF-8 NFC encoded. + * * Translation - TextSnippet, content up to 25,000 characters, UTF-8 + * encoded. + * * Tables - Row, with column values matching the columns of the model, + * up to 5MB. Not available for FORECASTING + * + * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + * * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + * encoded. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the model requested to serve the prediction. + * @param {google.cloud.automl.v1beta1.ExamplePayload} request.payload + * Required. Payload to perform a prediction on. The payload must match the + * problem type that the model was trained to solve. + * @param {number[]} request.params + * Additional domain-specific parameters, any string must be up to 25000 + * characters long. + * + * * For Image Classification: + * + * `score_threshold` - (float) A value from 0.0 to 1.0. When the model + * makes predictions for an image, it will only produce results that have + * at least this confidence score. The default is 0.5. + * + * * For Image Object Detection: + * `score_threshold` - (float) When Model detects objects on the image, + * it will only produce bounding boxes which have at least this + * confidence score. Value in 0 to 1 range, default is 0.5. + * `max_bounding_box_count` - (int64) No more than this number of bounding + * boxes will be returned in the response. Default is 100, the + * requested value may be limited by server. + * * For Tables: + * feature_importance - (boolean) Whether feature importance + * should be populated in the returned TablesAnnotation. + * The default is false. + * @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 [PredictResponse]{@link google.cloud.automl.v1beta1.PredictResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + predict( + request: protosTypes.google.cloud.automl.v1beta1.IPredictRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.automl.v1beta1.IPredictResponse, + protosTypes.google.cloud.automl.v1beta1.IPredictRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.automl.v1beta1.IPredictResponse, + protosTypes.google.cloud.automl.v1beta1.IPredictRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.automl.v1beta1.IPredictResponse, + protosTypes.google.cloud.automl.v1beta1.IPredictRequest | 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.predict(request, options, callback); + } + + batchPredict( + request: protosTypes.google.cloud.automl.v1beta1.IBatchPredictRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1beta1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + batchPredict( + request: protosTypes.google.cloud.automl.v1beta1.IBatchPredictRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protosTypes.google.cloud.automl.v1beta1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; + /** + * Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch + * prediction result won't be immediately available in the response. Instead, + * a long running operation object is returned. User can poll the operation + * result via [GetOperation][google.longrunning.Operations.GetOperation] + * method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in + * the [response][google.longrunning.Operation.response] field. + * Available for following ML problems: + * * Image Classification + * * Image Object Detection + * * Video Classification + * * Video Object Tracking * Text Extraction + * * Tables + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the model requested to serve the batch prediction. + * @param {google.cloud.automl.v1beta1.BatchPredictInputConfig} request.inputConfig + * Required. The input configuration for batch prediction. + * @param {google.cloud.automl.v1beta1.BatchPredictOutputConfig} request.outputConfig + * Required. The Configuration specifying where output predictions should + * be written. + * @param {number[]} request.params + * Required. Additional domain-specific parameters for the predictions, any string must + * be up to 25000 characters long. + * + * * For Text Classification: + * + * `score_threshold` - (float) A value from 0.0 to 1.0. When the model + * makes predictions for a text snippet, it will only produce results + * that have at least this confidence score. The default is 0.5. + * + * * For Image Classification: + * + * `score_threshold` - (float) A value from 0.0 to 1.0. When the model + * makes predictions for an image, it will only produce results that + * have at least this confidence score. The default is 0.5. + * + * * For Image Object Detection: + * + * `score_threshold` - (float) When Model detects objects on the image, + * it will only produce bounding boxes which have at least this + * confidence score. Value in 0 to 1 range, default is 0.5. + * `max_bounding_box_count` - (int64) No more than this number of bounding + * boxes will be produced per image. Default is 100, the + * requested value may be limited by server. + * + * * For Video Classification : + * + * `score_threshold` - (float) A value from 0.0 to 1.0. When the model + * makes predictions for a video, it will only produce results that + * have at least this confidence score. The default is 0.5. + * `segment_classification` - (boolean) Set to true to request + * segment-level classification. AutoML Video Intelligence returns + * labels and their confidence scores for the entire segment of the + * video that user specified in the request configuration. + * The default is "true". + * `shot_classification` - (boolean) Set to true to request shot-level + * classification. AutoML Video Intelligence determines the boundaries + * for each camera shot in the entire segment of the video that user + * specified in the request configuration. AutoML Video Intelligence + * then returns labels and their confidence scores for each detected + * shot, along with the start and end time of the shot. + * WARNING: Model evaluation is not done for this classification type, + * the quality of it depends on training data, but there are no metrics + * provided to describe that quality. The default is "false". + * `1s_interval_classification` - (boolean) Set to true to request + * classification for a video at one-second intervals. AutoML Video + * Intelligence returns labels and their confidence scores for each + * second of the entire segment of the video that user specified in the + * request configuration. + * WARNING: Model evaluation is not done for this classification + * type, the quality of it depends on training data, but there are no + * metrics provided to describe that quality. The default is + * "false". + * + * * For Tables: + * + * feature_importance - (boolean) Whether feature importance + * should be populated in the returned TablesAnnotations. The + * default is false. + * + * * For Video Object Tracking: + * + * `score_threshold` - (float) When Model detects objects on video frames, + * it will only produce bounding boxes which have at least this + * confidence score. Value in 0 to 1 range, default is 0.5. + * `max_bounding_box_count` - (int64) No more than this number of bounding + * boxes will be returned per frame. Default is 100, the requested + * value may be limited by server. + * `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + * at least that long as a relative value of video frame size will be + * returned. Value in 0 to 1 range. Default is 0. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + batchPredict( + request: protosTypes.google.cloud.automl.v1beta1.IBatchPredictRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protosTypes.google.cloud.automl.v1beta1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + LROperation< + protosTypes.google.cloud.automl.v1beta1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + LROperation< + protosTypes.google.cloud.automl.v1beta1.IBatchPredictResult, + protosTypes.google.cloud.automl.v1beta1.IOperationMetadata + >, + protosTypes.google.longrunning.IOperation | 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.batchPredict(request, options, callback); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this._pathTemplates.annotationSpecPathTemplate.render({ + project, + location, + dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified columnSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} table_spec + * @param {string} column_spec + * @returns {string} Resource name string. + */ + columnSpecPath( + project: string, + location: string, + dataset: string, + tableSpec: string, + columnSpec: string + ) { + return this._pathTemplates.columnSpecPathTemplate.render({ + project, + location, + dataset, + table_spec: tableSpec, + column_spec: columnSpec, + }); + } + + /** + * Parse the project from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .project; + } + + /** + * Parse the location from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .location; + } + + /** + * Parse the dataset from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .dataset; + } + + /** + * Parse the table_spec from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the table_spec. + */ + matchTableSpecFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .table_spec; + } + + /** + * Parse the column_spec from ColumnSpec resource. + * + * @param {string} columnSpecName + * A fully-qualified path representing ColumnSpec resource. + * @returns {string} A string representing the column_spec. + */ + matchColumnSpecFromColumnSpecName(columnSpecName: string) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .column_spec; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this._pathTemplates.datasetPathTemplate.render({ + project, + location, + dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this._pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this._pathTemplates.modelPathTemplate.render({ + project, + location, + model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this._pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} model_evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + modelEvaluation: string + ) { + return this._pathTemplates.modelEvaluationPathTemplate.render({ + project, + location, + model, + model_evaluation: modelEvaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the model_evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model_evaluation. + */ + matchModelEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this._pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model_evaluation; + } + + /** + * Return a fully-qualified tableSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} table_spec + * @returns {string} Resource name string. + */ + tableSpecPath( + project: string, + location: string, + dataset: string, + tableSpec: string + ) { + return this._pathTemplates.tableSpecPathTemplate.render({ + project, + location, + dataset, + table_spec: tableSpec, + }); + } + + /** + * Parse the project from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .project; + } + + /** + * Parse the location from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .location; + } + + /** + * Parse the dataset from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .dataset; + } + + /** + * Parse the table_spec from TableSpec resource. + * + * @param {string} tableSpecName + * A fully-qualified path representing TableSpec resource. + * @returns {string} A string representing the table_spec. + */ + matchTableSpecFromTableSpecName(tableSpecName: string) { + return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) + .table_spec; + } + + /** + * 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.predictionServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-automl/src/v1beta1/prediction_service_client_config.json b/packages/google-cloud-automl/src/v1beta1/prediction_service_client_config.json index 223ea719ba8..cc9f502b67c 100644 --- a/packages/google-cloud-automl/src/v1beta1/prediction_service_client_config.json +++ b/packages/google-cloud-automl/src/v1beta1/prediction_service_client_config.json @@ -2,11 +2,11 @@ "interfaces": { "google.cloud.automl.v1beta1.PredictionService": { "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": 60000, - "rpc_timeout_multiplier": 1.0, + "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } @@ -26,7 +26,7 @@ "retry_params_name": "default" }, "BatchPredict": { - "timeout_millis": 20000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-automl/src/v1beta1/prediction_service_proto_list.json b/packages/google-cloud-automl/src/v1beta1/prediction_service_proto_list.json index 98ea2af5536..3a493dbb13a 100644 --- a/packages/google-cloud-automl/src/v1beta1/prediction_service_proto_list.json +++ b/packages/google-cloud-automl/src/v1beta1/prediction_service_proto_list.json @@ -1,3 +1,30 @@ [ - "../../protos/google/cloud/automl/v1beta1/prediction_service.proto" + "../../protos/google/cloud/automl/v1beta1/annotation_payload.proto", + "../../protos/google/cloud/automl/v1beta1/annotation_spec.proto", + "../../protos/google/cloud/automl/v1beta1/classification.proto", + "../../protos/google/cloud/automl/v1beta1/column_spec.proto", + "../../protos/google/cloud/automl/v1beta1/data_items.proto", + "../../protos/google/cloud/automl/v1beta1/data_stats.proto", + "../../protos/google/cloud/automl/v1beta1/data_types.proto", + "../../protos/google/cloud/automl/v1beta1/dataset.proto", + "../../protos/google/cloud/automl/v1beta1/detection.proto", + "../../protos/google/cloud/automl/v1beta1/geometry.proto", + "../../protos/google/cloud/automl/v1beta1/image.proto", + "../../protos/google/cloud/automl/v1beta1/io.proto", + "../../protos/google/cloud/automl/v1beta1/model.proto", + "../../protos/google/cloud/automl/v1beta1/model_evaluation.proto", + "../../protos/google/cloud/automl/v1beta1/operations.proto", + "../../protos/google/cloud/automl/v1beta1/prediction_service.proto", + "../../protos/google/cloud/automl/v1beta1/ranges.proto", + "../../protos/google/cloud/automl/v1beta1/regression.proto", + "../../protos/google/cloud/automl/v1beta1/service.proto", + "../../protos/google/cloud/automl/v1beta1/table_spec.proto", + "../../protos/google/cloud/automl/v1beta1/tables.proto", + "../../protos/google/cloud/automl/v1beta1/temporal.proto", + "../../protos/google/cloud/automl/v1beta1/text.proto", + "../../protos/google/cloud/automl/v1beta1/text_extraction.proto", + "../../protos/google/cloud/automl/v1beta1/text_segment.proto", + "../../protos/google/cloud/automl/v1beta1/text_sentiment.proto", + "../../protos/google/cloud/automl/v1beta1/translation.proto", + "../../protos/google/cloud/automl/v1beta1/video.proto" ] diff --git a/packages/google-cloud-automl/synth.metadata b/packages/google-cloud-automl/synth.metadata index 3ee31e3564b..05e0d034c5a 100644 --- a/packages/google-cloud-automl/synth.metadata +++ b/packages/google-cloud-automl/synth.metadata @@ -1,20 +1,12 @@ { - "updateTime": "2020-03-05T12:13:17.034526Z", + "updateTime": "2020-03-05T22:40:22.969554Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "1.0.0", - "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "638253bf86d1ce1c314108a089b7351440c2f0bf", - "internalRef": "298971070", - "log": "638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n" + "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", + "internalRef": "299181282" } }, { @@ -31,9 +23,8 @@ "source": "googleapis", "apiName": "automl", "apiVersion": "v1beta1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/automl/artman_automl_v1beta1.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } }, { @@ -41,9 +32,8 @@ "source": "googleapis", "apiName": "automl", "apiVersion": "v1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/automl/artman_automl_v1.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } } ] diff --git a/packages/google-cloud-automl/synth.py b/packages/google-cloud-automl/synth.py index 3f66ddf7f51..02b91ec8b73 100644 --- a/packages/google-cloud-automl/synth.py +++ b/packages/google-cloud-automl/synth.py @@ -19,20 +19,27 @@ logging.basicConfig(level=logging.DEBUG) -gapic = gcp.GAPICGenerator() +gapic = gcp.GAPICMicrogenerator() versions = ['v1beta1', 'v1'] for version in versions: - library = gapic.node_library('automl', version) - s.copy(library, excludes=['src/index.js', 'README.md', 'package.json']) + library = gapic.typescript_library( + 'automl', version, + generator_args={ + "grpc-service-config": f"google/cloud/automl/{version}/automl_grpc_service_config.json", + "package-name": f"@google-cloud/automl", + "main-service": f"automl" + }, + proto_path=f'/google/cloud/automl/{version}', + extra_proto_files=['google/cloud/common_resources.proto'], + ) + s.copy(library, excludes=['src/index.ts', 'README.md', 'package.json']) common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() +templates = common_templates.node_library(source_location='build/src') s.copy(templates) -s.replace('**/doc/google/protobuf/doc_timestamp.js', - 'https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)', - r"https://\1)") - +linkinator_json="linkinator.config.json" +s.replace(linkinator_json, '"recurse": true,', '"recurse": true,\n\t"concurrency": 10,') # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) diff --git a/packages/google-cloud-automl/system-test/automl.js b/packages/google-cloud-automl/system-test/automl.ts similarity index 88% rename from packages/google-cloud-automl/system-test/automl.js rename to packages/google-cloud-automl/system-test/automl.ts index 9e1e0a4e7c9..3667a8c1d53 100644 --- a/packages/google-cloud-automl/system-test/automl.js +++ b/packages/google-cloud-automl/system-test/automl.ts @@ -14,15 +14,15 @@ 'use strict'; -const automl = require('../src'); -const assert = require('assert'); -const {describe, it, before} = require('mocha'); +import * as automl from '../src'; +import * as assert from 'assert'; +import {describe, it, before} from 'mocha'; const client = new automl.AutoMlClient(); const location = 'us-central1'; describe('automl system tests', () => { - let projectId; + let projectId: string; before(async () => { projectId = await client.getProjectId(); }); diff --git a/packages/google-cloud-automl/system-test/fixtures/sample/src/index.js b/packages/google-cloud-automl/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..943fc42008b --- /dev/null +++ b/packages/google-cloud-automl/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 automl = require('@google-cloud/automl'); + +function main() { + const autoMlClient = new automl.AutoMlClient(); + const predictionServiceClient = new automl.PredictionServiceClient(); +} + +main(); diff --git a/packages/google-cloud-automl/src/v1/index.js b/packages/google-cloud-automl/system-test/fixtures/sample/src/index.ts similarity index 56% rename from packages/google-cloud-automl/src/v1/index.js rename to packages/google-cloud-automl/system-test/fixtures/sample/src/index.ts index 26633ce3a80..2ad77a349bb 100644 --- a/packages/google-cloud-automl/src/v1/index.js +++ b/packages/google-cloud-automl/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -11,11 +11,16 @@ // 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 {AutoMlClient, PredictionServiceClient} from '@google-cloud/automl'; -const AutoMlClient = require('./auto_ml_client'); -const PredictionServiceClient = require('./prediction_service_client'); +function main() { + const autoMlClient = new AutoMlClient(); + const predictionServiceClient = new PredictionServiceClient(); +} -module.exports.AutoMlClient = AutoMlClient; -module.exports.PredictionServiceClient = PredictionServiceClient; +main(); diff --git a/packages/google-cloud-automl/system-test/install.ts b/packages/google-cloud-automl/system-test/install.ts new file mode 100644 index 00000000000..c9aa74ec221 --- /dev/null +++ b/packages/google-cloud-automl/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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'; +import {describe, it} from 'mocha'; + +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-automl/test/gapic-auto_ml-v1.ts b/packages/google-cloud-automl/test/gapic-auto_ml-v1.ts new file mode 100644 index 00000000000..d4cdcb59105 --- /dev/null +++ b/packages/google-cloud-automl/test/gapic-auto_ml-v1.ts @@ -0,0 +1,1141 @@ +// 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'; +import {describe, it} from 'mocha'; +const automlModule = 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); + } + }; +} +function mockLongRunningGrpcMethod( + expectedRequest: {}, + response: {} | null, + error?: {} | null +) { + return (request: {}) => { + assert.deepStrictEqual(request, expectedRequest); + const mockOperation = { + promise() { + return new Promise((resolve, reject) => { + if (error) { + reject(error); + } else { + resolve([response]); + } + }); + }, + }; + return Promise.resolve([mockOperation]); + }; +} +describe('v1.AutoMlClient', () => { + it('has servicePath', () => { + const servicePath = automlModule.v1.AutoMlClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = automlModule.v1.AutoMlClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = automlModule.v1.AutoMlClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new automlModule.v1.AutoMlClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new automlModule.v1.AutoMlClient({ + fallback: true, + }); + assert(client); + }); + describe('getDataset', () => { + it('invokes getDataset without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDataset = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getDataset(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getDataset with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDataset = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getDataset(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateDataset', () => { + it('invokes updateDataset without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest = {}; + request.dataset = {}; + request.dataset.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateDataset(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateDataset with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IUpdateDatasetRequest = {}; + request.dataset = {}; + request.dataset.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateDataset(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getAnnotationSpec', () => { + it('invokes getAnnotationSpec without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getAnnotationSpec(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getAnnotationSpec with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetAnnotationSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getAnnotationSpec(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getModel', () => { + it('invokes getModel without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getModel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getModel with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getModel(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateModel', () => { + it('invokes updateModel without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IUpdateModelRequest = {}; + request.model = {}; + request.model.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateModel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateModel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateModel with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IUpdateModelRequest = {}; + request.model = {}; + request.model.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateModel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateModel(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getModelEvaluation', () => { + it('invokes getModelEvaluation without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getModelEvaluation(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getModelEvaluation with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IGetModelEvaluationRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getModelEvaluation(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createDataset', () => { + it('invokes createDataset without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.ICreateDatasetRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDataset = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .createDataset(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes createDataset with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.ICreateDatasetRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDataset = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .createDataset(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('deleteDataset', () => { + it('invokes deleteDataset without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IDeleteDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .deleteDataset(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes deleteDataset with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IDeleteDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .deleteDataset(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('importData', () => { + it('invokes importData without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IImportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.importData = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .importData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes importData with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IImportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.importData = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .importData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('exportData', () => { + it('invokes exportData without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IExportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportData = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .exportData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes exportData with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IExportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportData = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .exportData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('createModel', () => { + it('invokes createModel without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.ICreateModelRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .createModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes createModel with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.ICreateModelRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .createModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('deleteModel', () => { + it('invokes deleteModel without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IDeleteModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .deleteModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes deleteModel with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IDeleteModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .deleteModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('deployModel', () => { + it('invokes deployModel without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IDeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .deployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes deployModel with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IDeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .deployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('undeployModel', () => { + it('invokes undeployModel without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IUndeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .undeployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes undeployModel with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IUndeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .undeployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('exportModel', () => { + it('invokes exportModel without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IExportModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .exportModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes exportModel with error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IExportModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .exportModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('listDatasets', () => { + it('invokes listDatasets without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IListDatasetsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDatasets = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listDatasets(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listDatasetsStream', () => { + it('invokes listDatasetsStream without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IListDatasetsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listDatasets = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listDatasetsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listModels', () => { + it('invokes listModels without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IListModelsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listModels = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listModels(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listModelsStream', () => { + it('invokes listModelsStream without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IListModelsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listModels = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listModelsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listModelEvaluations', () => { + it('invokes listModelEvaluations without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listModelEvaluations = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listModelEvaluations(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listModelEvaluationsStream', () => { + it('invokes listModelEvaluationsStream without error', done => { + const client = new automlModule.v1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IListModelEvaluationsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listModelEvaluations = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listModelEvaluationsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-automl/test/gapic-auto_ml-v1beta1.ts b/packages/google-cloud-automl/test/gapic-auto_ml-v1beta1.ts new file mode 100644 index 00000000000..cd3bc2f0c64 --- /dev/null +++ b/packages/google-cloud-automl/test/gapic-auto_ml-v1beta1.ts @@ -0,0 +1,1453 @@ +// 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'; +import {describe, it} from 'mocha'; +const automlModule = 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); + } + }; +} +function mockLongRunningGrpcMethod( + expectedRequest: {}, + response: {} | null, + error?: {} | null +) { + return (request: {}) => { + assert.deepStrictEqual(request, expectedRequest); + const mockOperation = { + promise() { + return new Promise((resolve, reject) => { + if (error) { + reject(error); + } else { + resolve([response]); + } + }); + }, + }; + return Promise.resolve([mockOperation]); + }; +} +describe('v1beta1.AutoMlClient', () => { + it('has servicePath', () => { + const servicePath = automlModule.v1beta1.AutoMlClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = automlModule.v1beta1.AutoMlClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = automlModule.v1beta1.AutoMlClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new automlModule.v1beta1.AutoMlClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new automlModule.v1beta1.AutoMlClient({ + fallback: true, + }); + assert(client); + }); + describe('createDataset', () => { + it('invokes createDataset without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDataset = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createDataset(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createDataset with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.ICreateDatasetRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDataset = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createDataset(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getDataset', () => { + it('invokes getDataset without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDataset = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getDataset(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getDataset with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDataset = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getDataset(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateDataset', () => { + it('invokes updateDataset without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest = {}; + request.dataset = {}; + request.dataset.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateDataset(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateDataset with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUpdateDatasetRequest = {}; + request.dataset = {}; + request.dataset.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateDataset(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getAnnotationSpec', () => { + it('invokes getAnnotationSpec without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getAnnotationSpec(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getAnnotationSpec with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetAnnotationSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getAnnotationSpec(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getTableSpec', () => { + it('invokes getTableSpec without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getTableSpec = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getTableSpec(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getTableSpec with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetTableSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getTableSpec = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getTableSpec(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateTableSpec', () => { + it('invokes updateTableSpec without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest = {}; + request.tableSpec = {}; + request.tableSpec.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateTableSpec = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateTableSpec(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateTableSpec with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUpdateTableSpecRequest = {}; + request.tableSpec = {}; + request.tableSpec.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateTableSpec = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateTableSpec(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getColumnSpec', () => { + it('invokes getColumnSpec without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getColumnSpec = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getColumnSpec(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getColumnSpec with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetColumnSpecRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getColumnSpec = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getColumnSpec(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateColumnSpec', () => { + it('invokes updateColumnSpec without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest = {}; + request.columnSpec = {}; + request.columnSpec.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateColumnSpec = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateColumnSpec(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateColumnSpec with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUpdateColumnSpecRequest = {}; + request.columnSpec = {}; + request.columnSpec.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateColumnSpec = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateColumnSpec(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getModel', () => { + it('invokes getModel without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getModel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getModel with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getModel(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getModelEvaluation', () => { + it('invokes getModelEvaluation without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getModelEvaluation(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getModelEvaluation with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IGetModelEvaluationRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getModelEvaluation(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteDataset', () => { + it('invokes deleteDataset without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IDeleteDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .deleteDataset(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes deleteDataset with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IDeleteDatasetRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .deleteDataset(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('importData', () => { + it('invokes importData without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IImportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.importData = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .importData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes importData with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IImportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.importData = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .importData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('exportData', () => { + it('invokes exportData without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IExportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportData = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .exportData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes exportData with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IExportDataRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportData = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .exportData(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('createModel', () => { + it('invokes createModel without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.ICreateModelRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .createModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes createModel with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.ICreateModelRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .createModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('deleteModel', () => { + it('invokes deleteModel without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IDeleteModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .deleteModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes deleteModel with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IDeleteModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .deleteModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('deployModel', () => { + it('invokes deployModel without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IDeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .deployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes deployModel with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IDeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .deployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('undeployModel', () => { + it('invokes undeployModel without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUndeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .undeployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes undeployModel with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IUndeployModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .undeployModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('exportModel', () => { + it('invokes exportModel without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IExportModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .exportModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes exportModel with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IExportModelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .exportModel(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('exportEvaluatedExamples', () => { + it('invokes exportEvaluatedExamples without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportEvaluatedExamples = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .exportEvaluatedExamples(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes exportEvaluatedExamples with error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IExportEvaluatedExamplesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportEvaluatedExamples = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .exportEvaluatedExamples(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('listDatasets', () => { + it('invokes listDatasets without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDatasets = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listDatasets(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listDatasetsStream', () => { + it('invokes listDatasetsStream without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListDatasetsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listDatasets = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listDatasetsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listTableSpecs', () => { + it('invokes listTableSpecs without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listTableSpecs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listTableSpecs(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listTableSpecsStream', () => { + it('invokes listTableSpecsStream without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListTableSpecsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listTableSpecs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listTableSpecsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listColumnSpecs', () => { + it('invokes listColumnSpecs without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listColumnSpecs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listColumnSpecs(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listColumnSpecsStream', () => { + it('invokes listColumnSpecsStream without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListColumnSpecsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listColumnSpecs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listColumnSpecsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listModels', () => { + it('invokes listModels without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListModelsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listModels = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listModels(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listModelsStream', () => { + it('invokes listModelsStream without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListModelsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listModels = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listModelsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listModelEvaluations', () => { + it('invokes listModelEvaluations without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listModelEvaluations = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listModelEvaluations(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listModelEvaluationsStream', () => { + it('invokes listModelEvaluationsStream without error', done => { + const client = new automlModule.v1beta1.AutoMlClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IListModelEvaluationsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listModelEvaluations = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listModelEvaluationsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-automl/test/gapic-prediction_service-v1.ts b/packages/google-cloud-automl/test/gapic-prediction_service-v1.ts new file mode 100644 index 00000000000..0db8ea518f7 --- /dev/null +++ b/packages/google-cloud-automl/test/gapic-prediction_service-v1.ts @@ -0,0 +1,218 @@ +// 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'; +import {describe, it} from 'mocha'; +const predictionserviceModule = 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); + } + }; +} +function mockLongRunningGrpcMethod( + expectedRequest: {}, + response: {} | null, + error?: {} | null +) { + return (request: {}) => { + assert.deepStrictEqual(request, expectedRequest); + const mockOperation = { + promise() { + return new Promise((resolve, reject) => { + if (error) { + reject(error); + } else { + resolve([response]); + } + }); + }, + }; + return Promise.resolve([mockOperation]); + }; +} +describe('v1.PredictionServiceClient', () => { + it('has servicePath', () => { + const servicePath = + predictionserviceModule.v1.PredictionServiceClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + predictionserviceModule.v1.PredictionServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = predictionserviceModule.v1.PredictionServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new predictionserviceModule.v1.PredictionServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('predict', () => { + it('invokes predict without error', done => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.predict = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.predict(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes predict with error', done => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.predict = mockSimpleGrpcMethod( + request, + null, + error + ); + client.predict(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('batchPredict', () => { + it('invokes batchPredict without error', done => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IBatchPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .batchPredict(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes batchPredict with error', done => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.automl.v1.IBatchPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .batchPredict(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); +}); diff --git a/packages/google-cloud-automl/test/gapic-prediction_service-v1beta1.ts b/packages/google-cloud-automl/test/gapic-prediction_service-v1beta1.ts new file mode 100644 index 00000000000..7668630686d --- /dev/null +++ b/packages/google-cloud-automl/test/gapic-prediction_service-v1beta1.ts @@ -0,0 +1,226 @@ +// 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'; +import {describe, it} from 'mocha'; +const predictionserviceModule = 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); + } + }; +} +function mockLongRunningGrpcMethod( + expectedRequest: {}, + response: {} | null, + error?: {} | null +) { + return (request: {}) => { + assert.deepStrictEqual(request, expectedRequest); + const mockOperation = { + promise() { + return new Promise((resolve, reject) => { + if (error) { + reject(error); + } else { + resolve([response]); + } + }); + }, + }; + return Promise.resolve([mockOperation]); + }; +} +describe('v1beta1.PredictionServiceClient', () => { + it('has servicePath', () => { + const servicePath = + predictionserviceModule.v1beta1.PredictionServiceClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + predictionserviceModule.v1beta1.PredictionServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = predictionserviceModule.v1beta1.PredictionServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('predict', () => { + it('invokes predict without error', done => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.predict = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.predict(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes predict with error', done => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.predict = mockSimpleGrpcMethod( + request, + null, + error + ); + client.predict(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('batchPredict', () => { + it('invokes batchPredict without error', done => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IBatchPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .batchPredict(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes batchPredict with error', done => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.automl.v1beta1.IBatchPredictRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .batchPredict(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); +}); diff --git a/packages/google-cloud-automl/test/gapic-v1.js b/packages/google-cloud-automl/test/gapic-v1.js deleted file mode 100644 index c1a9f1dd043..00000000000 --- a/packages/google-cloud-automl/test/gapic-v1.js +++ /dev/null @@ -1,1824 +0,0 @@ -// Copyright 2020 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 assert = require('assert'); -const {describe, it} = require('mocha'); - -const automlModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; - -describe('AutoMlClient', () => { - it('has servicePath', () => { - const servicePath = automlModule.v1.AutoMlClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = automlModule.v1.AutoMlClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = automlModule.v1.AutoMlClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new automlModule.v1.AutoMlClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new automlModule.v1.AutoMlClient({fallback: true}); - assert(client); - }); - - describe('createDataset', function() { - it('invokes createDataset without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const dataset = {}; - const request = { - parent: formattedParent, - dataset: dataset, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const exampleCount = 1517063674; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - displayName: displayName, - description: description, - exampleCount: exampleCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.createDataset = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .createDataset(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes createDataset with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const dataset = {}; - const request = { - parent: formattedParent, - dataset: dataset, - }; - - // Mock Grpc layer - client._innerApiCalls.createDataset = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .createDataset(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.createDataset.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.createDataset.metadataDecoder instanceof - Function - ); - }); - }); - - describe('updateDataset', () => { - it('invokes updateDataset without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const dataset = {}; - const updateMask = {}; - const request = { - dataset: dataset, - updateMask: updateMask, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const exampleCount = 1517063674; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - displayName: displayName, - description: description, - exampleCount: exampleCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateDataset(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateDataset with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const dataset = {}; - const updateMask = {}; - const request = { - dataset: dataset, - updateMask: updateMask, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateDataset(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getDataset', () => { - it('invokes getDataset without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const exampleCount = 1517063674; - const etag = 'etag3123477'; - const expectedResponse = { - name: name2, - displayName: displayName, - description: description, - exampleCount: exampleCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.getDataset = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getDataset(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getDataset with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getDataset = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getDataset(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listDatasets', () => { - it('invokes listDatasets without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const datasetsElement = {}; - const datasets = [datasetsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - datasets: datasets, - }; - - // Mock Grpc layer - client._innerApiCalls.listDatasets = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.datasets); - }; - - client.listDatasets(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.datasets); - done(); - }); - }); - - it('invokes listDatasets with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listDatasets = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listDatasets(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteDataset', function() { - it('invokes deleteDataset without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .deleteDataset(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes deleteDataset with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .deleteDataset(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.deleteDataset.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.deleteDataset.metadataDecoder instanceof - Function - ); - }); - }); - - describe('importData', function() { - it('invokes importData without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const inputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.importData = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .importData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes importData with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const inputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.importData = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .importData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.importData.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.importData.metadataDecoder instanceof - Function - ); - }); - }); - - describe('exportData', function() { - it('invokes exportData without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.exportData = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .exportData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes exportData with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.exportData = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .exportData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.exportData.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.exportData.metadataDecoder instanceof - Function - ); - }); - }); - - describe('getAnnotationSpec', () => { - it('invokes getAnnotationSpec without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.annotationSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[ANNOTATION_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const exampleCount = 1517063674; - const expectedResponse = { - name: name2, - displayName: displayName, - exampleCount: exampleCount, - }; - - // Mock Grpc layer - client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getAnnotationSpec(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getAnnotationSpec with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.annotationSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[ANNOTATION_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getAnnotationSpec(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createModel', function() { - it('invokes createModel without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const model = {}; - const request = { - parent: formattedParent, - model: model, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const datasetId = 'datasetId-2115646910'; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - displayName: displayName, - datasetId: datasetId, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.createModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .createModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes createModel with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const model = {}; - const request = { - parent: formattedParent, - model: model, - }; - - // Mock Grpc layer - client._innerApiCalls.createModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .createModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.createModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.createModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('getModel', () => { - it('invokes getModel without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const datasetId = 'datasetId-2115646910'; - const etag = 'etag3123477'; - const expectedResponse = { - name: name2, - displayName: displayName, - datasetId: datasetId, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.getModel = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getModel(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getModel with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getModel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getModel(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateModel', () => { - it('invokes updateModel without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const model = {}; - const updateMask = {}; - const request = { - model: model, - updateMask: updateMask, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const datasetId = 'datasetId-2115646910'; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - displayName: displayName, - datasetId: datasetId, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.updateModel = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateModel(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateModel with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const model = {}; - const updateMask = {}; - const request = { - model: model, - updateMask: updateMask, - }; - - // Mock Grpc layer - client._innerApiCalls.updateModel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateModel(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listModels', () => { - it('invokes listModels without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const modelElement = {}; - const model = [modelElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - model: model, - }; - - // Mock Grpc layer - client._innerApiCalls.listModels = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.model); - }; - - client.listModels(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.model); - done(); - }); - }); - - it('invokes listModels with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listModels = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listModels(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteModel', function() { - it('invokes deleteModel without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .deleteModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes deleteModel with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .deleteModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.deleteModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.deleteModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('deployModel', function() { - it('invokes deployModel without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .deployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes deployModel with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .deployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.deployModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.deployModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('undeployModel', function() { - it('invokes undeployModel without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .undeployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes undeployModel with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .undeployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.undeployModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.undeployModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('exportModel', function() { - it('invokes exportModel without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .exportModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes exportModel with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .exportModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.exportModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.exportModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('getModelEvaluation', () => { - it('invokes getModelEvaluation without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelEvaluationPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]', - '[MODEL_EVALUATION]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const annotationSpecId = 'annotationSpecId60690191'; - const displayName = 'displayName1615086568'; - const evaluatedExampleCount = 277565350; - const expectedResponse = { - name: name2, - annotationSpecId: annotationSpecId, - displayName: displayName, - evaluatedExampleCount: evaluatedExampleCount, - }; - - // Mock Grpc layer - client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getModelEvaluation(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getModelEvaluation with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelEvaluationPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]', - '[MODEL_EVALUATION]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getModelEvaluation(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listModelEvaluations', () => { - it('invokes listModelEvaluations without error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const filter = 'filter-1274492040'; - const request = { - parent: formattedParent, - filter: filter, - }; - - // Mock response - const nextPageToken = ''; - const modelEvaluationElement = {}; - const modelEvaluation = [modelEvaluationElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - modelEvaluation: modelEvaluation, - }; - - // Mock Grpc layer - client._innerApiCalls.listModelEvaluations = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.modelEvaluation); - }; - - client.listModelEvaluations(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.modelEvaluation); - done(); - }); - }); - - it('invokes listModelEvaluations with error', done => { - const client = new automlModule.v1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const filter = 'filter-1274492040'; - const request = { - parent: formattedParent, - filter: filter, - }; - - // Mock Grpc layer - client._innerApiCalls.listModelEvaluations = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listModelEvaluations(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); -describe('PredictionServiceClient', () => { - it('has servicePath', () => { - const servicePath = automlModule.v1.PredictionServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = automlModule.v1.PredictionServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = automlModule.v1.PredictionServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new automlModule.v1.PredictionServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new automlModule.v1.PredictionServiceClient({ - fallback: true, - }); - assert(client); - }); - - describe('predict', () => { - it('invokes predict without error', done => { - const client = new automlModule.v1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const payload = {}; - const request = { - name: formattedName, - payload: payload, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.predict = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.predict(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes predict with error', done => { - const client = new automlModule.v1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const payload = {}; - const request = { - name: formattedName, - payload: payload, - }; - - // Mock Grpc layer - client._innerApiCalls.predict = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.predict(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('batchPredict', function() { - it('invokes batchPredict without error', done => { - const client = new automlModule.v1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const inputConfig = {}; - const outputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - outputConfig: outputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .batchPredict(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes batchPredict with error', done => { - const client = new automlModule.v1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const inputConfig = {}; - const outputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - outputConfig: outputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .batchPredict(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.batchPredict.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.batchPredict.metadataDecoder instanceof - Function - ); - }); - }); -}); - -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); - } - }; -} - -function mockLongRunningGrpcMethod(expectedRequest, response, error) { - return request => { - assert.deepStrictEqual(request, expectedRequest); - const mockOperation = { - promise: function() { - return new Promise((resolve, reject) => { - if (error) { - reject(error); - } else { - resolve([response]); - } - }); - }, - }; - return Promise.resolve([mockOperation]); - }; -} diff --git a/packages/google-cloud-automl/test/gapic-v1beta1.js b/packages/google-cloud-automl/test/gapic-v1beta1.js deleted file mode 100644 index 4e630e34f79..00000000000 --- a/packages/google-cloud-automl/test/gapic-v1beta1.js +++ /dev/null @@ -1,2255 +0,0 @@ -// Copyright 2020 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 assert = require('assert'); -const {describe, it} = require('mocha'); - -const automlModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; - -describe('AutoMlClient', () => { - it('has servicePath', () => { - const servicePath = automlModule.v1beta1.AutoMlClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = automlModule.v1beta1.AutoMlClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = automlModule.v1beta1.AutoMlClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new automlModule.v1beta1.AutoMlClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new automlModule.v1beta1.AutoMlClient({fallback: true}); - assert(client); - }); - - describe('createDataset', () => { - it('invokes createDataset without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const dataset = {}; - const request = { - parent: formattedParent, - dataset: dataset, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const exampleCount = 1517063674; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - displayName: displayName, - description: description, - exampleCount: exampleCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.createDataset = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createDataset(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createDataset with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const dataset = {}; - const request = { - parent: formattedParent, - dataset: dataset, - }; - - // Mock Grpc layer - client._innerApiCalls.createDataset = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createDataset(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateDataset', () => { - it('invokes updateDataset without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const dataset = {}; - const request = { - dataset: dataset, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const exampleCount = 1517063674; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - displayName: displayName, - description: description, - exampleCount: exampleCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateDataset(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateDataset with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const dataset = {}; - const request = { - dataset: dataset, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDataset = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateDataset(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getDataset', () => { - it('invokes getDataset without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const exampleCount = 1517063674; - const etag = 'etag3123477'; - const expectedResponse = { - name: name2, - displayName: displayName, - description: description, - exampleCount: exampleCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.getDataset = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getDataset(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getDataset with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getDataset = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getDataset(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listDatasets', () => { - it('invokes listDatasets without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const datasetsElement = {}; - const datasets = [datasetsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - datasets: datasets, - }; - - // Mock Grpc layer - client._innerApiCalls.listDatasets = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.datasets); - }; - - client.listDatasets(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.datasets); - done(); - }); - }); - - it('invokes listDatasets with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listDatasets = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listDatasets(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteDataset', function() { - it('invokes deleteDataset without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .deleteDataset(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes deleteDataset with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .deleteDataset(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.deleteDataset.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.deleteDataset.metadataDecoder instanceof - Function - ); - }); - }); - - describe('importData', function() { - it('invokes importData without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const inputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.importData = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .importData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes importData with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const inputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.importData = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .importData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.importData.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.importData.metadataDecoder instanceof - Function - ); - }); - }); - - describe('exportData', function() { - it('invokes exportData without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.exportData = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .exportData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes exportData with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.exportData = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .exportData(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.exportData.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.exportData.metadataDecoder instanceof - Function - ); - }); - }); - - describe('createModel', function() { - it('invokes createModel without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const model = {}; - const request = { - parent: formattedParent, - model: model, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const datasetId = 'datasetId-2115646910'; - const expectedResponse = { - name: name, - displayName: displayName, - datasetId: datasetId, - }; - - // Mock Grpc layer - client._innerApiCalls.createModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .createModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes createModel with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const model = {}; - const request = { - parent: formattedParent, - model: model, - }; - - // Mock Grpc layer - client._innerApiCalls.createModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .createModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.createModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.createModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('getModel', () => { - it('invokes getModel without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const datasetId = 'datasetId-2115646910'; - const expectedResponse = { - name: name2, - displayName: displayName, - datasetId: datasetId, - }; - - // Mock Grpc layer - client._innerApiCalls.getModel = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getModel(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getModel with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getModel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getModel(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listModels', () => { - it('invokes listModels without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const modelElement = {}; - const model = [modelElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - model: model, - }; - - // Mock Grpc layer - client._innerApiCalls.listModels = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.model); - }; - - client.listModels(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.model); - done(); - }); - }); - - it('invokes listModels with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listModels = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listModels(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteModel', function() { - it('invokes deleteModel without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .deleteModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes deleteModel with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .deleteModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.deleteModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.deleteModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('deployModel', function() { - it('invokes deployModel without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .deployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes deployModel with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deployModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .deployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.deployModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.deployModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('undeployModel', function() { - it('invokes undeployModel without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .undeployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes undeployModel with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.undeployModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .undeployModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.undeployModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.undeployModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('getModelEvaluation', () => { - it('invokes getModelEvaluation without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelEvaluationPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]', - '[MODEL_EVALUATION]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const annotationSpecId = 'annotationSpecId60690191'; - const displayName = 'displayName1615086568'; - const evaluatedExampleCount = 277565350; - const expectedResponse = { - name: name2, - annotationSpecId: annotationSpecId, - displayName: displayName, - evaluatedExampleCount: evaluatedExampleCount, - }; - - // Mock Grpc layer - client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getModelEvaluation(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getModelEvaluation with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelEvaluationPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]', - '[MODEL_EVALUATION]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getModelEvaluation = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getModelEvaluation(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('exportModel', function() { - it('invokes exportModel without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .exportModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes exportModel with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.exportModel = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .exportModel(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.exportModel.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.exportModel.metadataDecoder instanceof - Function - ); - }); - }); - - describe('exportEvaluatedExamples', function() { - it('invokes exportEvaluatedExamples without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.exportEvaluatedExamples = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .exportEvaluatedExamples(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes exportEvaluatedExamples with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const outputConfig = {}; - const request = { - name: formattedName, - outputConfig: outputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.exportEvaluatedExamples = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .exportEvaluatedExamples(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.exportEvaluatedExamples - .responseDecoder instanceof Function - ); - assert( - client._descriptors.longrunning.exportEvaluatedExamples - .metadataDecoder instanceof Function - ); - }); - }); - - describe('listModelEvaluations', () => { - it('invokes listModelEvaluations without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const modelEvaluationElement = {}; - const modelEvaluation = [modelEvaluationElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - modelEvaluation: modelEvaluation, - }; - - // Mock Grpc layer - client._innerApiCalls.listModelEvaluations = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.modelEvaluation); - }; - - client.listModelEvaluations(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.modelEvaluation); - done(); - }); - }); - - it('invokes listModelEvaluations with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listModelEvaluations = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listModelEvaluations(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getAnnotationSpec', () => { - it('invokes getAnnotationSpec without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.annotationSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[ANNOTATION_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const exampleCount = 1517063674; - const expectedResponse = { - name: name2, - displayName: displayName, - exampleCount: exampleCount, - }; - - // Mock Grpc layer - client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getAnnotationSpec(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getAnnotationSpec with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.annotationSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[ANNOTATION_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getAnnotationSpec = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getAnnotationSpec(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getTableSpec', () => { - it('invokes getTableSpec without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.tableSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[TABLE_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const timeColumnSpecId = 'timeColumnSpecId1558734824'; - const rowCount = 1340416618; - const validRowCount = 406068761; - const columnCount = 122671386; - const etag = 'etag3123477'; - const expectedResponse = { - name: name2, - timeColumnSpecId: timeColumnSpecId, - rowCount: rowCount, - validRowCount: validRowCount, - columnCount: columnCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.getTableSpec = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getTableSpec(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getTableSpec with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.tableSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[TABLE_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getTableSpec = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getTableSpec(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listTableSpecs', () => { - it('invokes listTableSpecs without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const tableSpecsElement = {}; - const tableSpecs = [tableSpecsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - tableSpecs: tableSpecs, - }; - - // Mock Grpc layer - client._innerApiCalls.listTableSpecs = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.tableSpecs); - }; - - client.listTableSpecs(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.tableSpecs); - done(); - }); - }); - - it('invokes listTableSpecs with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.datasetPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listTableSpecs = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listTableSpecs(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateTableSpec', () => { - it('invokes updateTableSpec without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const tableSpec = {}; - const request = { - tableSpec: tableSpec, - }; - - // Mock response - const name = 'name3373707'; - const timeColumnSpecId = 'timeColumnSpecId1558734824'; - const rowCount = 1340416618; - const validRowCount = 406068761; - const columnCount = 122671386; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - timeColumnSpecId: timeColumnSpecId, - rowCount: rowCount, - validRowCount: validRowCount, - columnCount: columnCount, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.updateTableSpec = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateTableSpec(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateTableSpec with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const tableSpec = {}; - const request = { - tableSpec: tableSpec, - }; - - // Mock Grpc layer - client._innerApiCalls.updateTableSpec = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateTableSpec(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getColumnSpec', () => { - it('invokes getColumnSpec without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.columnSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[TABLE_SPEC]', - '[COLUMN_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const etag = 'etag3123477'; - const expectedResponse = { - name: name2, - displayName: displayName, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.getColumnSpec = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getColumnSpec(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getColumnSpec with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.columnSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[TABLE_SPEC]', - '[COLUMN_SPEC]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getColumnSpec = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getColumnSpec(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listColumnSpecs', () => { - it('invokes listColumnSpecs without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.tableSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[TABLE_SPEC]' - ); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const columnSpecsElement = {}; - const columnSpecs = [columnSpecsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - columnSpecs: columnSpecs, - }; - - // Mock Grpc layer - client._innerApiCalls.listColumnSpecs = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.columnSpecs); - }; - - client.listColumnSpecs(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.columnSpecs); - done(); - }); - }); - - it('invokes listColumnSpecs with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.tableSpecPath( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[TABLE_SPEC]' - ); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listColumnSpecs = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listColumnSpecs(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateColumnSpec', () => { - it('invokes updateColumnSpec without error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const columnSpec = {}; - const request = { - columnSpec: columnSpec, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const etag = 'etag3123477'; - const expectedResponse = { - name: name, - displayName: displayName, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.updateColumnSpec = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateColumnSpec(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateColumnSpec with error', done => { - const client = new automlModule.v1beta1.AutoMlClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const columnSpec = {}; - const request = { - columnSpec: columnSpec, - }; - - // Mock Grpc layer - client._innerApiCalls.updateColumnSpec = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateColumnSpec(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); -describe('PredictionServiceClient', () => { - it('has servicePath', () => { - const servicePath = - automlModule.v1beta1.PredictionServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - automlModule.v1beta1.PredictionServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = automlModule.v1beta1.PredictionServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new automlModule.v1beta1.PredictionServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new automlModule.v1beta1.PredictionServiceClient({ - fallback: true, - }); - assert(client); - }); - - describe('predict', () => { - it('invokes predict without error', done => { - const client = new automlModule.v1beta1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const payload = {}; - const request = { - name: formattedName, - payload: payload, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.predict = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.predict(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes predict with error', done => { - const client = new automlModule.v1beta1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const payload = {}; - const request = { - name: formattedName, - payload: payload, - }; - - // Mock Grpc layer - client._innerApiCalls.predict = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.predict(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('batchPredict', function() { - it('invokes batchPredict without error', done => { - const client = new automlModule.v1beta1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const inputConfig = {}; - const outputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - outputConfig: outputConfig, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - - client - .batchPredict(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch(err => { - done(err); - }); - }); - - it('invokes batchPredict with error', done => { - const client = new automlModule.v1beta1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.modelPath( - '[PROJECT]', - '[LOCATION]', - '[MODEL]' - ); - const inputConfig = {}; - const outputConfig = {}; - const request = { - name: formattedName, - inputConfig: inputConfig, - outputConfig: outputConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.batchPredict = mockLongRunningGrpcMethod( - request, - null, - error - ); - - client - .batchPredict(request) - .then(responses => { - const operation = responses[0]; - return operation.promise(); - }) - .then(() => { - assert.fail(); - }) - .catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new automlModule.v1beta1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert( - client._descriptors.longrunning.batchPredict.responseDecoder instanceof - Function - ); - assert( - client._descriptors.longrunning.batchPredict.metadataDecoder instanceof - Function - ); - }); - }); -}); - -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); - } - }; -} - -function mockLongRunningGrpcMethod(expectedRequest, response, error) { - return request => { - assert.deepStrictEqual(request, expectedRequest); - const mockOperation = { - promise: function() { - return new Promise((resolve, reject) => { - if (error) { - reject(error); - } else { - resolve([response]); - } - }); - }, - }; - return Promise.resolve([mockOperation]); - }; -} diff --git a/packages/google-cloud-automl/tsconfig.json b/packages/google-cloud-automl/tsconfig.json new file mode 100644 index 00000000000..613d35597b5 --- /dev/null +++ b/packages/google-cloud-automl/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-automl/tslint.json b/packages/google-cloud-automl/tslint.json new file mode 100644 index 00000000000..617dc975bae --- /dev/null +++ b/packages/google-cloud-automl/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tslint.json" +} diff --git a/packages/google-cloud-automl/webpack.config.js b/packages/google-cloud-automl/webpack.config.js index 66cd10e53eb..aba1e63f554 100644 --- a/packages/google-cloud-automl/webpack.config.js +++ b/packages/google-cloud-automl/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -12,8 +12,10 @@ // 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: 'automl', filename: './automl.js', @@ -24,21 +26,37 @@ 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[\\/]/, - use: 'null-loader', + 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[\\/]/, - use: 'null-loader', + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' }, { - test: /node_modules[\\/]gtoken[\\/]/, - use: 'null-loader', + test: /node_modules[\\/]gtoken/, + use: 'null-loader' }, ], },