generated/google/apis/vision_v1/classes.rb in google-api-client-0.9.6 vs generated/google/apis/vision_v1/classes.rb in google-api-client-0.9.8

- old
+ new

@@ -193,11 +193,11 @@ # 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 - # [-180.0, 180.0] and [-90.0, 90.0], respectively.""" + # [-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) @@ -232,11 +232,11 @@ # 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 - # [-180.0, 180.0] and [-90.0, 90.0], respectively.""" + # [-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) @@ -391,22 +391,22 @@ # Headwear likelihood. # Corresponds to the JSON property `headwearLikelihood` # @return [String] attr_accessor :headwear_likelihood - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_poly - # Yaw angle. Indicates the leftward/rightward angle that the face is # pointing, relative to the vertical plane perpendicular to the image. Range # [-180,180]. # Corresponds to the JSON property `panAngle` # @return [Float] attr_accessor :pan_angle + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingPoly` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_poly + # Detected face landmarks. # Corresponds to the JSON property `landmarks` # @return [Array<Google::Apis::VisionV1::Landmark>] attr_accessor :landmarks @@ -441,12 +441,12 @@ @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood) @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence) @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood) @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood) @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood) - @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) @pan_angle = args[:pan_angle] if args.key?(:pan_angle) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) @landmarks = args[:landmarks] if args.key?(:landmarks) @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood) @roll_angle = args[:roll_angle] if args.key?(:roll_angle) @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood) end @@ -660,10 +660,15 @@ # Image context. class ImageContext include Google::Apis::Core::Hashable + # Rectangle determined by min and max LatLng pairs. + # Corresponds to the JSON property `latLongRect` + # @return [Google::Apis::VisionV1::LatLongRect] + attr_accessor :lat_long_rect + # List of languages to use for TEXT_DETECTION. In most cases, an empty value # will yield the best results as it will allow text detection to # automatically detect the text language. For languages based on the latin # alphabet a hint is not needed. In rare cases, when the language of # the text in the image is known in advance, setting this hint will help get @@ -674,23 +679,18 @@ # https://cloud.google.com/translate/v2/using_rest#language-params # Corresponds to the JSON property `languageHints` # @return [Array<String>] attr_accessor :language_hints - # Rectangle determined by min and max LatLng pairs. - # Corresponds to the JSON property `latLongRect` - # @return [Google::Apis::VisionV1::LatLongRect] - attr_accessor :lat_long_rect - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @language_hints = args[:language_hints] if args.key?(:language_hints) @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect) + @language_hints = args[:language_hints] if args.key?(:language_hints) end end # Multiple image annotation requests are batched into a single service call. class BatchAnnotateImagesRequest @@ -713,12 +713,13 @@ # Set of detected entity features. class EntityAnnotation include Google::Apis::Core::Hashable - # Knowledge Graph entity ID. Maps to a freebase entity ID. - # (for example, "Google" maps to: mid /m/045c7b). + # Opaque entity ID. Some IDs might be available in Knowledge Graph(KG). + # For more details on KG please see: + # https://developers.google.com/knowledge-graph/ # Corresponds to the JSON property `mid` # @return [String] attr_accessor :mid # Entity textual description, expressed in its <code>locale</code> language. @@ -975,11 +976,11 @@ # 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 - # [-180.0, 180.0] and [-90.0, 90.0], respectively.""" + # [-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) @@ -1021,22 +1022,22 @@ # Likelihood this is a medical image. # Corresponds to the JSON property `medical` # @return [String] attr_accessor :medical - # Violence likelihood. - # Corresponds to the JSON property `violence` - # @return [String] - attr_accessor :violence - # Spoof likelihood. The likelihood that an obvious modification # was made to the image's canonical version to make it appear # funny or offensive. # Corresponds to the JSON property `spoof` # @return [String] attr_accessor :spoof + # Violence likelihood. + # Corresponds to the JSON property `violence` + # @return [String] + attr_accessor :violence + # Represents the adult contents likelihood for the image. # Corresponds to the JSON property `adult` # @return [String] attr_accessor :adult @@ -1045,12 +1046,12 @@ end # Update properties of this object def update!(**args) @medical = args[:medical] if args.key?(:medical) - @violence = args[:violence] if args.key?(:violence) @spoof = args[:spoof] if args.key?(:spoof) + @violence = args[:violence] if args.key?(:violence) @adult = args[:adult] if args.key?(:adult) end end # Client image to perform Google Cloud Vision API tasks over. @@ -1102,28 +1103,28 @@ # images by using <em>Feature</em>s. Features encode the Cloud Vision API # vertical to operate on and the number of top-scoring results to return. class Feature include Google::Apis::Core::Hashable - # Maximum number of results of this type. - # Corresponds to the JSON property `maxResults` - # @return [Fixnum] - attr_accessor :max_results - # The feature type. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type + # Maximum number of results of this type. + # Corresponds to the JSON property `maxResults` + # @return [Fixnum] + attr_accessor :max_results + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @max_results = args[:max_results] if args.key?(:max_results) @type = args[:type] if args.key?(:type) + @max_results = args[:max_results] if args.key?(:max_results) end end # Response to a batch image annotation request. class BatchAnnotateImagesResponse @@ -1161,43 +1162,10 @@ def update!(**args) @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors) end end - # 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 - include Google::Apis::Core::Hashable - - # Y coordinate. - # Corresponds to the JSON property `y` - # @return [Float] - attr_accessor :y - - # Z coordinate (or depth). - # Corresponds to the JSON property `z` - # @return [Float] - attr_accessor :z - - # X coordinate. - # Corresponds to the JSON property `x` - # @return [Float] - attr_accessor :x - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @y = args[:y] if args.key?(:y) - @z = args[:z] if args.key?(:z) - @x = args[:x] if args.key?(:x) - 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 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 # standard</a>. Values must be within normalized ranges. @@ -1208,11 +1176,11 @@ # 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 - # [-180.0, 180.0] and [-90.0, 90.0], respectively.""" + # [-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) @@ -1232,27 +1200,60 @@ # 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 - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` + 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 + + # 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 + include Google::Apis::Core::Hashable + + # Y coordinate. + # Corresponds to the JSON property `y` # @return [Float] - attr_accessor :latitude + attr_accessor :y + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Float] + attr_accessor :x + + # Z coordinate (or depth). + # Corresponds to the JSON property `z` + # @return [Float] + attr_accessor :z + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @longitude = args[:longitude] if args.key?(:longitude) - @latitude = args[:latitude] if args.key?(:latitude) + @y = args[:y] if args.key?(:y) + @x = args[:x] if args.key?(:x) + @z = args[:z] if args.key?(:z) end end end end end