google-cloud-profiler-v2 0.3.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/cloud/profiler/v2/export_service/client.rb +419 -0
  5. data/lib/google/cloud/profiler/v2/export_service/credentials.rb +53 -0
  6. data/lib/google/cloud/profiler/v2/export_service/paths.rb +47 -0
  7. data/lib/google/cloud/profiler/v2/export_service/rest/client.rb +383 -0
  8. data/lib/google/cloud/profiler/v2/export_service/rest/service_stub.rb +107 -0
  9. data/lib/google/cloud/profiler/v2/export_service/rest.rb +53 -0
  10. data/lib/google/cloud/profiler/v2/export_service.rb +56 -0
  11. data/lib/google/cloud/profiler/v2/profiler_service/client.rb +21 -8
  12. data/lib/google/cloud/profiler/v2/profiler_service/paths.rb +64 -0
  13. data/lib/google/cloud/profiler/v2/profiler_service/rest/client.rb +576 -0
  14. data/lib/google/cloud/profiler/v2/profiler_service/rest/service_stub.rb +228 -0
  15. data/lib/google/cloud/profiler/v2/profiler_service/rest.rb +57 -0
  16. data/lib/google/cloud/profiler/v2/profiler_service.rb +8 -1
  17. data/lib/google/cloud/profiler/v2/rest.rb +38 -0
  18. data/lib/google/cloud/profiler/v2/version.rb +1 -1
  19. data/lib/google/cloud/profiler/v2.rb +8 -2
  20. data/lib/google/devtools/cloudprofiler/v2/profiler_pb.rb +31 -38
  21. data/lib/google/devtools/cloudprofiler/v2/profiler_services_pb.rb +19 -0
  22. data/proto_docs/google/api/client.rb +394 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/devtools/cloudprofiler/v2/profiler.rb +48 -7
  26. metadata +23 -8
@@ -0,0 +1,228 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/devtools/cloudprofiler/v2/profiler_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Profiler
24
+ module V2
25
+ module ProfilerService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the ProfilerService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the create_profile REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateProfileRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Profiler::V2::Profile]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Profiler::V2::Profile]
56
+ # A result object deserialized from the server's reply
57
+ def create_profile request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_profile_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Profiler::V2::Profile.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the create_offline_profile REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateOfflineProfileRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Cloud::Profiler::V2::Profile]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::Profiler::V2::Profile]
94
+ # A result object deserialized from the server's reply
95
+ def create_offline_profile request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_offline_profile_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Cloud::Profiler::V2::Profile.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the update_profile REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::Profiler::V2::UpdateProfileRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::Profiler::V2::Profile]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::Profiler::V2::Profile]
132
+ # A result object deserialized from the server's reply
133
+ def update_profile request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_profile_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::Profiler::V2::Profile.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # @private
159
+ #
160
+ # GRPC transcoding helper method for the create_profile REST call
161
+ #
162
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateProfileRequest]
163
+ # A request object representing the call parameters. Required.
164
+ # @return [Array(String, [String, nil], Hash{String => String})]
165
+ # Uri, Body, Query string parameters
166
+ def self.transcode_create_profile_request request_pb
167
+ transcoder = Gapic::Rest::GrpcTranscoder.new
168
+ .with_bindings(
169
+ uri_method: :post,
170
+ uri_template: "/v2/{parent}/profiles",
171
+ body: "*",
172
+ matches: [
173
+ ["parent", %r{^projects/[^/]+/?$}, false]
174
+ ]
175
+ )
176
+ transcoder.transcode request_pb
177
+ end
178
+
179
+ ##
180
+ # @private
181
+ #
182
+ # GRPC transcoding helper method for the create_offline_profile REST call
183
+ #
184
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateOfflineProfileRequest]
185
+ # A request object representing the call parameters. Required.
186
+ # @return [Array(String, [String, nil], Hash{String => String})]
187
+ # Uri, Body, Query string parameters
188
+ def self.transcode_create_offline_profile_request request_pb
189
+ transcoder = Gapic::Rest::GrpcTranscoder.new
190
+ .with_bindings(
191
+ uri_method: :post,
192
+ uri_template: "/v2/{parent}/profiles:createOffline",
193
+ body: "profile",
194
+ matches: [
195
+ ["parent", %r{^projects/[^/]+/?$}, false]
196
+ ]
197
+ )
198
+ transcoder.transcode request_pb
199
+ end
200
+
201
+ ##
202
+ # @private
203
+ #
204
+ # GRPC transcoding helper method for the update_profile REST call
205
+ #
206
+ # @param request_pb [::Google::Cloud::Profiler::V2::UpdateProfileRequest]
207
+ # A request object representing the call parameters. Required.
208
+ # @return [Array(String, [String, nil], Hash{String => String})]
209
+ # Uri, Body, Query string parameters
210
+ def self.transcode_update_profile_request request_pb
211
+ transcoder = Gapic::Rest::GrpcTranscoder.new
212
+ .with_bindings(
213
+ uri_method: :patch,
214
+ uri_template: "/v2/{profile.name}",
215
+ body: "profile",
216
+ matches: [
217
+ ["profile.name", %r{^projects/[^/]+/profiles/[^/]+/?$}, false]
218
+ ]
219
+ )
220
+ transcoder.transcode request_pb
221
+ end
222
+ end
223
+ end
224
+ end
225
+ end
226
+ end
227
+ end
228
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/profiler/v2/version"
24
+
25
+ require "google/cloud/profiler/v2/profiler_service/credentials"
26
+ require "google/cloud/profiler/v2/profiler_service/paths"
27
+ require "google/cloud/profiler/v2/profiler_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Profiler
32
+ module V2
33
+ ##
34
+ # Manage the collection of continuous profiling data provided by profiling
35
+ # agents running in the cloud or by an offline provider of profiling data.
36
+ #
37
+ # General guidelines:
38
+ # * Profiles for a single deployment must be created in ascending time order.
39
+ # * Profiles can be created in either online or offline mode, see below.
40
+ #
41
+ # To load this service and instantiate a REST client:
42
+ #
43
+ # require "google/cloud/profiler/v2/profiler_service/rest"
44
+ # client = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::Client.new
45
+ #
46
+ module ProfilerService
47
+ # Client for the REST transport
48
+ module Rest
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
57
+ require "google/cloud/profiler/v2/profiler_service/rest/helpers" if ::File.file? helper_path
@@ -23,7 +23,9 @@ require "gapic/config/method"
23
23
  require "google/cloud/profiler/v2/version"
24
24
 
25
25
  require "google/cloud/profiler/v2/profiler_service/credentials"
26
+ require "google/cloud/profiler/v2/profiler_service/paths"
26
27
  require "google/cloud/profiler/v2/profiler_service/client"
28
+ require "google/cloud/profiler/v2/profiler_service/rest"
27
29
 
28
30
  module Google
29
31
  module Cloud
@@ -37,11 +39,16 @@ module Google
37
39
  # * Profiles for a single deployment must be created in ascending time order.
38
40
  # * Profiles can be created in either online or offline mode, see below.
39
41
  #
40
- # To load this service and instantiate a client:
42
+ # @example Load this service and instantiate a gRPC client
41
43
  #
42
44
  # require "google/cloud/profiler/v2/profiler_service"
43
45
  # client = ::Google::Cloud::Profiler::V2::ProfilerService::Client.new
44
46
  #
47
+ # @example Load this service and instantiate a REST client
48
+ #
49
+ # require "google/cloud/profiler/v2/profiler_service/rest"
50
+ # client = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::Client.new
51
+ #
45
52
  module ProfilerService
46
53
  end
47
54
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/profiler/v2/profiler_service/rest"
20
+ require "google/cloud/profiler/v2/export_service/rest"
21
+ require "google/cloud/profiler/v2/version"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Profiler
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/profiler/v2/rest"
32
+ # client = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::Client.new
33
+ #
34
+ module V2
35
+ end
36
+ end
37
+ end
38
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Profiler
23
23
  module V2
24
- VERSION = "0.3.0"
24
+ VERSION = "0.8.0"
25
25
  end
26
26
  end
27
27
  end
@@ -17,19 +17,25 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/profiler/v2/profiler_service"
20
+ require "google/cloud/profiler/v2/export_service"
20
21
  require "google/cloud/profiler/v2/version"
21
22
 
22
23
  module Google
23
24
  module Cloud
24
25
  module Profiler
25
26
  ##
26
- # To load this package, including all its services, and instantiate a client:
27
+ # API client module.
27
28
  #
28
- # @example
29
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
30
  #
30
31
  # require "google/cloud/profiler/v2"
31
32
  # client = ::Google::Cloud::Profiler::V2::ProfilerService::Client.new
32
33
  #
34
+ # @example Load this package, including all its services, and instantiate a REST client
35
+ #
36
+ # require "google/cloud/profiler/v2"
37
+ # client = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::Client.new
38
+ #
33
39
  module V2
34
40
  end
35
41
  end
@@ -1,52 +1,43 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/devtools/cloudprofiler/v2/profiler.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
7
11
  require 'google/protobuf/duration_pb'
8
12
  require 'google/protobuf/field_mask_pb'
9
- require 'google/api/client_pb'
10
13
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/devtools/cloudprofiler/v2/profiler.proto", :syntax => :proto3) do
13
- add_message "google.devtools.cloudprofiler.v2.CreateProfileRequest" do
14
- optional :parent, :string, 4
15
- optional :deployment, :message, 1, "google.devtools.cloudprofiler.v2.Deployment"
16
- repeated :profile_type, :enum, 2, "google.devtools.cloudprofiler.v2.ProfileType"
17
- end
18
- add_message "google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest" do
19
- optional :parent, :string, 1
20
- optional :profile, :message, 2, "google.devtools.cloudprofiler.v2.Profile"
21
- end
22
- add_message "google.devtools.cloudprofiler.v2.UpdateProfileRequest" do
23
- optional :profile, :message, 1, "google.devtools.cloudprofiler.v2.Profile"
24
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
25
- end
26
- add_message "google.devtools.cloudprofiler.v2.Profile" do
27
- optional :name, :string, 1
28
- optional :profile_type, :enum, 2, "google.devtools.cloudprofiler.v2.ProfileType"
29
- optional :deployment, :message, 3, "google.devtools.cloudprofiler.v2.Deployment"
30
- optional :duration, :message, 4, "google.protobuf.Duration"
31
- optional :profile_bytes, :bytes, 5
32
- map :labels, :string, :string, 6
33
- end
34
- add_message "google.devtools.cloudprofiler.v2.Deployment" do
35
- optional :project_id, :string, 1
36
- optional :target, :string, 2
37
- map :labels, :string, :string, 3
38
- end
39
- add_enum "google.devtools.cloudprofiler.v2.ProfileType" do
40
- value :PROFILE_TYPE_UNSPECIFIED, 0
41
- value :CPU, 1
42
- value :WALL, 2
43
- value :HEAP, 3
44
- value :THREADS, 4
45
- value :CONTENTION, 5
46
- value :PEAK_HEAP, 6
47
- value :HEAP_ALLOC, 7
14
+
15
+ descriptor_data = "\n/google/devtools/cloudprofiler/v2/profiler.proto\x12 google.devtools.cloudprofiler.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\"\xdf\x01\n\x14\x43reateProfileRequest\x12@\n\x06parent\x18\x04 \x01(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12@\n\ndeployment\x18\x01 \x01(\x0b\x32,.google.devtools.cloudprofiler.v2.Deployment\x12\x43\n\x0cprofile_type\x18\x02 \x03(\x0e\x32-.google.devtools.cloudprofiler.v2.ProfileType\"\x9b\x01\n\x1b\x43reateOfflineProfileRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x07profile\x18\x02 \x01(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\"\x83\x01\n\x14UpdateProfileRequest\x12:\n\x07profile\x18\x01 \x01(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb9\x03\n\x07Profile\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x0cprofile_type\x18\x02 \x01(\x0e\x32-.google.devtools.cloudprofiler.v2.ProfileType\x12@\n\ndeployment\x18\x03 \x01(\x0b\x32,.google.devtools.cloudprofiler.v2.Deployment\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rprofile_bytes\x18\x05 \x01(\x0c\x42\x03\xe0\x41\x04\x12J\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.devtools.cloudprofiler.v2.Profile.LabelsEntryB\x03\xe0\x41\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:P\xea\x41M\n$cloudprofiler.googleapis.com/Profile\x12%projects/{project}/profiles/{profile}\"\xa9\x01\n\nDeployment\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x0e\n\x06target\x18\x02 \x01(\t\x12H\n\x06labels\x18\x03 \x03(\x0b\x32\x38.google.devtools.cloudprofiler.v2.Deployment.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x01\n\x13ListProfilesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x86\x01\n\x14ListProfilesResponse\x12;\n\x08profiles\x18\x01 \x03(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x10skipped_profiles\x18\x03 \x01(\x05*\x84\x01\n\x0bProfileType\x12\x1c\n\x18PROFILE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x43PU\x10\x01\x12\x08\n\x04WALL\x10\x02\x12\x08\n\x04HEAP\x10\x03\x12\x0b\n\x07THREADS\x10\x04\x12\x0e\n\nCONTENTION\x10\x05\x12\r\n\tPEAK_HEAP\x10\x06\x12\x0e\n\nHEAP_ALLOC\x10\x07\x32\xfe\x05\n\x0fProfilerService\x12\x9f\x01\n\rCreateProfile\x12\x36.google.devtools.cloudprofiler.v2.CreateProfileRequest\x1a).google.devtools.cloudprofiler.v2.Profile\"+\x82\xd3\xe4\x93\x02%\" /v2/{parent=projects/*}/profiles:\x01*\x12\xd2\x01\n\x14\x43reateOfflineProfile\x12=.google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest\x1a).google.devtools.cloudprofiler.v2.Profile\"P\x82\xd3\xe4\x93\x02\x39\"./v2/{parent=projects/*}/profiles:createOffline:\x07profile\xda\x41\x0eparent,profile\x12\xc3\x01\n\rUpdateProfile\x12\x36.google.devtools.cloudprofiler.v2.UpdateProfileRequest\x1a).google.devtools.cloudprofiler.v2.Profile\"O\x82\xd3\xe4\x93\x02\x33\x32(/v2/{profile.name=projects/*/profiles/*}:\x07profile\xda\x41\x13profile,update_mask\x1a\xad\x01\xca\x41\x1c\x63loudprofiler.googleapis.com\xd2\x41\x8a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.write2\xe9\x02\n\rExportService\x12\xa7\x01\n\x0cListProfiles\x12\x35.google.devtools.cloudprofiler.v2.ListProfilesRequest\x1a\x36.google.devtools.cloudprofiler.v2.ListProfilesResponse\"(\x82\xd3\xe4\x93\x02\"\x12 /v2/{parent=projects/*}/profiles\x1a\xad\x01\xca\x41\x1c\x63loudprofiler.googleapis.com\xd2\x41\x8a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.writeB\xd4\x01\n$com.google.devtools.cloudprofiler.v2B\rProfilerProtoP\x01ZGcloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb;cloudprofilerpb\xaa\x02\x18Google.Cloud.Profiler.V2\xca\x02\x18Google\\Cloud\\Profiler\\V2\xea\x02\x1bGoogle::Cloud::Profiler::V2b\x06proto3"
16
+
17
+ pool = Google::Protobuf::DescriptorPool.generated_pool
18
+
19
+ begin
20
+ pool.add_serialized_file(descriptor_data)
21
+ rescue TypeError => e
22
+ # Compatibility code: will be removed in the next major version.
23
+ require 'google/protobuf/descriptor_pb'
24
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
25
+ parsed.clear_dependency
26
+ serialized = parsed.class.encode(parsed)
27
+ file = pool.add_serialized_file(serialized)
28
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
29
+ imports = [
30
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
31
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
32
+ ]
33
+ imports.each do |type_name, expected_filename|
34
+ import_file = pool.lookup(type_name).file_descriptor
35
+ if import_file.name != expected_filename
36
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
48
37
  end
49
38
  end
39
+ warn "Each proto file must use a consistent fully-qualified name."
40
+ warn "This will become an error in the next major version."
50
41
  end
51
42
 
52
43
  module Google
@@ -58,6 +49,8 @@ module Google
58
49
  UpdateProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.UpdateProfileRequest").msgclass
59
50
  Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.Profile").msgclass
60
51
  Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.Deployment").msgclass
52
+ ListProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.ListProfilesRequest").msgclass
53
+ ListProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.ListProfilesResponse").msgclass
61
54
  ProfileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.ProfileType").enummodule
62
55
  end
63
56
  end
@@ -51,6 +51,7 @@ module Google
51
51
  # status. To a gRPC client, the extension will be return as a
52
52
  # binary-serialized proto in the trailing metadata item named
53
53
  # "google.rpc.retryinfo-bin".
54
+ #
54
55
  rpc :CreateProfile, ::Google::Cloud::Profiler::V2::CreateProfileRequest, ::Google::Cloud::Profiler::V2::Profile
55
56
  # CreateOfflineProfile creates a new profile resource in the offline mode.
56
57
  # The client provides the profile to create along with the profile bytes, the
@@ -63,6 +64,24 @@ module Google
63
64
  rpc :UpdateProfile, ::Google::Cloud::Profiler::V2::UpdateProfileRequest, ::Google::Cloud::Profiler::V2::Profile
64
65
  end
65
66
 
67
+ Stub = Service.rpc_stub_class
68
+ end
69
+ module ExportService
70
+ # Service allows existing Cloud Profiler customers to export their profile data
71
+ # out of Google Cloud.
72
+ class Service
73
+
74
+ include ::GRPC::GenericService
75
+
76
+ self.marshal_class_method = :encode
77
+ self.unmarshal_class_method = :decode
78
+ self.service_name = 'google.devtools.cloudprofiler.v2.ExportService'
79
+
80
+ # Lists profiles which have been collected so far and for which the caller
81
+ # has permission to view.
82
+ rpc :ListProfiles, ::Google::Cloud::Profiler::V2::ListProfilesRequest, ::Google::Cloud::Profiler::V2::ListProfilesResponse
83
+ end
84
+
66
85
  Stub = Service.rpc_stub_class
67
86
  end
68
87
  end