google-cloud-vision-v1p3beta1 0.5.4 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f25309847ca05f1d772eb8912196dfc1e7df6531bc1efb91008d99a426885f0
4
- data.tar.gz: f076f32a5f4e18f27d82d542f816a0fd084423a506630c5f0e7effacb1dc8ca9
3
+ metadata.gz: 0f912a29648234567ef47c8951e50f57ceaf73fc269bcad830d70e2dae8a12a3
4
+ data.tar.gz: bb353a5cd20c8aff7c5145bd2b29f7cba98859c5443da485779cfac58178f27d
5
5
  SHA512:
6
- metadata.gz: 8b6dfe0c7bb600ef54d63d7481f065e532e2b3e9a5310667fa992b30cdf86a81e30de7826f5891373d0ff067d1b4e2bff6c7d35c252c2beeeb8cfd8468102f2b
7
- data.tar.gz: 301c983dbb9dc650346799573c7aae961d8885589928e32a713ce891f49ce26e7426147083c9e4cc56fa0d660d4a149a546b28a3e3704dd692b56a99d01375d2
6
+ metadata.gz: ff68296ba800af8c39de675cc8b9e83973a9e3f9e1489821cd05512ebb64db8b20b1ab1877d4be12602561ca0f92afafdf1662e1361ac9c60b45aa19947e27f4
7
+ data.tar.gz: 3c716f880dbe8692e8e113b7ac9c48305de2cd67a71e3fa25d8a3f692b37feaec52b166a151bf4c5b6c0e42e024f915470e75e5dd30c80c2ac8819015516bad2
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Vision V1p3beta1 API
2
+ --title="Cloud Vision V1p3beta1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Vision::V1p3beta1::CreateProductSetRequest.new # (req
37
37
  response = client.create_product_set request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-vision-v1p3beta1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vision-v1p3beta1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/vision)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/vision/v1p3beta1/geometry.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/protobuf'
6
5
 
7
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -18,9 +17,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
18
17
  repeated :vertices, :message, 1, "google.cloud.vision.v1p3beta1.Vertex"
19
18
  repeated :normalized_vertices, :message, 2, "google.cloud.vision.v1p3beta1.NormalizedVertex"
20
19
  end
21
- add_message "google.cloud.vision.v1p3beta1.NormalizedBoundingPoly" do
22
- repeated :vertices, :message, 1, "google.cloud.vision.v1p3beta1.NormalizedVertex"
23
- end
24
20
  add_message "google.cloud.vision.v1p3beta1.Position" do
25
21
  optional :x, :float, 1
26
22
  optional :y, :float, 2
@@ -36,7 +32,6 @@ module Google
36
32
  Vertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Vertex").msgclass
37
33
  NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.NormalizedVertex").msgclass
38
34
  BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BoundingPoly").msgclass
39
- NormalizedBoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.NormalizedBoundingPoly").msgclass
40
35
  Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Position").msgclass
41
36
  end
42
37
  end
@@ -147,6 +147,7 @@ module Google
147
147
 
148
148
  @operations_client = Operations.new do |config|
149
149
  config.credentials = credentials
150
+ config.quota_project = @quota_project_id
150
151
  config.endpoint = @config.endpoint
151
152
  end
152
153
 
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/vision/v1p3beta1/image_annotator.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -13,7 +15,6 @@ require 'google/protobuf/timestamp_pb'
13
15
  require 'google/rpc/status_pb'
14
16
  require 'google/type/color_pb'
15
17
  require 'google/type/latlng_pb'
16
- require 'google/protobuf'
17
18
 
18
19
  Google::Protobuf::DescriptorPool.generated_pool.build do
19
20
  add_file("google/cloud/vision/v1p3beta1/image_annotator.proto", :syntax => :proto3) do
@@ -238,6 +238,7 @@ module Google
238
238
 
239
239
  @operations_client = Operations.new do |config|
240
240
  config.credentials = credentials
241
+ config.quota_project = @quota_project_id
241
242
  config.endpoint = @config.endpoint
242
243
  end
243
244
 
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -1,51 +1,41 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/vision/v1p3beta1/product_search.proto
3
3
 
4
- require 'google/api/annotations_pb'
4
+ require 'google/protobuf'
5
+
5
6
  require 'google/api/resource_pb'
6
7
  require 'google/cloud/vision/v1p3beta1/geometry_pb'
7
8
  require 'google/cloud/vision/v1p3beta1/product_search_service_pb'
8
9
  require 'google/protobuf/timestamp_pb'
9
- require 'google/protobuf'
10
10
 
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/cloud/vision/v1p3beta1/product_search.proto", :syntax => :proto3) do
13
13
  add_message "google.cloud.vision.v1p3beta1.ProductSearchParams" do
14
- optional :catalog_name, :string, 1
15
- optional :category, :enum, 2, "google.cloud.vision.v1p3beta1.ProductSearchCategory"
16
- optional :product_category, :string, 5
17
- optional :normalized_bounding_poly, :message, 3, "google.cloud.vision.v1p3beta1.NormalizedBoundingPoly"
18
14
  optional :bounding_poly, :message, 9, "google.cloud.vision.v1p3beta1.BoundingPoly"
19
- optional :view, :enum, 4, "google.cloud.vision.v1p3beta1.ProductSearchResultsView"
20
15
  optional :product_set, :string, 6
21
16
  repeated :product_categories, :string, 7
22
17
  optional :filter, :string, 8
23
18
  end
24
19
  add_message "google.cloud.vision.v1p3beta1.ProductSearchResults" do
25
- optional :category, :enum, 1, "google.cloud.vision.v1p3beta1.ProductSearchCategory"
26
- optional :product_category, :string, 4
27
20
  optional :index_time, :message, 2, "google.protobuf.Timestamp"
28
- repeated :products, :message, 3, "google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo"
29
21
  repeated :results, :message, 5, "google.cloud.vision.v1p3beta1.ProductSearchResults.Result"
30
- end
31
- add_message "google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo" do
32
- optional :product_id, :string, 1
33
- optional :image_uri, :string, 2
34
- optional :score, :float, 3
22
+ repeated :product_grouped_results, :message, 6, "google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult"
35
23
  end
36
24
  add_message "google.cloud.vision.v1p3beta1.ProductSearchResults.Result" do
37
25
  optional :product, :message, 1, "google.cloud.vision.v1p3beta1.Product"
38
26
  optional :score, :float, 2
39
27
  optional :image, :string, 3
40
28
  end
41
- add_enum "google.cloud.vision.v1p3beta1.ProductSearchCategory" do
42
- value :PRODUCT_SEARCH_CATEGORY_UNSPECIFIED, 0
43
- value :SHOES, 1
44
- value :BAGS, 2
29
+ add_message "google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation" do
30
+ optional :mid, :string, 1
31
+ optional :language_code, :string, 2
32
+ optional :name, :string, 3
33
+ optional :score, :float, 4
45
34
  end
46
- add_enum "google.cloud.vision.v1p3beta1.ProductSearchResultsView" do
47
- value :BASIC, 0
48
- value :FULL, 1
35
+ add_message "google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult" do
36
+ optional :bounding_poly, :message, 1, "google.cloud.vision.v1p3beta1.BoundingPoly"
37
+ repeated :results, :message, 2, "google.cloud.vision.v1p3beta1.ProductSearchResults.Result"
38
+ repeated :object_annotations, :message, 3, "google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation"
49
39
  end
50
40
  end
51
41
  end
@@ -56,10 +46,9 @@ module Google
56
46
  module V1p3beta1
57
47
  ProductSearchParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchParams").msgclass
58
48
  ProductSearchResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults").msgclass
59
- ProductSearchResults::ProductInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo").msgclass
60
49
  ProductSearchResults::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults.Result").msgclass
61
- ProductSearchCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchCategory").enummodule
62
- ProductSearchResultsView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResultsView").enummodule
50
+ ProductSearchResults::ObjectAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation").msgclass
51
+ ProductSearchResults::GroupedResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult").msgclass
63
52
  end
64
53
  end
65
54
  end
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/vision/v1p3beta1/product_search_service.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -11,7 +13,6 @@ require 'google/protobuf/empty_pb'
11
13
  require 'google/protobuf/field_mask_pb'
12
14
  require 'google/protobuf/timestamp_pb'
13
15
  require 'google/rpc/status_pb'
14
- require 'google/protobuf'
15
16
 
16
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
18
  add_file("google/cloud/vision/v1p3beta1/product_search_service.proto", :syntax => :proto3) do
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/vision/v1p3beta1/text_annotation.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/cloud/vision/v1p3beta1/geometry_pb'
6
- require 'google/protobuf'
7
8
 
8
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_file("google/cloud/vision/v1p3beta1/text_annotation.proto", :syntax => :proto3) do
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Vision
23
23
  module V1p3beta1
24
- VERSION = "0.5.4"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/vision/v1p3beta1/web_detection.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/protobuf'
6
5
 
6
+ require 'google/api/annotations_pb'
7
+
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_file("google/cloud/vision/v1p3beta1/web_detection.proto", :syntax => :proto3) do
9
10
  add_message "google.cloud.vision.v1p3beta1.WebDetection" do
@@ -26,6 +26,8 @@ module Google
26
26
  ##
27
27
  # To load this package, including all its services, and instantiate a client:
28
28
  #
29
+ # @example
30
+ #
29
31
  # require "google/cloud/vision/v1p3beta1"
30
32
  # client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
31
33
  #
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -60,15 +60,6 @@ module Google
60
60
  extend ::Google::Protobuf::MessageExts::ClassMethods
61
61
  end
62
62
 
63
- # A normalized bounding polygon around a portion of an image.
64
- # @!attribute [rw] vertices
65
- # @return [::Array<::Google::Cloud::Vision::V1p3beta1::NormalizedVertex>]
66
- # Normalized vertices of the bounding polygon.
67
- class NormalizedBoundingPoly
68
- include ::Google::Protobuf::MessageExts
69
- extend ::Google::Protobuf::MessageExts::ClassMethods
70
- end
71
-
72
63
  # A 3D position in the image, used primarily for Face detection landmarks.
73
64
  # A valid Position must have both x and y coordinates.
74
65
  # The position coordinates are in the same scale as the original image.
@@ -22,107 +22,59 @@ module Google
22
22
  module Vision
23
23
  module V1p3beta1
24
24
  # Parameters for a product search request.
25
- # @!attribute [rw] catalog_name
26
- # @return [::String]
27
- # The resource name of the catalog to search.
28
- #
29
- # Format is: `productSearch/catalogs/CATALOG_NAME`.
30
- # @!attribute [rw] category
31
- # @return [::Google::Cloud::Vision::V1p3beta1::ProductSearchCategory]
32
- # The category to search in.
33
- # Optional. It is inferred by the system if it is not specified.
34
- # [Deprecated] Use `product_category`.
35
- # @!attribute [rw] product_category
36
- # @return [::String]
37
- # The product category to search in.
38
- # Optional. It is inferred by the system if it is not specified.
39
- # Supported values are `bag`, `shoe`, `sunglasses`, `dress`, `outerwear`,
40
- # `skirt`, `top`, `shorts`, and `pants`.
41
- # @!attribute [rw] normalized_bounding_poly
42
- # @return [::Google::Cloud::Vision::V1p3beta1::NormalizedBoundingPoly]
43
- # The bounding polygon around the area of interest in the image.
44
- # Optional. If it is not specified, system discretion will be applied.
45
- # [Deprecated] Use `bounding_poly`.
46
25
  # @!attribute [rw] bounding_poly
47
26
  # @return [::Google::Cloud::Vision::V1p3beta1::BoundingPoly]
48
27
  # The bounding polygon around the area of interest in the image.
49
- # Optional. If it is not specified, system discretion will be applied.
50
- # @!attribute [rw] view
51
- # @return [::Google::Cloud::Vision::V1p3beta1::ProductSearchResultsView]
52
- # Specifies the verbosity of the product search results.
53
- # Optional. Defaults to `BASIC`.
28
+ # If it is not specified, system discretion will be applied.
54
29
  # @!attribute [rw] product_set
55
30
  # @return [::String]
56
- # The resource name of a
57
- # {::Google::Cloud::Vision::V1p3beta1::ProductSet ProductSet} to be searched for
58
- # similar images.
31
+ # The resource name of a {::Google::Cloud::Vision::V1p3beta1::ProductSet ProductSet} to be searched for similar images.
59
32
  #
60
33
  # Format is:
61
34
  # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
62
35
  # @!attribute [rw] product_categories
63
36
  # @return [::Array<::String>]
64
37
  # The list of product categories to search in. Currently, we only consider
65
- # the first category, and either "homegoods" or "apparel" should be
66
- # specified.
38
+ # the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
39
+ # "packagedgoods-v1", or "general-v1" should be specified. The legacy
40
+ # categories "homegoods", "apparel", and "toys" are still supported but will
41
+ # be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
42
+ # or "toys-v2" for better product search accuracy. It is recommended to
43
+ # migrate existing products to these categories as well.
67
44
  # @!attribute [rw] filter
68
45
  # @return [::String]
69
46
  # The filtering expression. This can be used to restrict search results based
70
47
  # on Product labels. We currently support an AND of OR of key-value
71
- # expressions, where each expression within an OR must have the same key.
48
+ # expressions, where each expression within an OR must have the same key. An
49
+ # '=' should be used to connect the key and value.
72
50
  #
73
51
  # For example, "(color = red OR color = blue) AND brand = Google" is
74
- # acceptable, but not "(color = red OR brand = Google)" or "color: red".
52
+ # acceptable, but "(color = red OR brand = Google)" is not acceptable.
53
+ # "color: red" is not acceptable because it uses a ':' instead of an '='.
75
54
  class ProductSearchParams
76
55
  include ::Google::Protobuf::MessageExts
77
56
  extend ::Google::Protobuf::MessageExts::ClassMethods
78
57
  end
79
58
 
80
59
  # Results for a product search request.
81
- # @!attribute [rw] category
82
- # @return [::Google::Cloud::Vision::V1p3beta1::ProductSearchCategory]
83
- # Product category.
84
- # [Deprecated] Use `product_category`.
85
- # @!attribute [rw] product_category
86
- # @return [::String]
87
- # Product category.
88
- # Supported values are `bag` and `shoe`.
89
- # [Deprecated] `product_category` is provided in each Product.
90
60
  # @!attribute [rw] index_time
91
61
  # @return [::Google::Protobuf::Timestamp]
92
- # Timestamp of the index which provided these results. Changes made after
93
- # this time are not reflected in the current results.
94
- # @!attribute [rw] products
95
- # @return [::Array<::Google::Cloud::Vision::V1p3beta1::ProductSearchResults::ProductInfo>]
96
- # List of detected products.
62
+ # Timestamp of the index which provided these results. Products added to the
63
+ # product set and products removed from the product set after this time are
64
+ # not reflected in the current results.
97
65
  # @!attribute [rw] results
98
66
  # @return [::Array<::Google::Cloud::Vision::V1p3beta1::ProductSearchResults::Result>]
99
67
  # List of results, one for each product match.
68
+ # @!attribute [rw] product_grouped_results
69
+ # @return [::Array<::Google::Cloud::Vision::V1p3beta1::ProductSearchResults::GroupedResult>]
70
+ # List of results grouped by products detected in the query image. Each entry
71
+ # corresponds to one bounding polygon in the query image, and contains the
72
+ # matching products specific to that region. There may be duplicate product
73
+ # matches in the union of all the per-product results.
100
74
  class ProductSearchResults
101
75
  include ::Google::Protobuf::MessageExts
102
76
  extend ::Google::Protobuf::MessageExts::ClassMethods
103
77
 
104
- # Information about a product.
105
- # @!attribute [rw] product_id
106
- # @return [::String]
107
- # Product ID.
108
- # @!attribute [rw] image_uri
109
- # @return [::String]
110
- # The URI of the image which matched the query image.
111
- #
112
- # This field is returned only if `view` is set to `FULL` in
113
- # the request.
114
- # @!attribute [rw] score
115
- # @return [::Float]
116
- # A confidence level on the match, ranging from 0 (no confidence) to
117
- # 1 (full confidence).
118
- #
119
- # This field is returned only if `view` is set to `FULL` in
120
- # the request.
121
- class ProductInfo
122
- include ::Google::Protobuf::MessageExts
123
- extend ::Google::Protobuf::MessageExts::ClassMethods
124
- end
125
-
126
78
  # Information about a product.
127
79
  # @!attribute [rw] product
128
80
  # @return [::Google::Cloud::Vision::V1p3beta1::Product]
@@ -131,9 +83,6 @@ module Google
131
83
  # @return [::Float]
132
84
  # A confidence level on the match, ranging from 0 (no confidence) to
133
85
  # 1 (full confidence).
134
- #
135
- # This field is returned only if `view` is set to `FULL` in
136
- # the request.
137
86
  # @!attribute [rw] image
138
87
  # @return [::String]
139
88
  # The resource name of the image from the product that is the closest match
@@ -142,29 +91,42 @@ module Google
142
91
  include ::Google::Protobuf::MessageExts
143
92
  extend ::Google::Protobuf::MessageExts::ClassMethods
144
93
  end
145
- end
146
-
147
- # Supported product search categories.
148
- module ProductSearchCategory
149
- # Default value used when a category is not specified.
150
- PRODUCT_SEARCH_CATEGORY_UNSPECIFIED = 0
151
-
152
- # Shoes category.
153
- SHOES = 1
154
-
155
- # Bags category.
156
- BAGS = 2
157
- end
158
94
 
159
- # Specifies the fields to include in product search results.
160
- module ProductSearchResultsView
161
- # Product search results contain only `product_category` and `product_id`.
162
- # Default value.
163
- BASIC = 0
95
+ # Prediction for what the object in the bounding box is.
96
+ # @!attribute [rw] mid
97
+ # @return [::String]
98
+ # Object ID that should align with EntityAnnotation mid.
99
+ # @!attribute [rw] language_code
100
+ # @return [::String]
101
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
102
+ # information, see
103
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
104
+ # @!attribute [rw] name
105
+ # @return [::String]
106
+ # Object name, expressed in its `language_code` language.
107
+ # @!attribute [rw] score
108
+ # @return [::Float]
109
+ # Score of the result. Range [0, 1].
110
+ class ObjectAnnotation
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
164
114
 
165
- # Product search results contain `product_category`, `product_id`,
166
- # `image_uri`, and `score`.
167
- FULL = 1
115
+ # Information about the products similar to a single product in a query
116
+ # image.
117
+ # @!attribute [rw] bounding_poly
118
+ # @return [::Google::Cloud::Vision::V1p3beta1::BoundingPoly]
119
+ # The bounding polygon around the product detected in the query image.
120
+ # @!attribute [rw] results
121
+ # @return [::Array<::Google::Cloud::Vision::V1p3beta1::ProductSearchResults::Result>]
122
+ # List of results, one for each product match.
123
+ # @!attribute [rw] object_annotations
124
+ # @return [::Array<::Google::Cloud::Vision::V1p3beta1::ProductSearchResults::ObjectAnnotation>]
125
+ # List of generic predictions for the object in the bounding box.
126
+ class GroupedResult
127
+ include ::Google::Protobuf::MessageExts
128
+ extend ::Google::Protobuf::MessageExts::ClassMethods
129
+ end
168
130
  end
169
131
  end
170
132
  end
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-vision-v1p3beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.10'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -224,14 +224,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
224
  requirements:
225
225
  - - ">="
226
226
  - !ruby/object:Gem::Version
227
- version: '2.5'
227
+ version: '2.6'
228
228
  required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  requirements:
230
230
  - - ">="
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0'
233
233
  requirements: []
234
- rubygems_version: 3.2.17
234
+ rubygems_version: 3.3.14
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: API Client library for the Cloud Vision V1p3beta1 API