google-api-client 0.17.2 → 0.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,263 @@
1
+ # Copyright 2015 Google Inc.
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 OsloginV1
23
+ # Google Cloud OS Login API
24
+ #
25
+ # Manages OS login configuration for Google account users.
26
+ #
27
+ # @example
28
+ # require 'google/apis/oslogin_v1'
29
+ #
30
+ # Oslogin = Google::Apis::OsloginV1 # Alias the module
31
+ # service = Oslogin::CloudOSLoginService.new
32
+ #
33
+ # @see https://cloud.google.com/compute/docs/oslogin/rest/
34
+ class CloudOSLoginService < 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://oslogin.googleapis.com/', '')
47
+ @batch_path = 'batch'
48
+ end
49
+
50
+ # Retrieves the profile information used for logging in to a virtual machine
51
+ # on Google Compute Engine.
52
+ # @param [String] name
53
+ # The unique ID for the user in format `users/`user``.
54
+ # @param [String] fields
55
+ # Selector specifying which fields to include in a partial response.
56
+ # @param [String] quota_user
57
+ # Available to use for quota purposes for server-side applications. Can be any
58
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
59
+ # @param [Google::Apis::RequestOptions] options
60
+ # Request-specific options
61
+ #
62
+ # @yield [result, err] Result & error if block supplied
63
+ # @yieldparam result [Google::Apis::OsloginV1::LoginProfile] parsed result object
64
+ # @yieldparam err [StandardError] error object if request failed
65
+ #
66
+ # @return [Google::Apis::OsloginV1::LoginProfile]
67
+ #
68
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
69
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
70
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
71
+ def get_user_login_profile(name, fields: nil, quota_user: nil, options: nil, &block)
72
+ command = make_simple_command(:get, 'v1/{+name}/loginProfile', options)
73
+ command.response_representation = Google::Apis::OsloginV1::LoginProfile::Representation
74
+ command.response_class = Google::Apis::OsloginV1::LoginProfile
75
+ command.params['name'] = name unless name.nil?
76
+ command.query['fields'] = fields unless fields.nil?
77
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
78
+ execute_or_queue_command(command, &block)
79
+ end
80
+
81
+ # Adds an SSH public key and returns the profile information. Default POSIX
82
+ # account information is set when no username and UID exist as part of the
83
+ # login profile.
84
+ # @param [String] parent
85
+ # The unique ID for the user in format `users/`user``.
86
+ # @param [Google::Apis::OsloginV1::SshPublicKey] ssh_public_key_object
87
+ # @param [String] project_id
88
+ # The project ID of the Google Cloud Platform project.
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::OsloginV1::ImportSshPublicKeyResponse] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::OsloginV1::ImportSshPublicKeyResponse]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def import_user_ssh_public_key(parent, ssh_public_key_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:post, 'v1/{+parent}:importSshPublicKey', options)
108
+ command.request_representation = Google::Apis::OsloginV1::SshPublicKey::Representation
109
+ command.request_object = ssh_public_key_object
110
+ command.response_representation = Google::Apis::OsloginV1::ImportSshPublicKeyResponse::Representation
111
+ command.response_class = Google::Apis::OsloginV1::ImportSshPublicKeyResponse
112
+ command.params['parent'] = parent unless parent.nil?
113
+ command.query['projectId'] = project_id unless project_id.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Deletes a POSIX account.
120
+ # @param [String] name
121
+ # A reference to the POSIX account to update. POSIX accounts are identified
122
+ # by the project ID they are associated with. A reference to the POSIX
123
+ # account is in format `users/`user`/projects/`project``.
124
+ # @param [String] fields
125
+ # Selector specifying which fields to include in a partial response.
126
+ # @param [String] quota_user
127
+ # Available to use for quota purposes for server-side applications. Can be any
128
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
129
+ # @param [Google::Apis::RequestOptions] options
130
+ # Request-specific options
131
+ #
132
+ # @yield [result, err] Result & error if block supplied
133
+ # @yieldparam result [Google::Apis::OsloginV1::Empty] parsed result object
134
+ # @yieldparam err [StandardError] error object if request failed
135
+ #
136
+ # @return [Google::Apis::OsloginV1::Empty]
137
+ #
138
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
139
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
140
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
141
+ def delete_user_project(name, fields: nil, quota_user: nil, options: nil, &block)
142
+ command = make_simple_command(:delete, 'v1/{+name}', options)
143
+ command.response_representation = Google::Apis::OsloginV1::Empty::Representation
144
+ command.response_class = Google::Apis::OsloginV1::Empty
145
+ command.params['name'] = name unless name.nil?
146
+ command.query['fields'] = fields unless fields.nil?
147
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
148
+ execute_or_queue_command(command, &block)
149
+ end
150
+
151
+ # Deletes an SSH public key.
152
+ # @param [String] name
153
+ # The fingerprint of the public key to update. Public keys are identified by
154
+ # their SHA-256 fingerprint. The fingerprint of the public key is in format
155
+ # `users/`user`/sshPublicKeys/`fingerprint``.
156
+ # @param [String] fields
157
+ # Selector specifying which fields to include in a partial response.
158
+ # @param [String] quota_user
159
+ # Available to use for quota purposes for server-side applications. Can be any
160
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
161
+ # @param [Google::Apis::RequestOptions] options
162
+ # Request-specific options
163
+ #
164
+ # @yield [result, err] Result & error if block supplied
165
+ # @yieldparam result [Google::Apis::OsloginV1::Empty] parsed result object
166
+ # @yieldparam err [StandardError] error object if request failed
167
+ #
168
+ # @return [Google::Apis::OsloginV1::Empty]
169
+ #
170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
173
+ def delete_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil, &block)
174
+ command = make_simple_command(:delete, 'v1/{+name}', options)
175
+ command.response_representation = Google::Apis::OsloginV1::Empty::Representation
176
+ command.response_class = Google::Apis::OsloginV1::Empty
177
+ command.params['name'] = name unless name.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ execute_or_queue_command(command, &block)
181
+ end
182
+
183
+ # Retrieves an SSH public key.
184
+ # @param [String] name
185
+ # The fingerprint of the public key to retrieve. Public keys are identified
186
+ # by their SHA-256 fingerprint. The fingerprint of the public key is in
187
+ # format `users/`user`/sshPublicKeys/`fingerprint``.
188
+ # @param [String] fields
189
+ # Selector specifying which fields to include in a partial response.
190
+ # @param [String] quota_user
191
+ # Available to use for quota purposes for server-side applications. Can be any
192
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
193
+ # @param [Google::Apis::RequestOptions] options
194
+ # Request-specific options
195
+ #
196
+ # @yield [result, err] Result & error if block supplied
197
+ # @yieldparam result [Google::Apis::OsloginV1::SshPublicKey] parsed result object
198
+ # @yieldparam err [StandardError] error object if request failed
199
+ #
200
+ # @return [Google::Apis::OsloginV1::SshPublicKey]
201
+ #
202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
205
+ def get_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil, &block)
206
+ command = make_simple_command(:get, 'v1/{+name}', options)
207
+ command.response_representation = Google::Apis::OsloginV1::SshPublicKey::Representation
208
+ command.response_class = Google::Apis::OsloginV1::SshPublicKey
209
+ command.params['name'] = name unless name.nil?
210
+ command.query['fields'] = fields unless fields.nil?
211
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
212
+ execute_or_queue_command(command, &block)
213
+ end
214
+
215
+ # Updates an SSH public key and returns the profile information. This method
216
+ # supports patch semantics.
217
+ # @param [String] name
218
+ # The fingerprint of the public key to update. Public keys are identified by
219
+ # their SHA-256 fingerprint. The fingerprint of the public key is in format
220
+ # `users/`user`/sshPublicKeys/`fingerprint``.
221
+ # @param [Google::Apis::OsloginV1::SshPublicKey] ssh_public_key_object
222
+ # @param [String] update_mask
223
+ # Mask to control which fields get updated. Updates all if not present.
224
+ # @param [String] fields
225
+ # Selector specifying which fields to include in a partial response.
226
+ # @param [String] quota_user
227
+ # Available to use for quota purposes for server-side applications. Can be any
228
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
229
+ # @param [Google::Apis::RequestOptions] options
230
+ # Request-specific options
231
+ #
232
+ # @yield [result, err] Result & error if block supplied
233
+ # @yieldparam result [Google::Apis::OsloginV1::SshPublicKey] parsed result object
234
+ # @yieldparam err [StandardError] error object if request failed
235
+ #
236
+ # @return [Google::Apis::OsloginV1::SshPublicKey]
237
+ #
238
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
239
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
240
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
241
+ def patch_user_ssh_public_key(name, ssh_public_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
242
+ command = make_simple_command(:patch, 'v1/{+name}', options)
243
+ command.request_representation = Google::Apis::OsloginV1::SshPublicKey::Representation
244
+ command.request_object = ssh_public_key_object
245
+ command.response_representation = Google::Apis::OsloginV1::SshPublicKey::Representation
246
+ command.response_class = Google::Apis::OsloginV1::SshPublicKey
247
+ command.params['name'] = name unless name.nil?
248
+ command.query['updateMask'] = update_mask unless update_mask.nil?
249
+ command.query['fields'] = fields unless fields.nil?
250
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
251
+ execute_or_queue_command(command, &block)
252
+ end
253
+
254
+ protected
255
+
256
+ def apply_command_defaults(command)
257
+ command.query['key'] = key unless key.nil?
258
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
259
+ end
260
+ end
261
+ end
262
+ end
263
+ end
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/tpu/
26
26
  module TpuV1alpha1
27
27
  VERSION = 'V1alpha1'
28
- REVISION = '20171108'
28
+ REVISION = '20171121'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -454,6 +454,38 @@ module Google
454
454
  end
455
455
  end
456
456
 
457
+ # Request for ReimageNode.
458
+ class ReimageNodeRequest
459
+ include Google::Apis::Core::Hashable
460
+
461
+ # The version for reimage to create.
462
+ # Corresponds to the JSON property `tensorflowVersion`
463
+ # @return [String]
464
+ attr_accessor :tensorflow_version
465
+
466
+ def initialize(**args)
467
+ update!(**args)
468
+ end
469
+
470
+ # Update properties of this object
471
+ def update!(**args)
472
+ @tensorflow_version = args[:tensorflow_version] if args.key?(:tensorflow_version)
473
+ end
474
+ end
475
+
476
+ # Request for ResetNode.
477
+ class ResetNodeRequest
478
+ include Google::Apis::Core::Hashable
479
+
480
+ def initialize(**args)
481
+ update!(**args)
482
+ end
483
+
484
+ # Update properties of this object
485
+ def update!(**args)
486
+ end
487
+ end
488
+
457
489
  # The `Status` type defines a logical error model that is suitable for different
458
490
  # programming environments, including REST APIs and RPC APIs. It is used by
459
491
  # [gRPC](https://github.com/grpc). The error model is designed to be:
@@ -76,6 +76,18 @@ module Google
76
76
  include Google::Apis::Core::JsonObjectSupport
77
77
  end
78
78
 
79
+ class ReimageNodeRequest
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class ResetNodeRequest
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
79
91
  class Status
80
92
  class Representation < Google::Apis::Core::JsonRepresentation; end
81
93
 
@@ -178,6 +190,19 @@ module Google
178
190
  end
179
191
  end
180
192
 
193
+ class ReimageNodeRequest
194
+ # @private
195
+ class Representation < Google::Apis::Core::JsonRepresentation
196
+ property :tensorflow_version, as: 'tensorflowVersion'
197
+ end
198
+ end
199
+
200
+ class ResetNodeRequest
201
+ # @private
202
+ class Representation < Google::Apis::Core::JsonRepresentation
203
+ end
204
+ end
205
+
181
206
  class Status
182
207
  # @private
183
208
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -251,8 +251,7 @@ module Google
251
251
  # Reimage a node's OS.
252
252
  # @param [String] name
253
253
  # The resource name.
254
- # @param [String] tensorflow_version
255
- # The version for reimage to create.
254
+ # @param [Google::Apis::TpuV1alpha1::ReimageNodeRequest] reimage_node_request_object
256
255
  # @param [String] fields
257
256
  # Selector specifying which fields to include in a partial response.
258
257
  # @param [String] quota_user
@@ -270,12 +269,13 @@ module Google
270
269
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
271
270
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
272
271
  # @raise [Google::Apis::AuthorizationError] Authorization is required
273
- def reimage_project_location_node(name, tensorflow_version: nil, fields: nil, quota_user: nil, options: nil, &block)
272
+ def reimage_project_location_node(name, reimage_node_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
274
273
  command = make_simple_command(:post, 'v1alpha1/{+name}:reimage', options)
274
+ command.request_representation = Google::Apis::TpuV1alpha1::ReimageNodeRequest::Representation
275
+ command.request_object = reimage_node_request_object
275
276
  command.response_representation = Google::Apis::TpuV1alpha1::Operation::Representation
276
277
  command.response_class = Google::Apis::TpuV1alpha1::Operation
277
278
  command.params['name'] = name unless name.nil?
278
- command.query['tensorflowVersion'] = tensorflow_version unless tensorflow_version.nil?
279
279
  command.query['fields'] = fields unless fields.nil?
280
280
  command.query['quotaUser'] = quota_user unless quota_user.nil?
281
281
  execute_or_queue_command(command, &block)
@@ -284,6 +284,7 @@ module Google
284
284
  # Resets a node, which stops and starts the VM.
285
285
  # @param [String] name
286
286
  # The resource name.
287
+ # @param [Google::Apis::TpuV1alpha1::ResetNodeRequest] reset_node_request_object
287
288
  # @param [String] fields
288
289
  # Selector specifying which fields to include in a partial response.
289
290
  # @param [String] quota_user
@@ -301,8 +302,10 @@ module Google
301
302
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
302
303
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
303
304
  # @raise [Google::Apis::AuthorizationError] Authorization is required
304
- def reset_project_location_node(name, fields: nil, quota_user: nil, options: nil, &block)
305
+ def reset_project_location_node(name, reset_node_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
305
306
  command = make_simple_command(:post, 'v1alpha1/{+name}:reset', options)
307
+ command.request_representation = Google::Apis::TpuV1alpha1::ResetNodeRequest::Representation
308
+ command.request_object = reset_node_request_object
306
309
  command.response_representation = Google::Apis::TpuV1alpha1::Operation::Representation
307
310
  command.response_class = Google::Apis::TpuV1alpha1::Operation
308
311
  command.params['name'] = name unless name.nil?
@@ -20,12 +20,18 @@ module Google
20
20
  module Apis
21
21
  # Google Vault API
22
22
  #
23
- #
23
+ # Archiving and eDiscovery for G Suite.
24
24
  #
25
- # @see https://apps.google.com/products/vault/
25
+ # @see https://developers.google.com/vault
26
26
  module VaultV1
27
27
  VERSION = 'V1'
28
- REVISION = '20170828'
28
+ REVISION = '20171026'
29
+
30
+ # Manage your eDiscovery data
31
+ AUTH_EDISCOVERY = 'https://www.googleapis.com/auth/ediscovery'
32
+
33
+ # View your eDiscovery data
34
+ AUTH_EDISCOVERY_READONLY = 'https://www.googleapis.com/auth/ediscovery.readonly'
29
35
  end
30
36
  end
31
37
  end
@@ -195,13 +195,13 @@ module Google
195
195
  class HeldGroupsQuery
196
196
  include Google::Apis::Core::Hashable
197
197
 
198
- # The end date range for the search query. These timestamps are in GMT and
198
+ # The end time range for the search query. These timestamps are in GMT and
199
199
  # rounded down to the start of the given date.
200
200
  # Corresponds to the JSON property `endTime`
201
201
  # @return [String]
202
202
  attr_accessor :end_time
203
203
 
204
- # The start date range for the search query. These timestamps are in GMT and
204
+ # The start time range for the search query. These timestamps are in GMT and
205
205
  # rounded down to the start of the given date.
206
206
  # Corresponds to the JSON property `startTime`
207
207
  # @return [String]
@@ -228,13 +228,13 @@ module Google
228
228
  class HeldMailQuery
229
229
  include Google::Apis::Core::Hashable
230
230
 
231
- # The end date range for the search query. These timestamps are in GMT and
231
+ # The end time range for the search query. These timestamps are in GMT and
232
232
  # rounded down to the start of the given date.
233
233
  # Corresponds to the JSON property `endTime`
234
234
  # @return [String]
235
235
  attr_accessor :end_time
236
236
 
237
- # The start date range for the search query. These timestamps are in GMT and
237
+ # The start time range for the search query. These timestamps are in GMT and
238
238
  # rounded down to the start of the given date.
239
239
  # Corresponds to the JSON property `startTime`
240
240
  # @return [String]