From 4d029c8b3096cf3f250156373f864d2ce45a1f8f Mon Sep 17 00:00:00 2001 From: Google APIs Date: Sun, 5 Nov 2017 00:34:55 +0000 Subject: [PATCH] Autogenerated update (2017-11-05) Update: - vision_v1 --- api_names_out.yaml | 192 +++ generated/google/apis/vision_v1.rb | 2 +- generated/google/apis/vision_v1/classes.rb | 1258 ++++++++--------- .../google/apis/vision_v1/representations.rb | 362 ++--- generated/google/apis/vision_v1/service.rb | 16 +- 5 files changed, 949 insertions(+), 881 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 433fce9e5..66138cac9 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -61237,6 +61237,198 @@ "/vision:v1/Feature": feature "/vision:v1/Feature/maxResults": max_results "/vision:v1/Feature/type": type +"/vision:v1/GoogleCloudVisionV1AnnotateImageRequest": google_cloud_vision_v1_annotate_image_request +"/vision:v1/GoogleCloudVisionV1AnnotateImageRequest/features": features +"/vision:v1/GoogleCloudVisionV1AnnotateImageRequest/features/feature": feature +"/vision:v1/GoogleCloudVisionV1AnnotateImageRequest/image": image +"/vision:v1/GoogleCloudVisionV1AnnotateImageRequest/imageContext": image_context +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse": google_cloud_vision_v1_annotate_image_response +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/cropHintsAnnotation": crop_hints_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/error": error +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/faceAnnotations": face_annotations +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/faceAnnotations/face_annotation": face_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/fullTextAnnotation": full_text_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/imagePropertiesAnnotation": image_properties_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/labelAnnotations": label_annotations +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/labelAnnotations/label_annotation": label_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/landmarkAnnotations": landmark_annotations +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/landmarkAnnotations/landmark_annotation": landmark_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/logoAnnotations": logo_annotations +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/logoAnnotations/logo_annotation": logo_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/safeSearchAnnotation": safe_search_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/textAnnotations": text_annotations +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/textAnnotations/text_annotation": text_annotation +"/vision:v1/GoogleCloudVisionV1AnnotateImageResponse/webDetection": web_detection +"/vision:v1/GoogleCloudVisionV1BatchAnnotateImagesRequest": google_cloud_vision_v1_batch_annotate_images_request +"/vision:v1/GoogleCloudVisionV1BatchAnnotateImagesRequest/requests": requests +"/vision:v1/GoogleCloudVisionV1BatchAnnotateImagesRequest/requests/request": request +"/vision:v1/GoogleCloudVisionV1BatchAnnotateImagesResponse": google_cloud_vision_v1_batch_annotate_images_response +"/vision:v1/GoogleCloudVisionV1BatchAnnotateImagesResponse/responses": responses +"/vision:v1/GoogleCloudVisionV1BatchAnnotateImagesResponse/responses/response": response +"/vision:v1/GoogleCloudVisionV1Block": google_cloud_vision_v1_block +"/vision:v1/GoogleCloudVisionV1Block/blockType": block_type +"/vision:v1/GoogleCloudVisionV1Block/boundingBox": bounding_box +"/vision:v1/GoogleCloudVisionV1Block/paragraphs": paragraphs +"/vision:v1/GoogleCloudVisionV1Block/paragraphs/paragraph": paragraph +"/vision:v1/GoogleCloudVisionV1Block/property": property +"/vision:v1/GoogleCloudVisionV1BoundingPoly": google_cloud_vision_v1_bounding_poly +"/vision:v1/GoogleCloudVisionV1BoundingPoly/vertices": vertices +"/vision:v1/GoogleCloudVisionV1BoundingPoly/vertices/vertex": vertex +"/vision:v1/GoogleCloudVisionV1ColorInfo": google_cloud_vision_v1_color_info +"/vision:v1/GoogleCloudVisionV1ColorInfo/color": color +"/vision:v1/GoogleCloudVisionV1ColorInfo/pixelFraction": pixel_fraction +"/vision:v1/GoogleCloudVisionV1ColorInfo/score": score +"/vision:v1/GoogleCloudVisionV1CropHint": google_cloud_vision_v1_crop_hint +"/vision:v1/GoogleCloudVisionV1CropHint/boundingPoly": bounding_poly +"/vision:v1/GoogleCloudVisionV1CropHint/confidence": confidence +"/vision:v1/GoogleCloudVisionV1CropHint/importanceFraction": importance_fraction +"/vision:v1/GoogleCloudVisionV1CropHintsAnnotation": google_cloud_vision_v1_crop_hints_annotation +"/vision:v1/GoogleCloudVisionV1CropHintsAnnotation/cropHints": crop_hints +"/vision:v1/GoogleCloudVisionV1CropHintsAnnotation/cropHints/crop_hint": crop_hint +"/vision:v1/GoogleCloudVisionV1CropHintsParams": google_cloud_vision_v1_crop_hints_params +"/vision:v1/GoogleCloudVisionV1CropHintsParams/aspectRatios": aspect_ratios +"/vision:v1/GoogleCloudVisionV1CropHintsParams/aspectRatios/aspect_ratio": aspect_ratio +"/vision:v1/GoogleCloudVisionV1DominantColorsAnnotation": google_cloud_vision_v1_dominant_colors_annotation +"/vision:v1/GoogleCloudVisionV1DominantColorsAnnotation/colors": colors +"/vision:v1/GoogleCloudVisionV1DominantColorsAnnotation/colors/color": color +"/vision:v1/GoogleCloudVisionV1EntityAnnotation": google_cloud_vision_v1_entity_annotation +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/boundingPoly": bounding_poly +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/confidence": confidence +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/description": description +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/locale": locale +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/locations": locations +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/locations/location": location +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/mid": mid +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/properties": properties +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/properties/property": property +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/score": score +"/vision:v1/GoogleCloudVisionV1EntityAnnotation/topicality": topicality +"/vision:v1/GoogleCloudVisionV1FaceAnnotation": google_cloud_vision_v1_face_annotation +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/angerLikelihood": anger_likelihood +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/blurredLikelihood": blurred_likelihood +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/boundingPoly": bounding_poly +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/detectionConfidence": detection_confidence +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/fdBoundingPoly": fd_bounding_poly +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/headwearLikelihood": headwear_likelihood +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/joyLikelihood": joy_likelihood +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/landmarkingConfidence": landmarking_confidence +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/landmarks": landmarks +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/landmarks/landmark": landmark +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/panAngle": pan_angle +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/rollAngle": roll_angle +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/sorrowLikelihood": sorrow_likelihood +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/surpriseLikelihood": surprise_likelihood +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/tiltAngle": tilt_angle +"/vision:v1/GoogleCloudVisionV1FaceAnnotation/underExposedLikelihood": under_exposed_likelihood +"/vision:v1/GoogleCloudVisionV1FaceAnnotationLandmark": google_cloud_vision_v1_face_annotation_landmark +"/vision:v1/GoogleCloudVisionV1FaceAnnotationLandmark/position": position +"/vision:v1/GoogleCloudVisionV1FaceAnnotationLandmark/type": type +"/vision:v1/GoogleCloudVisionV1Feature": google_cloud_vision_v1_feature +"/vision:v1/GoogleCloudVisionV1Feature/maxResults": max_results +"/vision:v1/GoogleCloudVisionV1Feature/type": type +"/vision:v1/GoogleCloudVisionV1Image": google_cloud_vision_v1_image +"/vision:v1/GoogleCloudVisionV1Image/content": content +"/vision:v1/GoogleCloudVisionV1Image/source": source +"/vision:v1/GoogleCloudVisionV1ImageContext": google_cloud_vision_v1_image_context +"/vision:v1/GoogleCloudVisionV1ImageContext/cropHintsParams": crop_hints_params +"/vision:v1/GoogleCloudVisionV1ImageContext/languageHints": language_hints +"/vision:v1/GoogleCloudVisionV1ImageContext/languageHints/language_hint": language_hint +"/vision:v1/GoogleCloudVisionV1ImageContext/latLongRect": lat_long_rect +"/vision:v1/GoogleCloudVisionV1ImageProperties": google_cloud_vision_v1_image_properties +"/vision:v1/GoogleCloudVisionV1ImageProperties/dominantColors": dominant_colors +"/vision:v1/GoogleCloudVisionV1ImageSource": google_cloud_vision_v1_image_source +"/vision:v1/GoogleCloudVisionV1ImageSource/gcsImageUri": gcs_image_uri +"/vision:v1/GoogleCloudVisionV1ImageSource/imageUri": image_uri +"/vision:v1/GoogleCloudVisionV1LatLongRect": google_cloud_vision_v1_lat_long_rect +"/vision:v1/GoogleCloudVisionV1LatLongRect/maxLatLng": max_lat_lng +"/vision:v1/GoogleCloudVisionV1LatLongRect/minLatLng": min_lat_lng +"/vision:v1/GoogleCloudVisionV1LocationInfo": google_cloud_vision_v1_location_info +"/vision:v1/GoogleCloudVisionV1LocationInfo/latLng": lat_lng +"/vision:v1/GoogleCloudVisionV1Page": google_cloud_vision_v1_page +"/vision:v1/GoogleCloudVisionV1Page/blocks": blocks +"/vision:v1/GoogleCloudVisionV1Page/blocks/block": block +"/vision:v1/GoogleCloudVisionV1Page/height": height +"/vision:v1/GoogleCloudVisionV1Page/property": property +"/vision:v1/GoogleCloudVisionV1Page/width": width +"/vision:v1/GoogleCloudVisionV1Paragraph": google_cloud_vision_v1_paragraph +"/vision:v1/GoogleCloudVisionV1Paragraph/boundingBox": bounding_box +"/vision:v1/GoogleCloudVisionV1Paragraph/property": property +"/vision:v1/GoogleCloudVisionV1Paragraph/words": words +"/vision:v1/GoogleCloudVisionV1Paragraph/words/word": word +"/vision:v1/GoogleCloudVisionV1Position": google_cloud_vision_v1_position +"/vision:v1/GoogleCloudVisionV1Position/x": x +"/vision:v1/GoogleCloudVisionV1Position/y": y +"/vision:v1/GoogleCloudVisionV1Position/z": z +"/vision:v1/GoogleCloudVisionV1Property": google_cloud_vision_v1_property +"/vision:v1/GoogleCloudVisionV1Property/name": name +"/vision:v1/GoogleCloudVisionV1Property/uint64Value": uint64_value +"/vision:v1/GoogleCloudVisionV1Property/value": value +"/vision:v1/GoogleCloudVisionV1SafeSearchAnnotation": google_cloud_vision_v1_safe_search_annotation +"/vision:v1/GoogleCloudVisionV1SafeSearchAnnotation/adult": adult +"/vision:v1/GoogleCloudVisionV1SafeSearchAnnotation/medical": medical +"/vision:v1/GoogleCloudVisionV1SafeSearchAnnotation/spoof": spoof +"/vision:v1/GoogleCloudVisionV1SafeSearchAnnotation/violence": violence +"/vision:v1/GoogleCloudVisionV1Symbol": google_cloud_vision_v1_symbol +"/vision:v1/GoogleCloudVisionV1Symbol/boundingBox": bounding_box +"/vision:v1/GoogleCloudVisionV1Symbol/property": property +"/vision:v1/GoogleCloudVisionV1Symbol/text": text +"/vision:v1/GoogleCloudVisionV1TextAnnotation": google_cloud_vision_v1_text_annotation +"/vision:v1/GoogleCloudVisionV1TextAnnotation/pages": pages +"/vision:v1/GoogleCloudVisionV1TextAnnotation/pages/page": page +"/vision:v1/GoogleCloudVisionV1TextAnnotation/text": text +"/vision:v1/GoogleCloudVisionV1TextAnnotationDetectedBreak": google_cloud_vision_v1_text_annotation_detected_break +"/vision:v1/GoogleCloudVisionV1TextAnnotationDetectedBreak/isPrefix": is_prefix +"/vision:v1/GoogleCloudVisionV1TextAnnotationDetectedBreak/type": type +"/vision:v1/GoogleCloudVisionV1TextAnnotationDetectedLanguage": google_cloud_vision_v1_text_annotation_detected_language +"/vision:v1/GoogleCloudVisionV1TextAnnotationDetectedLanguage/confidence": confidence +"/vision:v1/GoogleCloudVisionV1TextAnnotationDetectedLanguage/languageCode": language_code +"/vision:v1/GoogleCloudVisionV1TextAnnotationTextProperty": google_cloud_vision_v1_text_annotation_text_property +"/vision:v1/GoogleCloudVisionV1TextAnnotationTextProperty/detectedBreak": detected_break +"/vision:v1/GoogleCloudVisionV1TextAnnotationTextProperty/detectedLanguages": detected_languages +"/vision:v1/GoogleCloudVisionV1TextAnnotationTextProperty/detectedLanguages/detected_language": detected_language +"/vision:v1/GoogleCloudVisionV1Vertex": google_cloud_vision_v1_vertex +"/vision:v1/GoogleCloudVisionV1Vertex/x": x +"/vision:v1/GoogleCloudVisionV1Vertex/y": y +"/vision:v1/GoogleCloudVisionV1WebDetection": google_cloud_vision_v1_web_detection +"/vision:v1/GoogleCloudVisionV1WebDetection/fullMatchingImages": full_matching_images +"/vision:v1/GoogleCloudVisionV1WebDetection/fullMatchingImages/full_matching_image": full_matching_image +"/vision:v1/GoogleCloudVisionV1WebDetection/pagesWithMatchingImages": pages_with_matching_images +"/vision:v1/GoogleCloudVisionV1WebDetection/pagesWithMatchingImages/pages_with_matching_image": pages_with_matching_image +"/vision:v1/GoogleCloudVisionV1WebDetection/partialMatchingImages": partial_matching_images +"/vision:v1/GoogleCloudVisionV1WebDetection/partialMatchingImages/partial_matching_image": partial_matching_image +"/vision:v1/GoogleCloudVisionV1WebDetection/visuallySimilarImages": visually_similar_images +"/vision:v1/GoogleCloudVisionV1WebDetection/visuallySimilarImages/visually_similar_image": visually_similar_image +"/vision:v1/GoogleCloudVisionV1WebDetection/webEntities": web_entities +"/vision:v1/GoogleCloudVisionV1WebDetection/webEntities/web_entity": web_entity +"/vision:v1/GoogleCloudVisionV1WebDetectionWebEntity": google_cloud_vision_v1_web_detection_web_entity +"/vision:v1/GoogleCloudVisionV1WebDetectionWebEntity/description": description +"/vision:v1/GoogleCloudVisionV1WebDetectionWebEntity/entityId": entity_id +"/vision:v1/GoogleCloudVisionV1WebDetectionWebEntity/score": score +"/vision:v1/GoogleCloudVisionV1WebDetectionWebImage": google_cloud_vision_v1_web_detection_web_image +"/vision:v1/GoogleCloudVisionV1WebDetectionWebImage/score": score +"/vision:v1/GoogleCloudVisionV1WebDetectionWebImage/url": url +"/vision:v1/GoogleCloudVisionV1WebDetectionWebPage": google_cloud_vision_v1_web_detection_web_page +"/vision:v1/GoogleCloudVisionV1WebDetectionWebPage/score": score +"/vision:v1/GoogleCloudVisionV1WebDetectionWebPage/url": url +"/vision:v1/GoogleCloudVisionV1Word": google_cloud_vision_v1_word +"/vision:v1/GoogleCloudVisionV1Word/boundingBox": bounding_box +"/vision:v1/GoogleCloudVisionV1Word/property": property +"/vision:v1/GoogleCloudVisionV1Word/symbols": symbols +"/vision:v1/GoogleCloudVisionV1Word/symbols/symbol": symbol +"/vision:v1/GoogleRpcStatus": google_rpc_status +"/vision:v1/GoogleRpcStatus/code": code +"/vision:v1/GoogleRpcStatus/details": details +"/vision:v1/GoogleRpcStatus/details/detail": detail +"/vision:v1/GoogleRpcStatus/details/detail/detail": detail +"/vision:v1/GoogleRpcStatus/message": message +"/vision:v1/GoogleTypeColor": google_type_color +"/vision:v1/GoogleTypeColor/alpha": alpha +"/vision:v1/GoogleTypeColor/blue": blue +"/vision:v1/GoogleTypeColor/green": green +"/vision:v1/GoogleTypeColor/red": red +"/vision:v1/GoogleTypeLatLng": google_type_lat_lng +"/vision:v1/GoogleTypeLatLng/latitude": latitude +"/vision:v1/GoogleTypeLatLng/longitude": longitude "/vision:v1/Image": image "/vision:v1/Image/content": content "/vision:v1/Image/source": source diff --git a/generated/google/apis/vision_v1.rb b/generated/google/apis/vision_v1.rb index d6b7dfa80..74f6035c0 100644 --- a/generated/google/apis/vision_v1.rb +++ b/generated/google/apis/vision_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1 VERSION = 'V1' - REVISION = '20171003' + REVISION = '20171102' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/vision_v1/classes.rb b/generated/google/apis/vision_v1/classes.rb index 78bcd4d96..cda442f78 100644 --- a/generated/google/apis/vision_v1/classes.rb +++ b/generated/google/apis/vision_v1/classes.rb @@ -24,22 +24,22 @@ module Google # Request for performing Google Cloud Vision API tasks over a user-provided # image, with user-requested features. - class AnnotateImageRequest + class GoogleCloudVisionV1AnnotateImageRequest include Google::Apis::Core::Hashable # Requested features. # Corresponds to the JSON property `features` - # @return [Array] + # @return [Array] attr_accessor :features # Client image to perform Google Cloud Vision API tasks over. # Corresponds to the JSON property `image` - # @return [Google::Apis::VisionV1::Image] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1Image] attr_accessor :image # Image context and/or feature-specific parameters. # Corresponds to the JSON property `imageContext` - # @return [Google::Apis::VisionV1::ImageContext] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1ImageContext] attr_accessor :image_context def initialize(**args) @@ -55,12 +55,12 @@ module Google end # Response to an image annotation request. - class AnnotateImageResponse + class GoogleCloudVisionV1AnnotateImageResponse include Google::Apis::Core::Hashable # Set of crop hints that are used to generate new crops when serving images. # Corresponds to the JSON property `cropHintsAnnotation` - # @return [Google::Apis::VisionV1::CropHintsAnnotation] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsAnnotation] attr_accessor :crop_hints_annotation # The `Status` type defines a logical error model that is suitable for different @@ -103,60 +103,60 @@ module Google # - Logging. If some API errors are stored in logs, the message `Status` could # be used directly after any stripping needed for security/privacy reasons. # Corresponds to the JSON property `error` - # @return [Google::Apis::VisionV1::Status] + # @return [Google::Apis::VisionV1::GoogleRpcStatus] attr_accessor :error # If present, face detection has completed successfully. # Corresponds to the JSON property `faceAnnotations` - # @return [Array] + # @return [Array] attr_accessor :face_annotations # TextAnnotation contains a structured representation of OCR extracted text. # The hierarchy of an OCR extracted text structure is like this: # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol # Each structural component, starting from Page, may further have their own - # properties. Properties describe detected languages, breaks etc.. Please - # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message - # definition below for more detail. + # properties. Properties describe detected languages, breaks etc.. Please refer + # to the TextAnnotation.TextProperty message definition below for more + # detail. # Corresponds to the JSON property `fullTextAnnotation` - # @return [Google::Apis::VisionV1::TextAnnotation] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotation] attr_accessor :full_text_annotation # Stores image properties, such as dominant colors. # Corresponds to the JSON property `imagePropertiesAnnotation` - # @return [Google::Apis::VisionV1::ImageProperties] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1ImageProperties] attr_accessor :image_properties_annotation # If present, label detection has completed successfully. # Corresponds to the JSON property `labelAnnotations` - # @return [Array] + # @return [Array] attr_accessor :label_annotations # If present, landmark detection has completed successfully. # Corresponds to the JSON property `landmarkAnnotations` - # @return [Array] + # @return [Array] attr_accessor :landmark_annotations # If present, logo detection has completed successfully. # Corresponds to the JSON property `logoAnnotations` - # @return [Array] + # @return [Array] attr_accessor :logo_annotations # Set of features pertaining to the image, computed by computer vision # methods over safe-search verticals (for example, adult, spoof, medical, # violence). # Corresponds to the JSON property `safeSearchAnnotation` - # @return [Google::Apis::VisionV1::SafeSearchAnnotation] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1SafeSearchAnnotation] attr_accessor :safe_search_annotation # If present, text (OCR) detection has completed successfully. # Corresponds to the JSON property `textAnnotations` - # @return [Array] + # @return [Array] attr_accessor :text_annotations # Relevant information for the image from the Internet. # Corresponds to the JSON property `webDetection` - # @return [Google::Apis::VisionV1::WebDetection] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1WebDetection] attr_accessor :web_detection def initialize(**args) @@ -180,12 +180,12 @@ module Google end # Multiple image annotation requests are batched into a single service call. - class BatchAnnotateImagesRequest + class GoogleCloudVisionV1BatchAnnotateImagesRequest include Google::Apis::Core::Hashable # Individual image annotation requests for this batch. # Corresponds to the JSON property `requests` - # @return [Array] + # @return [Array] attr_accessor :requests def initialize(**args) @@ -199,12 +199,12 @@ module Google end # Response to a batch image annotation request. - class BatchAnnotateImagesResponse + class GoogleCloudVisionV1BatchAnnotateImagesResponse include Google::Apis::Core::Hashable # Individual responses to image annotation requests within the batch. # Corresponds to the JSON property `responses` - # @return [Array] + # @return [Array] attr_accessor :responses def initialize(**args) @@ -218,7 +218,7 @@ module Google end # Logical element on the page. - class Block + class GoogleCloudVisionV1Block include Google::Apis::Core::Hashable # Detected block type (text, image etc) for this block. @@ -228,17 +228,17 @@ module Google # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] attr_accessor :bounding_box # List of paragraphs in this block (if this blocks is of type text). # Corresponds to the JSON property `paragraphs` - # @return [Array] + # @return [Array] attr_accessor :paragraphs # Additional information detected on the structural component. # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty] attr_accessor :property def initialize(**args) @@ -255,12 +255,12 @@ module Google end # A bounding polygon for the detected image annotation. - class BoundingPoly + class GoogleCloudVisionV1BoundingPoly include Google::Apis::Core::Hashable # The bounding polygon vertices. # Corresponds to the JSON property `vertices` - # @return [Array] + # @return [Array] attr_accessor :vertices def initialize(**args) @@ -273,152 +273,9 @@ module Google end end - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - class Color - include Google::Apis::Core::Hashable - - # The fraction of this color that should be applied to the pixel. That is, - # the final pixel color is defined by the equation: - # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. This - # uses a wrapper message rather than a simple float scalar so that it is - # possible to distinguish between a default value and the value being unset. - # If omitted, this color object is to be rendered as a solid color - # (as if the alpha value had been explicitly given with a value of 1.0). - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - # The amount of blue in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `blue` - # @return [Float] - attr_accessor :blue - - # The amount of green in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `green` - # @return [Float] - attr_accessor :green - - # The amount of red in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alpha = args[:alpha] if args.key?(:alpha) - @blue = args[:blue] if args.key?(:blue) - @green = args[:green] if args.key?(:green) - @red = args[:red] if args.key?(:red) - end - end - # Color information consists of RGB channels, score, and the fraction of # the image that the color occupies in the image. - class ColorInfo + class GoogleCloudVisionV1ColorInfo include Google::Apis::Core::Hashable # Represents a color in the RGBA color space. This representation is designed @@ -521,7 +378,7 @@ module Google # `; # // ... # Corresponds to the JSON property `color` - # @return [Google::Apis::VisionV1::Color] + # @return [Google::Apis::VisionV1::GoogleTypeColor] attr_accessor :color # The fraction of pixels the color occupies in the image. @@ -548,12 +405,12 @@ module Google end # Single crop hint that is used to generate a new crop when serving an image. - class CropHint + class GoogleCloudVisionV1CropHint include Google::Apis::Core::Hashable # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] attr_accessor :bounding_poly # Confidence of this being a salient region. Range [0, 1]. @@ -580,12 +437,12 @@ module Google end # Set of crop hints that are used to generate new crops when serving images. - class CropHintsAnnotation + class GoogleCloudVisionV1CropHintsAnnotation include Google::Apis::Core::Hashable # Crop hint results. # Corresponds to the JSON property `cropHints` - # @return [Array] + # @return [Array] attr_accessor :crop_hints def initialize(**args) @@ -599,7 +456,7 @@ module Google end # Parameters for crop hints annotation request. - class CropHintsParams + class GoogleCloudVisionV1CropHintsParams include Google::Apis::Core::Hashable # Aspect ratios in floats, representing the ratio of the width to the height @@ -622,66 +479,13 @@ module Google end end - # Detected start or end of a structural component. - class DetectedBreak - include Google::Apis::Core::Hashable - - # True if break prepends the element. - # Corresponds to the JSON property `isPrefix` - # @return [Boolean] - attr_accessor :is_prefix - alias_method :is_prefix?, :is_prefix - - # Detected break type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_prefix = args[:is_prefix] if args.key?(:is_prefix) - @type = args[:type] if args.key?(:type) - end - end - - # Detected language for a structural component. - class DetectedLanguage - include Google::Apis::Core::Hashable - - # Confidence of detected language. Range [0, 1]. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # The BCP-47 language code, such as "en-US" or "sr-Latn". For more - # information, see - # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # Corresponds to the JSON property `languageCode` - # @return [String] - attr_accessor :language_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @confidence = args[:confidence] if args.key?(:confidence) - @language_code = args[:language_code] if args.key?(:language_code) - end - end - # Set of dominant colors and their corresponding scores. - class DominantColorsAnnotation + class GoogleCloudVisionV1DominantColorsAnnotation include Google::Apis::Core::Hashable # RGB color values with their score and pixel fraction. # Corresponds to the JSON property `colors` - # @return [Array] + # @return [Array] attr_accessor :colors def initialize(**args) @@ -695,12 +499,12 @@ module Google end # Set of detected entity features. - class EntityAnnotation + class GoogleCloudVisionV1EntityAnnotation include Google::Apis::Core::Hashable # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] attr_accessor :bounding_poly # The accuracy of the entity detection in an image. @@ -728,12 +532,12 @@ module Google # may indicate the location of the place where the image was taken. # Location information is usually present for landmarks. # Corresponds to the JSON property `locations` - # @return [Array] + # @return [Array] attr_accessor :locations # 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/). # Corresponds to the JSON property `mid` # @return [String] attr_accessor :mid @@ -741,7 +545,7 @@ module Google # Some entities may have optional user-supplied `Property` (name/value) # fields, such a score or string that qualifies the entity. # Corresponds to the JSON property `properties` - # @return [Array] + # @return [Array] attr_accessor :properties # Overall score of the result. Range [0, 1]. @@ -777,7 +581,7 @@ module Google end # A face annotation object contains the results of face detection. - class FaceAnnotation + class GoogleCloudVisionV1FaceAnnotation include Google::Apis::Core::Hashable # Anger likelihood. @@ -792,7 +596,7 @@ module Google # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] attr_accessor :bounding_poly # Detection confidence. Range [0, 1]. @@ -802,7 +606,7 @@ module Google # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `fdBoundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] attr_accessor :fd_bounding_poly # Headwear likelihood. @@ -822,7 +626,7 @@ module Google # Detected face landmarks. # Corresponds to the JSON property `landmarks` - # @return [Array] + # @return [Array] attr_accessor :landmarks # Yaw angle, which indicates the leftward/rightward angle that the face is @@ -884,11 +688,38 @@ module Google end end + # A face-specific landmark (for example, a face feature). + class GoogleCloudVisionV1FaceAnnotationLandmark + include Google::Apis::Core::Hashable + + # A 3D position in the image, used primarily for Face detection landmarks. + # A valid Position must have both x and y coordinates. + # The position coordinates are in the same scale as the original image. + # Corresponds to the JSON property `position` + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1Position] + attr_accessor :position + + # Face landmark type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @type = args[:type] if args.key?(:type) + end + end + # 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. - class Feature + class GoogleCloudVisionV1Feature include Google::Apis::Core::Hashable # Maximum number of results of this type. @@ -913,7 +744,7 @@ module Google end # Client image to perform Google Cloud Vision API tasks over. - class Image + class GoogleCloudVisionV1Image include Google::Apis::Core::Hashable # Image content, represented as a stream of bytes. @@ -926,7 +757,7 @@ module Google # External image source (Google Cloud Storage image location). # Corresponds to the JSON property `source` - # @return [Google::Apis::VisionV1::ImageSource] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1ImageSource] attr_accessor :source def initialize(**args) @@ -941,12 +772,12 @@ module Google end # Image context and/or feature-specific parameters. - class ImageContext + class GoogleCloudVisionV1ImageContext include Google::Apis::Core::Hashable # Parameters for crop hints annotation request. # Corresponds to the JSON property `cropHintsParams` - # @return [Google::Apis::VisionV1::CropHintsParams] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsParams] attr_accessor :crop_hints_params # List of languages to use for TEXT_DETECTION. In most cases, an empty value @@ -963,7 +794,7 @@ module Google # Rectangle determined by min and max `LatLng` pairs. # Corresponds to the JSON property `latLongRect` - # @return [Google::Apis::VisionV1::LatLongRect] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1LatLongRect] attr_accessor :lat_long_rect def initialize(**args) @@ -979,12 +810,12 @@ module Google end # Stores image properties, such as dominant colors. - class ImageProperties + class GoogleCloudVisionV1ImageProperties include Google::Apis::Core::Hashable # Set of dominant colors and their corresponding scores. # Corresponds to the JSON property `dominantColors` - # @return [Google::Apis::VisionV1::DominantColorsAnnotation] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1DominantColorsAnnotation] attr_accessor :dominant_colors def initialize(**args) @@ -998,7 +829,7 @@ module Google end # External image source (Google Cloud Storage image location). - class ImageSource + class GoogleCloudVisionV1ImageSource include Google::Apis::Core::Hashable # NOTE: For new code `image_uri` below is preferred. @@ -1036,98 +867,8 @@ module Google end end - # 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`. - class Landmark - include Google::Apis::Core::Hashable - - # A 3D position in the image, used primarily for Face detection landmarks. - # A valid Position must have both x and y coordinates. - # The position coordinates are in the same scale as the original image. - # Corresponds to the JSON property `position` - # @return [Google::Apis::VisionV1::Position] - attr_accessor :position - - # Face landmark type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - @type = args[:type] if args.key?(:type) - end - end - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - class LatLng - include Google::Apis::Core::Hashable - - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latitude = args[:latitude] if args.key?(:latitude) - @longitude = args[:longitude] if args.key?(:longitude) - end - end - # Rectangle determined by min and max `LatLng` pairs. - class LatLongRect + class GoogleCloudVisionV1LatLongRect include Google::Apis::Core::Hashable # An object representing a latitude/longitude pair. This is expressed as a pair @@ -1135,38 +876,8 @@ module Google # specified otherwise, this must conform to the # WGS84 # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) # Corresponds to the JSON property `maxLatLng` - # @return [Google::Apis::VisionV1::LatLng] + # @return [Google::Apis::VisionV1::GoogleTypeLatLng] attr_accessor :max_lat_lng # An object representing a latitude/longitude pair. This is expressed as a pair @@ -1174,38 +885,8 @@ module Google # specified otherwise, this must conform to the # WGS84 # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) # Corresponds to the JSON property `minLatLng` - # @return [Google::Apis::VisionV1::LatLng] + # @return [Google::Apis::VisionV1::GoogleTypeLatLng] attr_accessor :min_lat_lng def initialize(**args) @@ -1220,7 +901,7 @@ module Google end # Detected entity location information. - class LocationInfo + class GoogleCloudVisionV1LocationInfo include Google::Apis::Core::Hashable # An object representing a latitude/longitude pair. This is expressed as a pair @@ -1228,38 +909,8 @@ module Google # specified otherwise, this must conform to the # WGS84 # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) # Corresponds to the JSON property `latLng` - # @return [Google::Apis::VisionV1::LatLng] + # @return [Google::Apis::VisionV1::GoogleTypeLatLng] attr_accessor :lat_lng def initialize(**args) @@ -1273,12 +924,12 @@ module Google end # Detected page from OCR. - class Page + class GoogleCloudVisionV1Page include Google::Apis::Core::Hashable # List of blocks of text, images etc on this page. # Corresponds to the JSON property `blocks` - # @return [Array] + # @return [Array] attr_accessor :blocks # Page height in pixels. @@ -1288,7 +939,7 @@ module Google # Additional information detected on the structural component. # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty] attr_accessor :property # Page width in pixels. @@ -1310,22 +961,22 @@ module Google end # Structural unit of text representing a number of words in certain order. - class Paragraph + class GoogleCloudVisionV1Paragraph include Google::Apis::Core::Hashable # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] attr_accessor :bounding_box # Additional information detected on the structural component. # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty] attr_accessor :property # List of words in this paragraph. # Corresponds to the JSON property `words` - # @return [Array] + # @return [Array] attr_accessor :words def initialize(**args) @@ -1343,7 +994,7 @@ module Google # A 3D position in the image, used primarily for Face detection landmarks. # A valid Position must have both x and y coordinates. # The position coordinates are in the same scale as the original image. - class Position + class GoogleCloudVisionV1Position include Google::Apis::Core::Hashable # X coordinate. @@ -1374,7 +1025,7 @@ module Google end # A `Property` consists of a user-supplied name/value pair. - class Property + class GoogleCloudVisionV1Property include Google::Apis::Core::Hashable # Name of the property. @@ -1407,7 +1058,7 @@ module Google # Set of features pertaining to the image, computed by computer vision # methods over safe-search verticals (for example, adult, spoof, medical, # violence). - class SafeSearchAnnotation + class GoogleCloudVisionV1SafeSearchAnnotation include Google::Apis::Core::Hashable # Represents the adult content likelihood for the image. Adult content may @@ -1447,6 +1098,332 @@ module Google end end + # A single symbol representation. + class GoogleCloudVisionV1Symbol + include Google::Apis::Core::Hashable + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingBox` + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] + attr_accessor :bounding_box + + # Additional information detected on the structural component. + # Corresponds to the JSON property `property` + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty] + attr_accessor :property + + # The actual UTF-8 representation of the symbol. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + @property = args[:property] if args.key?(:property) + @text = args[:text] if args.key?(:text) + end + end + + # TextAnnotation contains a structured representation of OCR extracted text. + # The hierarchy of an OCR extracted text structure is like this: + # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol + # Each structural component, starting from Page, may further have their own + # properties. Properties describe detected languages, breaks etc.. Please refer + # to the TextAnnotation.TextProperty message definition below for more + # detail. + class GoogleCloudVisionV1TextAnnotation + include Google::Apis::Core::Hashable + + # List of pages detected by OCR. + # Corresponds to the JSON property `pages` + # @return [Array] + attr_accessor :pages + + # UTF-8 text detected on the pages. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pages = args[:pages] if args.key?(:pages) + @text = args[:text] if args.key?(:text) + end + end + + # Detected start or end of a structural component. + class GoogleCloudVisionV1TextAnnotationDetectedBreak + include Google::Apis::Core::Hashable + + # True if break prepends the element. + # Corresponds to the JSON property `isPrefix` + # @return [Boolean] + attr_accessor :is_prefix + alias_method :is_prefix?, :is_prefix + + # Detected break type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @is_prefix = args[:is_prefix] if args.key?(:is_prefix) + @type = args[:type] if args.key?(:type) + end + end + + # Detected language for a structural component. + class GoogleCloudVisionV1TextAnnotationDetectedLanguage + include Google::Apis::Core::Hashable + + # Confidence of detected language. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @language_code = args[:language_code] if args.key?(:language_code) + end + end + + # Additional information detected on the structural component. + class GoogleCloudVisionV1TextAnnotationTextProperty + include Google::Apis::Core::Hashable + + # Detected start or end of a structural component. + # Corresponds to the JSON property `detectedBreak` + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationDetectedBreak] + attr_accessor :detected_break + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_break = args[:detected_break] if args.key?(:detected_break) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + end + end + + # A vertex represents a 2D point in the image. + # NOTE: the vertex coordinates are in the same scale as the original image. + class GoogleCloudVisionV1Vertex + include Google::Apis::Core::Hashable + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Fixnum] + attr_accessor :x + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Fixnum] + attr_accessor :y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @x = args[:x] if args.key?(:x) + @y = args[:y] if args.key?(:y) + end + end + + # Relevant information for the image from the Internet. + class GoogleCloudVisionV1WebDetection + include Google::Apis::Core::Hashable + + # Fully matching images from the Internet. + # Can include resized copies of the query image. + # Corresponds to the JSON property `fullMatchingImages` + # @return [Array] + attr_accessor :full_matching_images + + # Web pages containing the matching images from the Internet. + # Corresponds to the JSON property `pagesWithMatchingImages` + # @return [Array] + attr_accessor :pages_with_matching_images + + # Partial matching images from the Internet. + # Those images are similar enough to share some key-point features. For + # example an original image will likely have partial matching for its crops. + # Corresponds to the JSON property `partialMatchingImages` + # @return [Array] + attr_accessor :partial_matching_images + + # The visually similar image results. + # Corresponds to the JSON property `visuallySimilarImages` + # @return [Array] + attr_accessor :visually_similar_images + + # Deduced entities from similar images on the Internet. + # Corresponds to the JSON property `webEntities` + # @return [Array] + attr_accessor :web_entities + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images) + @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images) + @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images) + @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images) + @web_entities = args[:web_entities] if args.key?(:web_entities) + end + end + + # Entity deduced from similar images on the Internet. + class GoogleCloudVisionV1WebDetectionWebEntity + include Google::Apis::Core::Hashable + + # Canonical description of the entity, in English. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Opaque entity ID. + # Corresponds to the JSON property `entityId` + # @return [String] + attr_accessor :entity_id + + # Overall relevancy score for the entity. + # Not normalized and not comparable across different image queries. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @entity_id = args[:entity_id] if args.key?(:entity_id) + @score = args[:score] if args.key?(:score) + end + end + + # Metadata for online images. + class GoogleCloudVisionV1WebDetectionWebImage + include Google::Apis::Core::Hashable + + # (Deprecated) Overall relevancy score for the image. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + # The result image URL. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @score = args[:score] if args.key?(:score) + @url = args[:url] if args.key?(:url) + end + end + + # Metadata for web pages. + class GoogleCloudVisionV1WebDetectionWebPage + include Google::Apis::Core::Hashable + + # (Deprecated) Overall relevancy score for the web page. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + # The result web page URL. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @score = args[:score] if args.key?(:score) + @url = args[:url] if args.key?(:url) + end + end + + # A word representation. + class GoogleCloudVisionV1Word + include Google::Apis::Core::Hashable + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingBox` + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly] + attr_accessor :bounding_box + + # Additional information detected on the structural component. + # Corresponds to the JSON property `property` + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty] + attr_accessor :property + + # List of symbols in the word. + # The order of the symbols follows the natural reading order. + # Corresponds to the JSON property `symbols` + # @return [Array] + attr_accessor :symbols + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + @property = args[:property] if args.key?(:property) + @symbols = args[:symbols] if args.key?(:symbols) + end + end + # 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). The error model is designed to be: @@ -1486,7 +1463,7 @@ module Google # represented directly using the `Status` message. # - Logging. If some API errors are stored in logs, the message `Status` could # be used directly after any stripping needed for security/privacy reasons. - class Status + class GoogleRpcStatus include Google::Apis::Core::Hashable # The status code, which should be an enum value of google.rpc.Code. @@ -1519,235 +1496,135 @@ module Google end end - # A single symbol representation. - class Symbol + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + class GoogleTypeColor include Google::Apis::Core::Hashable - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_box - - # Additional information detected on the structural component. - # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] - attr_accessor :property - - # The actual UTF-8 representation of the symbol. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bounding_box = args[:bounding_box] if args.key?(:bounding_box) - @property = args[:property] if args.key?(:property) - @text = args[:text] if args.key?(:text) - end - end - - # TextAnnotation contains a structured representation of OCR extracted text. - # The hierarchy of an OCR extracted text structure is like this: - # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol - # Each structural component, starting from Page, may further have their own - # properties. Properties describe detected languages, breaks etc.. Please - # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message - # definition below for more detail. - class TextAnnotation - include Google::Apis::Core::Hashable - - # List of pages detected by OCR. - # Corresponds to the JSON property `pages` - # @return [Array] - attr_accessor :pages - - # UTF-8 text detected on the pages. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pages = args[:pages] if args.key?(:pages) - @text = args[:text] if args.key?(:text) - end - end - - # Additional information detected on the structural component. - class TextProperty - include Google::Apis::Core::Hashable - - # Detected start or end of a structural component. - # Corresponds to the JSON property `detectedBreak` - # @return [Google::Apis::VisionV1::DetectedBreak] - attr_accessor :detected_break - - # A list of detected languages together with confidence. - # Corresponds to the JSON property `detectedLanguages` - # @return [Array] - attr_accessor :detected_languages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @detected_break = args[:detected_break] if args.key?(:detected_break) - @detected_languages = args[:detected_languages] if args.key?(:detected_languages) - end - end - - # A vertex represents a 2D point in the image. - # NOTE: the vertex coordinates are in the same scale as the original image. - class Vertex - include Google::Apis::Core::Hashable - - # X coordinate. - # Corresponds to the JSON property `x` - # @return [Fixnum] - attr_accessor :x - - # Y coordinate. - # Corresponds to the JSON property `y` - # @return [Fixnum] - attr_accessor :y - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @x = args[:x] if args.key?(:x) - @y = args[:y] if args.key?(:y) - end - end - - # Relevant information for the image from the Internet. - class WebDetection - include Google::Apis::Core::Hashable - - # Fully matching images from the Internet. - # Can include resized copies of the query image. - # Corresponds to the JSON property `fullMatchingImages` - # @return [Array] - attr_accessor :full_matching_images - - # Web pages containing the matching images from the Internet. - # Corresponds to the JSON property `pagesWithMatchingImages` - # @return [Array] - attr_accessor :pages_with_matching_images - - # Partial matching images from the Internet. - # Those images are similar enough to share some key-point features. For - # example an original image will likely have partial matching for its crops. - # Corresponds to the JSON property `partialMatchingImages` - # @return [Array] - attr_accessor :partial_matching_images - - # The visually similar image results. - # Corresponds to the JSON property `visuallySimilarImages` - # @return [Array] - attr_accessor :visually_similar_images - - # Deduced entities from similar images on the Internet. - # Corresponds to the JSON property `webEntities` - # @return [Array] - attr_accessor :web_entities - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images) - @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images) - @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images) - @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images) - @web_entities = args[:web_entities] if args.key?(:web_entities) - end - end - - # Entity deduced from similar images on the Internet. - class WebEntity - include Google::Apis::Core::Hashable - - # Canonical description of the entity, in English. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Opaque entity ID. - # Corresponds to the JSON property `entityId` - # @return [String] - attr_accessor :entity_id - - # Overall relevancy score for the entity. - # Not normalized and not comparable across different image queries. - # Corresponds to the JSON property `score` + # The fraction of this color that should be applied to the pixel. That is, + # the final pixel color is defined by the equation: + # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. This + # uses a wrapper message rather than a simple float scalar so that it is + # possible to distinguish between a default value and the value being unset. + # If omitted, this color object is to be rendered as a solid color + # (as if the alpha value had been explicitly given with a value of 1.0). + # Corresponds to the JSON property `alpha` # @return [Float] - attr_accessor :score + attr_accessor :alpha - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @entity_id = args[:entity_id] if args.key?(:entity_id) - @score = args[:score] if args.key?(:score) - end - end - - # Metadata for online images. - class WebImage - include Google::Apis::Core::Hashable - - # (Deprecated) Overall relevancy score for the image. - # Corresponds to the JSON property `score` + # The amount of blue in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `blue` # @return [Float] - attr_accessor :score + attr_accessor :blue - # The result image URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @score = args[:score] if args.key?(:score) - @url = args[:url] if args.key?(:url) - end - end - - # Metadata for web pages. - class WebPage - include Google::Apis::Core::Hashable - - # (Deprecated) Overall relevancy score for the web page. - # Corresponds to the JSON property `score` + # The amount of green in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `green` # @return [Float] - attr_accessor :score + attr_accessor :green - # The result web page URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url + # The amount of red in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red def initialize(**args) update!(**args) @@ -1755,30 +1632,30 @@ module Google # Update properties of this object def update!(**args) - @score = args[:score] if args.key?(:score) - @url = args[:url] if args.key?(:url) + @alpha = args[:alpha] if args.key?(:alpha) + @blue = args[:blue] if args.key?(:blue) + @green = args[:green] if args.key?(:green) + @red = args[:red] if args.key?(:red) end end - # A word representation. - class Word + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + class GoogleTypeLatLng include Google::Apis::Core::Hashable - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_box + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude - # Additional information detected on the structural component. - # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] - attr_accessor :property - - # List of symbols in the word. - # The order of the symbols follows the natural reading order. - # Corresponds to the JSON property `symbols` - # @return [Array] - attr_accessor :symbols + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude def initialize(**args) update!(**args) @@ -1786,9 +1663,8 @@ module Google # Update properties of this object def update!(**args) - @bounding_box = args[:bounding_box] if args.key?(:bounding_box) - @property = args[:property] if args.key?(:property) - @symbols = args[:symbols] if args.key?(:symbols) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) end end end diff --git a/generated/google/apis/vision_v1/representations.rb b/generated/google/apis/vision_v1/representations.rb index 9bcaa88b7..c71cc909f 100644 --- a/generated/google/apis/vision_v1/representations.rb +++ b/generated/google/apis/vision_v1/representations.rb @@ -22,424 +22,398 @@ module Google module Apis module VisionV1 - class AnnotateImageRequest + class GoogleCloudVisionV1AnnotateImageRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AnnotateImageResponse + class GoogleCloudVisionV1AnnotateImageResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BatchAnnotateImagesRequest + class GoogleCloudVisionV1BatchAnnotateImagesRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BatchAnnotateImagesResponse + class GoogleCloudVisionV1BatchAnnotateImagesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Block + class GoogleCloudVisionV1Block class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BoundingPoly + class GoogleCloudVisionV1BoundingPoly class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Color + class GoogleCloudVisionV1ColorInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ColorInfo + class GoogleCloudVisionV1CropHint class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CropHint + class GoogleCloudVisionV1CropHintsAnnotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CropHintsAnnotation + class GoogleCloudVisionV1CropHintsParams class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CropHintsParams + class GoogleCloudVisionV1DominantColorsAnnotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DetectedBreak + class GoogleCloudVisionV1EntityAnnotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DetectedLanguage + class GoogleCloudVisionV1FaceAnnotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DominantColorsAnnotation + class GoogleCloudVisionV1FaceAnnotationLandmark class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class EntityAnnotation + class GoogleCloudVisionV1Feature class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FaceAnnotation + class GoogleCloudVisionV1Image class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Feature + class GoogleCloudVisionV1ImageContext class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Image + class GoogleCloudVisionV1ImageProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ImageContext + class GoogleCloudVisionV1ImageSource class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ImageProperties + class GoogleCloudVisionV1LatLongRect class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ImageSource + class GoogleCloudVisionV1LocationInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Landmark + class GoogleCloudVisionV1Page class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LatLng + class GoogleCloudVisionV1Paragraph class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LatLongRect + class GoogleCloudVisionV1Position class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LocationInfo + class GoogleCloudVisionV1Property class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Page + class GoogleCloudVisionV1SafeSearchAnnotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Paragraph + class GoogleCloudVisionV1Symbol class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Position + class GoogleCloudVisionV1TextAnnotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Property + class GoogleCloudVisionV1TextAnnotationDetectedBreak class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SafeSearchAnnotation + class GoogleCloudVisionV1TextAnnotationDetectedLanguage class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Status + class GoogleCloudVisionV1TextAnnotationTextProperty class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Symbol + class GoogleCloudVisionV1Vertex class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TextAnnotation + class GoogleCloudVisionV1WebDetection class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TextProperty + class GoogleCloudVisionV1WebDetectionWebEntity class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Vertex + class GoogleCloudVisionV1WebDetectionWebImage class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class WebDetection + class GoogleCloudVisionV1WebDetectionWebPage class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class WebEntity + class GoogleCloudVisionV1Word class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class WebImage + class GoogleRpcStatus class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class WebPage + class GoogleTypeColor class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Word + class GoogleTypeLatLng class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AnnotateImageRequest + class GoogleCloudVisionV1AnnotateImageRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :features, as: 'features', class: Google::Apis::VisionV1::Feature, decorator: Google::Apis::VisionV1::Feature::Representation + collection :features, as: 'features', class: Google::Apis::VisionV1::GoogleCloudVisionV1Feature, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Feature::Representation - property :image, as: 'image', class: Google::Apis::VisionV1::Image, decorator: Google::Apis::VisionV1::Image::Representation + property :image, as: 'image', class: Google::Apis::VisionV1::GoogleCloudVisionV1Image, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Image::Representation - property :image_context, as: 'imageContext', class: Google::Apis::VisionV1::ImageContext, decorator: Google::Apis::VisionV1::ImageContext::Representation + property :image_context, as: 'imageContext', class: Google::Apis::VisionV1::GoogleCloudVisionV1ImageContext, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1ImageContext::Representation end end - class AnnotateImageResponse + class GoogleCloudVisionV1AnnotateImageResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :crop_hints_annotation, as: 'cropHintsAnnotation', class: Google::Apis::VisionV1::CropHintsAnnotation, decorator: Google::Apis::VisionV1::CropHintsAnnotation::Representation + property :crop_hints_annotation, as: 'cropHintsAnnotation', class: Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsAnnotation::Representation - property :error, as: 'error', class: Google::Apis::VisionV1::Status, decorator: Google::Apis::VisionV1::Status::Representation + property :error, as: 'error', class: Google::Apis::VisionV1::GoogleRpcStatus, decorator: Google::Apis::VisionV1::GoogleRpcStatus::Representation - collection :face_annotations, as: 'faceAnnotations', class: Google::Apis::VisionV1::FaceAnnotation, decorator: Google::Apis::VisionV1::FaceAnnotation::Representation + collection :face_annotations, as: 'faceAnnotations', class: Google::Apis::VisionV1::GoogleCloudVisionV1FaceAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1FaceAnnotation::Representation - property :full_text_annotation, as: 'fullTextAnnotation', class: Google::Apis::VisionV1::TextAnnotation, decorator: Google::Apis::VisionV1::TextAnnotation::Representation + property :full_text_annotation, as: 'fullTextAnnotation', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotation::Representation - property :image_properties_annotation, as: 'imagePropertiesAnnotation', class: Google::Apis::VisionV1::ImageProperties, decorator: Google::Apis::VisionV1::ImageProperties::Representation + property :image_properties_annotation, as: 'imagePropertiesAnnotation', class: Google::Apis::VisionV1::GoogleCloudVisionV1ImageProperties, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1ImageProperties::Representation - collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation::Representation - collection :landmark_annotations, as: 'landmarkAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + collection :landmark_annotations, as: 'landmarkAnnotations', class: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation::Representation - collection :logo_annotations, as: 'logoAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + collection :logo_annotations, as: 'logoAnnotations', class: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation::Representation - property :safe_search_annotation, as: 'safeSearchAnnotation', class: Google::Apis::VisionV1::SafeSearchAnnotation, decorator: Google::Apis::VisionV1::SafeSearchAnnotation::Representation + property :safe_search_annotation, as: 'safeSearchAnnotation', class: Google::Apis::VisionV1::GoogleCloudVisionV1SafeSearchAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1SafeSearchAnnotation::Representation - collection :text_annotations, as: 'textAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + collection :text_annotations, as: 'textAnnotations', class: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation::Representation - property :web_detection, as: 'webDetection', class: Google::Apis::VisionV1::WebDetection, decorator: Google::Apis::VisionV1::WebDetection::Representation + property :web_detection, as: 'webDetection', class: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetection, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetection::Representation end end - class BatchAnnotateImagesRequest + class GoogleCloudVisionV1BatchAnnotateImagesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateImageRequest, decorator: Google::Apis::VisionV1::AnnotateImageRequest::Representation + collection :requests, as: 'requests', class: Google::Apis::VisionV1::GoogleCloudVisionV1AnnotateImageRequest, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1AnnotateImageRequest::Representation end end - class BatchAnnotateImagesResponse + class GoogleCloudVisionV1BatchAnnotateImagesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :responses, as: 'responses', class: Google::Apis::VisionV1::AnnotateImageResponse, decorator: Google::Apis::VisionV1::AnnotateImageResponse::Representation + collection :responses, as: 'responses', class: Google::Apis::VisionV1::GoogleCloudVisionV1AnnotateImageResponse, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1AnnotateImageResponse::Representation end end - class Block + class GoogleCloudVisionV1Block # @private class Representation < Google::Apis::Core::JsonRepresentation property :block_type, as: 'blockType' - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation - collection :paragraphs, as: 'paragraphs', class: Google::Apis::VisionV1::Paragraph, decorator: Google::Apis::VisionV1::Paragraph::Representation + collection :paragraphs, as: 'paragraphs', class: Google::Apis::VisionV1::GoogleCloudVisionV1Paragraph, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Paragraph::Representation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + property :property, as: 'property', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty::Representation end end - class BoundingPoly + class GoogleCloudVisionV1BoundingPoly # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :vertices, as: 'vertices', class: Google::Apis::VisionV1::Vertex, decorator: Google::Apis::VisionV1::Vertex::Representation + collection :vertices, as: 'vertices', class: Google::Apis::VisionV1::GoogleCloudVisionV1Vertex, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Vertex::Representation end end - class Color + class GoogleCloudVisionV1ColorInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :alpha, as: 'alpha' - property :blue, as: 'blue' - property :green, as: 'green' - property :red, as: 'red' - end - end - - class ColorInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color', class: Google::Apis::VisionV1::Color, decorator: Google::Apis::VisionV1::Color::Representation + property :color, as: 'color', class: Google::Apis::VisionV1::GoogleTypeColor, decorator: Google::Apis::VisionV1::GoogleTypeColor::Representation property :pixel_fraction, as: 'pixelFraction' property :score, as: 'score' end end - class CropHint + class GoogleCloudVisionV1CropHint # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation property :confidence, as: 'confidence' property :importance_fraction, as: 'importanceFraction' end end - class CropHintsAnnotation + class GoogleCloudVisionV1CropHintsAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :crop_hints, as: 'cropHints', class: Google::Apis::VisionV1::CropHint, decorator: Google::Apis::VisionV1::CropHint::Representation + collection :crop_hints, as: 'cropHints', class: Google::Apis::VisionV1::GoogleCloudVisionV1CropHint, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1CropHint::Representation end end - class CropHintsParams + class GoogleCloudVisionV1CropHintsParams # @private class Representation < Google::Apis::Core::JsonRepresentation collection :aspect_ratios, as: 'aspectRatios' end end - class DetectedBreak + class GoogleCloudVisionV1DominantColorsAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :is_prefix, as: 'isPrefix' - property :type, as: 'type' - end - end - - class DetectedLanguage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :confidence, as: 'confidence' - property :language_code, as: 'languageCode' - end - end - - class DominantColorsAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :colors, as: 'colors', class: Google::Apis::VisionV1::ColorInfo, decorator: Google::Apis::VisionV1::ColorInfo::Representation + collection :colors, as: 'colors', class: Google::Apis::VisionV1::GoogleCloudVisionV1ColorInfo, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1ColorInfo::Representation end end - class EntityAnnotation + class GoogleCloudVisionV1EntityAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation property :confidence, as: 'confidence' property :description, as: 'description' property :locale, as: 'locale' - collection :locations, as: 'locations', class: Google::Apis::VisionV1::LocationInfo, decorator: Google::Apis::VisionV1::LocationInfo::Representation + collection :locations, as: 'locations', class: Google::Apis::VisionV1::GoogleCloudVisionV1LocationInfo, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1LocationInfo::Representation property :mid, as: 'mid' - collection :properties, as: 'properties', class: Google::Apis::VisionV1::Property, decorator: Google::Apis::VisionV1::Property::Representation + collection :properties, as: 'properties', class: Google::Apis::VisionV1::GoogleCloudVisionV1Property, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Property::Representation property :score, as: 'score' property :topicality, as: 'topicality' end end - class FaceAnnotation + class GoogleCloudVisionV1FaceAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation property :anger_likelihood, as: 'angerLikelihood' property :blurred_likelihood, as: 'blurredLikelihood' - property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation property :detection_confidence, as: 'detectionConfidence' - property :fd_bounding_poly, as: 'fdBoundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :fd_bounding_poly, as: 'fdBoundingPoly', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation property :headwear_likelihood, as: 'headwearLikelihood' property :joy_likelihood, as: 'joyLikelihood' property :landmarking_confidence, as: 'landmarkingConfidence' - collection :landmarks, as: 'landmarks', class: Google::Apis::VisionV1::Landmark, decorator: Google::Apis::VisionV1::Landmark::Representation + collection :landmarks, as: 'landmarks', class: Google::Apis::VisionV1::GoogleCloudVisionV1FaceAnnotationLandmark, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1FaceAnnotationLandmark::Representation property :pan_angle, as: 'panAngle' property :roll_angle, as: 'rollAngle' @@ -450,7 +424,16 @@ module Google end end - class Feature + class GoogleCloudVisionV1FaceAnnotationLandmark + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::VisionV1::GoogleCloudVisionV1Position, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Position::Representation + + property :type, as: 'type' + end + end + + class GoogleCloudVisionV1Feature # @private class Representation < Google::Apis::Core::JsonRepresentation property :max_results, as: 'maxResults' @@ -458,35 +441,35 @@ module Google end end - class Image + class GoogleCloudVisionV1Image # @private class Representation < Google::Apis::Core::JsonRepresentation property :content, :base64 => true, as: 'content' - property :source, as: 'source', class: Google::Apis::VisionV1::ImageSource, decorator: Google::Apis::VisionV1::ImageSource::Representation + property :source, as: 'source', class: Google::Apis::VisionV1::GoogleCloudVisionV1ImageSource, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1ImageSource::Representation end end - class ImageContext + class GoogleCloudVisionV1ImageContext # @private class Representation < Google::Apis::Core::JsonRepresentation - property :crop_hints_params, as: 'cropHintsParams', class: Google::Apis::VisionV1::CropHintsParams, decorator: Google::Apis::VisionV1::CropHintsParams::Representation + property :crop_hints_params, as: 'cropHintsParams', class: Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsParams, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsParams::Representation collection :language_hints, as: 'languageHints' - property :lat_long_rect, as: 'latLongRect', class: Google::Apis::VisionV1::LatLongRect, decorator: Google::Apis::VisionV1::LatLongRect::Representation + property :lat_long_rect, as: 'latLongRect', class: Google::Apis::VisionV1::GoogleCloudVisionV1LatLongRect, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1LatLongRect::Representation end end - class ImageProperties + class GoogleCloudVisionV1ImageProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::DominantColorsAnnotation, decorator: Google::Apis::VisionV1::DominantColorsAnnotation::Representation + property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::GoogleCloudVisionV1DominantColorsAnnotation, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1DominantColorsAnnotation::Representation end end - class ImageSource + class GoogleCloudVisionV1ImageSource # @private class Representation < Google::Apis::Core::JsonRepresentation property :gcs_image_uri, as: 'gcsImageUri' @@ -494,66 +477,49 @@ module Google end end - class Landmark + class GoogleCloudVisionV1LatLongRect # @private class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::VisionV1::Position, decorator: Google::Apis::VisionV1::Position::Representation + property :max_lat_lng, as: 'maxLatLng', class: Google::Apis::VisionV1::GoogleTypeLatLng, decorator: Google::Apis::VisionV1::GoogleTypeLatLng::Representation - property :type, as: 'type' - end - end - - class LatLng - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - - class LatLongRect - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :max_lat_lng, as: 'maxLatLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation - - property :min_lat_lng, as: 'minLatLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation + property :min_lat_lng, as: 'minLatLng', class: Google::Apis::VisionV1::GoogleTypeLatLng, decorator: Google::Apis::VisionV1::GoogleTypeLatLng::Representation end end - class LocationInfo + class GoogleCloudVisionV1LocationInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation + property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1::GoogleTypeLatLng, decorator: Google::Apis::VisionV1::GoogleTypeLatLng::Representation end end - class Page + class GoogleCloudVisionV1Page # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :blocks, as: 'blocks', class: Google::Apis::VisionV1::Block, decorator: Google::Apis::VisionV1::Block::Representation + collection :blocks, as: 'blocks', class: Google::Apis::VisionV1::GoogleCloudVisionV1Block, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Block::Representation property :height, as: 'height' - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + property :property, as: 'property', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty::Representation property :width, as: 'width' end end - class Paragraph + class GoogleCloudVisionV1Paragraph # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + property :property, as: 'property', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty::Representation - collection :words, as: 'words', class: Google::Apis::VisionV1::Word, decorator: Google::Apis::VisionV1::Word::Representation + collection :words, as: 'words', class: Google::Apis::VisionV1::GoogleCloudVisionV1Word, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Word::Representation end end - class Position + class GoogleCloudVisionV1Position # @private class Representation < Google::Apis::Core::JsonRepresentation property :x, as: 'x' @@ -562,7 +528,7 @@ module Google end end - class Property + class GoogleCloudVisionV1Property # @private class Representation < Google::Apis::Core::JsonRepresentation property :name, as: 'name' @@ -571,7 +537,7 @@ module Google end end - class SafeSearchAnnotation + class GoogleCloudVisionV1SafeSearchAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' @@ -581,46 +547,53 @@ module Google end end - class Status + class GoogleCloudVisionV1Symbol # @private class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :details, as: 'details' - property :message, as: 'message' - end - end + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation - class Symbol - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + property :property, as: 'property', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty::Representation property :text, as: 'text' end end - class TextAnnotation + class GoogleCloudVisionV1TextAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :pages, as: 'pages', class: Google::Apis::VisionV1::Page, decorator: Google::Apis::VisionV1::Page::Representation + collection :pages, as: 'pages', class: Google::Apis::VisionV1::GoogleCloudVisionV1Page, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Page::Representation property :text, as: 'text' end end - class TextProperty + class GoogleCloudVisionV1TextAnnotationDetectedBreak # @private class Representation < Google::Apis::Core::JsonRepresentation - property :detected_break, as: 'detectedBreak', class: Google::Apis::VisionV1::DetectedBreak, decorator: Google::Apis::VisionV1::DetectedBreak::Representation + property :is_prefix, as: 'isPrefix' + property :type, as: 'type' + end + end - collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::VisionV1::DetectedLanguage, decorator: Google::Apis::VisionV1::DetectedLanguage::Representation + class GoogleCloudVisionV1TextAnnotationDetectedLanguage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :language_code, as: 'languageCode' + end + end + + class GoogleCloudVisionV1TextAnnotationTextProperty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :detected_break, as: 'detectedBreak', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationDetectedBreak, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationDetectedBreak::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationDetectedLanguage, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationDetectedLanguage::Representation end end - class Vertex + class GoogleCloudVisionV1Vertex # @private class Representation < Google::Apis::Core::JsonRepresentation property :x, as: 'x' @@ -628,23 +601,23 @@ module Google end end - class WebDetection + class GoogleCloudVisionV1WebDetection # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :full_matching_images, as: 'fullMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + collection :full_matching_images, as: 'fullMatchingImages', class: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage::Representation - collection :pages_with_matching_images, as: 'pagesWithMatchingImages', class: Google::Apis::VisionV1::WebPage, decorator: Google::Apis::VisionV1::WebPage::Representation + collection :pages_with_matching_images, as: 'pagesWithMatchingImages', class: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebPage, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebPage::Representation - collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage::Representation - collection :visually_similar_images, as: 'visuallySimilarImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + collection :visually_similar_images, as: 'visuallySimilarImages', class: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage::Representation - collection :web_entities, as: 'webEntities', class: Google::Apis::VisionV1::WebEntity, decorator: Google::Apis::VisionV1::WebEntity::Representation + collection :web_entities, as: 'webEntities', class: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebEntity, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebEntity::Representation end end - class WebEntity + class GoogleCloudVisionV1WebDetectionWebEntity # @private class Representation < Google::Apis::Core::JsonRepresentation property :description, as: 'description' @@ -653,7 +626,7 @@ module Google end end - class WebImage + class GoogleCloudVisionV1WebDetectionWebImage # @private class Representation < Google::Apis::Core::JsonRepresentation property :score, as: 'score' @@ -661,7 +634,7 @@ module Google end end - class WebPage + class GoogleCloudVisionV1WebDetectionWebPage # @private class Representation < Google::Apis::Core::JsonRepresentation property :score, as: 'score' @@ -669,17 +642,44 @@ module Google end end - class Word + class GoogleCloudVisionV1Word # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly::Representation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + property :property, as: 'property', class: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty::Representation - collection :symbols, as: 'symbols', class: Google::Apis::VisionV1::Symbol, decorator: Google::Apis::VisionV1::Symbol::Representation + collection :symbols, as: 'symbols', class: Google::Apis::VisionV1::GoogleCloudVisionV1Symbol, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1Symbol::Representation end end + + class GoogleRpcStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class GoogleTypeColor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alpha, as: 'alpha' + property :blue, as: 'blue' + property :green, as: 'green' + property :red, as: 'red' + end + end + + class GoogleTypeLatLng + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' + end + end end end end diff --git a/generated/google/apis/vision_v1/service.rb b/generated/google/apis/vision_v1/service.rb index 05bf09e0a..c6f89f305 100644 --- a/generated/google/apis/vision_v1/service.rb +++ b/generated/google/apis/vision_v1/service.rb @@ -50,7 +50,7 @@ module Google end # Run image detection and annotation for a batch of images. - # @param [Google::Apis::VisionV1::BatchAnnotateImagesRequest] batch_annotate_images_request_object + # @param [Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesRequest] google_cloud_vision_v1_batch_annotate_images_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -60,20 +60,20 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::VisionV1::BatchAnnotateImagesResponse] parsed result object + # @yieldparam result [Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::VisionV1::BatchAnnotateImagesResponse] + # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def annotate_image(batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def annotate_image(google_cloud_vision_v1_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/images:annotate', options) - command.request_representation = Google::Apis::VisionV1::BatchAnnotateImagesRequest::Representation - command.request_object = batch_annotate_images_request_object - command.response_representation = Google::Apis::VisionV1::BatchAnnotateImagesResponse::Representation - command.response_class = Google::Apis::VisionV1::BatchAnnotateImagesResponse + command.request_representation = Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesRequest::Representation + command.request_object = google_cloud_vision_v1_batch_annotate_images_request_object + command.response_representation = Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse::Representation + command.response_class = Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block)