lib/google/cloud/vision/v1.rb in google-cloud-vision-0.32.3 vs lib/google/cloud/vision/v1.rb in google-cloud-vision-0.33.0
- old
+ new
@@ -11,13 +11,13 @@
# 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/cloud/vision/v1/product_search_client"
require "google/cloud/vision/v1/image_annotator_client"
require "google/cloud/vision/v1/helpers"
+require "google/cloud/vision/v1/product_search_client"
require "google/cloud/vision/v1/product_search_service_pb"
require "google/cloud/vision/v1/image_annotator_pb"
module Google
module Cloud
@@ -26,13 +26,13 @@
##
# # Ruby Client for Cloud Vision API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
#
# [Cloud Vision API][Product Documentation]:
- # Integrates Google Vision features, including image labeling, face, logo, and
- # landmark detection, optical character recognition (OCR), and detection of
- # explicit content, into applications.
+ # Integrates Google Vision features, including image labeling, face, logo,
+ # and landmark detection, optical character recognition (OCR), and detection
+ # of explicit content, into applications.
# - [Product Documentation][]
#
# ## Quick Start
# In order to use this library, you first need to go through the following
# steps:
@@ -99,29 +99,16 @@
# ```
#
module V1
# rubocop:enable LineLength
- module ProductSearch
+ module ImageAnnotator
##
- # Manages Products and ProductSets of reference images for use in product
- # search. It uses the following resource model:
+ # Service that performs Google Cloud Vision API detection tasks over client
+ # images, such as face, landmark, logo, label, and text detection. The
+ # ImageAnnotator service returns detected entities from the images.
#
- # * The API has a collection of {Google::Cloud::Vision::V1::ProductSet ProductSet}
- # resources, named `projects/*/locations/*/productSets/*`, which acts as a way
- # to put different products into groups to limit identification.
- #
- # In parallel,
- #
- # * The API has a collection of {Google::Cloud::Vision::V1::Product Product}
- # resources, named
- # `projects/*/locations/*/products/*`
- #
- # * Each {Google::Cloud::Vision::V1::Product Product} has a collection of
- # {Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named
- # `projects/*/locations/*/products/*/referenceImages/*`
- #
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
# Provides the means for authenticating requests made by the client. This parameter can
# be many types.
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
# authenticating requests made by this client.
@@ -166,20 +153,33 @@
metadata: metadata,
exception_transformer: exception_transformer,
lib_name: lib_name,
lib_version: lib_version
}.select { |_, v| v != nil }
- Google::Cloud::Vision::V1::ProductSearchClient.new(**kwargs)
+ Google::Cloud::Vision::V1::ImageAnnotatorClient.new(**kwargs)
end
end
- module ImageAnnotator
+ module ProductSearch
##
- # Service that performs Google Cloud Vision API detection tasks over client
- # images, such as face, landmark, logo, label, and text detection. The
- # ImageAnnotator service returns detected entities from the images.
+ # Manages Products and ProductSets of reference images for use in product
+ # search. It uses the following resource model:
#
+ # * The API has a collection of {Google::Cloud::Vision::V1::ProductSet ProductSet}
+ # resources, named `projects/*/locations/*/productSets/*`, which acts as a way
+ # to put different products into groups to limit identification.
+ #
+ # In parallel,
+ #
+ # * The API has a collection of {Google::Cloud::Vision::V1::Product Product}
+ # resources, named
+ # `projects/*/locations/*/products/*`
+ #
+ # * Each {Google::Cloud::Vision::V1::Product Product} has a collection of
+ # {Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named
+ # `projects/*/locations/*/products/*/referenceImages/*`
+ #
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
# Provides the means for authenticating requests made by the client. This parameter can
# be many types.
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
# authenticating requests made by this client.
@@ -224,10 +224,10 @@
metadata: metadata,
exception_transformer: exception_transformer,
lib_name: lib_name,
lib_version: lib_version
}.select { |_, v| v != nil }
- Google::Cloud::Vision::V1::ImageAnnotatorClient.new(**kwargs)
+ Google::Cloud::Vision::V1::ProductSearchClient.new(**kwargs)
end
end
end
end
end