Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
fix: simplify logic for HTTP/1.1 REST fallback option
Browse files Browse the repository at this point in the history
For the `fallback` parameter, all values considered as `true`
in Boolean context will enable HTTP/1.1 REST fallback,
since the other fallback transport, proto over HTTP, is
removed from `google-gax` v4.

PiperOrigin-RevId: 559812260

Source-Link: googleapis/googleapis@6a6fd29

Source-Link: googleapis/googleapis-gen@56c1665
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTZjMTY2NTdlN2E1OTEyMmIxZGE5NDc3MWE5ZWY0MDk4OWMyODJjMCJ9
  • Loading branch information
gcf-owl-bot[bot] committed Aug 24, 2023
1 parent 6cff754 commit 39550f6
Show file tree
Hide file tree
Showing 143 changed files with 32,929 additions and 0 deletions.
7 changes: 7 additions & 0 deletions owl-bot-staging/v1/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/node_modules
**/.coverage
build/
docs/
protos/
system-test/
samples/generated/
3 changes: 3 additions & 0 deletions owl-bot-staging/v1/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
14 changes: 14 additions & 0 deletions owl-bot-staging/v1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/*.log
**/node_modules
/.coverage
/coverage
/.nyc_output
/docs/
/out/
/build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
55 changes: 55 additions & 0 deletions owl-bot-staging/v1/.jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2023 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. **

'use strict';

module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
'protos'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2023 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/automl',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
33 changes: 33 additions & 0 deletions owl-bot-staging/v1/.mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2023 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. **

const config = {
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000
}
if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
delete config['throw-deprecation'];
}
if (process.env.MOCHA_REPORTER) {
config.reporter = process.env.MOCHA_REPORTER;
}
if (process.env.MOCHA_REPORTER_OUTPUT) {
config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
}
module.exports = config
22 changes: 22 additions & 0 deletions owl-bot-staging/v1/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2023 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. **


module.exports = {
...require('gts/.prettierrc.json')
}
1 change: 1 addition & 0 deletions owl-bot-staging/v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Automl: Nodejs Client
59 changes: 59 additions & 0 deletions owl-bot-staging/v1/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "@google-cloud/automl",
"version": "0.1.0",
"description": "Automl client for Node.js",
"repository": "googleapis/nodejs-automl",
"license": "Apache-2.0",
"author": "Google LLC",
"main": "build/src/index.js",
"files": [
"build/src",
"build/protos"
],
"keywords": [
"google apis client",
"google api client",
"google apis",
"google api",
"google",
"google cloud platform",
"google cloud",
"cloud",
"google automl",
"automl",
"auto ml",
"prediction service"
],
"scripts": {
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/ && minifyProtoJson",
"compile-protos": "compileProtos src",
"docs": "jsdoc -c .jsdoc.js",
"fix": "gts fix",
"lint": "gts check",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test"
},
"dependencies": {
"google-gax": "^4.0.3"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.18",
"@types/sinon": "^10.0.16",
"c8": "^8.0.1",
"gapic-tools": "^0.1.8",
"gts": "5.0.1",
"jsdoc": "^4.0.2",
"jsdoc-region-tag": "^3.0.0",
"jsdoc-fresh": "^3.0.0",
"mocha": "^10.2.0",
"pack-n-play": "^1.0.0-2",
"sinon": "^15.2.0",
"typescript": "5.1.6"
},
"engines": {
"node": ">=v14"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.automl.v1;

import "google/cloud/automl/v1/classification.proto";
import "google/cloud/automl/v1/detection.proto";
import "google/cloud/automl/v1/text_extraction.proto";
import "google/cloud/automl/v1/text_sentiment.proto";
import "google/cloud/automl/v1/translation.proto";

option csharp_namespace = "Google.Cloud.AutoML.V1";
option go_package = "cloud.google.com/go/automl/apiv1/automlpb;automlpb";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1";
option ruby_package = "Google::Cloud::AutoML::V1";

// Contains annotation information that is relevant to AutoML.
message AnnotationPayload {
// Output only . Additional information about the annotation
// specific to the AutoML domain.
oneof detail {
// Annotation details for translation.
TranslationAnnotation translation = 2;

// Annotation details for content or image classification.
ClassificationAnnotation classification = 3;

// Annotation details for image object detection.
ImageObjectDetectionAnnotation image_object_detection = 4;

// Annotation details for text extraction.
TextExtractionAnnotation text_extraction = 6;

// Annotation details for text sentiment.
TextSentimentAnnotation text_sentiment = 7;
}

// 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.
string annotation_spec_id = 1;

// Output only. The value of
// [display_name][google.cloud.automl.v1.AnnotationSpec.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.
string display_name = 5;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.automl.v1;

import "google/api/resource.proto";

option csharp_namespace = "Google.Cloud.AutoML.V1";
option go_package = "cloud.google.com/go/automl/apiv1/automlpb;automlpb";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1";
option ruby_package = "Google::Cloud::AutoML::V1";

// A definition of an annotation spec.
message AnnotationSpec {
option (google.api.resource) = {
type: "automl.googleapis.com/AnnotationSpec"
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}"
};

// Output only. Resource name of the annotation spec.
// Form:
// 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
string name = 1;

// 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_]+`.
string display_name = 2;

// Output only. The number of examples in the parent dataset
// labeled by the annotation spec.
int32 example_count = 9;
}

0 comments on commit 39550f6

Please sign in to comment.