google-cloud-debugger-v2 0.1.0

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 (31) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-debugger-v2.rb +21 -0
  7. data/lib/google/cloud/debugger/v2.rb +36 -0
  8. data/lib/google/cloud/debugger/v2/controller.rb +67 -0
  9. data/lib/google/cloud/debugger/v2/controller/client.rb +591 -0
  10. data/lib/google/cloud/debugger/v2/controller/credentials.rb +52 -0
  11. data/lib/google/cloud/debugger/v2/debugger.rb +59 -0
  12. data/lib/google/cloud/debugger/v2/debugger/client.rb +742 -0
  13. data/lib/google/cloud/debugger/v2/debugger/credentials.rb +52 -0
  14. data/lib/google/cloud/debugger/v2/version.rb +28 -0
  15. data/lib/google/devtools/clouddebugger/v2/controller_pb.rb +51 -0
  16. data/lib/google/devtools/clouddebugger/v2/controller_services_pb.rb +97 -0
  17. data/lib/google/devtools/clouddebugger/v2/data_pb.rb +109 -0
  18. data/lib/google/devtools/clouddebugger/v2/debugger_pb.rb +78 -0
  19. data/lib/google/devtools/clouddebugger/v2/debugger_services_pb.rb +65 -0
  20. data/lib/google/devtools/source/v1/source_context_pb.rb +91 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/field_behavior.rb +59 -0
  23. data/proto_docs/google/api/resource.rb +247 -0
  24. data/proto_docs/google/devtools/clouddebugger/v2/controller.rb +113 -0
  25. data/proto_docs/google/devtools/clouddebugger/v2/data.rb +486 -0
  26. data/proto_docs/google/devtools/clouddebugger/v2/debugger.rb +185 -0
  27. data/proto_docs/google/devtools/source/v1/source_context.rb +205 -0
  28. data/proto_docs/google/protobuf/empty.rb +36 -0
  29. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  30. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  31. metadata +218 -0
@@ -0,0 +1,486 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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
+
20
+ module Google
21
+ module Cloud
22
+ module Debugger
23
+ module V2
24
+ # Represents a message with parameters.
25
+ # @!attribute [rw] format
26
+ # @return [::String]
27
+ # Format template for the message. The `format` uses placeholders `$0`,
28
+ # `$1`, etc. to reference parameters. `$$` can be used to denote the `$`
29
+ # character.
30
+ #
31
+ # Examples:
32
+ #
33
+ # * `Failed to load '$0' which helps debug $1 the first time it
34
+ # is loaded. Again, $0 is very important.`
35
+ # * `Please pay $$10 to use $0 instead of $1.`
36
+ # @!attribute [rw] parameters
37
+ # @return [::Array<::String>]
38
+ # Optional parameters to be embedded into the message.
39
+ class FormatMessage
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
+ end
43
+
44
+ # Represents a contextual status message.
45
+ # The message can indicate an error or informational status, and refer to
46
+ # specific parts of the containing object.
47
+ # For example, the `Breakpoint.status` field can indicate an error referring
48
+ # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.
49
+ # @!attribute [rw] is_error
50
+ # @return [::Boolean]
51
+ # Distinguishes errors from informational messages.
52
+ # @!attribute [rw] refers_to
53
+ # @return [::Google::Cloud::Debugger::V2::StatusMessage::Reference]
54
+ # Reference to which the message applies.
55
+ # @!attribute [rw] description
56
+ # @return [::Google::Cloud::Debugger::V2::FormatMessage]
57
+ # Status message text.
58
+ class StatusMessage
59
+ include ::Google::Protobuf::MessageExts
60
+ extend ::Google::Protobuf::MessageExts::ClassMethods
61
+
62
+ # Enumerates references to which the message applies.
63
+ module Reference
64
+ # Status doesn't refer to any particular input.
65
+ UNSPECIFIED = 0
66
+
67
+ # Status applies to the breakpoint and is related to its location.
68
+ BREAKPOINT_SOURCE_LOCATION = 3
69
+
70
+ # Status applies to the breakpoint and is related to its condition.
71
+ BREAKPOINT_CONDITION = 4
72
+
73
+ # Status applies to the breakpoint and is related to its expressions.
74
+ BREAKPOINT_EXPRESSION = 7
75
+
76
+ # Status applies to the breakpoint and is related to its age.
77
+ BREAKPOINT_AGE = 8
78
+
79
+ # Status applies to the entire variable.
80
+ VARIABLE_NAME = 5
81
+
82
+ # Status applies to variable value (variable name is valid).
83
+ VARIABLE_VALUE = 6
84
+ end
85
+ end
86
+
87
+ # Represents a location in the source code.
88
+ # @!attribute [rw] path
89
+ # @return [::String]
90
+ # Path to the source file within the source context of the target binary.
91
+ # @!attribute [rw] line
92
+ # @return [::Integer]
93
+ # Line inside the file. The first line in the file has the value `1`.
94
+ # @!attribute [rw] column
95
+ # @return [::Integer]
96
+ # Column within a line. The first column in a line as the value `1`.
97
+ # Agents that do not support setting breakpoints on specific columns ignore
98
+ # this field.
99
+ class SourceLocation
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
+ end
103
+
104
+ # Represents a variable or an argument possibly of a compound object type.
105
+ # Note how the following variables are represented:
106
+ #
107
+ # 1) A simple variable:
108
+ #
109
+ # int x = 5
110
+ #
111
+ # { name: "x", value: "5", type: "int" } // Captured variable
112
+ #
113
+ # 2) A compound object:
114
+ #
115
+ # struct T {
116
+ # int m1;
117
+ # int m2;
118
+ # };
119
+ # T x = { 3, 7 };
120
+ #
121
+ # { // Captured variable
122
+ # name: "x",
123
+ # type: "T",
124
+ # members { name: "m1", value: "3", type: "int" },
125
+ # members { name: "m2", value: "7", type: "int" }
126
+ # }
127
+ #
128
+ # 3) A pointer where the pointee was captured:
129
+ #
130
+ # T x = { 3, 7 };
131
+ # T* p = &x;
132
+ #
133
+ # { // Captured variable
134
+ # name: "p",
135
+ # type: "T*",
136
+ # value: "0x00500500",
137
+ # members { name: "m1", value: "3", type: "int" },
138
+ # members { name: "m2", value: "7", type: "int" }
139
+ # }
140
+ #
141
+ # 4) A pointer where the pointee was not captured:
142
+ #
143
+ # T* p = new T;
144
+ #
145
+ # { // Captured variable
146
+ # name: "p",
147
+ # type: "T*",
148
+ # value: "0x00400400"
149
+ # status { is_error: true, description { format: "unavailable" } }
150
+ # }
151
+ #
152
+ # The status should describe the reason for the missing value,
153
+ # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`.
154
+ #
155
+ # Note that a null pointer should not have members.
156
+ #
157
+ # 5) An unnamed value:
158
+ #
159
+ # int* p = new int(7);
160
+ #
161
+ # { // Captured variable
162
+ # name: "p",
163
+ # value: "0x00500500",
164
+ # type: "int*",
165
+ # members { value: "7", type: "int" } }
166
+ #
167
+ # 6) An unnamed pointer where the pointee was not captured:
168
+ #
169
+ # int* p = new int(7);
170
+ # int** pp = &p;
171
+ #
172
+ # { // Captured variable
173
+ # name: "pp",
174
+ # value: "0x00500500",
175
+ # type: "int**",
176
+ # members {
177
+ # value: "0x00400400",
178
+ # type: "int*"
179
+ # status {
180
+ # is_error: true,
181
+ # description: { format: "unavailable" } }
182
+ # }
183
+ # }
184
+ # }
185
+ #
186
+ # To optimize computation, memory and network traffic, variables that
187
+ # repeat in the output multiple times can be stored once in a shared
188
+ # variable table and be referenced using the `var_table_index` field. The
189
+ # variables stored in the shared table are nameless and are essentially
190
+ # a partition of the complete variable. To reconstruct the complete
191
+ # variable, merge the referencing variable with the referenced variable.
192
+ #
193
+ # When using the shared variable table, the following variables:
194
+ #
195
+ # T x = { 3, 7 };
196
+ # T* p = &x;
197
+ # T& r = x;
198
+ #
199
+ # { name: "x", var_table_index: 3, type: "T" } // Captured variables
200
+ # { name: "p", value "0x00500500", type="T*", var_table_index: 3 }
201
+ # { name: "r", type="T&", var_table_index: 3 }
202
+ #
203
+ # { // Shared variable table entry #3:
204
+ # members { name: "m1", value: "3", type: "int" },
205
+ # members { name: "m2", value: "7", type: "int" }
206
+ # }
207
+ #
208
+ # Note that the pointer address is stored with the referencing variable
209
+ # and not with the referenced variable. This allows the referenced variable
210
+ # to be shared between pointers and references.
211
+ #
212
+ # The type field is optional. The debugger agent may or may not support it.
213
+ # @!attribute [rw] name
214
+ # @return [::String]
215
+ # Name of the variable, if any.
216
+ # @!attribute [rw] value
217
+ # @return [::String]
218
+ # Simple value of the variable.
219
+ # @!attribute [rw] type
220
+ # @return [::String]
221
+ # Variable type (e.g. `MyClass`). If the variable is split with
222
+ # `var_table_index`, `type` goes next to `value`. The interpretation of
223
+ # a type is agent specific. It is recommended to include the dynamic type
224
+ # rather than a static type of an object.
225
+ # @!attribute [rw] members
226
+ # @return [::Array<::Google::Cloud::Debugger::V2::Variable>]
227
+ # Members contained or pointed to by the variable.
228
+ # @!attribute [rw] var_table_index
229
+ # @return [::Google::Protobuf::Int32Value]
230
+ # Reference to a variable in the shared variable table. More than
231
+ # one variable can reference the same variable in the table. The
232
+ # `var_table_index` field is an index into `variable_table` in Breakpoint.
233
+ # @!attribute [rw] status
234
+ # @return [::Google::Cloud::Debugger::V2::StatusMessage]
235
+ # Status associated with the variable. This field will usually stay
236
+ # unset. A status of a single variable only applies to that variable or
237
+ # expression. The rest of breakpoint data still remains valid. Variables
238
+ # might be reported in error state even when breakpoint is not in final
239
+ # state.
240
+ #
241
+ # The message may refer to variable name with `refers_to` set to
242
+ # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`.
243
+ # In either case variable value and members will be unset.
244
+ #
245
+ # Example of error message applied to name: `Invalid expression syntax`.
246
+ #
247
+ # Example of information message applied to value: `Not captured`.
248
+ #
249
+ # Examples of error message applied to value:
250
+ #
251
+ # * `Malformed string`,
252
+ # * `Field f not found in class C`
253
+ # * `Null pointer dereference`
254
+ class Variable
255
+ include ::Google::Protobuf::MessageExts
256
+ extend ::Google::Protobuf::MessageExts::ClassMethods
257
+ end
258
+
259
+ # Represents a stack frame context.
260
+ # @!attribute [rw] function
261
+ # @return [::String]
262
+ # Demangled function name at the call site.
263
+ # @!attribute [rw] location
264
+ # @return [::Google::Cloud::Debugger::V2::SourceLocation]
265
+ # Source location of the call site.
266
+ # @!attribute [rw] arguments
267
+ # @return [::Array<::Google::Cloud::Debugger::V2::Variable>]
268
+ # Set of arguments passed to this function.
269
+ # Note that this might not be populated for all stack frames.
270
+ # @!attribute [rw] locals
271
+ # @return [::Array<::Google::Cloud::Debugger::V2::Variable>]
272
+ # Set of local variables at the stack frame location.
273
+ # Note that this might not be populated for all stack frames.
274
+ class StackFrame
275
+ include ::Google::Protobuf::MessageExts
276
+ extend ::Google::Protobuf::MessageExts::ClassMethods
277
+ end
278
+
279
+ # Represents the breakpoint specification, status and results.
280
+ # @!attribute [rw] id
281
+ # @return [::String]
282
+ # Breakpoint identifier, unique in the scope of the debuggee.
283
+ # @!attribute [rw] action
284
+ # @return [::Google::Cloud::Debugger::V2::Breakpoint::Action]
285
+ # Action that the agent should perform when the code at the
286
+ # breakpoint location is hit.
287
+ # @!attribute [rw] location
288
+ # @return [::Google::Cloud::Debugger::V2::SourceLocation]
289
+ # Breakpoint source location.
290
+ # @!attribute [rw] condition
291
+ # @return [::String]
292
+ # Condition that triggers the breakpoint.
293
+ # The condition is a compound boolean expression composed using expressions
294
+ # in a programming language at the source location.
295
+ # @!attribute [rw] expressions
296
+ # @return [::Array<::String>]
297
+ # List of read-only expressions to evaluate at the breakpoint location.
298
+ # The expressions are composed using expressions in the programming language
299
+ # at the source location. If the breakpoint action is `LOG`, the evaluated
300
+ # expressions are included in log statements.
301
+ # @!attribute [rw] log_message_format
302
+ # @return [::String]
303
+ # Only relevant when action is `LOG`. Defines the message to log when
304
+ # the breakpoint hits. The message may include parameter placeholders `$0`,
305
+ # `$1`, etc. These placeholders are replaced with the evaluated value
306
+ # of the appropriate expression. Expressions not referenced in
307
+ # `log_message_format` are not logged.
308
+ #
309
+ # Example: `Message received, id = $0, count = $1` with
310
+ # `expressions` = `[ message.id, message.count ]`.
311
+ # @!attribute [rw] log_level
312
+ # @return [::Google::Cloud::Debugger::V2::Breakpoint::LogLevel]
313
+ # Indicates the severity of the log. Only relevant when action is `LOG`.
314
+ # @!attribute [rw] is_final_state
315
+ # @return [::Boolean]
316
+ # When true, indicates that this is a final result and the
317
+ # breakpoint state will not change from here on.
318
+ # @!attribute [rw] create_time
319
+ # @return [::Google::Protobuf::Timestamp]
320
+ # Time this breakpoint was created by the server in seconds resolution.
321
+ # @!attribute [rw] final_time
322
+ # @return [::Google::Protobuf::Timestamp]
323
+ # Time this breakpoint was finalized as seen by the server in seconds
324
+ # resolution.
325
+ # @!attribute [rw] user_email
326
+ # @return [::String]
327
+ # E-mail address of the user that created this breakpoint
328
+ # @!attribute [rw] status
329
+ # @return [::Google::Cloud::Debugger::V2::StatusMessage]
330
+ # Breakpoint status.
331
+ #
332
+ # The status includes an error flag and a human readable message.
333
+ # This field is usually unset. The message can be either
334
+ # informational or an error message. Regardless, clients should always
335
+ # display the text message back to the user.
336
+ #
337
+ # Error status indicates complete failure of the breakpoint.
338
+ #
339
+ # Example (non-final state): `Still loading symbols...`
340
+ #
341
+ # Examples (final state):
342
+ #
343
+ # * `Invalid line number` referring to location
344
+ # * `Field f not found in class C` referring to condition
345
+ # @!attribute [rw] stack_frames
346
+ # @return [::Array<::Google::Cloud::Debugger::V2::StackFrame>]
347
+ # The stack at breakpoint time, where stack_frames[0] represents the most
348
+ # recently entered function.
349
+ # @!attribute [rw] evaluated_expressions
350
+ # @return [::Array<::Google::Cloud::Debugger::V2::Variable>]
351
+ # Values of evaluated expressions at breakpoint time.
352
+ # The evaluated expressions appear in exactly the same order they
353
+ # are listed in the `expressions` field.
354
+ # The `name` field holds the original expression text, the `value` or
355
+ # `members` field holds the result of the evaluated expression.
356
+ # If the expression cannot be evaluated, the `status` inside the `Variable`
357
+ # will indicate an error and contain the error text.
358
+ # @!attribute [rw] variable_table
359
+ # @return [::Array<::Google::Cloud::Debugger::V2::Variable>]
360
+ # The `variable_table` exists to aid with computation, memory and network
361
+ # traffic optimization. It enables storing a variable once and reference
362
+ # it from multiple variables, including variables stored in the
363
+ # `variable_table` itself.
364
+ # For example, the same `this` object, which may appear at many levels of
365
+ # the stack, can have all of its data stored once in this table. The
366
+ # stack frame variables then would hold only a reference to it.
367
+ #
368
+ # The variable `var_table_index` field is an index into this repeated field.
369
+ # The stored objects are nameless and get their name from the referencing
370
+ # variable. The effective variable is a merge of the referencing variable
371
+ # and the referenced variable.
372
+ # @!attribute [rw] labels
373
+ # @return [::Google::Protobuf::Map{::String => ::String}]
374
+ # A set of custom breakpoint properties, populated by the agent, to be
375
+ # displayed to the user.
376
+ class Breakpoint
377
+ include ::Google::Protobuf::MessageExts
378
+ extend ::Google::Protobuf::MessageExts::ClassMethods
379
+
380
+ # @!attribute [rw] key
381
+ # @return [::String]
382
+ # @!attribute [rw] value
383
+ # @return [::String]
384
+ class LabelsEntry
385
+ include ::Google::Protobuf::MessageExts
386
+ extend ::Google::Protobuf::MessageExts::ClassMethods
387
+ end
388
+
389
+ # Actions that can be taken when a breakpoint hits.
390
+ # Agents should reject breakpoints with unsupported or unknown action values.
391
+ module Action
392
+ # Capture stack frame and variables and update the breakpoint.
393
+ # The data is only captured once. After that the breakpoint is set
394
+ # in a final state.
395
+ CAPTURE = 0
396
+
397
+ # Log each breakpoint hit. The breakpoint remains active until
398
+ # deleted or expired.
399
+ LOG = 1
400
+ end
401
+
402
+ # Log severity levels.
403
+ module LogLevel
404
+ # Information log message.
405
+ INFO = 0
406
+
407
+ # Warning log message.
408
+ WARNING = 1
409
+
410
+ # Error log message.
411
+ ERROR = 2
412
+ end
413
+ end
414
+
415
+ # Represents the debugged application. The application may include one or more
416
+ # replicated processes executing the same code. Each of these processes is
417
+ # attached with a debugger agent, carrying out the debugging commands.
418
+ # Agents attached to the same debuggee identify themselves as such by using
419
+ # exactly the same Debuggee message value when registering.
420
+ # @!attribute [rw] id
421
+ # @return [::String]
422
+ # Unique identifier for the debuggee generated by the controller service.
423
+ # @!attribute [rw] project
424
+ # @return [::String]
425
+ # Project the debuggee is associated with.
426
+ # Use project number or id when registering a Google Cloud Platform project.
427
+ # @!attribute [rw] uniquifier
428
+ # @return [::String]
429
+ # Uniquifier to further distinguish the application.
430
+ # It is possible that different applications might have identical values in
431
+ # the debuggee message, thus, incorrectly identified as a single application
432
+ # by the Controller service. This field adds salt to further distinguish the
433
+ # application. Agents should consider seeding this field with value that
434
+ # identifies the code, binary, configuration and environment.
435
+ # @!attribute [rw] description
436
+ # @return [::String]
437
+ # Human readable description of the debuggee.
438
+ # Including a human-readable project name, environment name and version
439
+ # information is recommended.
440
+ # @!attribute [rw] is_inactive
441
+ # @return [::Boolean]
442
+ # If set to `true`, indicates that Controller service does not detect any
443
+ # activity from the debuggee agents and the application is possibly stopped.
444
+ # @!attribute [rw] agent_version
445
+ # @return [::String]
446
+ # Version ID of the agent.
447
+ # Schema: `domain/language-platform/vmajor.minor` (for example
448
+ # `google.com/java-gcp/v1.1`).
449
+ # @!attribute [rw] is_disabled
450
+ # @return [::Boolean]
451
+ # If set to `true`, indicates that the agent should disable itself and
452
+ # detach from the debuggee.
453
+ # @!attribute [rw] status
454
+ # @return [::Google::Cloud::Debugger::V2::StatusMessage]
455
+ # Human readable message to be displayed to the user about this debuggee.
456
+ # Absence of this field indicates no status. The message can be either
457
+ # informational or an error status.
458
+ # @!attribute [rw] source_contexts
459
+ # @return [::Array<::Google::Devtools::Source::V1::SourceContext>]
460
+ # References to the locations and revisions of the source code used in the
461
+ # deployed application.
462
+ # @!attribute [rw] ext_source_contexts
463
+ # @return [::Array<::Google::Devtools::Source::V1::ExtendedSourceContext>]
464
+ # References to the locations and revisions of the source code used in the
465
+ # deployed application.
466
+ # @!attribute [rw] labels
467
+ # @return [::Google::Protobuf::Map{::String => ::String}]
468
+ # A set of custom debuggee properties, populated by the agent, to be
469
+ # displayed to the user.
470
+ class Debuggee
471
+ include ::Google::Protobuf::MessageExts
472
+ extend ::Google::Protobuf::MessageExts::ClassMethods
473
+
474
+ # @!attribute [rw] key
475
+ # @return [::String]
476
+ # @!attribute [rw] value
477
+ # @return [::String]
478
+ class LabelsEntry
479
+ include ::Google::Protobuf::MessageExts
480
+ extend ::Google::Protobuf::MessageExts::ClassMethods
481
+ end
482
+ end
483
+ end
484
+ end
485
+ end
486
+ end