google-cloud-video_intelligence 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +4 -3
  3. data/README.md +39 -2
  4. data/lib/google/cloud/video_intelligence.rb +33 -3
  5. data/lib/google/cloud/video_intelligence/credentials.rb +6 -10
  6. data/lib/google/cloud/video_intelligence/v1.rb +102 -66
  7. data/lib/google/cloud/video_intelligence/v1/credentials.rb +40 -0
  8. data/lib/google/cloud/video_intelligence/v1/doc/google/cloud/videointelligence/v1/video_intelligence.rb +1 -12
  9. data/lib/google/cloud/video_intelligence/v1/doc/google/longrunning/operations.rb +92 -0
  10. data/lib/google/cloud/video_intelligence/v1/doc/google/protobuf/any.rb +1 -1
  11. data/lib/google/cloud/video_intelligence/v1/doc/google/protobuf/duration.rb +1 -1
  12. data/lib/google/cloud/video_intelligence/v1/doc/google/rpc/status.rb +1 -1
  13. data/lib/google/cloud/video_intelligence/v1/doc/overview.rb +28 -3
  14. data/lib/google/cloud/video_intelligence/v1/video_intelligence_service_client.rb +29 -13
  15. data/lib/google/cloud/video_intelligence/v1beta1.rb +64 -28
  16. data/lib/google/cloud/video_intelligence/v1beta1/credentials.rb +40 -0
  17. data/lib/google/cloud/video_intelligence/v1beta1/doc/google/cloud/videointelligence/v1beta1/video_intelligence.rb +1 -12
  18. data/lib/google/cloud/video_intelligence/v1beta1/doc/google/longrunning/operations.rb +92 -0
  19. data/lib/google/cloud/video_intelligence/v1beta1/doc/google/protobuf/any.rb +1 -1
  20. data/lib/google/cloud/video_intelligence/v1beta1/doc/google/rpc/status.rb +1 -1
  21. data/lib/google/cloud/video_intelligence/v1beta1/doc/overview.rb +28 -3
  22. data/lib/google/cloud/video_intelligence/v1beta1/video_intelligence_service_client.rb +25 -12
  23. data/lib/google/cloud/video_intelligence/v1beta2.rb +64 -28
  24. data/lib/google/cloud/video_intelligence/v1beta2/credentials.rb +40 -0
  25. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/cloud/videointelligence/v1beta2/video_intelligence.rb +1 -12
  26. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/longrunning/operations.rb +92 -0
  27. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/protobuf/any.rb +1 -1
  28. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/protobuf/duration.rb +1 -1
  29. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/rpc/status.rb +1 -1
  30. data/lib/google/cloud/video_intelligence/v1beta2/doc/overview.rb +28 -3
  31. data/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service_client.rb +29 -13
  32. data/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb +1 -1
  33. data/lib/google/cloud/videointelligence/v1beta1/video_intelligence_services_pb.rb +1 -1
  34. data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb +1 -1
  35. metadata +45 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 715c978d35c2b688089a24f22d0be8028a22b6883c197493197cbc7c96f92b6d
4
- data.tar.gz: 05705a82fe5e50a7c3a08245a07cc6cb6336585130641a8467c5fadff91c1add
3
+ metadata.gz: cf983b4d950face69f2d600f2684e51d40d24d87171b34b982e8252b00555d64
4
+ data.tar.gz: 28da5ef28811f29faca2225984b59dd386890613f57c8cbb4f11dc38ff7d3dea
5
5
  SHA512:
6
- metadata.gz: 2f237062f6d5d93c6a231a80b7657e7b63e6a4c70f6186d01d98dbff2485a164f7127af7d70dea6396182f852ff2f17184b38b587995ce8fa4631a8d18ab4d16
7
- data.tar.gz: '079518aa5c58cebadd7faa2a8b9607879512e6f127089a2616975833d42535bc0c252802c1f69ecd5bd9a46487aa71d64276f8bf9ef962aba4cfe41992522ee5'
6
+ metadata.gz: c652f8efd13e1329fb43e0b1e7fc35567408db52bf008a88b58c6a23282f73ed807738669db8a6585ab5b7894e5df1812a9d687d2be527284a905e6a7dc570b0
7
+ data.tar.gz: 557a30f9c0da6e9210909434bca5c82cc01832f02a426a9124c8d32d87ee0c4d36f231c91c79672492d8f368386a4447d8baca095d6bb525ce3b5245fc9ca10d
data/.yardopts CHANGED
@@ -1,8 +1,9 @@
1
1
  --no-private
2
- --title=Google Cloud Video Intelligence API
3
- --exclude lib/google/cloud/videointelligence
2
+ --title=Cloud Video Intelligence API
3
+ --exclude _pb\.rb$
4
4
  --markup markdown
5
+ --markup-provider redcarpet
5
6
 
6
7
  ./lib/**/*.rb
7
8
  -
8
- README.md
9
+ README.md
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ruby Client for Cloud Video Intelligence API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
1
+ # Ruby Client for Cloud Video Intelligence API ([GA](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
2
2
 
3
3
  [Cloud Video Intelligence API][Product Documentation]:
4
4
  Cloud Video Intelligence API.
@@ -11,7 +11,7 @@ steps:
11
11
 
12
12
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
13
13
  2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
14
- 3. [Enable the Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
14
+ 3. [Enable the Cloud Video Intelligence API.](https://console.cloud.google.com/apis/library/videointelligence.googleapis.com)
15
15
  4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
16
16
 
17
17
  ### Installation
@@ -67,3 +67,40 @@ operation.wait_until_done!
67
67
 
68
68
  [Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1
69
69
  [Product Documentation]: https://cloud.google.com/video-intelligence
70
+
71
+ ## Enabling Logging
72
+
73
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
74
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
75
+ or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
76
+ that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
77
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
78
+
79
+ Configuring a Ruby stdlib logger:
80
+
81
+ ```ruby
82
+ require "logger"
83
+
84
+ module MyLogger
85
+ LOGGER = Logger.new $stderr, level: Logger::WARN
86
+ def logger
87
+ LOGGER
88
+ end
89
+ end
90
+
91
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
92
+ module GRPC
93
+ extend MyLogger
94
+ end
95
+ ```
96
+
97
+ ## Supported Ruby Versions
98
+
99
+ This library is supported on Ruby 2.3+.
100
+
101
+ Google provides official support for Ruby versions that are actively supported
102
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
103
+ in security maintenance, and not end of life. Currently, this means Ruby 2.3
104
+ and later. Older versions of Ruby _may_ still work, but are unsupported and not
105
+ recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
106
+ about the Ruby support schedule.
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ module Google
20
20
  # rubocop:disable LineLength
21
21
 
22
22
  ##
23
- # # Ruby Client for Cloud Video Intelligence API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
23
+ # # Ruby Client for Cloud Video Intelligence API ([GA](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
24
24
  #
25
25
  # [Cloud Video Intelligence API][Product Documentation]:
26
26
  # Cloud Video Intelligence API.
@@ -32,7 +32,7 @@ module Google
32
32
  #
33
33
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
34
34
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
35
- # 3. [Enable the Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
35
+ # 3. [Enable the Cloud Video Intelligence API.](https://console.cloud.google.com/apis/library/videointelligence.googleapis.com)
36
36
  # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
37
37
  #
38
38
  # ### Preview
@@ -81,6 +81,31 @@ module Google
81
81
  #
82
82
  # [Product Documentation]: https://cloud.google.com/video-intelligence
83
83
  #
84
+ # ## Enabling Logging
85
+ #
86
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
87
+ # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
88
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
89
+ # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
90
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
91
+ #
92
+ # Configuring a Ruby stdlib logger:
93
+ #
94
+ # ```ruby
95
+ # require "logger"
96
+ #
97
+ # module MyLogger
98
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
99
+ # def logger
100
+ # LOGGER
101
+ # end
102
+ # end
103
+ #
104
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
105
+ # module GRPC
106
+ # extend MyLogger
107
+ # end
108
+ # ```
84
109
  #
85
110
  module VideoIntelligence
86
111
  # rubocop:enable LineLength
@@ -124,6 +149,11 @@ module Google
124
149
  # or the specified config is missing data points.
125
150
  # @param timeout [Numeric]
126
151
  # The default timeout, in seconds, for calls made through this client.
152
+ # @param metadata [Hash]
153
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
154
+ # @param exception_transformer [Proc]
155
+ # An optional proc that intercepts any exceptions raised during an API call to inject
156
+ # custom error handling.
127
157
  def self.new(*args, version: :v1, **kwargs)
128
158
  unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
129
159
  raise "The version: #{version} is not available. The available versions " \
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -12,19 +12,15 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require "googleauth"
15
+ require "google/cloud/video_intelligence/v1/credentials"
16
16
 
17
17
  module Google
18
18
  module Cloud
19
19
  module VideoIntelligence
20
- class Credentials < Google::Auth::Credentials
21
- SCOPE = [
22
- "https://www.googleapis.com/auth/cloud-platform"
23
- ].freeze
24
- PATH_ENV_VARS = %w(VIDEO_INTELLIGENCE_KEYFILE GOOGLE_CLOUD_KEYFILE GCLOUD_KEYFILE)
25
- JSON_ENV_VARS = %w(VIDEO_INTELLIGENCE_KEYFILE_JSON GOOGLE_CLOUD_KEYFILE_JSON GCLOUD_KEYFILE_JSON)
26
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
27
- end
20
+ ##
21
+ # @deprecated Use version-specific credentials classes
22
+ #
23
+ Credentials = Google::Cloud::VideoIntelligence::V1::Credentials
28
24
  end
29
25
  end
30
26
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -13,75 +13,102 @@
13
13
  # limitations under the License.
14
14
 
15
15
  require "google/cloud/video_intelligence/v1/video_intelligence_service_client"
16
+ require "google/cloud/videointelligence/v1/video_intelligence_pb"
17
+ require "google/rpc/status_pb"
16
18
 
17
19
  module Google
18
20
  module Cloud
19
- # rubocop:disable LineLength
20
-
21
- ##
22
- # # Ruby Client for Cloud Video Intelligence API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
23
- #
24
- # [Cloud Video Intelligence API][Product Documentation]:
25
- # Cloud Video Intelligence API.
26
- # - [Product Documentation][]
27
- #
28
- # ## Quick Start
29
- # In order to use this library, you first need to go through the following
30
- # steps:
31
- #
32
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
33
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
34
- # 3. [Enable the Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
35
- # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
36
- #
37
- # ### Preview
38
- # #### VideoIntelligenceServiceClient
39
- # ```rb
40
- # require "google/cloud/video_intelligence/v1"
41
- #
42
- # video_intelligence_service_client = Google::Cloud::VideoIntelligence::V1.new
43
- # input_uri = "gs://demomaker/cat.mp4"
44
- # features_element = :LABEL_DETECTION
45
- # features = [features_element]
46
- #
47
- # # Register a callback during the method call.
48
- # operation = video_intelligence_service_client.annotate_video(input_uri: input_uri, features: features) do |op|
49
- # raise op.results.message if op.error?
50
- # op_results = op.results
51
- # # Process the results.
52
- #
53
- # metadata = op.metadata
54
- # # Process the metadata.
55
- # end
56
- #
57
- # # Or use the return value to register a callback.
58
- # operation.on_done do |op|
59
- # raise op.results.message if op.error?
60
- # op_results = op.results
61
- # # Process the results.
62
- #
63
- # metadata = op.metadata
64
- # # Process the metadata.
65
- # end
66
- #
67
- # # Manually reload the operation.
68
- # operation.reload!
69
- #
70
- # # Or block until the operation completes, triggering callbacks on
71
- # # completion.
72
- # operation.wait_until_done!
73
- # ```
74
- #
75
- # ### Next Steps
76
- # - Read the [Cloud Video Intelligence API Product documentation][Product Documentation]
77
- # to learn more about the product and see How-to Guides.
78
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
79
- # to see the full list of Cloud APIs that we cover.
80
- #
81
- # [Product Documentation]: https://cloud.google.com/video-intelligence
82
- #
83
- #
84
21
  module VideoIntelligence
22
+ # rubocop:disable LineLength
23
+
24
+ ##
25
+ # # Ruby Client for Cloud Video Intelligence API ([GA](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
26
+ #
27
+ # [Cloud Video Intelligence API][Product Documentation]:
28
+ # Cloud Video Intelligence API.
29
+ # - [Product Documentation][]
30
+ #
31
+ # ## Quick Start
32
+ # In order to use this library, you first need to go through the following
33
+ # steps:
34
+ #
35
+ # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
36
+ # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
37
+ # 3. [Enable the Cloud Video Intelligence API.](https://console.cloud.google.com/apis/library/videointelligence.googleapis.com)
38
+ # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
39
+ #
40
+ # ### Preview
41
+ # #### VideoIntelligenceServiceClient
42
+ # ```rb
43
+ # require "google/cloud/video_intelligence"
44
+ #
45
+ # video_intelligence_service_client = Google::Cloud::VideoIntelligence.new(version: :v1)
46
+ # input_uri = "gs://demomaker/cat.mp4"
47
+ # features_element = :LABEL_DETECTION
48
+ # features = [features_element]
49
+ #
50
+ # # Register a callback during the method call.
51
+ # operation = video_intelligence_service_client.annotate_video(input_uri: input_uri, features: features) do |op|
52
+ # raise op.results.message if op.error?
53
+ # op_results = op.results
54
+ # # Process the results.
55
+ #
56
+ # metadata = op.metadata
57
+ # # Process the metadata.
58
+ # end
59
+ #
60
+ # # Or use the return value to register a callback.
61
+ # operation.on_done do |op|
62
+ # raise op.results.message if op.error?
63
+ # op_results = op.results
64
+ # # Process the results.
65
+ #
66
+ # metadata = op.metadata
67
+ # # Process the metadata.
68
+ # end
69
+ #
70
+ # # Manually reload the operation.
71
+ # operation.reload!
72
+ #
73
+ # # Or block until the operation completes, triggering callbacks on
74
+ # # completion.
75
+ # operation.wait_until_done!
76
+ # ```
77
+ #
78
+ # ### Next Steps
79
+ # - Read the [Cloud Video Intelligence API Product documentation][Product Documentation]
80
+ # to learn more about the product and see How-to Guides.
81
+ # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
82
+ # to see the full list of Cloud APIs that we cover.
83
+ #
84
+ # [Product Documentation]: https://cloud.google.com/video-intelligence
85
+ #
86
+ # ## Enabling Logging
87
+ #
88
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
89
+ # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
90
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
91
+ # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
92
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
93
+ #
94
+ # Configuring a Ruby stdlib logger:
95
+ #
96
+ # ```ruby
97
+ # require "logger"
98
+ #
99
+ # module MyLogger
100
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
101
+ # def logger
102
+ # LOGGER
103
+ # end
104
+ # end
105
+ #
106
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
107
+ # module GRPC
108
+ # extend MyLogger
109
+ # end
110
+ # ```
111
+ #
85
112
  module V1
86
113
  # rubocop:enable LineLength
87
114
 
@@ -112,11 +139,18 @@ module Google
112
139
  # or the specified config is missing data points.
113
140
  # @param timeout [Numeric]
114
141
  # The default timeout, in seconds, for calls made through this client.
142
+ # @param metadata [Hash]
143
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
144
+ # @param exception_transformer [Proc]
145
+ # An optional proc that intercepts any exceptions raised during an API call to inject
146
+ # custom error handling.
115
147
  def self.new \
116
148
  credentials: nil,
117
149
  scopes: nil,
118
150
  client_config: nil,
119
151
  timeout: nil,
152
+ metadata: nil,
153
+ exception_transformer: nil,
120
154
  lib_name: nil,
121
155
  lib_version: nil
122
156
  kwargs = {
@@ -124,6 +158,8 @@ module Google
124
158
  scopes: scopes,
125
159
  client_config: client_config,
126
160
  timeout: timeout,
161
+ metadata: metadata,
162
+ exception_transformer: exception_transformer,
127
163
  lib_name: lib_name,
128
164
  lib_version: lib_version
129
165
  }.select { |_, v| v != nil }
@@ -0,0 +1,40 @@
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
+ require "googleauth"
16
+
17
+ module Google
18
+ module Cloud
19
+ module VideoIntelligence
20
+ module V1
21
+ class Credentials < Google::Auth::Credentials
22
+ SCOPE = [
23
+ "https://www.googleapis.com/auth/cloud-platform"
24
+ ].freeze
25
+ PATH_ENV_VARS = %w(VIDEO_INTELLIGENCE_CREDENTIALS
26
+ VIDEO_INTELLIGENCE_KEYFILE
27
+ GOOGLE_CLOUD_CREDENTIALS
28
+ GOOGLE_CLOUD_KEYFILE
29
+ GCLOUD_KEYFILE)
30
+ JSON_ENV_VARS = %w(VIDEO_INTELLIGENCE_CREDENTIALS_JSON
31
+ VIDEO_INTELLIGENCE_KEYFILE_JSON
32
+ GOOGLE_CLOUD_CREDENTIALS_JSON
33
+ GOOGLE_CLOUD_KEYFILE_JSON
34
+ GCLOUD_KEYFILE_JSON)
35
+ DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,17 +15,6 @@
15
15
  module Google
16
16
  module Cloud
17
17
  module Videointelligence
18
- ##
19
- # # Cloud Video Intelligence API Contents
20
- #
21
- # | Class | Description |
22
- # | ----- | ----------- |
23
- # | [VideoIntelligenceServiceClient][] | Cloud Video Intelligence API. |
24
- # | [Data Types][] | Data types for Google::Cloud::VideoIntelligence::V1 |
25
- #
26
- # [VideoIntelligenceServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1/videointelligenceserviceclient
27
- # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1/datatypes
28
- #
29
18
  module V1
30
19
  # Video annotation request.
31
20
  # @!attribute [rw] input_uri
@@ -0,0 +1,92 @@
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
+ module Google
16
+ module Longrunning
17
+ # This resource represents a long-running operation that is the result of a
18
+ # network API call.
19
+ # @!attribute [rw] name
20
+ # @return [String]
21
+ # The server-assigned name, which is only unique within the same service that
22
+ # originally returns it. If you use the default HTTP mapping, the
23
+ # +name+ should have the format of +operations/some/unique/name+.
24
+ # @!attribute [rw] metadata
25
+ # @return [Google::Protobuf::Any]
26
+ # Service-specific metadata associated with the operation. It typically
27
+ # contains progress information and common metadata such as create time.
28
+ # Some services might not provide such metadata. Any method that returns a
29
+ # long-running operation should document the metadata type, if any.
30
+ # @!attribute [rw] done
31
+ # @return [true, false]
32
+ # If the value is +false+, it means the operation is still in progress.
33
+ # If true, the operation is completed, and either +error+ or +response+ is
34
+ # available.
35
+ # @!attribute [rw] error
36
+ # @return [Google::Rpc::Status]
37
+ # The error result of the operation in case of failure or cancellation.
38
+ # @!attribute [rw] response
39
+ # @return [Google::Protobuf::Any]
40
+ # The normal response of the operation in case of success. If the original
41
+ # method returns no data on success, such as +Delete+, the response is
42
+ # +google.protobuf.Empty+. If the original method is standard
43
+ # +Get+/+Create+/+Update+, the response should be the resource. For other
44
+ # methods, the response should have the type +XxxResponse+, where +Xxx+
45
+ # is the original method name. For example, if the original method name
46
+ # is +TakeSnapshot()+, the inferred response type is
47
+ # +TakeSnapshotResponse+.
48
+ class Operation; end
49
+
50
+ # The request message for {Google::Longrunning::Operations::GetOperation Operations::GetOperation}.
51
+ # @!attribute [rw] name
52
+ # @return [String]
53
+ # The name of the operation resource.
54
+ class GetOperationRequest; end
55
+
56
+ # The request message for {Google::Longrunning::Operations::ListOperations Operations::ListOperations}.
57
+ # @!attribute [rw] name
58
+ # @return [String]
59
+ # The name of the operation collection.
60
+ # @!attribute [rw] filter
61
+ # @return [String]
62
+ # The standard list filter.
63
+ # @!attribute [rw] page_size
64
+ # @return [Integer]
65
+ # The standard list page size.
66
+ # @!attribute [rw] page_token
67
+ # @return [String]
68
+ # The standard list page token.
69
+ class ListOperationsRequest; end
70
+
71
+ # The response message for {Google::Longrunning::Operations::ListOperations Operations::ListOperations}.
72
+ # @!attribute [rw] operations
73
+ # @return [Array<Google::Longrunning::Operation>]
74
+ # A list of operations that matches the specified filter in the request.
75
+ # @!attribute [rw] next_page_token
76
+ # @return [String]
77
+ # The standard List next-page token.
78
+ class ListOperationsResponse; end
79
+
80
+ # The request message for {Google::Longrunning::Operations::CancelOperation Operations::CancelOperation}.
81
+ # @!attribute [rw] name
82
+ # @return [String]
83
+ # The name of the operation resource to be cancelled.
84
+ class CancelOperationRequest; end
85
+
86
+ # The request message for {Google::Longrunning::Operations::DeleteOperation Operations::DeleteOperation}.
87
+ # @!attribute [rw] name
88
+ # @return [String]
89
+ # The name of the operation resource to be deleted.
90
+ class DeleteOperationRequest; end
91
+ end
92
+ end