google-cloud-vision 0.32.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +4 -2
  3. data/AUTHENTICATION.md +151 -0
  4. data/LICENSE.md +201 -0
  5. data/MIGRATING.md +343 -0
  6. data/README.md +97 -52
  7. data/lib/google/cloud/vision/{v1/doc/google/protobuf/empty.rb → version.rb} +10 -13
  8. data/lib/google/cloud/vision.rb +132 -207
  9. data/lib/{google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb → google-cloud-vision.rb} +5 -15
  10. metadata +108 -83
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/vision/v1/credentials.rb +0 -42
  13. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +0 -66
  14. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +0 -763
  15. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +0 -88
  16. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +0 -539
  17. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +0 -254
  18. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +0 -102
  19. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +0 -93
  20. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +0 -130
  21. data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +0 -230
  22. data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +0 -109
  23. data/lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb +0 -90
  24. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +0 -84
  25. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +0 -156
  26. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +0 -65
  27. data/lib/google/cloud/vision/v1/geometry_pb.rb +0 -39
  28. data/lib/google/cloud/vision/v1/helpers.rb +0 -1154
  29. data/lib/google/cloud/vision/v1/image_annotator_client.rb +0 -302
  30. data/lib/google/cloud/vision/v1/image_annotator_client_config.json +0 -36
  31. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +0 -305
  32. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +0 -56
  33. data/lib/google/cloud/vision/v1/product_search_client.rb +0 -1337
  34. data/lib/google/cloud/vision/v1/product_search_client_config.json +0 -116
  35. data/lib/google/cloud/vision/v1/product_search_pb.rb +0 -45
  36. data/lib/google/cloud/vision/v1/product_search_service_pb.rb +0 -191
  37. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +0 -224
  38. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +0 -94
  39. data/lib/google/cloud/vision/v1/web_detection_pb.rb +0 -51
  40. data/lib/google/cloud/vision/v1.rb +0 -233
  41. data/lib/google/cloud/vision/v1p3beta1/credentials.rb +0 -42
  42. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +0 -72
  43. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +0 -763
  44. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +0 -154
  45. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +0 -533
  46. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +0 -254
  47. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +0 -101
  48. data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +0 -93
  49. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +0 -130
  50. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +0 -230
  51. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +0 -109
  52. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +0 -90
  53. data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +0 -84
  54. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +0 -156
  55. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +0 -65
  56. data/lib/google/cloud/vision/v1p3beta1/geometry_pb.rb +0 -43
  57. data/lib/google/cloud/vision/v1p3beta1/helpers.rb +0 -1154
  58. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +0 -302
  59. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json +0 -36
  60. data/lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb +0 -304
  61. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -55
  62. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1351
  63. data/lib/google/cloud/vision/v1p3beta1/product_search_client_config.json +0 -116
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_pb.rb +0 -64
  65. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -191
  66. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -222
  67. data/lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb +0 -94
  68. data/lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb +0 -51
  69. data/lib/google/cloud/vision/v1p3beta1.rb +0 -233
@@ -1,65 +0,0 @@
1
- # Copyright 2018 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Type
18
- # An object representing a latitude/longitude pair. This is expressed as a pair
19
- # of doubles representing degrees latitude and degrees longitude. Unless
20
- # specified otherwise, this must conform to the
21
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
22
- # standard</a>. Values must be within normalized ranges.
23
- #
24
- # Example of normalization code in Python:
25
- #
26
- # def NormalizeLongitude(longitude):
27
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
28
- # q, r = divmod(longitude, 360.0)
29
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
30
- # return r - 360.0
31
- # return r
32
- #
33
- # def NormalizeLatLng(latitude, longitude):
34
- # """Wraps decimal degrees latitude and longitude to
35
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
36
- # r = latitude % 360.0
37
- # if r <= 90.0:
38
- # return r, NormalizeLongitude(longitude)
39
- # elif r >= 270.0:
40
- # return r - 360, NormalizeLongitude(longitude)
41
- # else:
42
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
43
- #
44
- # assert 180.0 == NormalizeLongitude(180.0)
45
- # assert -180.0 == NormalizeLongitude(-180.0)
46
- # assert -179.0 == NormalizeLongitude(181.0)
47
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
48
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
49
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
50
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
51
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
52
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
53
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
54
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
55
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
56
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
57
- # @!attribute [rw] latitude
58
- # @return [Float]
59
- # The latitude in degrees. It must be in the range [-90.0, +90.0].
60
- # @!attribute [rw] longitude
61
- # @return [Float]
62
- # The longitude in degrees. It must be in the range [-180.0, +180.0].
63
- class LatLng; end
64
- end
65
- end
@@ -1,43 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/vision/v1p3beta1/geometry.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_message "google.cloud.vision.v1p3beta1.Vertex" do
10
- optional :x, :int32, 1
11
- optional :y, :int32, 2
12
- end
13
- add_message "google.cloud.vision.v1p3beta1.NormalizedVertex" do
14
- optional :x, :float, 1
15
- optional :y, :float, 2
16
- end
17
- add_message "google.cloud.vision.v1p3beta1.BoundingPoly" do
18
- repeated :vertices, :message, 1, "google.cloud.vision.v1p3beta1.Vertex"
19
- repeated :normalized_vertices, :message, 2, "google.cloud.vision.v1p3beta1.NormalizedVertex"
20
- end
21
- add_message "google.cloud.vision.v1p3beta1.NormalizedBoundingPoly" do
22
- repeated :vertices, :message, 1, "google.cloud.vision.v1p3beta1.NormalizedVertex"
23
- end
24
- add_message "google.cloud.vision.v1p3beta1.Position" do
25
- optional :x, :float, 1
26
- optional :y, :float, 2
27
- optional :z, :float, 3
28
- end
29
- end
30
-
31
- module Google
32
- module Cloud
33
- module Vision
34
- module V1p3beta1
35
- Vertex = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Vertex").msgclass
36
- NormalizedVertex = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.NormalizedVertex").msgclass
37
- BoundingPoly = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BoundingPoly").msgclass
38
- NormalizedBoundingPoly = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.NormalizedBoundingPoly").msgclass
39
- Position = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Position").msgclass
40
- end
41
- end
42
- end
43
- end