diff --git a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js index 9662534f798..bf2d0c7ec6a 100644 --- a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js +++ b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js @@ -114,27 +114,27 @@ class AutoMlClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - locationPathTemplate: new gax.PathTemplate( - 'projects/{project}/locations/{location}' + annotationSpecPathTemplate: new gax.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + columnSpecPathTemplate: new gax.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}' ), datasetPathTemplate: new gax.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), + locationPathTemplate: new gax.PathTemplate( + 'projects/{project}/locations/{location}' + ), modelPathTemplate: new gax.PathTemplate( 'projects/{project}/locations/{location}/models/{model}' ), modelEvaluationPathTemplate: new gax.PathTemplate( 'projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}' ), - annotationSpecPathTemplate: new gax.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' - ), tableSpecPathTemplate: new gax.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}' ), - columnSpecPathTemplate: new gax.PathTemplate( - 'projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}' - ), }; // Some of the methods on this service return "paged" results, @@ -2873,16 +2873,40 @@ class AutoMlClient { // -------------------- /** - * Return a fully-qualified location resource name string. + * Return a fully-qualified annotation_spec resource name string. * * @param {String} project * @param {String} location + * @param {String} dataset + * @param {String} annotationSpec * @returns {String} */ - locationPath(project, location) { - return this._pathTemplates.locationPathTemplate.render({ + 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, }); } @@ -2903,54 +2927,50 @@ class AutoMlClient { } /** - * Return a fully-qualified model resource name string. + * Return a fully-qualified location resource name string. * * @param {String} project * @param {String} location - * @param {String} model * @returns {String} */ - modelPath(project, location, model) { - return this._pathTemplates.modelPathTemplate.render({ + locationPath(project, location) { + return this._pathTemplates.locationPathTemplate.render({ project: project, location: location, - model: model, }); } /** - * Return a fully-qualified model_evaluation resource name string. + * Return a fully-qualified model 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({ + modelPath(project, location, model) { + return this._pathTemplates.modelPathTemplate.render({ project: project, location: location, model: model, - model_evaluation: modelEvaluation, }); } /** - * Return a fully-qualified annotation_spec resource name string. + * Return a fully-qualified model_evaluation resource name string. * * @param {String} project * @param {String} location - * @param {String} dataset - * @param {String} annotationSpec + * @param {String} model + * @param {String} modelEvaluation * @returns {String} */ - annotationSpecPath(project, location, dataset, annotationSpec) { - return this._pathTemplates.annotationSpecPathTemplate.render({ + modelEvaluationPath(project, location, model, modelEvaluation) { + return this._pathTemplates.modelEvaluationPathTemplate.render({ project: project, location: location, - dataset: dataset, - annotation_spec: annotationSpec, + model: model, + model_evaluation: modelEvaluation, }); } @@ -2973,48 +2993,117 @@ class AutoMlClient { } /** - * Return a fully-qualified column_spec resource name string. + * Parse the annotationSpecName from a annotation_spec resource. * - * @param {String} project - * @param {String} location - * @param {String} dataset - * @param {String} tableSpec - * @param {String} columnSpec - * @returns {String} + * @param {String} annotationSpecName + * A fully-qualified path representing a annotation_spec resources. + * @returns {String} - A string representing the project. */ - columnSpecPath(project, location, dataset, tableSpec, columnSpec) { - return this._pathTemplates.columnSpecPathTemplate.render({ - project: project, - location: location, - dataset: dataset, - table_spec: tableSpec, - column_spec: columnSpec, - }); + matchProjectFromAnnotationSpecName(annotationSpecName) { + return this._pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; } /** - * Parse the locationName from a location resource. + * Parse the annotationSpecName from a annotation_spec resource. * - * @param {String} locationName - * A fully-qualified path representing a location resources. + * @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. */ - matchProjectFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName).project; + matchProjectFromColumnSpecName(columnSpecName) { + return this._pathTemplates.columnSpecPathTemplate.match(columnSpecName) + .project; } /** - * Parse the locationName from a location resource. + * Parse the columnSpecName from a column_spec resource. * - * @param {String} locationName - * A fully-qualified path representing a location resources. + * @param {String} columnSpecName + * A fully-qualified path representing a column_spec resources. * @returns {String} - A string representing the location. */ - matchLocationFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName) + 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. * @@ -3048,6 +3137,29 @@ class AutoMlClient { 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. * @@ -3133,58 +3245,6 @@ class AutoMlClient { ).model_evaluation; } - /** - * 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 tableSpecName from a table_spec resource. * @@ -3232,66 +3292,6 @@ class AutoMlClient { return this._pathTemplates.tableSpecPathTemplate.match(tableSpecName) .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 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; - } } module.exports = AutoMlClient; diff --git a/packages/google-cloud-automl/synth.metadata b/packages/google-cloud-automl/synth.metadata index 54958944e85..be7ed0e1bd7 100644 --- a/packages/google-cloud-automl/synth.metadata +++ b/packages/google-cloud-automl/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-04-21T11:39:18.444782Z", + "updateTime": "2019-04-23T11:08:16.867254Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.26", - "dockerImage": "googleapis/artman@sha256:314eae2a40f6f7822db77365cf5f45bd513d628ae17773fd0473f460e7c2a665" + "version": "0.17.0", + "dockerImage": "googleapis/artman@sha256:c58f4ec3838eb4e0718eb1bccc6512bd6850feaa85a360a9e38f6f848ec73bc2" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3369c803f56d52662ea3792076deb8545183bdb0", - "internalRef": "244282812" + "sha": "547e19e7df398e9290e8e3674d7351efc500f9b0", + "internalRef": "244712781" } }, {