google-cloud-profiler-v2 0.3.0 → 0.10.1

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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/README.md +5 -5
  4. data/lib/google/cloud/profiler/v2/export_service/client.rb +446 -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 +413 -0
  8. data/lib/google/cloud/profiler/v2/export_service/rest/service_stub.rb +128 -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 +79 -23
  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 +622 -0
  14. data/lib/google/cloud/profiler/v2/profiler_service/rest/service_stub.rb +249 -0
  15. data/lib/google/cloud/profiler/v2/profiler_service/rest.rb +56 -0
  16. data/lib/google/cloud/profiler/v2/profiler_service.rb +10 -4
  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 +33 -38
  21. data/lib/google/devtools/cloudprofiler/v2/profiler_services_pb.rb +39 -6
  22. data/proto_docs/google/api/client.rb +399 -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 +52 -7
  26. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  27. metadata +23 -119
@@ -0,0 +1,249 @@
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:, endpoint_template:, universe_domain:, 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,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
42
+ numeric_enums: true,
43
+ raise_faraday_errors: false
44
+ end
45
+
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
64
+ ##
65
+ # Baseline implementation for the create_profile REST call
66
+ #
67
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateProfileRequest]
68
+ # A request object representing the call parameters. Required.
69
+ # @param options [::Gapic::CallOptions]
70
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
71
+ #
72
+ # @yield [result, operation] Access the result along with the TransportOperation object
73
+ # @yieldparam result [::Google::Cloud::Profiler::V2::Profile]
74
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
75
+ #
76
+ # @return [::Google::Cloud::Profiler::V2::Profile]
77
+ # A result object deserialized from the server's reply
78
+ def create_profile request_pb, options = nil
79
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
80
+
81
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_profile_request request_pb
82
+ query_string_params = if query_string_params.any?
83
+ query_string_params.to_h { |p| p.split "=", 2 }
84
+ else
85
+ {}
86
+ end
87
+
88
+ response = @client_stub.make_http_request(
89
+ verb,
90
+ uri: uri,
91
+ body: body || "",
92
+ params: query_string_params,
93
+ options: options
94
+ )
95
+ operation = ::Gapic::Rest::TransportOperation.new response
96
+ result = ::Google::Cloud::Profiler::V2::Profile.decode_json response.body, ignore_unknown_fields: true
97
+
98
+ yield result, operation if block_given?
99
+ result
100
+ end
101
+
102
+ ##
103
+ # Baseline implementation for the create_offline_profile REST call
104
+ #
105
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateOfflineProfileRequest]
106
+ # A request object representing the call parameters. Required.
107
+ # @param options [::Gapic::CallOptions]
108
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
109
+ #
110
+ # @yield [result, operation] Access the result along with the TransportOperation object
111
+ # @yieldparam result [::Google::Cloud::Profiler::V2::Profile]
112
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
113
+ #
114
+ # @return [::Google::Cloud::Profiler::V2::Profile]
115
+ # A result object deserialized from the server's reply
116
+ def create_offline_profile request_pb, options = nil
117
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
118
+
119
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_offline_profile_request request_pb
120
+ query_string_params = if query_string_params.any?
121
+ query_string_params.to_h { |p| p.split "=", 2 }
122
+ else
123
+ {}
124
+ end
125
+
126
+ response = @client_stub.make_http_request(
127
+ verb,
128
+ uri: uri,
129
+ body: body || "",
130
+ params: query_string_params,
131
+ options: options
132
+ )
133
+ operation = ::Gapic::Rest::TransportOperation.new response
134
+ result = ::Google::Cloud::Profiler::V2::Profile.decode_json response.body, ignore_unknown_fields: true
135
+
136
+ yield result, operation if block_given?
137
+ result
138
+ end
139
+
140
+ ##
141
+ # Baseline implementation for the update_profile REST call
142
+ #
143
+ # @param request_pb [::Google::Cloud::Profiler::V2::UpdateProfileRequest]
144
+ # A request object representing the call parameters. Required.
145
+ # @param options [::Gapic::CallOptions]
146
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
147
+ #
148
+ # @yield [result, operation] Access the result along with the TransportOperation object
149
+ # @yieldparam result [::Google::Cloud::Profiler::V2::Profile]
150
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
151
+ #
152
+ # @return [::Google::Cloud::Profiler::V2::Profile]
153
+ # A result object deserialized from the server's reply
154
+ def update_profile request_pb, options = nil
155
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
156
+
157
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_profile_request request_pb
158
+ query_string_params = if query_string_params.any?
159
+ query_string_params.to_h { |p| p.split "=", 2 }
160
+ else
161
+ {}
162
+ end
163
+
164
+ response = @client_stub.make_http_request(
165
+ verb,
166
+ uri: uri,
167
+ body: body || "",
168
+ params: query_string_params,
169
+ options: options
170
+ )
171
+ operation = ::Gapic::Rest::TransportOperation.new response
172
+ result = ::Google::Cloud::Profiler::V2::Profile.decode_json response.body, ignore_unknown_fields: true
173
+
174
+ yield result, operation if block_given?
175
+ result
176
+ end
177
+
178
+ ##
179
+ # @private
180
+ #
181
+ # GRPC transcoding helper method for the create_profile REST call
182
+ #
183
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateProfileRequest]
184
+ # A request object representing the call parameters. Required.
185
+ # @return [Array(String, [String, nil], Hash{String => String})]
186
+ # Uri, Body, Query string parameters
187
+ def self.transcode_create_profile_request request_pb
188
+ transcoder = Gapic::Rest::GrpcTranscoder.new
189
+ .with_bindings(
190
+ uri_method: :post,
191
+ uri_template: "/v2/{parent}/profiles",
192
+ body: "*",
193
+ matches: [
194
+ ["parent", %r{^projects/[^/]+/?$}, false]
195
+ ]
196
+ )
197
+ transcoder.transcode request_pb
198
+ end
199
+
200
+ ##
201
+ # @private
202
+ #
203
+ # GRPC transcoding helper method for the create_offline_profile REST call
204
+ #
205
+ # @param request_pb [::Google::Cloud::Profiler::V2::CreateOfflineProfileRequest]
206
+ # A request object representing the call parameters. Required.
207
+ # @return [Array(String, [String, nil], Hash{String => String})]
208
+ # Uri, Body, Query string parameters
209
+ def self.transcode_create_offline_profile_request request_pb
210
+ transcoder = Gapic::Rest::GrpcTranscoder.new
211
+ .with_bindings(
212
+ uri_method: :post,
213
+ uri_template: "/v2/{parent}/profiles:createOffline",
214
+ body: "profile",
215
+ matches: [
216
+ ["parent", %r{^projects/[^/]+/?$}, false]
217
+ ]
218
+ )
219
+ transcoder.transcode request_pb
220
+ end
221
+
222
+ ##
223
+ # @private
224
+ #
225
+ # GRPC transcoding helper method for the update_profile REST call
226
+ #
227
+ # @param request_pb [::Google::Cloud::Profiler::V2::UpdateProfileRequest]
228
+ # A request object representing the call parameters. Required.
229
+ # @return [Array(String, [String, nil], Hash{String => String})]
230
+ # Uri, Body, Query string parameters
231
+ def self.transcode_update_profile_request request_pb
232
+ transcoder = Gapic::Rest::GrpcTranscoder.new
233
+ .with_bindings(
234
+ uri_method: :patch,
235
+ uri_template: "/v2/{profile.name}",
236
+ body: "profile",
237
+ matches: [
238
+ ["profile.name", %r{^projects/[^/]+/profiles/[^/]+/?$}, false]
239
+ ]
240
+ )
241
+ transcoder.transcode request_pb
242
+ end
243
+ end
244
+ end
245
+ end
246
+ end
247
+ end
248
+ end
249
+ end
@@ -0,0 +1,56 @@
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
+ # __The APIs listed in this service are intended for use within our profiler
38
+ # agents only.__
39
+ #
40
+ # To load this service and instantiate a REST client:
41
+ #
42
+ # require "google/cloud/profiler/v2/profiler_service/rest"
43
+ # client = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::Client.new
44
+ #
45
+ module ProfilerService
46
+ # Client for the REST transport
47
+ module Rest
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
56
+ 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
@@ -33,15 +35,19 @@ module Google
33
35
  # Manage the collection of continuous profiling data provided by profiling
34
36
  # agents running in the cloud or by an offline provider of profiling data.
35
37
  #
36
- # General guidelines:
37
- # * Profiles for a single deployment must be created in ascending time order.
38
- # * Profiles can be created in either online or offline mode, see below.
38
+ # __The APIs listed in this service are intended for use within our profiler
39
+ # agents only.__
39
40
  #
40
- # To load this service and instantiate a client:
41
+ # @example Load this service and instantiate a gRPC client
41
42
  #
42
43
  # require "google/cloud/profiler/v2/profiler_service"
43
44
  # client = ::Google::Cloud::Profiler::V2::ProfilerService::Client.new
44
45
  #
46
+ # @example Load this service and instantiate a REST client
47
+ #
48
+ # require "google/cloud/profiler/v2/profiler_service/rest"
49
+ # client = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::Client.new
50
+ #
45
51
  module ProfilerService
46
52
  end
47
53
  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.10.1"
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,45 @@
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'
13
+ require 'google/protobuf/timestamp_pb'
10
14
 
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
15
+
16
+ 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\x1a\x1fgoogle/protobuf/timestamp.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\"\xee\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\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\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\xda\x41\x0eparent,profile\x82\xd3\xe4\x93\x02\x39\"./v2/{parent=projects/*}/profiles:createOffline:\x07profile\x12\xc3\x01\n\rUpdateProfile\x12\x36.google.devtools.cloudprofiler.v2.UpdateProfileRequest\x1a).google.devtools.cloudprofiler.v2.Profile\"O\xda\x41\x13profile,update_mask\x82\xd3\xe4\x93\x02\x33\x32(/v2/{profile.name=projects/*/profiles/*}:\x07profile\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\xf2\x02\n\rExportService\x12\xb0\x01\n\x0cListProfiles\x12\x35.google.devtools.cloudprofiler.v2.ListProfilesRequest\x1a\x36.google.devtools.cloudprofiler.v2.ListProfilesResponse\"1\xda\x41\x06parent\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"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
32
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
33
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
48
39
  end
49
40
  end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
50
43
  end
51
44
 
52
45
  module Google
@@ -58,6 +51,8 @@ module Google
58
51
  UpdateProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.UpdateProfileRequest").msgclass
59
52
  Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.Profile").msgclass
60
53
  Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.Deployment").msgclass
54
+ ListProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.ListProfilesRequest").msgclass
55
+ ListProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.ListProfilesResponse").msgclass
61
56
  ProfileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudprofiler.v2.ProfileType").enummodule
62
57
  end
63
58
  end
@@ -27,9 +27,8 @@ module Google
27
27
  # Manage the collection of continuous profiling data provided by profiling
28
28
  # agents running in the cloud or by an offline provider of profiling data.
29
29
  #
30
- # General guidelines:
31
- # * Profiles for a single deployment must be created in ascending time order.
32
- # * Profiles can be created in either online or offline mode, see below.
30
+ # __The APIs listed in this service are intended for use within our profiler
31
+ # agents only.__
33
32
  class Service
34
33
 
35
34
  include ::GRPC::GenericService
@@ -40,6 +39,11 @@ module Google
40
39
 
41
40
  # CreateProfile creates a new profile resource in the online mode.
42
41
  #
42
+ # _Direct use of this API is discouraged, please use a [supported
43
+ # profiler
44
+ # agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
45
+ # instead for profile collection._
46
+ #
43
47
  # The server ensures that the new profiles are created at a constant rate per
44
48
  # deployment, so the creation request may hang for some time until the next
45
49
  # profile session is available.
@@ -51,18 +55,47 @@ module Google
51
55
  # status. To a gRPC client, the extension will be return as a
52
56
  # binary-serialized proto in the trailing metadata item named
53
57
  # "google.rpc.retryinfo-bin".
58
+ #
54
59
  rpc :CreateProfile, ::Google::Cloud::Profiler::V2::CreateProfileRequest, ::Google::Cloud::Profiler::V2::Profile
55
- # CreateOfflineProfile creates a new profile resource in the offline mode.
56
- # The client provides the profile to create along with the profile bytes, the
57
- # server records it.
60
+ # CreateOfflineProfile creates a new profile resource in the offline
61
+ # mode. The client provides the profile to create along with the profile
62
+ # bytes, the server records it.
63
+ #
64
+ # _Direct use of this API is discouraged, please use a [supported
65
+ # profiler
66
+ # agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
67
+ # instead for profile collection._
58
68
  rpc :CreateOfflineProfile, ::Google::Cloud::Profiler::V2::CreateOfflineProfileRequest, ::Google::Cloud::Profiler::V2::Profile
59
69
  # UpdateProfile updates the profile bytes and labels on the profile resource
60
70
  # created in the online mode. Updating the bytes for profiles created in the
61
71
  # offline mode is currently not supported: the profile content must be
62
72
  # provided at the time of the profile creation.
73
+ #
74
+ # _Direct use of this API is discouraged, please use a [supported
75
+ # profiler
76
+ # agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
77
+ # instead for profile collection._
63
78
  rpc :UpdateProfile, ::Google::Cloud::Profiler::V2::UpdateProfileRequest, ::Google::Cloud::Profiler::V2::Profile
64
79
  end
65
80
 
81
+ Stub = Service.rpc_stub_class
82
+ end
83
+ module ExportService
84
+ # Service allows existing Cloud Profiler customers to export their profile data
85
+ # out of Google Cloud.
86
+ class Service
87
+
88
+ include ::GRPC::GenericService
89
+
90
+ self.marshal_class_method = :encode
91
+ self.unmarshal_class_method = :decode
92
+ self.service_name = 'google.devtools.cloudprofiler.v2.ExportService'
93
+
94
+ # Lists profiles which have been collected so far and for which the caller
95
+ # has permission to view.
96
+ rpc :ListProfiles, ::Google::Cloud::Profiler::V2::ListProfilesRequest, ::Google::Cloud::Profiler::V2::ListProfilesResponse
97
+ end
98
+
66
99
  Stub = Service.rpc_stub_class
67
100
  end
68
101
  end