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
@@ -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.
@@ -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.
@@ -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.
@@ -17,7 +17,7 @@ module Google
17
17
  # rubocop:disable LineLength
18
18
 
19
19
  ##
20
- # # Ruby Client for Google Cloud Video Intelligence API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
20
+ # # Ruby Client for Google Cloud Video Intelligence API ([GA](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
21
21
  #
22
22
  # [Google Cloud Video Intelligence API][Product Documentation]:
23
23
  # Google Cloud Video Intelligence API.
@@ -29,7 +29,7 @@ module Google
29
29
  #
30
30
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
31
31
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
32
- # 3. [Enable the Google Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
32
+ # 3. [Enable the Google Cloud Video Intelligence API.](https://console.cloud.google.com/apis/library/videointelligence.googleapis.com)
33
33
  # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
34
34
  #
35
35
  # ### Installation
@@ -45,6 +45,31 @@ module Google
45
45
  #
46
46
  # [Product Documentation]: https://cloud.google.com/video-intelligence
47
47
  #
48
+ # ## Enabling Logging
49
+ #
50
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
51
+ # 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,
52
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
53
+ # 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)
54
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
55
+ #
56
+ # Configuring a Ruby stdlib logger:
57
+ #
58
+ # ```ruby
59
+ # require "logger"
60
+ #
61
+ # module MyLogger
62
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
63
+ # def logger
64
+ # LOGGER
65
+ # end
66
+ # end
67
+ #
68
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
69
+ # module GRPC
70
+ # extend MyLogger
71
+ # end
72
+ # ```
48
73
  #
49
74
  module VideoIntelligence
50
75
  module V1beta1
@@ -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.
@@ -18,9 +18,6 @@
18
18
  # and updates to that file get reflected here through a refresh process.
19
19
  # For the short term, the refresh process will only be runnable by Google
20
20
  # engineers.
21
- #
22
- # The only allowed edits are to method and file documentation. A 3-way
23
- # merge preserves those additions if the generated source changes.
24
21
 
25
22
  require "json"
26
23
  require "pathname"
@@ -30,7 +27,7 @@ require "google/gax/operation"
30
27
  require "google/longrunning/operations_client"
31
28
 
32
29
  require "google/cloud/videointelligence/v1beta1/video_intelligence_pb"
33
- require "google/cloud/video_intelligence/credentials"
30
+ require "google/cloud/video_intelligence/v1beta1/credentials"
34
31
 
35
32
  module Google
36
33
  module Cloud
@@ -49,6 +46,9 @@ module Google
49
46
  # The default port of the service.
50
47
  DEFAULT_SERVICE_PORT = 443
51
48
 
49
+ # The default set of gRPC interceptors.
50
+ GRPC_INTERCEPTORS = []
51
+
52
52
  DEFAULT_TIMEOUT = 30
53
53
 
54
54
  # The scopes needed to make gRPC calls to all of the methods defined in
@@ -57,8 +57,10 @@ module Google
57
57
  "https://www.googleapis.com/auth/cloud-platform"
58
58
  ].freeze
59
59
 
60
+ # @private
60
61
  class OperationsClient < Google::Longrunning::OperationsClient
61
- SERVICE_ADDRESS = SERVICE_ADDRESS
62
+ self::SERVICE_ADDRESS = VideoIntelligenceServiceClient::SERVICE_ADDRESS
63
+ self::GRPC_INTERCEPTORS = VideoIntelligenceServiceClient::GRPC_INTERCEPTORS
62
64
  end
63
65
 
64
66
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
@@ -85,11 +87,18 @@ module Google
85
87
  # or the specified config is missing data points.
86
88
  # @param timeout [Numeric]
87
89
  # The default timeout, in seconds, for calls made through this client.
90
+ # @param metadata [Hash]
91
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
92
+ # @param exception_transformer [Proc]
93
+ # An optional proc that intercepts any exceptions raised during an API call to inject
94
+ # custom error handling.
88
95
  def initialize \
89
96
  credentials: nil,
90
97
  scopes: ALL_SCOPES,
91
98
  client_config: {},
92
99
  timeout: DEFAULT_TIMEOUT,
100
+ metadata: nil,
101
+ exception_transformer: nil,
93
102
  lib_name: nil,
94
103
  lib_version: ""
95
104
  # These require statements are intentionally placed here to initialize
@@ -98,7 +107,7 @@ module Google
98
107
  require "google/gax/grpc"
99
108
  require "google/cloud/videointelligence/v1beta1/video_intelligence_services_pb"
100
109
 
101
- credentials ||= Google::Cloud::VideoIntelligence::Credentials.default
110
+ credentials ||= Google::Cloud::VideoIntelligence::V1beta1::Credentials.default
102
111
 
103
112
  @operations_client = OperationsClient.new(
104
113
  credentials: credentials,
@@ -110,7 +119,7 @@ module Google
110
119
  )
111
120
 
112
121
  if credentials.is_a?(String) || credentials.is_a?(Hash)
113
- updater_proc = Google::Cloud::VideoIntelligence::Credentials.new(credentials).updater_proc
122
+ updater_proc = Google::Cloud::VideoIntelligence::V1beta1::Credentials.new(credentials).updater_proc
114
123
  end
115
124
  if credentials.is_a?(GRPC::Core::Channel)
116
125
  channel = credentials
@@ -134,6 +143,7 @@ module Google
134
143
  google_api_client.freeze
135
144
 
136
145
  headers = { :"x-goog-api-client" => google_api_client }
146
+ headers.merge!(metadata) unless metadata.nil?
137
147
  client_config_file = Pathname.new(__dir__).join(
138
148
  "video_intelligence_service_client_config.json"
139
149
  )
@@ -145,13 +155,14 @@ module Google
145
155
  Google::Gax::Grpc::STATUS_CODE_NAMES,
146
156
  timeout,
147
157
  errors: Google::Gax::Grpc::API_ERRORS,
148
- kwargs: headers
158
+ metadata: headers
149
159
  )
150
160
  end
151
161
 
152
162
  # Allow overriding the service path/port in subclasses.
153
163
  service_path = self.class::SERVICE_ADDRESS
154
164
  port = self.class::DEFAULT_SERVICE_PORT
165
+ interceptors = self.class::GRPC_INTERCEPTORS
155
166
  @video_intelligence_service_stub = Google::Gax::Grpc.create_stub(
156
167
  service_path,
157
168
  port,
@@ -159,12 +170,14 @@ module Google
159
170
  channel: channel,
160
171
  updater_proc: updater_proc,
161
172
  scopes: scopes,
173
+ interceptors: interceptors,
162
174
  &Google::Cloud::Videointelligence::V1beta1::VideoIntelligenceService::Stub.method(:new)
163
175
  )
164
176
 
165
177
  @annotate_video = Google::Gax.create_api_call(
166
178
  @video_intelligence_service_stub.method(:annotate_video),
167
- defaults["annotate_video"]
179
+ defaults["annotate_video"],
180
+ exception_transformer: exception_transformer
168
181
  )
169
182
  end
170
183
 
@@ -212,9 +225,9 @@ module Google
212
225
  # @return [Google::Gax::Operation]
213
226
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
214
227
  # @example
215
- # require "google/cloud/video_intelligence/v1beta1"
228
+ # require "google/cloud/video_intelligence"
216
229
  #
217
- # video_intelligence_service_client = Google::Cloud::VideoIntelligence::V1beta1.new
230
+ # video_intelligence_service_client = Google::Cloud::VideoIntelligence.new(version: :v1beta1)
218
231
  # input_uri = "gs://demomaker/cat.mp4"
219
232
  # features_element = :LABEL_DETECTION
220
233
  # features = [features_element]
@@ -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,37 +13,64 @@
13
13
  # limitations under the License.
14
14
 
15
15
  require "google/cloud/video_intelligence/v1beta2/video_intelligence_service_client"
16
+ require "google/cloud/videointelligence/v1beta2/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 Google Cloud Video Intelligence API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
23
- #
24
- # [Google Cloud Video Intelligence API][Product Documentation]:
25
- # Google 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 Google 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
- # ### Next Steps
38
- # - Read the [Google Cloud Video Intelligence API Product documentation][Product Documentation]
39
- # to learn more about the product and see How-to Guides.
40
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
41
- # to see the full list of Cloud APIs that we cover.
42
- #
43
- # [Product Documentation]: https://cloud.google.com/video-intelligence
44
- #
45
- #
46
21
  module VideoIntelligence
22
+ # rubocop:disable LineLength
23
+
24
+ ##
25
+ # # Ruby Client for Google Cloud Video Intelligence API ([GA](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
26
+ #
27
+ # [Google Cloud Video Intelligence API][Product Documentation]:
28
+ # Google 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 Google 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
+ # ### Next Steps
41
+ # - Read the [Google Cloud Video Intelligence API Product documentation][Product Documentation]
42
+ # to learn more about the product and see How-to Guides.
43
+ # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
44
+ # to see the full list of Cloud APIs that we cover.
45
+ #
46
+ # [Product Documentation]: https://cloud.google.com/video-intelligence
47
+ #
48
+ # ## Enabling Logging
49
+ #
50
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
51
+ # 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,
52
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
53
+ # 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)
54
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
55
+ #
56
+ # Configuring a Ruby stdlib logger:
57
+ #
58
+ # ```ruby
59
+ # require "logger"
60
+ #
61
+ # module MyLogger
62
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
63
+ # def logger
64
+ # LOGGER
65
+ # end
66
+ # end
67
+ #
68
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
69
+ # module GRPC
70
+ # extend MyLogger
71
+ # end
72
+ # ```
73
+ #
47
74
  module V1beta2
48
75
  # rubocop:enable LineLength
49
76
 
@@ -74,11 +101,18 @@ module Google
74
101
  # or the specified config is missing data points.
75
102
  # @param timeout [Numeric]
76
103
  # The default timeout, in seconds, for calls made through this client.
104
+ # @param metadata [Hash]
105
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
106
+ # @param exception_transformer [Proc]
107
+ # An optional proc that intercepts any exceptions raised during an API call to inject
108
+ # custom error handling.
77
109
  def self.new \
78
110
  credentials: nil,
79
111
  scopes: nil,
80
112
  client_config: nil,
81
113
  timeout: nil,
114
+ metadata: nil,
115
+ exception_transformer: nil,
82
116
  lib_name: nil,
83
117
  lib_version: nil
84
118
  kwargs = {
@@ -86,6 +120,8 @@ module Google
86
120
  scopes: scopes,
87
121
  client_config: client_config,
88
122
  timeout: timeout,
123
+ metadata: metadata,
124
+ exception_transformer: exception_transformer,
89
125
  lib_name: lib_name,
90
126
  lib_version: lib_version
91
127
  }.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 V1beta2
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
- # # Google Cloud Video Intelligence API Contents
20
- #
21
- # | Class | Description |
22
- # | ----- | ----------- |
23
- # | [VideoIntelligenceServiceClient][] | Google Cloud Video Intelligence API. |
24
- # | [Data Types][] | Data types for Google::Cloud::VideoIntelligence::V1beta2 |
25
- #
26
- # [VideoIntelligenceServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1beta2/videointelligenceserviceclient
27
- # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1beta2/datatypes
28
- #
29
18
  module V1beta2
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