Skip to content

Commit

Permalink
chore: generate library based on googleapis/googleapis@9aac8c3 (#7)
Browse files Browse the repository at this point in the history
* synth: use common templating for .circleci/config.yml

* gen: generate library based on googleapis/googleapis@9aac8c3

* dep: upgrade google-gax to 0.17.1 (#8)

* chore: regenerate package-lock.json

* chore: remove dependency on nodejs-repo-tools
  • Loading branch information
jkwlui authored Jul 18, 2018
1 parent b1e05b3 commit f354a0a
Show file tree
Hide file tree
Showing 21 changed files with 1,612 additions and 8,176 deletions.
9,685 changes: 1,576 additions & 8,109 deletions packages/google-cloud-automl/package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions packages/google-cloud-automl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@
"system-test": "mocha system-test/*.js --timeout 600000"
},
"dependencies": {
"google-gax": "^0.16.1",
"google-gax": "^0.17.1",
"lodash.merge": "^4.6.0",
"lodash.union": "^4.6.0",
"protobufjs": "^6.8.0"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^2.3.0",
"async": "^2.6.1",
"codecov": "^3.0.2",
"eslint": "^5.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,9 +27,9 @@ option java_package = "com.google.cloud.automl.v1beta1";
// A representation of an image.
message Image {
// Input only. The data representing the image.
// For Predict calls [image_bytes][] must be set.
// You can read the contents of an uploaded image by using the [content_uri][]
// field.
// For Predict calls [image_bytes][] must be set, as other options are not
// currently supported by prediction API. You can read the contents of an
// uploaded image by using the [content_uri][] field.
oneof data {
// Image content represented as a stream of bytes.
// Note: As with all `bytes` fields, protobuffers use a pure binary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -45,8 +45,11 @@ message ModelEvaluation {
string name = 1;

// Output only.
// Evaluated annotation spec id. Only non empty if the `ModelEvaluation` is
// for a single annotation spec.
// The ID of the annotation spec that the model evaluation applies to. The
// ID is empty for overall model evaluation.
// NOTE: Currently there is no way to obtain the display_name of the
// annotation spec from its ID. To see the display_names, review the model
// evaluations in the UI.
string annotation_spec_id = 2;

// Output only.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,14 +50,6 @@ message PredictRequest {
// Additional domain-specific parameters, any string must be up to 25000
// characters long.
//
// * For Translation:
//
// `translation_allow_fallback` - If specified, AutoML will fallback to
// use a Google translation model for translation requests if the
// the specified AutoML translation model cannot serve the request.
// The [PredictResponse.metadata][google.cloud.automl.v1beta1.PredictResponse.metadata] field provides additional data to the
// caller.
//
// * For Image Classification:
//
// `score_threshold` - (float) A value from 0.0 to 1.0. When the model
Expand All @@ -77,11 +69,5 @@ message PredictResponse {
repeated AnnotationPayload payload = 1;

// Additional domain-specific prediction response metadata.
// * For Translation:
//
// `translation_fallback_model` - When [PredictRequest.params][google.cloud.automl.v1beta1.PredictRequest.params] has
// `translation_allow_fallback` specified, the caller can check the value
// of `translation_fallback_model` in the metadata to determine whether a
// translation fallback model was used and which model was used.
map<string, string> metadata = 2;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-automl/src/v1beta1/auto_ml_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AutoMlClient {
// Create a `gaxGrpc` object, with any grpc-specific options
// sent to the client.
opts.scopes = this.constructor.scopes;
var gaxGrpc = gax.grpc(opts);
var gaxGrpc = new gax.GrpcClient(opts);

// Save the auth object to the client, for use by other methods.
this.auth = gaxGrpc.auth;
Expand Down Expand Up @@ -139,7 +139,7 @@ class AutoMlClient {
'modelEvaluation'
),
};
var protoFilesRoot = new gax.grpc.GoogleProtoFilesRoot();
var protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
path.join(
__dirname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@
*
* @property {string} annotationSpecId
* Output only.
* Evaluated annotation spec id. Only non empty if the `ModelEvaluation` is
* for a single annotation spec.
* The ID of the annotation spec that the model evaluation applies to. The
* ID is empty for overall model evaluation.
* NOTE: Currently there is no way to obtain the display_name of the
* annotation spec from its ID. To see the display_names, review the model
* evaluations in the UI.
*
* @property {Object} createTime
* Output only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@
* Additional domain-specific parameters, any string must be up to 25000
* characters long.
*
* * For Translation:
*
* `translation_allow_fallback` - If specified, AutoML will fallback to
* use a Google translation model for translation requests if the
* the specified AutoML translation model cannot serve the request.
* The PredictResponse.metadata field provides additional data to the
* caller.
*
* * For Image Classification:
*
* `score_threshold` - (float) A value from 0.0 to 1.0. When the model
Expand Down Expand Up @@ -69,12 +61,6 @@ var PredictRequest = {
*
* @property {Object.<string, string>} metadata
* Additional domain-specific prediction response metadata.
* * For Translation:
*
* `translation_fallback_model` - When PredictRequest.params has
* `translation_allow_fallback` specified, the caller can check the value
* of `translation_fallback_model` in the metadata to determine whether a
* translation fallback model was used and which model was used.
*
* @typedef PredictResponse
* @memberof google.cloud.automl.v1beta1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class PredictionServiceClient {
// Create a `gaxGrpc` object, with any grpc-specific options
// sent to the client.
opts.scopes = this.constructor.scopes;
var gaxGrpc = gax.grpc(opts);
var gaxGrpc = new gax.GrpcClient(opts);

// Save the auth object to the client, for use by other methods.
this.auth = gaxGrpc.auth;
Expand Down Expand Up @@ -195,14 +195,6 @@ class PredictionServiceClient {
* Additional domain-specific parameters, any string must be up to 25000
* characters long.
*
* * For Translation:
*
* `translation_allow_fallback` - If specified, AutoML will fallback to
* use a Google translation model for translation requests if the
* the specified AutoML translation model cannot serve the request.
* The PredictResponse.metadata field provides additional data to the
* caller.
*
* * For Image Classification:
*
* `score_threshold` - (float) A value from 0.0 to 1.0. When the model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 20000,
"initial_rpc_timeout_millis": 60000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
}
},
Expand Down
8 changes: 4 additions & 4 deletions packages/google-cloud-automl/test/gapic-v1beta1.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,10 +945,10 @@ describe('AutoMlClient', () => {

// Mock response
var name2 = 'name2-1052831874';
var isDone = true;
var done_ = true;
var expectedResponse = {
name: name2,
done: isDone,
done: done_,
};

// Mock Grpc layer
Expand Down Expand Up @@ -1015,10 +1015,10 @@ describe('AutoMlClient', () => {

// Mock response
var name2 = 'name2-1052831874';
var isDone = true;
var done_ = true;
var expectedResponse = {
name: name2,
done: isDone,
done: done_,
};

// Mock Grpc layer
Expand Down

0 comments on commit f354a0a

Please sign in to comment.