Autogenerated update (2018-02-23)

Update:
- cloudiot_v1
- genomics_v1
- genomics_v1alpha2
- genomics_v2alpha1
- language_v1
- language_v1beta1
- language_v1beta2
- speech_v1
- tpu_v1alpha1
- vision_v1
- vision_v1p1beta1
- youtube_partner_v1
This commit is contained in:
Google APIs committed 2018-02-23 00:36:45 +00:00
1 parent cacd313a7b
commit f607fc3548
37 files changed
+4546 -40

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/iot
module CloudiotV1
VERSION = 'V1'
REVISION = '20180208'
REVISION = '20180215'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
+2 -2
View File
@@ -301,8 +301,8 @@ module Google
# The metadata key-value pairs assigned to the device. This metadata is not
# interpreted or indexed by Cloud IoT Core. It can be used to add contextual
# information for the device.
# Keys must conform to the regular expression [a-zA-Z0-9-_]+ and be less than
# 128 bytes in length.
# Keys must conform to the regular expression a-zA-Z+ and
# be less than 128 bytes in length.
# Values are free-form strings. Each value must be less than or equal to 32
# KB in size.
# The total size of all keys and values must be less than 256 KB, and the
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/genomics
module GenomicsV1
VERSION = 'V1'
REVISION = '20180220'
REVISION = '20180222'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
+2 -1
View File
@@ -1399,7 +1399,8 @@ module Google
# @return [Google::Apis::GenomicsV1::Status]
attr_accessor :error
# An OperationMetadata object. This will always be returned with the Operation.
# An OperationMetadata or Metadata object. This will always be returned with the
# Operation.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
+9 -1
View File
@@ -1043,7 +1043,15 @@ module Google
# The name of the operation's parent resource.
# @param [String] filter
# A string for filtering Operations.
# The following filter fields are supported&#58;
# In v2alpha1, the following filter fields are supported&#58;
# * createTime&#58; The time this job was created
# * events&#58; The set of event (names) that have occurred while running
# the pipeline. The &#58; operator can be used to determine if a
# particular event has occurred.
# * error&#58; If the pipeline is running, this value is NULL. Once the
# pipeline finishes, the value is the standard Google error code.
# * labels.key or labels."key with space" where key is a label key.
# In v1 and v1alpha2, the following filter fields are supported&#58;
# * projectId&#58; Required. Corresponds to
# OperationMetadata.projectId.
# * createTime&#58; The time this job was created, in seconds from the
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/genomics
module GenomicsV1alpha2
VERSION = 'V1alpha2'
REVISION = '20180220'
REVISION = '20180222'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -615,7 +615,8 @@ module Google
# @return [Google::Apis::GenomicsV1alpha2::Status]
attr_accessor :error
# An OperationMetadata object. This will always be returned with the Operation.
# An OperationMetadata or Metadata object. This will always be returned with the
# Operation.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
@@ -120,7 +120,15 @@ module Google
# The name of the operation's parent resource.
# @param [String] filter
# A string for filtering Operations.
# The following filter fields are supported&#58;
# In v2alpha1, the following filter fields are supported&#58;
# * createTime&#58; The time this job was created
# * events&#58; The set of event (names) that have occurred while running
# the pipeline. The &#58; operator can be used to determine if a
# particular event has occurred.
# * error&#58; If the pipeline is running, this value is NULL. Once the
# pipeline finishes, the value is the standard Google error code.
# * labels.key or labels."key with space" where key is a label key.
# In v1 and v1alpha2, the following filter fields are supported&#58;
# * projectId&#58; Required. Corresponds to
# OperationMetadata.projectId.
# * createTime&#58; The time this job was created, in seconds from the
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/genomics
module GenomicsV2alpha1
VERSION = 'V2alpha1'
REVISION = '20180220'
REVISION = '20180222'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -716,7 +716,8 @@ module Google
# @return [Google::Apis::GenomicsV2alpha1::Status]
attr_accessor :error
# An OperationMetadata object. This will always be returned with the Operation.
# An OperationMetadata or Metadata object. This will always be returned with the
# Operation.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
@@ -48,6 +48,12 @@ module Google
end
# Runs a pipeline.
# **Note:** In order to use this method, the Genomics Service Agent must have
# access to your project. This is done automatically when the Genomics API
# is first enabled, but if you delete this permission, or if you have
# already enabled the Genomics API prior to the launch of the v2alpha1 API,
# you must disable and re-enable the API to grant the Genomics Service Agent
# the required permissions.
# @param [Google::Apis::GenomicsV2alpha1::RunPipelineRequest] run_pipeline_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@@ -150,7 +156,15 @@ module Google
# The name of the operation's parent resource.
# @param [String] filter
# A string for filtering Operations.
# The following filter fields are supported&#58;
# In v2alpha1, the following filter fields are supported&#58;
# * createTime&#58; The time this job was created
# * events&#58; The set of event (names) that have occurred while running
# the pipeline. The &#58; operator can be used to determine if a
# particular event has occurred.
# * error&#58; If the pipeline is running, this value is NULL. Once the
# pipeline finishes, the value is the standard Google error code.
# * labels.key or labels."key with space" where key is a label key.
# In v1 and v1alpha2, the following filter fields are supported&#58;
# * projectId&#58; Required. Corresponds to
# OperationMetadata.projectId.
# * createTime&#58; The time this job was created, in seconds from the
+2 -2
View File
@@ -18,7 +18,7 @@ require 'google/apis/language_v1/representations.rb'
module Google
module Apis
# Google Cloud Natural Language API
# Cloud Natural Language API
#
# Provides natural language understanding technologies to developers. Examples
# include sentiment analysis, entity recognition, entity sentiment analysis, and
@@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/natural-language/
module LanguageV1
VERSION = 'V1'
REVISION = '20171023'
REVISION = '20180221'
# Apply machine learning models to reveal the structure and meaning of text
AUTH_CLOUD_LANGUAGE = 'https://www.googleapis.com/auth/cloud-language'
+1 -1
View File
@@ -20,7 +20,7 @@ require 'google/apis/errors'
module Google
module Apis
module LanguageV1
# Google Cloud Natural Language API
# Cloud Natural Language API
#
# Provides natural language understanding technologies to developers. Examples
# include sentiment analysis, entity recognition, entity sentiment analysis, and
+2 -2
View File
@@ -18,7 +18,7 @@ require 'google/apis/language_v1beta1/representations.rb'
module Google
module Apis
# Google Cloud Natural Language API
# Cloud Natural Language API
#
# Provides natural language understanding technologies to developers. Examples
# include sentiment analysis, entity recognition, entity sentiment analysis, and
@@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/natural-language/
module LanguageV1beta1
VERSION = 'V1beta1'
REVISION = '20170911'
REVISION = '20180221'
# Apply machine learning models to reveal the structure and meaning of text
AUTH_CLOUD_LANGUAGE = 'https://www.googleapis.com/auth/cloud-language'
@@ -20,7 +20,7 @@ require 'google/apis/errors'
module Google
module Apis
module LanguageV1beta1
# Google Cloud Natural Language API
# Cloud Natural Language API
#
# Provides natural language understanding technologies to developers. Examples
# include sentiment analysis, entity recognition, entity sentiment analysis, and
+2 -2
View File
@@ -18,7 +18,7 @@ require 'google/apis/language_v1beta2/representations.rb'
module Google
module Apis
# Google Cloud Natural Language API
# Cloud Natural Language API
#
# Provides natural language understanding technologies to developers. Examples
# include sentiment analysis, entity recognition, entity sentiment analysis, and
@@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/natural-language/
module LanguageV1beta2
VERSION = 'V1beta2'
REVISION = '20171031'
REVISION = '20180221'
# Apply machine learning models to reveal the structure and meaning of text
AUTH_CLOUD_LANGUAGE = 'https://www.googleapis.com/auth/cloud-language'
@@ -20,7 +20,7 @@ require 'google/apis/errors'
module Google
module Apis
module LanguageV1beta2
# Google Cloud Natural Language API
# Cloud Natural Language API
#
# Provides natural language understanding technologies to developers. Examples
# include sentiment analysis, entity recognition, entity sentiment analysis, and
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/speech/
module SpeechV1
VERSION = 'V1'
REVISION = '20180123'
REVISION = '20180220'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -190,14 +190,6 @@ module Google
class RecognitionConfig
include Google::Apis::Core::Hashable
# *Optional* If `true`, the top result includes a list of words and the
# confidence for those words. If `false`, no word-level confidence
# information is returned. The default is `false`.
# Corresponds to the JSON property `enableWordConfidence`
# @return [Boolean]
attr_accessor :enable_word_confidence
alias_method :enable_word_confidence?, :enable_word_confidence
# *Optional* If `true`, the top result includes a list of words and
# the start and end time offsets (timestamps) for those words. If
# `false`, no word-level time offset information is returned. The default is
@@ -260,7 +252,6 @@ module Google
# Update properties of this object
def update!(**args)
@enable_word_confidence = args[:enable_word_confidence] if args.key?(:enable_word_confidence)
@enable_word_time_offsets = args[:enable_word_time_offsets] if args.key?(:enable_word_time_offsets)
@encoding = args[:encoding] if args.key?(:encoding)
@language_code = args[:language_code] if args.key?(:language_code)
@@ -121,7 +121,6 @@ module Google
class RecognitionConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :enable_word_confidence, as: 'enableWordConfidence'
property :enable_word_time_offsets, as: 'enableWordTimeOffsets'
property :encoding, as: 'encoding'
property :language_code, as: 'languageCode'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/tpu/
module TpuV1alpha1
VERSION = 'V1alpha1'
REVISION = '20180202'
REVISION = '20180222'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -22,6 +22,31 @@ module Google
module Apis
module TpuV1alpha1
# A accelerator type that a Node can be configured with.
class AcceleratorType
include Google::Apis::Core::Hashable
# The resource name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# the accelerator 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)
@name = args[:name] if args.key?(:name)
@type = args[:type] if args.key?(:type)
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
@@ -41,6 +66,31 @@ module Google
end
end
# Response for ListAcceleratorTypes.
class ListAcceleratorTypesResponse
include Google::Apis::Core::Hashable
# The listed nodes.
# Corresponds to the JSON property `acceleratorTypes`
# @return [Array<Google::Apis::TpuV1alpha1::AcceleratorType>]
attr_accessor :accelerator_types
# The next page token or empty if none.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@accelerator_types = args[:accelerator_types] if args.key?(:accelerator_types)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# The response message for Locations.ListLocations.
class ListLocationsResponse
include Google::Apis::Core::Hashable
@@ -22,12 +22,24 @@ module Google
module Apis
module TpuV1alpha1
class AcceleratorType
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListAcceleratorTypesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListLocationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -118,12 +130,29 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AcceleratorType
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :type, as: 'type'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ListAcceleratorTypesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :accelerator_types, as: 'acceleratorTypes', class: Google::Apis::TpuV1alpha1::AcceleratorType, decorator: Google::Apis::TpuV1alpha1::AcceleratorType::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ListLocationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -116,6 +116,78 @@ module Google
execute_or_queue_command(command, &block)
end
# Gets AcceleratorType.
# @param [String] name
# The resource name.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::TpuV1alpha1::AcceleratorType] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TpuV1alpha1::AcceleratorType]
#
# @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 get_project_location_accelerator_type(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha1/{+name}', options)
command.response_representation = Google::Apis::TpuV1alpha1::AcceleratorType::Representation
command.response_class = Google::Apis::TpuV1alpha1::AcceleratorType
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists accelerator types supported by this API.
# @param [String] parent
# The parent resource name.
# @param [String] filter
# List filter.
# @param [String] order_by
# Sort results.
# @param [Fixnum] page_size
# The maximum number of items to return.
# @param [String] page_token
# The next_page_token value returned from a previous List request, if any.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::TpuV1alpha1::ListAcceleratorTypesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TpuV1alpha1::ListAcceleratorTypesResponse]
#
# @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 list_project_location_accelerator_types(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha1/{+parent}/acceleratorTypes', options)
command.response_representation = Google::Apis::TpuV1alpha1::ListAcceleratorTypesResponse::Representation
command.response_class = Google::Apis::TpuV1alpha1::ListAcceleratorTypesResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a node.
# @param [String] parent
# The parent resource name.
+1 -1
View File
@@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/vision/
module VisionV1
VERSION = 'V1'
REVISION = '20180122'
REVISION = '20180221'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
+290 -2
View File
@@ -279,6 +279,19 @@ module Google
end
end
# The request message for Operations.CancelOperation.
class CancelOperationRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
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
@@ -700,6 +713,25 @@ module Google
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Set of detected entity features.
class EntityAnnotation
include Google::Apis::Core::Hashable
@@ -927,6 +959,138 @@ module Google
end
end
# The response for a single offline file annotation request.
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
include Google::Apis::Core::Hashable
# The desired output location and metadata.
# Corresponds to the JSON property `outputConfig`
# @return [Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1OutputConfig]
attr_accessor :output_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@output_config = args[:output_config] if args.key?(:output_config)
end
end
# Response to an async batch file annotation request.
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
include Google::Apis::Core::Hashable
# The list of file annotation responses, one for each request in
# AsyncBatchAnnotateFilesRequest.
# Corresponds to the JSON property `responses`
# @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse>]
attr_accessor :responses
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@responses = args[:responses] if args.key?(:responses)
end
end
# The Google Cloud Storage location where the output will be written to.
class GoogleCloudVisionV1p2beta1GcsDestination
include Google::Apis::Core::Hashable
# Google Cloud Storage URI where the results will be stored. Results will
# be in JSON format and preceded by its corresponding input URI. This field
# can either represent a single file, or a prefix for multiple outputs.
# Prefixes must end in a `/`.
# Examples:
# * File: gs://bucket-name/filename.json
# * Prefix: gs://bucket-name/prefix/here/
# * File: gs://bucket-name/prefix/here
# If multiple outputs, each response is still AnnotateFileResponse, each of
# which contains some subset of the full list of AnnotateImageResponse.
# Multiple outputs can happen if, for example, the output JSON is too large
# and overflows into multiple sharded files.
# Corresponds to the JSON property `uri`
# @return [String]
attr_accessor :uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@uri = args[:uri] if args.key?(:uri)
end
end
# Contains metadata for the BatchAnnotateImages operation.
class GoogleCloudVisionV1p2beta1OperationMetadata
include Google::Apis::Core::Hashable
# The time when the batch request was received.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Current state of the batch operation.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# The time when the operation result was last updated.
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@state = args[:state] if args.key?(:state)
@update_time = args[:update_time] if args.key?(:update_time)
end
end
# The desired output location and metadata.
class GoogleCloudVisionV1p2beta1OutputConfig
include Google::Apis::Core::Hashable
# The max number of response protos to put into each output JSON file on GCS.
# The valid range is [1, 100]. If not specified, the default value is 20.
# For example, for one pdf file with 100 pages, 100 response protos will
# be generated. If `batch_size` = 20, then 5 json files each
# containing 20 response protos will be written under the prefix
# `gcs_destination`.`uri`.
# Currently, batch_size only applies to GcsDestination, with potential future
# support for other output configurations.
# Corresponds to the JSON property `batchSize`
# @return [Fixnum]
attr_accessor :batch_size
# The Google Cloud Storage location where the output will be written to.
# Corresponds to the JSON property `gcsDestination`
# @return [Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1GcsDestination]
attr_accessor :gcs_destination
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@batch_size = args[:batch_size] if args.key?(:batch_size)
@gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
end
end
# Client image to perform Google Cloud Vision API tasks over.
class Image
include Google::Apis::Core::Hashable
@@ -1149,6 +1313,31 @@ module Google
end
end
# The response message for Operations.ListOperations.
class ListOperationsResponse
include Google::Apis::Core::Hashable
# The standard List next-page token.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A list of operations that matches the specified filter in the request.
# Corresponds to the JSON property `operations`
# @return [Array<Google::Apis::VisionV1::Operation>]
attr_accessor :operations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@operations = args[:operations] if args.key?(:operations)
end
end
# Detected entity location information.
class LocationInfo
include Google::Apis::Core::Hashable
@@ -1172,6 +1361,103 @@ module Google
end
end
# This resource represents a long-running operation that is the result of a
# network API call.
class Operation
include Google::Apis::Core::Hashable
# If the value is `false`, it means the operation is still in progress.
# If `true`, the operation is completed, and either `error` or `response` is
# available.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# 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:
# - Simple to use and understand for most users
# - Flexible enough to meet unexpected needs
# # Overview
# The `Status` message contains three pieces of data: error code, error message,
# and error details. The error code should be an enum value of
# google.rpc.Code, but it may accept additional error codes if needed. The
# error message should be a developer-facing English message that helps
# developers *understand* and *resolve* the error. If a localized user-facing
# error message is needed, put the localized message in the error details or
# localize it in the client. The optional error details may contain arbitrary
# information about the error. There is a predefined set of error detail types
# in the package `google.rpc` that can be used for common error conditions.
# # Language mapping
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C.
# # Other uses
# The error model and the `Status` message can be used in a variety of
# environments, either with or without APIs, to provide a
# consistent developer experience across different environments.
# Example uses of this error model include:
# - Partial errors. If a service needs to return partial errors to the client,
# it may embed the `Status` in the normal response to indicate the partial
# errors.
# - Workflow errors. A typical workflow has multiple steps. Each step may
# have a `Status` message for error reporting.
# - Batch operations. If a client uses batch request and batch response, the
# `Status` message should be used directly inside batch response, one for
# each error sub-response.
# - Asynchronous operations. If an API call embeds asynchronous operation
# results in its response, the status of those operations should be
# 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.
# Corresponds to the JSON property `error`
# @return [Google::Apis::VisionV1::Status]
attr_accessor :error
# Service-specific metadata associated with the operation. It typically
# contains progress information and common metadata such as create time.
# Some services might not provide such metadata. Any method that returns a
# long-running operation should document the metadata type, if any.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# The server-assigned name, which is only unique within the same service that
# originally returns it. If you use the default HTTP mapping, the
# `name` should have the format of `operations/some/unique/name`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The normal response of the operation in case of success. If the original
# method returns no data on success, such as `Delete`, the response is
# `google.protobuf.Empty`. If the original method is standard
# `Get`/`Create`/`Update`, the response should be the resource. For other
# methods, the response should have the type `XxxResponse`, where `Xxx`
# is the original method name. For example, if the original method name
# is `TakeSnapshot()`, the inferred response type is
# `TakeSnapshotResponse`.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@done = args[:done] if args.key?(:done)
@error = args[:error] if args.key?(:error)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
@response = args[:response] if args.key?(:response)
end
end
# Detected page from OCR.
class Page
include Google::Apis::Core::Hashable
@@ -1186,7 +1472,8 @@ module Google
# @return [Float]
attr_accessor :confidence
# Page height in pixels.
# Page height. For PDFs the unit is points. For images (including
# TIFFs) the unit is pixels.
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height
@@ -1196,7 +1483,8 @@ module Google
# @return [Google::Apis::VisionV1::TextProperty]
attr_accessor :property
# Page width in pixels.
# Page width. For PDFs the unit is points. For images (including
# TIFFs) the unit is pixels.
# Corresponds to the JSON property `width`
# @return [Fixnum]
attr_accessor :width
@@ -58,6 +58,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class CancelOperationRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Color
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -106,6 +112,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EntityAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -124,6 +136,36 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1GcsDestination
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1OperationMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1OutputConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -166,12 +208,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LocationInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Page
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -352,6 +406,12 @@ module Google
end
end
class CancelOperationRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Color
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -421,6 +481,12 @@ module Google
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class EntityAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -472,6 +538,47 @@ module Google
end
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1OutputConfig, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1OutputConfig::Representation
end
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :responses, as: 'responses', class: Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse::Representation
end
end
class GoogleCloudVisionV1p2beta1GcsDestination
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :uri, as: 'uri'
end
end
class GoogleCloudVisionV1p2beta1OperationMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :state, as: 'state'
property :update_time, as: 'updateTime'
end
end
class GoogleCloudVisionV1p2beta1OutputConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_size, as: 'batchSize'
property :gcs_destination, as: 'gcsDestination', class: Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1GcsDestination, decorator: Google::Apis::VisionV1::GoogleCloudVisionV1p2beta1GcsDestination::Representation
end
end
class Image
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -537,6 +644,15 @@ module Google
end
end
class ListOperationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :operations, as: 'operations', class: Google::Apis::VisionV1::Operation, decorator: Google::Apis::VisionV1::Operation::Representation
end
end
class LocationInfo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -545,6 +661,18 @@ module Google
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::VisionV1::Status, decorator: Google::Apis::VisionV1::Status::Representation
hash :metadata, as: 'metadata'
property :name, as: 'name'
hash :response, as: 'response'
end
end
class Page
# @private
class Representation < Google::Apis::Core::JsonRepresentation
+154
View File
@@ -78,6 +78,160 @@ module Google
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Starts asynchronous cancellation on a long-running operation. The server
# makes a best effort to cancel the operation, but success is not
# guaranteed. If the server doesn't support this method, it returns
# `google.rpc.Code.UNIMPLEMENTED`. Clients can use
# Operations.GetOperation or
# other methods to check whether the cancellation succeeded or whether the
# operation completed despite cancellation. On successful cancellation,
# the operation is not deleted; instead, it becomes an operation with
# an Operation.error value with a google.rpc.Status.code of 1,
# corresponding to `Code.CANCELLED`.
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [Google::Apis::VisionV1::CancelOperationRequest] cancel_operation_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::Empty]
#
# @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 cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.request_representation = Google::Apis::VisionV1::CancelOperationRequest::Representation
command.request_object = cancel_operation_request_object
command.response_representation = Google::Apis::VisionV1::Empty::Representation
command.response_class = Google::Apis::VisionV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a long-running operation. This method indicates that the client is
# no longer interested in the operation result. It does not cancel the
# operation. If the server doesn't support this method, it returns
# `google.rpc.Code.UNIMPLEMENTED`.
# @param [String] name
# The name of the operation resource to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::Empty]
#
# @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 delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::VisionV1::Empty::Representation
command.response_class = Google::Apis::VisionV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the latest state of a long-running operation. Clients can use this
# method to poll the operation result at intervals as recommended by the API
# service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::Operation]
#
# @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 get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VisionV1::Operation::Representation
command.response_class = Google::Apis::VisionV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists operations that match the specified filter in the request. If the
# server doesn't support this method, it returns `UNIMPLEMENTED`.
# NOTE: the `name` binding allows API services to override the binding
# to use different resource name schemes, such as `users/*/operations`. To
# override the binding, API services can add a binding such as
# `"/v1/`name=users/*`/operations"` to their service configuration.
# For backwards compatibility, the default name includes the operations
# collection id, however overriding users must ensure the name binding
# is the parent resource, without the operations collection id.
# @param [String] name
# The name of the operation's parent resource.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::ListOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::ListOperationsResponse]
#
# @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 list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VisionV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::VisionV1::ListOperationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
+1 -1
View File
@@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/vision/
module VisionV1p1beta1
VERSION = 'V1p1beta1'
REVISION = '20180103'
REVISION = '20180221'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -1104,7 +1104,8 @@ module Google
# @return [Float]
attr_accessor :confidence
# Page height in pixels.
# Page height. For PDFs the unit is points. For images (including
# TIFFs) the unit is pixels.
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height
@@ -1114,7 +1115,8 @@ module Google
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationTextProperty]
attr_accessor :property
# Page width in pixels.
# Page width. For PDFs the unit is points. For images (including
# TIFFs) the unit is pixels.
# Corresponds to the JSON property `width`
# @return [Fixnum]
attr_accessor :width
@@ -1699,6 +1701,138 @@ module Google
end
end
# The response for a single offline file annotation request.
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
include Google::Apis::Core::Hashable
# The desired output location and metadata.
# Corresponds to the JSON property `outputConfig`
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1OutputConfig]
attr_accessor :output_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@output_config = args[:output_config] if args.key?(:output_config)
end
end
# Response to an async batch file annotation request.
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
include Google::Apis::Core::Hashable
# The list of file annotation responses, one for each request in
# AsyncBatchAnnotateFilesRequest.
# Corresponds to the JSON property `responses`
# @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse>]
attr_accessor :responses
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@responses = args[:responses] if args.key?(:responses)
end
end
# The Google Cloud Storage location where the output will be written to.
class GoogleCloudVisionV1p2beta1GcsDestination
include Google::Apis::Core::Hashable
# Google Cloud Storage URI where the results will be stored. Results will
# be in JSON format and preceded by its corresponding input URI. This field
# can either represent a single file, or a prefix for multiple outputs.
# Prefixes must end in a `/`.
# Examples:
# * File: gs://bucket-name/filename.json
# * Prefix: gs://bucket-name/prefix/here/
# * File: gs://bucket-name/prefix/here
# If multiple outputs, each response is still AnnotateFileResponse, each of
# which contains some subset of the full list of AnnotateImageResponse.
# Multiple outputs can happen if, for example, the output JSON is too large
# and overflows into multiple sharded files.
# Corresponds to the JSON property `uri`
# @return [String]
attr_accessor :uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@uri = args[:uri] if args.key?(:uri)
end
end
# Contains metadata for the BatchAnnotateImages operation.
class GoogleCloudVisionV1p2beta1OperationMetadata
include Google::Apis::Core::Hashable
# The time when the batch request was received.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Current state of the batch operation.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# The time when the operation result was last updated.
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@state = args[:state] if args.key?(:state)
@update_time = args[:update_time] if args.key?(:update_time)
end
end
# The desired output location and metadata.
class GoogleCloudVisionV1p2beta1OutputConfig
include Google::Apis::Core::Hashable
# The max number of response protos to put into each output JSON file on GCS.
# The valid range is [1, 100]. If not specified, the default value is 20.
# For example, for one pdf file with 100 pages, 100 response protos will
# be generated. If `batch_size` = 20, then 5 json files each
# containing 20 response protos will be written under the prefix
# `gcs_destination`.`uri`.
# Currently, batch_size only applies to GcsDestination, with potential future
# support for other output configurations.
# Corresponds to the JSON property `batchSize`
# @return [Fixnum]
attr_accessor :batch_size
# The Google Cloud Storage location where the output will be written to.
# Corresponds to the JSON property `gcsDestination`
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1GcsDestination]
attr_accessor :gcs_destination
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@batch_size = args[:batch_size] if args.key?(:batch_size)
@gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
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
@@ -262,6 +262,36 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1GcsDestination
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1OperationMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1OutputConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LatLng
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -707,6 +737,47 @@ module Google
end
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1OutputConfig, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1OutputConfig::Representation
end
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :responses, as: 'responses', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse::Representation
end
end
class GoogleCloudVisionV1p2beta1GcsDestination
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :uri, as: 'uri'
end
end
class GoogleCloudVisionV1p2beta1OperationMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :state, as: 'state'
property :update_time, as: 'updateTime'
end
end
class GoogleCloudVisionV1p2beta1OutputConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_size, as: 'batchSize'
property :gcs_destination, as: 'gcsDestination', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1GcsDestination, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1GcsDestination::Representation
end
end
class LatLng
# @private
class Representation < Google::Apis::Core::JsonRepresentation
+39
View File
@@ -0,0 +1,39 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/vision_v1p2beta1/service.rb'
require 'google/apis/vision_v1p2beta1/classes.rb'
require 'google/apis/vision_v1p2beta1/representations.rb'
module Google
module Apis
# Google Cloud Vision API
#
# Integrates Google Vision features, including image labeling, face, logo, and
# landmark detection, optical character recognition (OCR), and detection of
# explicit content, into applications.
#
# @see https://cloud.google.com/vision/
module VisionV1p2beta1
VERSION = 'V1p2beta1'
REVISION = '20180221'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# Apply machine learning models to understand and label images
AUTH_CLOUD_VISION = 'https://www.googleapis.com/auth/cloud-vision'
end
end
end
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,895 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module VisionV1p2beta1
class Color
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AnnotateImageRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AnnotateImageResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Block
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1BoundingPoly
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1ColorInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1CropHint
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1CropHintsAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1CropHintsParams
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1DominantColorsAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1EntityAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1FaceAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Feature
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1GcsDestination
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1GcsSource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Image
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1ImageAnnotationContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1ImageContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1ImageProperties
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1ImageSource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1InputConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1LatLongRect
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1LocationInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1OperationMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1OutputConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Page
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Paragraph
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Position
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Property
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1SafeSearchAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Symbol
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1TextAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Vertex
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1WebDetection
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1WebDetectionParams
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1WebDetectionWebEntity
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1WebDetectionWebImage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1WebDetectionWebLabel
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1WebDetectionWebPage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudVisionV1p2beta1Word
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LatLng
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Status
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Color
# @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 GoogleCloudVisionV1p2beta1AnnotateImageRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :features, as: 'features', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature::Representation
property :image, as: 'image', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Image, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Image::Representation
property :image_context, as: 'imageContext', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext::Representation
end
end
class GoogleCloudVisionV1p2beta1AnnotateImageResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :context, as: 'context', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageAnnotationContext, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageAnnotationContext::Representation
property :crop_hints_annotation, as: 'cropHintsAnnotation', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsAnnotation::Representation
property :error, as: 'error', class: Google::Apis::VisionV1p2beta1::Status, decorator: Google::Apis::VisionV1p2beta1::Status::Representation
collection :face_annotations, as: 'faceAnnotations', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotation::Representation
property :full_text_annotation, as: 'fullTextAnnotation', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotation::Representation
property :image_properties_annotation, as: 'imagePropertiesAnnotation', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageProperties, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageProperties::Representation
collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation::Representation
collection :landmark_annotations, as: 'landmarkAnnotations', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation::Representation
collection :logo_annotations, as: 'logoAnnotations', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation::Representation
property :safe_search_annotation, as: 'safeSearchAnnotation', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1SafeSearchAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1SafeSearchAnnotation::Representation
collection :text_annotations, as: 'textAnnotations', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation::Representation
property :web_detection, as: 'webDetection', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetection, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetection::Representation
end
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :features, as: 'features', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature::Representation
property :image_context, as: 'imageContext', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext::Representation
property :input_config, as: 'inputConfig', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig::Representation
property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig::Representation
end
end
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig::Representation
end
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest::Representation
end
end
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :responses, as: 'responses', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse::Representation
end
end
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest::Representation
end
end
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :responses, as: 'responses', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse::Representation
end
end
class GoogleCloudVisionV1p2beta1Block
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :block_type, as: 'blockType'
property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :confidence, as: 'confidence'
collection :paragraphs, as: 'paragraphs', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Paragraph, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Paragraph::Representation
property :property, as: 'property', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty::Representation
end
end
class GoogleCloudVisionV1p2beta1BoundingPoly
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :vertices, as: 'vertices', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Vertex, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Vertex::Representation
end
end
class GoogleCloudVisionV1p2beta1ColorInfo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color', class: Google::Apis::VisionV1p2beta1::Color, decorator: Google::Apis::VisionV1p2beta1::Color::Representation
property :pixel_fraction, as: 'pixelFraction'
property :score, as: 'score'
end
end
class GoogleCloudVisionV1p2beta1CropHint
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :confidence, as: 'confidence'
property :importance_fraction, as: 'importanceFraction'
end
end
class GoogleCloudVisionV1p2beta1CropHintsAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :crop_hints, as: 'cropHints', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHint, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHint::Representation
end
end
class GoogleCloudVisionV1p2beta1CropHintsParams
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :aspect_ratios, as: 'aspectRatios'
end
end
class GoogleCloudVisionV1p2beta1DominantColorsAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :colors, as: 'colors', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ColorInfo, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ColorInfo::Representation
end
end
class GoogleCloudVisionV1p2beta1EntityAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :confidence, as: 'confidence'
property :description, as: 'description'
property :locale, as: 'locale'
collection :locations, as: 'locations', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LocationInfo, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LocationInfo::Representation
property :mid, as: 'mid'
collection :properties, as: 'properties', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Property, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Property::Representation
property :score, as: 'score'
property :topicality, as: 'topicality'
end
end
class GoogleCloudVisionV1p2beta1FaceAnnotation
# @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::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :detection_confidence, as: 'detectionConfidence'
property :fd_bounding_poly, as: 'fdBoundingPoly', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :headwear_likelihood, as: 'headwearLikelihood'
property :joy_likelihood, as: 'joyLikelihood'
property :landmarking_confidence, as: 'landmarkingConfidence'
collection :landmarks, as: 'landmarks', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotationLandmark, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotationLandmark::Representation
property :pan_angle, as: 'panAngle'
property :roll_angle, as: 'rollAngle'
property :sorrow_likelihood, as: 'sorrowLikelihood'
property :surprise_likelihood, as: 'surpriseLikelihood'
property :tilt_angle, as: 'tiltAngle'
property :under_exposed_likelihood, as: 'underExposedLikelihood'
end
end
class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :position, as: 'position', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Position, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Position::Representation
property :type, as: 'type'
end
end
class GoogleCloudVisionV1p2beta1Feature
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_results, as: 'maxResults'
property :model, as: 'model'
property :type, as: 'type'
end
end
class GoogleCloudVisionV1p2beta1GcsDestination
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :uri, as: 'uri'
end
end
class GoogleCloudVisionV1p2beta1GcsSource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :uri, as: 'uri'
end
end
class GoogleCloudVisionV1p2beta1Image
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :content, :base64 => true, as: 'content'
property :source, as: 'source', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageSource, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageSource::Representation
end
end
class GoogleCloudVisionV1p2beta1ImageAnnotationContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :page_number, as: 'pageNumber'
property :uri, as: 'uri'
end
end
class GoogleCloudVisionV1p2beta1ImageContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :crop_hints_params, as: 'cropHintsParams', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsParams, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsParams::Representation
collection :language_hints, as: 'languageHints'
property :lat_long_rect, as: 'latLongRect', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LatLongRect, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LatLongRect::Representation
property :web_detection_params, as: 'webDetectionParams', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionParams, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionParams::Representation
end
end
class GoogleCloudVisionV1p2beta1ImageProperties
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1DominantColorsAnnotation, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1DominantColorsAnnotation::Representation
end
end
class GoogleCloudVisionV1p2beta1ImageSource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gcs_image_uri, as: 'gcsImageUri'
property :image_uri, as: 'imageUri'
end
end
class GoogleCloudVisionV1p2beta1InputConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gcs_source, as: 'gcsSource', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsSource, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsSource::Representation
property :mime_type, as: 'mimeType'
end
end
class GoogleCloudVisionV1p2beta1LatLongRect
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_lat_lng, as: 'maxLatLng', class: Google::Apis::VisionV1p2beta1::LatLng, decorator: Google::Apis::VisionV1p2beta1::LatLng::Representation
property :min_lat_lng, as: 'minLatLng', class: Google::Apis::VisionV1p2beta1::LatLng, decorator: Google::Apis::VisionV1p2beta1::LatLng::Representation
end
end
class GoogleCloudVisionV1p2beta1LocationInfo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1p2beta1::LatLng, decorator: Google::Apis::VisionV1p2beta1::LatLng::Representation
end
end
class GoogleCloudVisionV1p2beta1OperationMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :state, as: 'state'
property :update_time, as: 'updateTime'
end
end
class GoogleCloudVisionV1p2beta1OutputConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_size, as: 'batchSize'
property :gcs_destination, as: 'gcsDestination', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsDestination, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsDestination::Representation
end
end
class GoogleCloudVisionV1p2beta1Page
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :blocks, as: 'blocks', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Block, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Block::Representation
property :confidence, as: 'confidence'
property :height, as: 'height'
property :property, as: 'property', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty::Representation
property :width, as: 'width'
end
end
class GoogleCloudVisionV1p2beta1Paragraph
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :confidence, as: 'confidence'
property :property, as: 'property', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty::Representation
collection :words, as: 'words', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Word, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Word::Representation
end
end
class GoogleCloudVisionV1p2beta1Position
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :x, as: 'x'
property :y, as: 'y'
property :z, as: 'z'
end
end
class GoogleCloudVisionV1p2beta1Property
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :uint64_value, :numeric_string => true, as: 'uint64Value'
property :value, as: 'value'
end
end
class GoogleCloudVisionV1p2beta1SafeSearchAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult'
property :medical, as: 'medical'
property :racy, as: 'racy'
property :spoof, as: 'spoof'
property :violence, as: 'violence'
end
end
class GoogleCloudVisionV1p2beta1Symbol
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :confidence, as: 'confidence'
property :property, as: 'property', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty::Representation
property :text, as: 'text'
end
end
class GoogleCloudVisionV1p2beta1TextAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :pages, as: 'pages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Page, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Page::Representation
property :text, as: 'text'
end
end
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :is_prefix, as: 'isPrefix'
property :type, as: 'type'
end
end
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :confidence, as: 'confidence'
property :language_code, as: 'languageCode'
end
end
class GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :detected_break, as: 'detectedBreak', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak::Representation
collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage::Representation
end
end
class GoogleCloudVisionV1p2beta1Vertex
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :x, as: 'x'
property :y, as: 'y'
end
end
class GoogleCloudVisionV1p2beta1WebDetection
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :best_guess_labels, as: 'bestGuessLabels', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebLabel, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebLabel::Representation
collection :full_matching_images, as: 'fullMatchingImages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage::Representation
collection :pages_with_matching_images, as: 'pagesWithMatchingImages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebPage, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebPage::Representation
collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage::Representation
collection :visually_similar_images, as: 'visuallySimilarImages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage::Representation
collection :web_entities, as: 'webEntities', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebEntity, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebEntity::Representation
end
end
class GoogleCloudVisionV1p2beta1WebDetectionParams
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :include_geo_results, as: 'includeGeoResults'
end
end
class GoogleCloudVisionV1p2beta1WebDetectionWebEntity
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :entity_id, as: 'entityId'
property :score, as: 'score'
end
end
class GoogleCloudVisionV1p2beta1WebDetectionWebImage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :score, as: 'score'
property :url, as: 'url'
end
end
class GoogleCloudVisionV1p2beta1WebDetectionWebLabel
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :language_code, as: 'languageCode'
end
end
class GoogleCloudVisionV1p2beta1WebDetectionWebPage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :full_matching_images, as: 'fullMatchingImages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage::Representation
property :page_title, as: 'pageTitle'
collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage::Representation
property :score, as: 'score'
property :url, as: 'url'
end
end
class GoogleCloudVisionV1p2beta1Word
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly::Representation
property :confidence, as: 'confidence'
property :property, as: 'property', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty::Representation
collection :symbols, as: 'symbols', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Symbol, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Symbol::Representation
end
end
class LatLng
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :latitude, as: 'latitude'
property :longitude, as: 'longitude'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::VisionV1p2beta1::Status, decorator: Google::Apis::VisionV1p2beta1::Status::Representation
hash :metadata, as: 'metadata'
property :name, as: 'name'
hash :response, as: 'response'
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :details, as: 'details'
property :message, as: 'message'
end
end
end
end
end
@@ -0,0 +1,126 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module VisionV1p2beta1
# Google Cloud Vision API
#
# Integrates Google Vision features, including image labeling, face, logo, and
# landmark detection, optical character recognition (OCR), and detection of
# explicit content, into applications.
#
# @example
# require 'google/apis/vision_v1p2beta1'
#
# Vision = Google::Apis::VisionV1p2beta1 # Alias the module
# service = Vision::VisionService.new
#
# @see https://cloud.google.com/vision/
class VisionService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super('https://vision.googleapis.com/', '')
@batch_path = 'batch'
end
# Run async image detection and annotation for a list of generic files (e.g.
# PDF) which may contain multiple pages and multiple images per page.
# Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest] google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::Operation]
#
# @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 async_file_batch_annotate(google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/files:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p2beta1::Operation
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run image detection and annotation for a batch of images.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest] google_cloud_vision_v1p2beta1_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse]
#
# @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(google_cloud_vision_v1p2beta1_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/images:annotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse::Representation
command.response_class = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/youtube/partner/
module YoutubePartnerV1
VERSION = 'V1'
REVISION = '20180212'
REVISION = '20180219'
# View and manage your assets and associated content on YouTube
AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner'