Skip to content

Commit

Permalink
feat: update GAPIC generated code (v1), bump semver minor version (#24)
Browse files Browse the repository at this point in the history
* regenerating GAPIC v1 code

* bump version and regenerate scaffolding
  • Loading branch information
alexander-fenster authored Jan 30, 2018
1 parent c7a6192 commit 296eb42
Show file tree
Hide file tree
Showing 20 changed files with 350 additions and 156 deletions.
2 changes: 2 additions & 0 deletions packages/google-cloud-vision/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ Jun Mukai <mukai@google.com> Jun Mukai <jun.mukai@gmail.com>
Luke Sneeringer <lukesneeringer@google.com> Luke Sneeringer <luke@sneeringer.com>
Stephen Sawchuk <sawchuk@gmail.com> Stephen Sawchuk <stephenplusplus@users.noreply.github.com>
Stephen Sawchuk <sawchuk@gmail.com> Stephen Sawchuk <stephenplusplusplus@gmail.com>
Alexander Fenster <fenster@google.com> Alexander Fenster <github@fenster.name>
Rebecca Taylor <remily@google.com> Rebecca Taylor <remilytaylor@gmail.com>
4 changes: 3 additions & 1 deletion packages/google-cloud-vision/CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
# name <email>
#
Ace Nassri <anassri@google.com>
Alexander Fenster <fenster@google.com>
Ali Ijaz Sheikh <ofrobots@google.com>
Dave Gramlich <callmehiphop@gmail.com>
Ernest Landrito <landrito@google.com>
Gus Class <gguuss@gmail.com>
Jason Dobry <jdobry@google.com>
Jun Mukai <mukai@google.com>
Luke Sneeringer <lukesneeringer@google.com>
Rebecca Taylor <remily@google.com>
Song Wang <songwang@google.com>
Stephen Sawchuk <sawchuk@gmail.com>
Tim Swast <swast@google.com>
calibr <awcalibr@gmail.com>
Rebecca Taylor <remily@google.com>
greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
rtw <rtw1981@gmail.com>
6 changes: 4 additions & 2 deletions packages/google-cloud-vision/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/vision",
"description": "Google Cloud Vision API client for Node.js",
"version": "0.14.0",
"version": "0.15.0",
"license": "Apache-2.0",
"author": "Google Inc",
"engines": {
Expand Down Expand Up @@ -30,18 +30,20 @@
],
"contributors": [
"Ace Nassri <anassri@google.com>",
"Alexander Fenster <fenster@google.com>",
"Ali Ijaz Sheikh <ofrobots@google.com>",
"Dave Gramlich <callmehiphop@gmail.com>",
"Ernest Landrito <landrito@google.com>",
"Gus Class <gguuss@gmail.com>",
"Jason Dobry <jdobry@google.com>",
"Jun Mukai <mukai@google.com>",
"Luke Sneeringer <lukesneeringer@google.com>",
"Rebecca Taylor <remily@google.com>",
"Song Wang <songwang@google.com>",
"Stephen Sawchuk <sawchuk@gmail.com>",
"Tim Swast <swast@google.com>",
"calibr <awcalibr@gmail.com>",
"Rebecca Taylor <remily@google.com>",
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",
"rtw <rtw1981@gmail.com>"
],
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2018 Google Inc.
//
// 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 2016 Google Inc.
// Copyright 2018 Google Inc.
//
// 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 @@ -41,12 +41,11 @@ service ImageAnnotator {
}
}

// Users describe the type of Google Cloud Vision API tasks to perform over
// images by using *Feature*s. Each Feature indicates a type of image
// detection task to perform. Features encode the Cloud Vision API
// vertical to operate on and the number of top-scoring results to return.
// The type of Google Cloud Vision API detection to perform, and the maximum
// number of results to return for that type. Multiple `Feature` objects can
// be specified in the `features` list.
message Feature {
// Type of image feature.
// Type of Google Cloud Vision API feature to be extracted.
enum Type {
// Unspecified feature type.
TYPE_UNSPECIFIED = 0;
Expand All @@ -63,17 +62,21 @@ message Feature {
// Run label detection.
LABEL_DETECTION = 4;

// Run OCR.
// Run text detection / optical character recognition (OCR). Text detection
// is optimized for areas of text within a larger image; if the image is
// a document, use `DOCUMENT_TEXT_DETECTION` instead.
TEXT_DETECTION = 5;

// Run dense text document OCR. Takes precedence when both
// DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
// `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
DOCUMENT_TEXT_DETECTION = 11;

// Run computer vision models to compute image safe-search properties.
// Run Safe Search to detect potentially unsafe
// or undesirable content.
SAFE_SEARCH_DETECTION = 6;

// Compute a set of image properties, such as the image's dominant colors.
// Compute a set of image properties, such as the
// image's dominant colors.
IMAGE_PROPERTIES = 7;

// Run crop hints.
Expand All @@ -86,53 +89,62 @@ message Feature {
// The feature type.
Type type = 1;

// Maximum number of results of this type.
// Maximum number of results of this type. Does not apply to
// `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
int32 max_results = 2;

// Model to use for the feature.
// Supported values: "builtin/stable" (the default if unset) and
// "builtin/latest".
string model = 3;
}

// External image source (Google Cloud Storage image location).
// External image source (Google Cloud Storage or web URL image location).
message ImageSource {
// NOTE: For new code `image_uri` below is preferred.
// Google Cloud Storage image URI, which must be in the following form:
// `gs://bucket_name/object_name` (for details, see
// **Use `image_uri` instead.**
//
// The Google Cloud Storage URI of the form
// `gs://bucket_name/object_name`. Object versioning is not supported. See
// [Google Cloud Storage Request
// URIs](https://cloud.google.com/storage/docs/reference-uris)).
// NOTE: Cloud Storage object versioning is not supported.
// URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
string gcs_image_uri = 1;

// Image URI which supports:
// 1) Google Cloud Storage image URI, which must be in the following form:
// `gs://bucket_name/object_name` (for details, see
// [Google Cloud Storage Request
// URIs](https://cloud.google.com/storage/docs/reference-uris)).
// NOTE: Cloud Storage object versioning is not supported.
// 2) Publicly accessible image HTTP/HTTPS URL.
// This is preferred over the legacy `gcs_image_uri` above. When both
// `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
// The URI of the source image. Can be either:
//
// 1. A Google Cloud Storage URI of the form
// `gs://bucket_name/object_name`. Object versioning is not supported. See
// [Google Cloud Storage Request
// URIs](https://cloud.google.com/storage/docs/reference-uris) for more
// info.
//
// 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
// HTTP/HTTPS URLs, Google cannot guarantee that the request will be
// completed. Your request may fail if the specified host denies the
// request (e.g. due to request throttling or DOS prevention), or if Google
// throttles requests to the site for abuse prevention. You should not
// depend on externally-hosted images for production applications.
//
// When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
// precedence.
string image_uri = 2;
}

// Client image to perform Google Cloud Vision API tasks over.
message Image {
// Image content, represented as a stream of bytes.
// Note: as with all `bytes` fields, protobuffers use a pure binary
// Note: As with all `bytes` fields, protobuffers use a pure binary
// representation, whereas JSON representations use base64.
bytes content = 1;

// Google Cloud Storage image location. If both `content` and `source`
// are provided for an image, `content` takes precedence and is
// used to perform the image annotation request.
// Google Cloud Storage image location, or publicly-accessible image
// URL. If both `content` and `source` are provided for an image, `content`
// takes precedence and is used to perform the image annotation request.
ImageSource source = 2;
}

// A face annotation object contains the results of face detection.
message FaceAnnotation {
// A face-specific landmark (for example, a face feature).
// Landmark positions may fall outside the bounds of the image
// if the face is near one or more edges of the image.
// Therefore it is NOT guaranteed that `0 <= x < width` or
// `0 <= y < height`.
message Landmark {
// Face landmark (feature) type.
// Left and right are defined from the vantage of the viewer of the image
Expand Down Expand Up @@ -327,12 +339,16 @@ message Property {

// Value of the property.
string value = 2;

// Value of numeric properties.
uint64 uint64_value = 3;
}

// Set of detected entity features.
message EntityAnnotation {
// Opaque entity ID. Some IDs may be available in
// [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).
// [Google Knowledge Graph Search
// API](https://developers.google.com/knowledge-graph/).
string mid = 1;

// The language code for the locale in which the entity textual
Expand All @@ -345,6 +361,7 @@ message EntityAnnotation {
// Overall score of the result. Range [0, 1].
float score = 4;

// **Deprecated. Use `score` instead.**
// The accuracy of the entity detection in an image.
// For example, for an image in which the "Eiffel Tower" entity is detected,
// this field represents the confidence that there is a tower in the query
Expand All @@ -358,10 +375,8 @@ message EntityAnnotation {
// there is a tower in each image may be the same. Range [0, 1].
float topicality = 6;

// Image region to which this entity belongs. Currently not produced
// for `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR), `boundingPoly`s
// are produced for the entire text detected in an image region, followed by
// `boundingPoly`s for each word within the detected text.
// Image region to which this entity belongs. Not produced
// for `LABEL_DETECTION` features.
BoundingPoly bounding_poly = 7;

// The location information for the detected entity. Multiple
Expand All @@ -380,7 +395,9 @@ message EntityAnnotation {
// methods over safe-search verticals (for example, adult, spoof, medical,
// violence).
message SafeSearchAnnotation {
// Represents the adult content likelihood for the image.
// Represents the adult content likelihood for the image. Adult content may
// contain elements such as nudity, pornographic images or cartoons, or
// sexual activities.
Likelihood adult = 1;

// Spoof likelihood. The likelihood that an modification
Expand All @@ -391,8 +408,14 @@ message SafeSearchAnnotation {
// Likelihood that this is a medical image.
Likelihood medical = 3;

// Violence likelihood.
// Likelihood that this image contains violent content.
Likelihood violence = 4;

// Likelihood that the request image contains racy content. Racy content may
// include (but is not limited to) skimpy or sheer clothing, strategically
// covered nudity, lewd or provocative poses, or close-ups of sensitive
// body areas.
Likelihood racy = 9;
}

// Rectangle determined by min and max `LatLng` pairs.
Expand Down Expand Up @@ -446,6 +469,7 @@ message CropHint {

// Set of crop hints that are used to generate new crops when serving images.
message CropHintsAnnotation {
// Crop hint results.
repeated CropHint crop_hints = 1;
}

Expand All @@ -460,6 +484,12 @@ message CropHintsParams {
repeated float aspect_ratios = 1;
}

// Parameters for web detection request.
message WebDetectionParams {
// Whether to include results derived from the geo information in the image.
bool include_geo_results = 2;
}

// Image context and/or feature-specific parameters.
message ImageContext {
// lat/long rectangle that specifies the location of the image.
Expand All @@ -477,6 +507,9 @@ message ImageContext {

// Parameters for crop hints annotation request.
CropHintsParams crop_hints_params = 4;

// Parameters for web detection.
WebDetectionParams web_detection_params = 6;
}

// Request for performing Google Cloud Vision API tasks over a user-provided
Expand Down Expand Up @@ -506,8 +539,7 @@ message AnnotateImageResponse {
// If present, label detection has completed successfully.
repeated EntityAnnotation label_annotations = 4;

// If present, text (OCR) detection or document (OCR) text detection has
// completed successfully.
// If present, text (OCR) detection has completed successfully.
repeated EntityAnnotation text_annotations = 5;

// If present, text (OCR) detection or document (OCR) text detection has
Expand Down
Loading

0 comments on commit 296eb42

Please sign in to comment.