google-cloud-os_login-v1beta 0.4.1 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 229365229ed89ff3bf4649cf9f153e3e3e1bc2f7b137e9f7bdb518849ed69144
4
- data.tar.gz: ef30e409fcc3c760ec6c1ff3333c79799f79b392b8d6d0749cc50912a027ee58
3
+ metadata.gz: acd45646a31f9d59f2aad516bde68826bdc877ab4a987abc34f4a4e6e44363e2
4
+ data.tar.gz: af073d5db06dc89dc23338d749a148af29f61b750288256f45f16d31e3986731
5
5
  SHA512:
6
- metadata.gz: e331d70aa5ab14bea3e19d95e8d66c54bf951bcc19f038733b7fb514ef8f9fe9d501585ccb6e29f1c9deed0f705f296ce164a6f703aa40da89ead284ea5177fd
7
- data.tar.gz: fa444f7b0652d0c43b4612429783f13410903e0465a251d3cd530763c639ae24cb201224dfba11160fdd05166260cf216e84590c3b4b25dddbda58770a43100b
6
+ metadata.gz: 31c058c4aca2ae2ce6fa736bc97e98f177820185e791a441d119795014d40ae2a9c00961a764369d3c4f38f1abc8cc46c9d8b4a35dde4e51066e6c0483a735ed
7
+ data.tar.gz: fe28e4cc5993c7e7c3b0752d477c251f334aa8eeda06129c19dff724b9d234ab1cedd573e3eaf3030dba0cf79b10323a94ca712fcfad80c5c981db069b58f000
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud OS Login V1beta API
2
+ --title="Cloud OS Login V1beta API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-os_login-v1beta
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::OsLogin::V1beta::OsLoginService::Credentials}):
68
68
 
69
- 1. `OS_LOGIN_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `OS_LOGIN_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `OS_LOGIN_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `OS_LOGIN_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/os_login/v1beta"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/os_login/v1beta"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new do |config
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/os_login/v1beta"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/os_login/v1beta"
34
34
 
35
35
  client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::OsLogin::V1beta::DeletePosixAccountRequest.new # (request fields as keyword arguments...)
37
37
  response = client.delete_posix_account request
38
38
  ```
39
39
 
@@ -44,13 +44,12 @@ module Google
44
44
  # See {::Google::Cloud::OsLogin::V1beta::OsLoginService::Client::Configuration}
45
45
  # for a description of the configuration fields.
46
46
  #
47
- # ## Example
47
+ # @example
48
48
  #
49
- # To modify the configuration for all OsLoginService clients:
50
- #
51
- # ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.configure do |config|
52
- # config.timeout = 10.0
53
- # end
49
+ # # Modify the configuration for all OsLoginService clients
50
+ # ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
54
53
  #
55
54
  # @yield [config] Configure the Client client.
56
55
  # @yieldparam config [Client::Configuration]
@@ -70,50 +69,32 @@ module Google
70
69
 
71
70
  default_config.rpcs.delete_posix_account.timeout = 10.0
72
71
  default_config.rpcs.delete_posix_account.retry_policy = {
73
- initial_delay: 0.1,
74
- max_delay: 60.0,
75
- multiplier: 1.3,
76
- retry_codes: [14, 4]
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
77
73
  }
78
74
 
79
75
  default_config.rpcs.delete_ssh_public_key.timeout = 10.0
80
76
  default_config.rpcs.delete_ssh_public_key.retry_policy = {
81
- initial_delay: 0.1,
82
- max_delay: 60.0,
83
- multiplier: 1.3,
84
- retry_codes: [14, 4]
77
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
85
78
  }
86
79
 
87
80
  default_config.rpcs.get_login_profile.timeout = 10.0
88
81
  default_config.rpcs.get_login_profile.retry_policy = {
89
- initial_delay: 0.1,
90
- max_delay: 60.0,
91
- multiplier: 1.3,
92
- retry_codes: [14, 4]
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
93
83
  }
94
84
 
95
85
  default_config.rpcs.get_ssh_public_key.timeout = 10.0
96
86
  default_config.rpcs.get_ssh_public_key.retry_policy = {
97
- initial_delay: 0.1,
98
- max_delay: 60.0,
99
- multiplier: 1.3,
100
- retry_codes: [14, 4]
87
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
101
88
  }
102
89
 
103
90
  default_config.rpcs.import_ssh_public_key.timeout = 10.0
104
91
  default_config.rpcs.import_ssh_public_key.retry_policy = {
105
- initial_delay: 0.1,
106
- max_delay: 60.0,
107
- multiplier: 1.3,
108
- retry_codes: [14, 4]
92
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
109
93
  }
110
94
 
111
95
  default_config.rpcs.update_ssh_public_key.timeout = 10.0
112
96
  default_config.rpcs.update_ssh_public_key.retry_policy = {
113
- initial_delay: 0.1,
114
- max_delay: 60.0,
115
- multiplier: 1.3,
116
- retry_codes: [14, 4]
97
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
117
98
  }
118
99
 
119
100
  default_config
@@ -145,19 +126,15 @@ module Google
145
126
  ##
146
127
  # Create a new OsLoginService client object.
147
128
  #
148
- # ## Examples
149
- #
150
- # To create a new OsLoginService client with the default
151
- # configuration:
129
+ # @example
152
130
  #
153
- # client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
131
+ # # Create a client using the default configuration
132
+ # client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
154
133
  #
155
- # To create a new OsLoginService client with a custom
156
- # configuration:
157
- #
158
- # client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new do |config|
159
- # config.timeout = 10.0
160
- # end
134
+ # # Create a client using a custom configuration
135
+ # client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new do |config|
136
+ # config.timeout = 10.0
137
+ # end
161
138
  #
162
139
  # @yield [config] Configure the OsLoginService client.
163
140
  # @yieldparam config [Client::Configuration]
@@ -177,14 +154,13 @@ module Google
177
154
 
178
155
  # Create credentials
179
156
  credentials = @config.credentials
180
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
157
+ # Use self-signed JWT if the endpoint is unchanged from default,
181
158
  # but only if the default endpoint does not have a region prefix.
182
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
183
- @config.endpoint == Client.configure.endpoint &&
159
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
184
160
  !@config.endpoint.split(".").first.include?("-")
185
161
  credentials ||= Credentials.default scope: @config.scope,
186
162
  enable_self_signed_jwt: enable_self_signed_jwt
187
- if credentials.is_a?(String) || credentials.is_a?(Hash)
163
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
188
164
  credentials = Credentials.new credentials, scope: @config.scope
189
165
  end
190
166
  @quota_project_id = @config.quota_project
@@ -232,6 +208,21 @@ module Google
232
208
  #
233
209
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
234
210
  #
211
+ # @example Basic example
212
+ # require "google/cloud/os_login/v1beta"
213
+ #
214
+ # # Create a client object. The client can be reused for multiple calls.
215
+ # client = Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
216
+ #
217
+ # # Create a request. To set request fields, pass in keyword arguments.
218
+ # request = Google::Cloud::OsLogin::V1beta::DeletePosixAccountRequest.new
219
+ #
220
+ # # Call the delete_posix_account method.
221
+ # result = client.delete_posix_account request
222
+ #
223
+ # # The returned object is of type Google::Protobuf::Empty.
224
+ # p result
225
+ #
235
226
  def delete_posix_account request, options = nil
236
227
  raise ::ArgumentError, "request must be provided" if request.nil?
237
228
 
@@ -249,16 +240,20 @@ module Google
249
240
  gapic_version: ::Google::Cloud::OsLogin::V1beta::VERSION
250
241
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
251
242
 
252
- header_params = {
253
- "name" => request.name
254
- }
243
+ header_params = {}
244
+ if request.name
245
+ header_params["name"] = request.name
246
+ end
247
+
255
248
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
256
249
  metadata[:"x-goog-request-params"] ||= request_params_header
257
250
 
258
251
  options.apply_defaults timeout: @config.rpcs.delete_posix_account.timeout,
259
252
  metadata: metadata,
260
253
  retry_policy: @config.rpcs.delete_posix_account.retry_policy
261
- options.apply_defaults metadata: @config.metadata,
254
+
255
+ options.apply_defaults timeout: @config.timeout,
256
+ metadata: @config.metadata,
262
257
  retry_policy: @config.retry_policy
263
258
 
264
259
  @os_login_service_stub.call_rpc :delete_posix_account, request, options: options do |response, operation|
@@ -300,6 +295,21 @@ module Google
300
295
  #
301
296
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
302
297
  #
298
+ # @example Basic example
299
+ # require "google/cloud/os_login/v1beta"
300
+ #
301
+ # # Create a client object. The client can be reused for multiple calls.
302
+ # client = Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
303
+ #
304
+ # # Create a request. To set request fields, pass in keyword arguments.
305
+ # request = Google::Cloud::OsLogin::V1beta::DeleteSshPublicKeyRequest.new
306
+ #
307
+ # # Call the delete_ssh_public_key method.
308
+ # result = client.delete_ssh_public_key request
309
+ #
310
+ # # The returned object is of type Google::Protobuf::Empty.
311
+ # p result
312
+ #
303
313
  def delete_ssh_public_key request, options = nil
304
314
  raise ::ArgumentError, "request must be provided" if request.nil?
305
315
 
@@ -317,16 +327,20 @@ module Google
317
327
  gapic_version: ::Google::Cloud::OsLogin::V1beta::VERSION
318
328
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
319
329
 
320
- header_params = {
321
- "name" => request.name
322
- }
330
+ header_params = {}
331
+ if request.name
332
+ header_params["name"] = request.name
333
+ end
334
+
323
335
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
324
336
  metadata[:"x-goog-request-params"] ||= request_params_header
325
337
 
326
338
  options.apply_defaults timeout: @config.rpcs.delete_ssh_public_key.timeout,
327
339
  metadata: metadata,
328
340
  retry_policy: @config.rpcs.delete_ssh_public_key.retry_policy
329
- options.apply_defaults metadata: @config.metadata,
341
+
342
+ options.apply_defaults timeout: @config.timeout,
343
+ metadata: @config.metadata,
330
344
  retry_policy: @config.retry_policy
331
345
 
332
346
  @os_login_service_stub.call_rpc :delete_ssh_public_key, request, options: options do |response, operation|
@@ -371,6 +385,21 @@ module Google
371
385
  #
372
386
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
373
387
  #
388
+ # @example Basic example
389
+ # require "google/cloud/os_login/v1beta"
390
+ #
391
+ # # Create a client object. The client can be reused for multiple calls.
392
+ # client = Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
393
+ #
394
+ # # Create a request. To set request fields, pass in keyword arguments.
395
+ # request = Google::Cloud::OsLogin::V1beta::GetLoginProfileRequest.new
396
+ #
397
+ # # Call the get_login_profile method.
398
+ # result = client.get_login_profile request
399
+ #
400
+ # # The returned object is of type Google::Cloud::OsLogin::V1beta::LoginProfile.
401
+ # p result
402
+ #
374
403
  def get_login_profile request, options = nil
375
404
  raise ::ArgumentError, "request must be provided" if request.nil?
376
405
 
@@ -388,16 +417,20 @@ module Google
388
417
  gapic_version: ::Google::Cloud::OsLogin::V1beta::VERSION
389
418
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
390
419
 
391
- header_params = {
392
- "name" => request.name
393
- }
420
+ header_params = {}
421
+ if request.name
422
+ header_params["name"] = request.name
423
+ end
424
+
394
425
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
395
426
  metadata[:"x-goog-request-params"] ||= request_params_header
396
427
 
397
428
  options.apply_defaults timeout: @config.rpcs.get_login_profile.timeout,
398
429
  metadata: metadata,
399
430
  retry_policy: @config.rpcs.get_login_profile.retry_policy
400
- options.apply_defaults metadata: @config.metadata,
431
+
432
+ options.apply_defaults timeout: @config.timeout,
433
+ metadata: @config.metadata,
401
434
  retry_policy: @config.retry_policy
402
435
 
403
436
  @os_login_service_stub.call_rpc :get_login_profile, request, options: options do |response, operation|
@@ -439,6 +472,21 @@ module Google
439
472
  #
440
473
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
441
474
  #
475
+ # @example Basic example
476
+ # require "google/cloud/os_login/v1beta"
477
+ #
478
+ # # Create a client object. The client can be reused for multiple calls.
479
+ # client = Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
480
+ #
481
+ # # Create a request. To set request fields, pass in keyword arguments.
482
+ # request = Google::Cloud::OsLogin::V1beta::GetSshPublicKeyRequest.new
483
+ #
484
+ # # Call the get_ssh_public_key method.
485
+ # result = client.get_ssh_public_key request
486
+ #
487
+ # # The returned object is of type Google::Cloud::OsLogin::Common::SshPublicKey.
488
+ # p result
489
+ #
442
490
  def get_ssh_public_key request, options = nil
443
491
  raise ::ArgumentError, "request must be provided" if request.nil?
444
492
 
@@ -456,16 +504,20 @@ module Google
456
504
  gapic_version: ::Google::Cloud::OsLogin::V1beta::VERSION
457
505
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
458
506
 
459
- header_params = {
460
- "name" => request.name
461
- }
507
+ header_params = {}
508
+ if request.name
509
+ header_params["name"] = request.name
510
+ end
511
+
462
512
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
463
513
  metadata[:"x-goog-request-params"] ||= request_params_header
464
514
 
465
515
  options.apply_defaults timeout: @config.rpcs.get_ssh_public_key.timeout,
466
516
  metadata: metadata,
467
517
  retry_policy: @config.rpcs.get_ssh_public_key.retry_policy
468
- options.apply_defaults metadata: @config.metadata,
518
+
519
+ options.apply_defaults timeout: @config.timeout,
520
+ metadata: @config.metadata,
469
521
  retry_policy: @config.retry_policy
470
522
 
471
523
  @os_login_service_stub.call_rpc :get_ssh_public_key, request, options: options do |response, operation|
@@ -511,6 +563,21 @@ module Google
511
563
  #
512
564
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
513
565
  #
566
+ # @example Basic example
567
+ # require "google/cloud/os_login/v1beta"
568
+ #
569
+ # # Create a client object. The client can be reused for multiple calls.
570
+ # client = Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
571
+ #
572
+ # # Create a request. To set request fields, pass in keyword arguments.
573
+ # request = Google::Cloud::OsLogin::V1beta::ImportSshPublicKeyRequest.new
574
+ #
575
+ # # Call the import_ssh_public_key method.
576
+ # result = client.import_ssh_public_key request
577
+ #
578
+ # # The returned object is of type Google::Cloud::OsLogin::V1beta::ImportSshPublicKeyResponse.
579
+ # p result
580
+ #
514
581
  def import_ssh_public_key request, options = nil
515
582
  raise ::ArgumentError, "request must be provided" if request.nil?
516
583
 
@@ -528,16 +595,20 @@ module Google
528
595
  gapic_version: ::Google::Cloud::OsLogin::V1beta::VERSION
529
596
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
530
597
 
531
- header_params = {
532
- "parent" => request.parent
533
- }
598
+ header_params = {}
599
+ if request.parent
600
+ header_params["parent"] = request.parent
601
+ end
602
+
534
603
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
535
604
  metadata[:"x-goog-request-params"] ||= request_params_header
536
605
 
537
606
  options.apply_defaults timeout: @config.rpcs.import_ssh_public_key.timeout,
538
607
  metadata: metadata,
539
608
  retry_policy: @config.rpcs.import_ssh_public_key.retry_policy
540
- options.apply_defaults metadata: @config.metadata,
609
+
610
+ options.apply_defaults timeout: @config.timeout,
611
+ metadata: @config.metadata,
541
612
  retry_policy: @config.retry_policy
542
613
 
543
614
  @os_login_service_stub.call_rpc :import_ssh_public_key, request, options: options do |response, operation|
@@ -584,6 +655,21 @@ module Google
584
655
  #
585
656
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
586
657
  #
658
+ # @example Basic example
659
+ # require "google/cloud/os_login/v1beta"
660
+ #
661
+ # # Create a client object. The client can be reused for multiple calls.
662
+ # client = Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new
663
+ #
664
+ # # Create a request. To set request fields, pass in keyword arguments.
665
+ # request = Google::Cloud::OsLogin::V1beta::UpdateSshPublicKeyRequest.new
666
+ #
667
+ # # Call the update_ssh_public_key method.
668
+ # result = client.update_ssh_public_key request
669
+ #
670
+ # # The returned object is of type Google::Cloud::OsLogin::Common::SshPublicKey.
671
+ # p result
672
+ #
587
673
  def update_ssh_public_key request, options = nil
588
674
  raise ::ArgumentError, "request must be provided" if request.nil?
589
675
 
@@ -601,16 +687,20 @@ module Google
601
687
  gapic_version: ::Google::Cloud::OsLogin::V1beta::VERSION
602
688
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
603
689
 
604
- header_params = {
605
- "name" => request.name
606
- }
690
+ header_params = {}
691
+ if request.name
692
+ header_params["name"] = request.name
693
+ end
694
+
607
695
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
608
696
  metadata[:"x-goog-request-params"] ||= request_params_header
609
697
 
610
698
  options.apply_defaults timeout: @config.rpcs.update_ssh_public_key.timeout,
611
699
  metadata: metadata,
612
700
  retry_policy: @config.rpcs.update_ssh_public_key.retry_policy
613
- options.apply_defaults metadata: @config.metadata,
701
+
702
+ options.apply_defaults timeout: @config.timeout,
703
+ metadata: @config.metadata,
614
704
  retry_policy: @config.retry_policy
615
705
 
616
706
  @os_login_service_stub.call_rpc :update_ssh_public_key, request, options: options do |response, operation|
@@ -634,22 +724,21 @@ module Google
634
724
  # Configuration can be applied globally to all clients, or to a single client
635
725
  # on construction.
636
726
  #
637
- # # Examples
638
- #
639
- # To modify the global config, setting the timeout for delete_posix_account
640
- # to 20 seconds, and all remaining timeouts to 10 seconds:
641
- #
642
- # ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.configure do |config|
643
- # config.timeout = 10.0
644
- # config.rpcs.delete_posix_account.timeout = 20.0
645
- # end
646
- #
647
- # To apply the above configuration only to a new client:
648
- #
649
- # client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new do |config|
650
- # config.timeout = 10.0
651
- # config.rpcs.delete_posix_account.timeout = 20.0
652
- # end
727
+ # @example
728
+ #
729
+ # # Modify the global config, setting the timeout for
730
+ # # delete_posix_account to 20 seconds,
731
+ # # and all remaining timeouts to 10 seconds.
732
+ # ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.configure do |config|
733
+ # config.timeout = 10.0
734
+ # config.rpcs.delete_posix_account.timeout = 20.0
735
+ # end
736
+ #
737
+ # # Apply the above configuration only to a new client.
738
+ # client = ::Google::Cloud::OsLogin::V1beta::OsLoginService::Client.new do |config|
739
+ # config.timeout = 10.0
740
+ # config.rpcs.delete_posix_account.timeout = 20.0
741
+ # end
653
742
  #
654
743
  # @!attribute [rw] endpoint
655
744
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module OsLogin
23
23
  module V1beta
24
- VERSION = "0.4.1"
24
+ VERSION = "0.4.5"
25
25
  end
26
26
  end
27
27
  end
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/oslogin/common/common.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/oslogin/common/common.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.oslogin.common.PosixAccount" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/oslogin/v1beta/oslogin.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/cloud/oslogin/common/common_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/oslogin/v1beta/oslogin.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.oslogin.v1beta.LoginProfile" do
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-os_login-v1beta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []
210
- rubygems_version: 3.2.17
210
+ rubygems_version: 3.3.4
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: API Client library for the Cloud OS Login V1beta API