debugger.proto 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. // Copyright 2019 Google LLC.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. //
  15. syntax = "proto3";
  16. package google.devtools.clouddebugger.v2;
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/devtools/clouddebugger/v2/data.proto";
  20. import "google/protobuf/empty.proto";
  21. import "google/api/annotations.proto";
  22. option csharp_namespace = "Google.Cloud.Debugger.V2";
  23. option go_package = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2;clouddebugger";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "DebuggerProto";
  26. option java_package = "com.google.devtools.clouddebugger.v2";
  27. option php_namespace = "Google\\Cloud\\Debugger\\V2";
  28. option ruby_package = "Google::Cloud::Debugger::V2";
  29. // The Debugger service provides the API that allows users to collect run-time
  30. // information from a running application, without stopping or slowing it down
  31. // and without modifying its state. An application may include one or
  32. // more replicated processes performing the same work.
  33. //
  34. // A debugged application is represented using the Debuggee concept. The
  35. // Debugger service provides a way to query for available debuggees, but does
  36. // not provide a way to create one. A debuggee is created using the Controller
  37. // service, usually by running a debugger agent with the application.
  38. //
  39. // The Debugger service enables the client to set one or more Breakpoints on a
  40. // Debuggee and collect the results of the set Breakpoints.
  41. service Debugger2 {
  42. option (google.api.default_host) = "clouddebugger.googleapis.com";
  43. option (google.api.oauth_scopes) =
  44. "https://www.googleapis.com/auth/cloud-platform,"
  45. "https://www.googleapis.com/auth/cloud_debugger";
  46. // Sets the breakpoint to the debuggee.
  47. rpc SetBreakpoint(SetBreakpointRequest) returns (SetBreakpointResponse) {
  48. option (google.api.http) = {
  49. post: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/set"
  50. body: "breakpoint"
  51. };
  52. option (google.api.method_signature) = "debuggee_id,breakpoint,client_version";
  53. }
  54. // Gets breakpoint information.
  55. rpc GetBreakpoint(GetBreakpointRequest) returns (GetBreakpointResponse) {
  56. option (google.api.http) = {
  57. get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}"
  58. };
  59. option (google.api.method_signature) = "debuggee_id,breakpoint_id,client_version";
  60. }
  61. // Deletes the breakpoint from the debuggee.
  62. rpc DeleteBreakpoint(DeleteBreakpointRequest) returns (google.protobuf.Empty) {
  63. option (google.api.http) = {
  64. delete: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}"
  65. };
  66. option (google.api.method_signature) = "debuggee_id,breakpoint_id,client_version";
  67. }
  68. // Lists all breakpoints for the debuggee.
  69. rpc ListBreakpoints(ListBreakpointsRequest) returns (ListBreakpointsResponse) {
  70. option (google.api.http) = {
  71. get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints"
  72. };
  73. option (google.api.method_signature) = "debuggee_id,client_version";
  74. }
  75. // Lists all the debuggees that the user has access to.
  76. rpc ListDebuggees(ListDebuggeesRequest) returns (ListDebuggeesResponse) {
  77. option (google.api.http) = {
  78. get: "/v2/debugger/debuggees"
  79. };
  80. option (google.api.method_signature) = "project,client_version";
  81. }
  82. }
  83. // Request to set a breakpoint
  84. message SetBreakpointRequest {
  85. // Required. ID of the debuggee where the breakpoint is to be set.
  86. string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED];
  87. // Required. Breakpoint specification to set.
  88. // The field `location` of the breakpoint must be set.
  89. Breakpoint breakpoint = 2 [(google.api.field_behavior) = REQUIRED];
  90. // Required. The client version making the call.
  91. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  92. string client_version = 4 [(google.api.field_behavior) = REQUIRED];
  93. }
  94. // Response for setting a breakpoint.
  95. message SetBreakpointResponse {
  96. // Breakpoint resource.
  97. // The field `id` is guaranteed to be set (in addition to the echoed fileds).
  98. Breakpoint breakpoint = 1;
  99. }
  100. // Request to get breakpoint information.
  101. message GetBreakpointRequest {
  102. // Required. ID of the debuggee whose breakpoint to get.
  103. string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED];
  104. // Required. ID of the breakpoint to get.
  105. string breakpoint_id = 2 [(google.api.field_behavior) = REQUIRED];
  106. // Required. The client version making the call.
  107. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  108. string client_version = 4 [(google.api.field_behavior) = REQUIRED];
  109. }
  110. // Response for getting breakpoint information.
  111. message GetBreakpointResponse {
  112. // Complete breakpoint state.
  113. // The fields `id` and `location` are guaranteed to be set.
  114. Breakpoint breakpoint = 1;
  115. }
  116. // Request to delete a breakpoint.
  117. message DeleteBreakpointRequest {
  118. // Required. ID of the debuggee whose breakpoint to delete.
  119. string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED];
  120. // Required. ID of the breakpoint to delete.
  121. string breakpoint_id = 2 [(google.api.field_behavior) = REQUIRED];
  122. // Required. The client version making the call.
  123. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  124. string client_version = 3 [(google.api.field_behavior) = REQUIRED];
  125. }
  126. // Request to list breakpoints.
  127. message ListBreakpointsRequest {
  128. // Wrapper message for `Breakpoint.Action`. Defines a filter on the action
  129. // field of breakpoints.
  130. message BreakpointActionValue {
  131. // Only breakpoints with the specified action will pass the filter.
  132. Breakpoint.Action value = 1;
  133. }
  134. // Required. ID of the debuggee whose breakpoints to list.
  135. string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED];
  136. // When set to `true`, the response includes the list of breakpoints set by
  137. // any user. Otherwise, it includes only breakpoints set by the caller.
  138. bool include_all_users = 2;
  139. // When set to `true`, the response includes active and inactive
  140. // breakpoints. Otherwise, it includes only active breakpoints.
  141. bool include_inactive = 3;
  142. // When set, the response includes only breakpoints with the specified action.
  143. BreakpointActionValue action = 4;
  144. // This field is deprecated. The following fields are always stripped out of
  145. // the result: `stack_frames`, `evaluated_expressions` and `variable_table`.
  146. bool strip_results = 5 [deprecated = true];
  147. // A wait token that, if specified, blocks the call until the breakpoints
  148. // list has changed, or a server selected timeout has expired. The value
  149. // should be set from the last response. The error code
  150. // `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which
  151. // should be called again with the same `wait_token`.
  152. string wait_token = 6;
  153. // Required. The client version making the call.
  154. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  155. string client_version = 8 [(google.api.field_behavior) = REQUIRED];
  156. }
  157. // Response for listing breakpoints.
  158. message ListBreakpointsResponse {
  159. // List of breakpoints matching the request.
  160. // The fields `id` and `location` are guaranteed to be set on each breakpoint.
  161. // The fields: `stack_frames`, `evaluated_expressions` and `variable_table`
  162. // are cleared on each breakpoint regardless of its status.
  163. repeated Breakpoint breakpoints = 1;
  164. // A wait token that can be used in the next call to `list` (REST) or
  165. // `ListBreakpoints` (RPC) to block until the list of breakpoints has changes.
  166. string next_wait_token = 2;
  167. }
  168. // Request to list debuggees.
  169. message ListDebuggeesRequest {
  170. // Required. Project number of a Google Cloud project whose debuggees to list.
  171. string project = 2 [(google.api.field_behavior) = REQUIRED];
  172. // When set to `true`, the result includes all debuggees. Otherwise, the
  173. // result includes only debuggees that are active.
  174. bool include_inactive = 3;
  175. // Required. The client version making the call.
  176. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  177. string client_version = 4 [(google.api.field_behavior) = REQUIRED];
  178. }
  179. // Response for listing debuggees.
  180. message ListDebuggeesResponse {
  181. // List of debuggees accessible to the calling user.
  182. // The fields `debuggee.id` and `description` are guaranteed to be set.
  183. // The `description` field is a human readable field provided by agents and
  184. // can be displayed to users.
  185. repeated Debuggee debuggees = 1;
  186. }