google-cloud-profiler-v2 0.2.3 → 0.2.4

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: ea45203b1120ad2a7bd6d6232cb77f7abfb4940a4edb341309532e9a19a224f3
4
- data.tar.gz: 7dd18f1469fcda15edcfe6cb591d0e8875e6b971471a99931669d8b46902c1e0
3
+ metadata.gz: bb2ad911ae1c5a74aadb4a0c7cb401ad67201f588d82a912151d135d5dc684c9
4
+ data.tar.gz: 51624476eb148b86c06fa97b7ba52ea57b35ad5f5ec98e7f23d6fb08f4e89fb0
5
5
  SHA512:
6
- metadata.gz: 3874d4dc7f9703506746b64dd5c0415fa944618755fbb31b1ecb29884b5c12f665dfced39f46d815387ff3e14615371d12f64be9d669dde0e372aa38e4792638
7
- data.tar.gz: 88ae98c022be79b60a468decb15e90a861c021bf29e8649fbf929dcb9b686cb2f4cbcb8b5af14e1b2abe1fe4bb9d3d68119f82e98b54c1b893b86824566ff69e
6
+ metadata.gz: 0c5b403a13e55c3587bf87b744fb42bc3bfd225bb7207964137707ce468831dda1b6517bd7538639189ab63a9cd1435f7ed387602af845e63001de63178fbb52
7
+ data.tar.gz: fa44484a64a9069c7e2016b97e20861d863f33091fff5f80bfa050dd19da572b9e22f7fcbf9f1d25b20b59a874dbb831146b3940302126ba6e13ad76d5f40272
@@ -203,6 +203,21 @@ module Google
203
203
  #
204
204
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
205
205
  #
206
+ # @example Basic example
207
+ # require "google/cloud/profiler/v2"
208
+ #
209
+ # # Create a client object. The client can be reused for multiple calls.
210
+ # client = Google::Cloud::Profiler::V2::ProfilerService::Client.new
211
+ #
212
+ # # Create a request. To set request fields, pass in keyword arguments.
213
+ # request = Google::Cloud::Profiler::V2::CreateProfileRequest.new
214
+ #
215
+ # # Call the create_profile method.
216
+ # result = client.create_profile request
217
+ #
218
+ # # The returned object is of type Google::Cloud::Profiler::V2::Profile.
219
+ # p result
220
+ #
206
221
  def create_profile request, options = nil
207
222
  raise ::ArgumentError, "request must be provided" if request.nil?
208
223
 
@@ -220,9 +235,11 @@ module Google
220
235
  gapic_version: ::Google::Cloud::Profiler::V2::VERSION
221
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
222
237
 
223
- header_params = {
224
- "parent" => request.parent
225
- }
238
+ header_params = {}
239
+ if request.parent
240
+ header_params["parent"] = request.parent
241
+ end
242
+
226
243
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
227
244
  metadata[:"x-goog-request-params"] ||= request_params_header
228
245
 
@@ -275,6 +292,21 @@ module Google
275
292
  #
276
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
277
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/profiler/v2"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Profiler::V2::ProfilerService::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Profiler::V2::CreateOfflineProfileRequest.new
303
+ #
304
+ # # Call the create_offline_profile method.
305
+ # result = client.create_offline_profile request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Profiler::V2::Profile.
308
+ # p result
309
+ #
278
310
  def create_offline_profile request, options = nil
279
311
  raise ::ArgumentError, "request must be provided" if request.nil?
280
312
 
@@ -292,9 +324,11 @@ module Google
292
324
  gapic_version: ::Google::Cloud::Profiler::V2::VERSION
293
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
294
326
 
295
- header_params = {
296
- "parent" => request.parent
297
- }
327
+ header_params = {}
328
+ if request.parent
329
+ header_params["parent"] = request.parent
330
+ end
331
+
298
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
299
333
  metadata[:"x-goog-request-params"] ||= request_params_header
300
334
 
@@ -351,6 +385,21 @@ module Google
351
385
  #
352
386
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
353
387
  #
388
+ # @example Basic example
389
+ # require "google/cloud/profiler/v2"
390
+ #
391
+ # # Create a client object. The client can be reused for multiple calls.
392
+ # client = Google::Cloud::Profiler::V2::ProfilerService::Client.new
393
+ #
394
+ # # Create a request. To set request fields, pass in keyword arguments.
395
+ # request = Google::Cloud::Profiler::V2::UpdateProfileRequest.new
396
+ #
397
+ # # Call the update_profile method.
398
+ # result = client.update_profile request
399
+ #
400
+ # # The returned object is of type Google::Cloud::Profiler::V2::Profile.
401
+ # p result
402
+ #
354
403
  def update_profile request, options = nil
355
404
  raise ::ArgumentError, "request must be provided" if request.nil?
356
405
 
@@ -368,9 +417,11 @@ module Google
368
417
  gapic_version: ::Google::Cloud::Profiler::V2::VERSION
369
418
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
370
419
 
371
- header_params = {
372
- "profile.name" => request.profile.name
373
- }
420
+ header_params = {}
421
+ if request.profile&.name
422
+ header_params["profile.name"] = request.profile.name
423
+ end
424
+
374
425
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
375
426
  metadata[:"x-goog-request-params"] ||= request_params_header
376
427
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Profiler
23
23
  module V2
24
- VERSION = "0.2.3"
24
+ VERSION = "0.2.4"
25
25
  end
26
26
  end
27
27
  end
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/cloudprofiler/v2/profiler.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/protobuf/duration_pb'
8
6
  require 'google/protobuf/field_mask_pb'
9
7
  require 'google/api/client_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/devtools/cloudprofiler/v2/profiler.proto", :syntax => :proto3) do
12
12
  add_message "google.devtools.cloudprofiler.v2.CreateProfileRequest" do
@@ -32,7 +32,7 @@ module Google
32
32
  # * Profiles can be created in either online or offline mode, see below.
33
33
  class Service
34
34
 
35
- include GRPC::GenericService
35
+ include ::GRPC::GenericService
36
36
 
37
37
  self.marshal_class_method = :encode
38
38
  self.unmarshal_class_method = :decode
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-profiler-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
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-08-11 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common