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