google-apis-datastream_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,284 @@
1
+ # Copyright 2020 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
+ # http://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 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DatastreamV1
23
+ # Datastream API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/datastream_v1'
29
+ #
30
+ # Datastream = Google::Apis::DatastreamV1 # Alias the module
31
+ # service = Datastream::DatastreamService.new
32
+ #
33
+ # @see https://cloud.google.com/datastream/
34
+ class DatastreamService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://datastream.googleapis.com/', '',
47
+ client_name: 'google-apis-datastream_v1',
48
+ client_version: Google::Apis::DatastreamV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets information about a location.
53
+ # @param [String] name
54
+ # Resource name for the location.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::DatastreamV1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::DatastreamV1::Location]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1/{+name}', options)
74
+ command.response_representation = Google::Apis::DatastreamV1::Location::Representation
75
+ command.response_class = Google::Apis::DatastreamV1::Location
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists information about the supported locations for this service.
83
+ # @param [String] name
84
+ # The resource that owns the locations collection, if applicable.
85
+ # @param [String] filter
86
+ # A filter to narrow down results to a preferred subset. The filtering language
87
+ # accepts strings like "displayName=tokyo", and is documented in more detail in [
88
+ # AIP-160](https://google.aip.dev/160).
89
+ # @param [Fixnum] page_size
90
+ # The maximum number of results to return. If not set, the service selects a
91
+ # default.
92
+ # @param [String] page_token
93
+ # A page token received from the `next_page_token` field in the response. Send
94
+ # that page token to receive the subsequent page.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::DatastreamV1::ListLocationsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::DatastreamV1::ListLocationsResponse]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
114
+ command.response_representation = Google::Apis::DatastreamV1::ListLocationsResponse::Representation
115
+ command.response_class = Google::Apis::DatastreamV1::ListLocationsResponse
116
+ command.params['name'] = name unless name.nil?
117
+ command.query['filter'] = filter unless filter.nil?
118
+ command.query['pageSize'] = page_size unless page_size.nil?
119
+ command.query['pageToken'] = page_token unless page_token.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Starts asynchronous cancellation on a long-running operation. The server makes
126
+ # a best effort to cancel the operation, but success is not guaranteed. If the
127
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
128
+ # Clients can use Operations.GetOperation or other methods to check whether the
129
+ # cancellation succeeded or whether the operation completed despite cancellation.
130
+ # On successful cancellation, the operation is not deleted; instead, it becomes
131
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
132
+ # corresponding to `Code.CANCELLED`.
133
+ # @param [String] name
134
+ # The name of the operation resource to be cancelled.
135
+ # @param [Google::Apis::DatastreamV1::CancelOperationRequest] cancel_operation_request_object
136
+ # @param [String] fields
137
+ # Selector specifying which fields to include in a partial response.
138
+ # @param [String] quota_user
139
+ # Available to use for quota purposes for server-side applications. Can be any
140
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
141
+ # @param [Google::Apis::RequestOptions] options
142
+ # Request-specific options
143
+ #
144
+ # @yield [result, err] Result & error if block supplied
145
+ # @yieldparam result [Google::Apis::DatastreamV1::Empty] parsed result object
146
+ # @yieldparam err [StandardError] error object if request failed
147
+ #
148
+ # @return [Google::Apis::DatastreamV1::Empty]
149
+ #
150
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
153
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
155
+ command.request_representation = Google::Apis::DatastreamV1::CancelOperationRequest::Representation
156
+ command.request_object = cancel_operation_request_object
157
+ command.response_representation = Google::Apis::DatastreamV1::Empty::Representation
158
+ command.response_class = Google::Apis::DatastreamV1::Empty
159
+ command.params['name'] = name unless name.nil?
160
+ command.query['fields'] = fields unless fields.nil?
161
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
162
+ execute_or_queue_command(command, &block)
163
+ end
164
+
165
+ # Deletes a long-running operation. This method indicates that the client is no
166
+ # longer interested in the operation result. It does not cancel the operation.
167
+ # If the server doesn't support this method, it returns `google.rpc.Code.
168
+ # UNIMPLEMENTED`.
169
+ # @param [String] name
170
+ # The name of the operation resource to be deleted.
171
+ # @param [String] fields
172
+ # Selector specifying which fields to include in a partial response.
173
+ # @param [String] quota_user
174
+ # Available to use for quota purposes for server-side applications. Can be any
175
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
176
+ # @param [Google::Apis::RequestOptions] options
177
+ # Request-specific options
178
+ #
179
+ # @yield [result, err] Result & error if block supplied
180
+ # @yieldparam result [Google::Apis::DatastreamV1::Empty] parsed result object
181
+ # @yieldparam err [StandardError] error object if request failed
182
+ #
183
+ # @return [Google::Apis::DatastreamV1::Empty]
184
+ #
185
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
186
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
187
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
188
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
189
+ command = make_simple_command(:delete, 'v1/{+name}', options)
190
+ command.response_representation = Google::Apis::DatastreamV1::Empty::Representation
191
+ command.response_class = Google::Apis::DatastreamV1::Empty
192
+ command.params['name'] = name unless name.nil?
193
+ command.query['fields'] = fields unless fields.nil?
194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
195
+ execute_or_queue_command(command, &block)
196
+ end
197
+
198
+ # Gets the latest state of a long-running operation. Clients can use this method
199
+ # to poll the operation result at intervals as recommended by the API service.
200
+ # @param [String] name
201
+ # The name of the operation resource.
202
+ # @param [String] fields
203
+ # Selector specifying which fields to include in a partial response.
204
+ # @param [String] quota_user
205
+ # Available to use for quota purposes for server-side applications. Can be any
206
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
207
+ # @param [Google::Apis::RequestOptions] options
208
+ # Request-specific options
209
+ #
210
+ # @yield [result, err] Result & error if block supplied
211
+ # @yieldparam result [Google::Apis::DatastreamV1::Operation] parsed result object
212
+ # @yieldparam err [StandardError] error object if request failed
213
+ #
214
+ # @return [Google::Apis::DatastreamV1::Operation]
215
+ #
216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
219
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
220
+ command = make_simple_command(:get, 'v1/{+name}', options)
221
+ command.response_representation = Google::Apis::DatastreamV1::Operation::Representation
222
+ command.response_class = Google::Apis::DatastreamV1::Operation
223
+ command.params['name'] = name unless name.nil?
224
+ command.query['fields'] = fields unless fields.nil?
225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
226
+ execute_or_queue_command(command, &block)
227
+ end
228
+
229
+ # Lists operations that match the specified filter in the request. If the server
230
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
231
+ # binding allows API services to override the binding to use different resource
232
+ # name schemes, such as `users/*/operations`. To override the binding, API
233
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
234
+ # service configuration. For backwards compatibility, the default name includes
235
+ # the operations collection id, however overriding users must ensure the name
236
+ # binding is the parent resource, without the operations collection id.
237
+ # @param [String] name
238
+ # The name of the operation's parent resource.
239
+ # @param [String] filter
240
+ # The standard list filter.
241
+ # @param [Fixnum] page_size
242
+ # The standard list page size.
243
+ # @param [String] page_token
244
+ # The standard list page token.
245
+ # @param [String] fields
246
+ # Selector specifying which fields to include in a partial response.
247
+ # @param [String] quota_user
248
+ # Available to use for quota purposes for server-side applications. Can be any
249
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
250
+ # @param [Google::Apis::RequestOptions] options
251
+ # Request-specific options
252
+ #
253
+ # @yield [result, err] Result & error if block supplied
254
+ # @yieldparam result [Google::Apis::DatastreamV1::ListOperationsResponse] parsed result object
255
+ # @yieldparam err [StandardError] error object if request failed
256
+ #
257
+ # @return [Google::Apis::DatastreamV1::ListOperationsResponse]
258
+ #
259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
262
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
263
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
264
+ command.response_representation = Google::Apis::DatastreamV1::ListOperationsResponse::Representation
265
+ command.response_class = Google::Apis::DatastreamV1::ListOperationsResponse
266
+ command.params['name'] = name unless name.nil?
267
+ command.query['filter'] = filter unless filter.nil?
268
+ command.query['pageSize'] = page_size unless page_size.nil?
269
+ command.query['pageToken'] = page_token unless page_token.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ execute_or_queue_command(command, &block)
273
+ end
274
+
275
+ protected
276
+
277
+ def apply_command_defaults(command)
278
+ command.query['key'] = key unless key.nil?
279
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
280
+ end
281
+ end
282
+ end
283
+ end
284
+ end
@@ -0,0 +1,36 @@
1
+ # Copyright 2020 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
+ # http://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 'google/apis/datastream_v1/service.rb'
16
+ require 'google/apis/datastream_v1/classes.rb'
17
+ require 'google/apis/datastream_v1/representations.rb'
18
+ require 'google/apis/datastream_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Datastream API
23
+ #
24
+ #
25
+ #
26
+ # @see https://cloud.google.com/datastream/
27
+ module DatastreamV1
28
+ # Version of the Datastream API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1'
31
+
32
+ # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 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
+ # http://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 "google/apis/datastream_v1"
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-datastream_v1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-11-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.4'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.a
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.4'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.a
33
+ description: This is the simple REST client for Datastream API V1. Simple REST clients
34
+ are Ruby client libraries that provide access to Google services via their HTTP
35
+ REST API endpoints. These libraries are generated and updated automatically based
36
+ on the discovery documents published by the service, and they handle most concerns
37
+ such as authentication, pagination, retry, timeouts, and logging. You can use this
38
+ client to access the Datastream API, but note that some services may provide a separate
39
+ modern client that is easier to use.
40
+ email: googleapis-packages@google.com
41
+ executables: []
42
+ extensions: []
43
+ extra_rdoc_files: []
44
+ files:
45
+ - ".yardopts"
46
+ - CHANGELOG.md
47
+ - LICENSE.md
48
+ - OVERVIEW.md
49
+ - lib/google-apis-datastream_v1.rb
50
+ - lib/google/apis/datastream_v1.rb
51
+ - lib/google/apis/datastream_v1/classes.rb
52
+ - lib/google/apis/datastream_v1/gem_version.rb
53
+ - lib/google/apis/datastream_v1/representations.rb
54
+ - lib/google/apis/datastream_v1/service.rb
55
+ homepage: https://github.com/google/google-api-ruby-client
56
+ licenses:
57
+ - Apache-2.0
58
+ metadata:
59
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-datastream_v1/CHANGELOG.md
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-datastream_v1/v0.1.0
62
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-datastream_v1
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '2.5'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.2.17
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Simple REST client for Datastream API V1
82
+ test_files: []