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