You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2812 lines
104 KiB

  1. // Package clouddebugger provides access to the Stackdriver Debugger API.
  2. //
  3. // See https://cloud.google.com/debugger
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/clouddebugger/v2"
  8. // ...
  9. // clouddebuggerService, err := clouddebugger.New(oauthHttpClient)
  10. package clouddebugger // import "google.golang.org/api/clouddebugger/v2"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "clouddebugger:v2"
  41. const apiName = "clouddebugger"
  42. const apiVersion = "v2"
  43. const basePath = "https://clouddebugger.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. // Use Stackdriver Debugger
  49. CloudDebuggerScope = "https://www.googleapis.com/auth/cloud_debugger"
  50. )
  51. func New(client *http.Client) (*Service, error) {
  52. if client == nil {
  53. return nil, errors.New("client is nil")
  54. }
  55. s := &Service{client: client, BasePath: basePath}
  56. s.Controller = NewControllerService(s)
  57. s.Debugger = NewDebuggerService(s)
  58. return s, nil
  59. }
  60. type Service struct {
  61. client *http.Client
  62. BasePath string // API endpoint base URL
  63. UserAgent string // optional additional User-Agent fragment
  64. Controller *ControllerService
  65. Debugger *DebuggerService
  66. }
  67. func (s *Service) userAgent() string {
  68. if s.UserAgent == "" {
  69. return googleapi.UserAgent
  70. }
  71. return googleapi.UserAgent + " " + s.UserAgent
  72. }
  73. func NewControllerService(s *Service) *ControllerService {
  74. rs := &ControllerService{s: s}
  75. rs.Debuggees = NewControllerDebuggeesService(s)
  76. return rs
  77. }
  78. type ControllerService struct {
  79. s *Service
  80. Debuggees *ControllerDebuggeesService
  81. }
  82. func NewControllerDebuggeesService(s *Service) *ControllerDebuggeesService {
  83. rs := &ControllerDebuggeesService{s: s}
  84. rs.Breakpoints = NewControllerDebuggeesBreakpointsService(s)
  85. return rs
  86. }
  87. type ControllerDebuggeesService struct {
  88. s *Service
  89. Breakpoints *ControllerDebuggeesBreakpointsService
  90. }
  91. func NewControllerDebuggeesBreakpointsService(s *Service) *ControllerDebuggeesBreakpointsService {
  92. rs := &ControllerDebuggeesBreakpointsService{s: s}
  93. return rs
  94. }
  95. type ControllerDebuggeesBreakpointsService struct {
  96. s *Service
  97. }
  98. func NewDebuggerService(s *Service) *DebuggerService {
  99. rs := &DebuggerService{s: s}
  100. rs.Debuggees = NewDebuggerDebuggeesService(s)
  101. return rs
  102. }
  103. type DebuggerService struct {
  104. s *Service
  105. Debuggees *DebuggerDebuggeesService
  106. }
  107. func NewDebuggerDebuggeesService(s *Service) *DebuggerDebuggeesService {
  108. rs := &DebuggerDebuggeesService{s: s}
  109. rs.Breakpoints = NewDebuggerDebuggeesBreakpointsService(s)
  110. return rs
  111. }
  112. type DebuggerDebuggeesService struct {
  113. s *Service
  114. Breakpoints *DebuggerDebuggeesBreakpointsService
  115. }
  116. func NewDebuggerDebuggeesBreakpointsService(s *Service) *DebuggerDebuggeesBreakpointsService {
  117. rs := &DebuggerDebuggeesBreakpointsService{s: s}
  118. return rs
  119. }
  120. type DebuggerDebuggeesBreakpointsService struct {
  121. s *Service
  122. }
  123. // AliasContext: An alias to a repo revision.
  124. type AliasContext struct {
  125. // Kind: The alias kind.
  126. //
  127. // Possible values:
  128. // "ANY" - Do not use.
  129. // "FIXED" - Git tag
  130. // "MOVABLE" - Git branch
  131. // "OTHER" - OTHER is used to specify non-standard aliases, those not
  132. // of the kinds
  133. // above. For example, if a Git repo has a ref named "refs/foo/bar",
  134. // it
  135. // is considered to be of kind OTHER.
  136. Kind string `json:"kind,omitempty"`
  137. // Name: The alias name.
  138. Name string `json:"name,omitempty"`
  139. // ForceSendFields is a list of field names (e.g. "Kind") to
  140. // unconditionally include in API requests. By default, fields with
  141. // empty values are omitted from API requests. However, any non-pointer,
  142. // non-interface field appearing in ForceSendFields will be sent to the
  143. // server regardless of whether the field is empty or not. This may be
  144. // used to include empty fields in Patch requests.
  145. ForceSendFields []string `json:"-"`
  146. // NullFields is a list of field names (e.g. "Kind") to include in API
  147. // requests with the JSON null value. By default, fields with empty
  148. // values are omitted from API requests. However, any field with an
  149. // empty value appearing in NullFields will be sent to the server as
  150. // null. It is an error if a field in this list has a non-empty value.
  151. // This may be used to include null fields in Patch requests.
  152. NullFields []string `json:"-"`
  153. }
  154. func (s *AliasContext) MarshalJSON() ([]byte, error) {
  155. type NoMethod AliasContext
  156. raw := NoMethod(*s)
  157. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  158. }
  159. // Breakpoint: Represents the breakpoint specification, status and
  160. // results.
  161. type Breakpoint struct {
  162. // Action: Action that the agent should perform when the code at
  163. // the
  164. // breakpoint location is hit.
  165. //
  166. // Possible values:
  167. // "CAPTURE" - Capture stack frame and variables and update the
  168. // breakpoint.
  169. // The data is only captured once. After that the breakpoint is set
  170. // in a final state.
  171. // "LOG" - Log each breakpoint hit. The breakpoint remains active
  172. // until
  173. // deleted or expired.
  174. Action string `json:"action,omitempty"`
  175. // Condition: Condition that triggers the breakpoint.
  176. // The condition is a compound boolean expression composed using
  177. // expressions
  178. // in a programming language at the source location.
  179. Condition string `json:"condition,omitempty"`
  180. // CreateTime: Time this breakpoint was created by the server in seconds
  181. // resolution.
  182. CreateTime string `json:"createTime,omitempty"`
  183. // EvaluatedExpressions: Values of evaluated expressions at breakpoint
  184. // time.
  185. // The evaluated expressions appear in exactly the same order they
  186. // are listed in the `expressions` field.
  187. // The `name` field holds the original expression text, the `value`
  188. // or
  189. // `members` field holds the result of the evaluated expression.
  190. // If the expression cannot be evaluated, the `status` inside the
  191. // `Variable`
  192. // will indicate an error and contain the error text.
  193. EvaluatedExpressions []*Variable `json:"evaluatedExpressions,omitempty"`
  194. // Expressions: List of read-only expressions to evaluate at the
  195. // breakpoint location.
  196. // The expressions are composed using expressions in the programming
  197. // language
  198. // at the source location. If the breakpoint action is `LOG`, the
  199. // evaluated
  200. // expressions are included in log statements.
  201. Expressions []string `json:"expressions,omitempty"`
  202. // FinalTime: Time this breakpoint was finalized as seen by the server
  203. // in seconds
  204. // resolution.
  205. FinalTime string `json:"finalTime,omitempty"`
  206. // Id: Breakpoint identifier, unique in the scope of the debuggee.
  207. Id string `json:"id,omitempty"`
  208. // IsFinalState: When true, indicates that this is a final result and
  209. // the
  210. // breakpoint state will not change from here on.
  211. IsFinalState bool `json:"isFinalState,omitempty"`
  212. // Labels: A set of custom breakpoint properties, populated by the
  213. // agent, to be
  214. // displayed to the user.
  215. Labels map[string]string `json:"labels,omitempty"`
  216. // Location: Breakpoint source location.
  217. Location *SourceLocation `json:"location,omitempty"`
  218. // LogLevel: Indicates the severity of the log. Only relevant when
  219. // action is `LOG`.
  220. //
  221. // Possible values:
  222. // "INFO" - Information log message.
  223. // "WARNING" - Warning log message.
  224. // "ERROR" - Error log message.
  225. LogLevel string `json:"logLevel,omitempty"`
  226. // LogMessageFormat: Only relevant when action is `LOG`. Defines the
  227. // message to log when
  228. // the breakpoint hits. The message may include parameter placeholders
  229. // `$0`,
  230. // `$1`, etc. These placeholders are replaced with the evaluated
  231. // value
  232. // of the appropriate expression. Expressions not referenced
  233. // in
  234. // `log_message_format` are not logged.
  235. //
  236. // Example: `Message received, id = $0, count = $1` with
  237. // `expressions` = `[ message.id, message.count ]`.
  238. LogMessageFormat string `json:"logMessageFormat,omitempty"`
  239. // StackFrames: The stack at breakpoint time, where stack_frames[0]
  240. // represents the most
  241. // recently entered function.
  242. StackFrames []*StackFrame `json:"stackFrames,omitempty"`
  243. // Status: Breakpoint status.
  244. //
  245. // The status includes an error flag and a human readable message.
  246. // This field is usually unset. The message can be either
  247. // informational or an error message. Regardless, clients should
  248. // always
  249. // display the text message back to the user.
  250. //
  251. // Error status indicates complete failure of the breakpoint.
  252. //
  253. // Example (non-final state): `Still loading symbols...`
  254. //
  255. // Examples (final state):
  256. //
  257. // * `Invalid line number` referring to location
  258. // * `Field f not found in class C` referring to condition
  259. Status *StatusMessage `json:"status,omitempty"`
  260. // UserEmail: E-mail address of the user that created this breakpoint
  261. UserEmail string `json:"userEmail,omitempty"`
  262. // VariableTable: The `variable_table` exists to aid with computation,
  263. // memory and network
  264. // traffic optimization. It enables storing a variable once and
  265. // reference
  266. // it from multiple variables, including variables stored in
  267. // the
  268. // `variable_table` itself.
  269. // For example, the same `this` object, which may appear at many levels
  270. // of
  271. // the stack, can have all of its data stored once in this table.
  272. // The
  273. // stack frame variables then would hold only a reference to it.
  274. //
  275. // The variable `var_table_index` field is an index into this repeated
  276. // field.
  277. // The stored objects are nameless and get their name from the
  278. // referencing
  279. // variable. The effective variable is a merge of the referencing
  280. // variable
  281. // and the referenced variable.
  282. VariableTable []*Variable `json:"variableTable,omitempty"`
  283. // ForceSendFields is a list of field names (e.g. "Action") to
  284. // unconditionally include in API requests. By default, fields with
  285. // empty values are omitted from API requests. However, any non-pointer,
  286. // non-interface field appearing in ForceSendFields will be sent to the
  287. // server regardless of whether the field is empty or not. This may be
  288. // used to include empty fields in Patch requests.
  289. ForceSendFields []string `json:"-"`
  290. // NullFields is a list of field names (e.g. "Action") to include in API
  291. // requests with the JSON null value. By default, fields with empty
  292. // values are omitted from API requests. However, any field with an
  293. // empty value appearing in NullFields will be sent to the server as
  294. // null. It is an error if a field in this list has a non-empty value.
  295. // This may be used to include null fields in Patch requests.
  296. NullFields []string `json:"-"`
  297. }
  298. func (s *Breakpoint) MarshalJSON() ([]byte, error) {
  299. type NoMethod Breakpoint
  300. raw := NoMethod(*s)
  301. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  302. }
  303. // CloudRepoSourceContext: A CloudRepoSourceContext denotes a particular
  304. // revision in a cloud
  305. // repo (a repo hosted by the Google Cloud Platform).
  306. type CloudRepoSourceContext struct {
  307. // AliasContext: An alias, which may be a branch or tag.
  308. AliasContext *AliasContext `json:"aliasContext,omitempty"`
  309. // AliasName: The name of an alias (branch, tag, etc.).
  310. AliasName string `json:"aliasName,omitempty"`
  311. // RepoId: The ID of the repo.
  312. RepoId *RepoId `json:"repoId,omitempty"`
  313. // RevisionId: A revision ID.
  314. RevisionId string `json:"revisionId,omitempty"`
  315. // ForceSendFields is a list of field names (e.g. "AliasContext") to
  316. // unconditionally include in API requests. By default, fields with
  317. // empty values are omitted from API requests. However, any non-pointer,
  318. // non-interface field appearing in ForceSendFields will be sent to the
  319. // server regardless of whether the field is empty or not. This may be
  320. // used to include empty fields in Patch requests.
  321. ForceSendFields []string `json:"-"`
  322. // NullFields is a list of field names (e.g. "AliasContext") to include
  323. // in API requests with the JSON null value. By default, fields with
  324. // empty values are omitted from API requests. However, any field with
  325. // an empty value appearing in NullFields will be sent to the server as
  326. // null. It is an error if a field in this list has a non-empty value.
  327. // This may be used to include null fields in Patch requests.
  328. NullFields []string `json:"-"`
  329. }
  330. func (s *CloudRepoSourceContext) MarshalJSON() ([]byte, error) {
  331. type NoMethod CloudRepoSourceContext
  332. raw := NoMethod(*s)
  333. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  334. }
  335. // CloudWorkspaceId: A CloudWorkspaceId is a unique identifier for a
  336. // cloud workspace.
  337. // A cloud workspace is a place associated with a repo where modified
  338. // files
  339. // can be stored before they are committed.
  340. type CloudWorkspaceId struct {
  341. // Name: The unique name of the workspace within the repo. This is the
  342. // name
  343. // chosen by the client in the Source API's CreateWorkspace method.
  344. Name string `json:"name,omitempty"`
  345. // RepoId: The ID of the repo containing the workspace.
  346. RepoId *RepoId `json:"repoId,omitempty"`
  347. // ForceSendFields is a list of field names (e.g. "Name") to
  348. // unconditionally include in API requests. By default, fields with
  349. // empty values are omitted from API requests. However, any non-pointer,
  350. // non-interface field appearing in ForceSendFields will be sent to the
  351. // server regardless of whether the field is empty or not. This may be
  352. // used to include empty fields in Patch requests.
  353. ForceSendFields []string `json:"-"`
  354. // NullFields is a list of field names (e.g. "Name") to include in API
  355. // requests with the JSON null value. By default, fields with empty
  356. // values are omitted from API requests. However, any field with an
  357. // empty value appearing in NullFields will be sent to the server as
  358. // null. It is an error if a field in this list has a non-empty value.
  359. // This may be used to include null fields in Patch requests.
  360. NullFields []string `json:"-"`
  361. }
  362. func (s *CloudWorkspaceId) MarshalJSON() ([]byte, error) {
  363. type NoMethod CloudWorkspaceId
  364. raw := NoMethod(*s)
  365. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  366. }
  367. // CloudWorkspaceSourceContext: A CloudWorkspaceSourceContext denotes a
  368. // workspace at a particular snapshot.
  369. type CloudWorkspaceSourceContext struct {
  370. // SnapshotId: The ID of the snapshot.
  371. // An empty snapshot_id refers to the most recent snapshot.
  372. SnapshotId string `json:"snapshotId,omitempty"`
  373. // WorkspaceId: The ID of the workspace.
  374. WorkspaceId *CloudWorkspaceId `json:"workspaceId,omitempty"`
  375. // ForceSendFields is a list of field names (e.g. "SnapshotId") to
  376. // unconditionally include in API requests. By default, fields with
  377. // empty values are omitted from API requests. However, any non-pointer,
  378. // non-interface field appearing in ForceSendFields will be sent to the
  379. // server regardless of whether the field is empty or not. This may be
  380. // used to include empty fields in Patch requests.
  381. ForceSendFields []string `json:"-"`
  382. // NullFields is a list of field names (e.g. "SnapshotId") to include in
  383. // API requests with the JSON null value. By default, fields with empty
  384. // values are omitted from API requests. However, any field with an
  385. // empty value appearing in NullFields will be sent to the server as
  386. // null. It is an error if a field in this list has a non-empty value.
  387. // This may be used to include null fields in Patch requests.
  388. NullFields []string `json:"-"`
  389. }
  390. func (s *CloudWorkspaceSourceContext) MarshalJSON() ([]byte, error) {
  391. type NoMethod CloudWorkspaceSourceContext
  392. raw := NoMethod(*s)
  393. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  394. }
  395. // Debuggee: Represents the debugged application. The application may
  396. // include one or more
  397. // replicated processes executing the same code. Each of these processes
  398. // is
  399. // attached with a debugger agent, carrying out the debugging
  400. // commands.
  401. // Agents attached to the same debuggee identify themselves as such by
  402. // using
  403. // exactly the same Debuggee message value when registering.
  404. type Debuggee struct {
  405. // AgentVersion: Version ID of the agent.
  406. // Schema: `domain/language-platform/vmajor.minor` (for
  407. // example
  408. // `google.com/java-gcp/v1.1`).
  409. AgentVersion string `json:"agentVersion,omitempty"`
  410. // Description: Human readable description of the debuggee.
  411. // Including a human-readable project name, environment name and
  412. // version
  413. // information is recommended.
  414. Description string `json:"description,omitempty"`
  415. // ExtSourceContexts: References to the locations and revisions of the
  416. // source code used in the
  417. // deployed application.
  418. ExtSourceContexts []*ExtendedSourceContext `json:"extSourceContexts,omitempty"`
  419. // Id: Unique identifier for the debuggee generated by the controller
  420. // service.
  421. Id string `json:"id,omitempty"`
  422. // IsDisabled: If set to `true`, indicates that the agent should disable
  423. // itself and
  424. // detach from the debuggee.
  425. IsDisabled bool `json:"isDisabled,omitempty"`
  426. // IsInactive: If set to `true`, indicates that Controller service does
  427. // not detect any
  428. // activity from the debuggee agents and the application is possibly
  429. // stopped.
  430. IsInactive bool `json:"isInactive,omitempty"`
  431. // Labels: A set of custom debuggee properties, populated by the agent,
  432. // to be
  433. // displayed to the user.
  434. Labels map[string]string `json:"labels,omitempty"`
  435. // Project: Project the debuggee is associated with.
  436. // Use project number or id when registering a Google Cloud Platform
  437. // project.
  438. Project string `json:"project,omitempty"`
  439. // SourceContexts: References to the locations and revisions of the
  440. // source code used in the
  441. // deployed application.
  442. SourceContexts []*SourceContext `json:"sourceContexts,omitempty"`
  443. // Status: Human readable message to be displayed to the user about this
  444. // debuggee.
  445. // Absence of this field indicates no status. The message can be
  446. // either
  447. // informational or an error status.
  448. Status *StatusMessage `json:"status,omitempty"`
  449. // Uniquifier: Uniquifier to further distiguish the application.
  450. // It is possible that different applications might have identical
  451. // values in
  452. // the debuggee message, thus, incorrectly identified as a single
  453. // application
  454. // by the Controller service. This field adds salt to further distiguish
  455. // the
  456. // application. Agents should consider seeding this field with value
  457. // that
  458. // identifies the code, binary, configuration and environment.
  459. Uniquifier string `json:"uniquifier,omitempty"`
  460. // ForceSendFields is a list of field names (e.g. "AgentVersion") to
  461. // unconditionally include in API requests. By default, fields with
  462. // empty values are omitted from API requests. However, any non-pointer,
  463. // non-interface field appearing in ForceSendFields will be sent to the
  464. // server regardless of whether the field is empty or not. This may be
  465. // used to include empty fields in Patch requests.
  466. ForceSendFields []string `json:"-"`
  467. // NullFields is a list of field names (e.g. "AgentVersion") to include
  468. // in API requests with the JSON null value. By default, fields with
  469. // empty values are omitted from API requests. However, any field with
  470. // an empty value appearing in NullFields will be sent to the server as
  471. // null. It is an error if a field in this list has a non-empty value.
  472. // This may be used to include null fields in Patch requests.
  473. NullFields []string `json:"-"`
  474. }
  475. func (s *Debuggee) MarshalJSON() ([]byte, error) {
  476. type NoMethod Debuggee
  477. raw := NoMethod(*s)
  478. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  479. }
  480. // Empty: A generic empty message that you can re-use to avoid defining
  481. // duplicated
  482. // empty messages in your APIs. A typical example is to use it as the
  483. // request
  484. // or the response type of an API method. For instance:
  485. //
  486. // service Foo {
  487. // rpc Bar(google.protobuf.Empty) returns
  488. // (google.protobuf.Empty);
  489. // }
  490. //
  491. // The JSON representation for `Empty` is empty JSON object `{}`.
  492. type Empty struct {
  493. // ServerResponse contains the HTTP response code and headers from the
  494. // server.
  495. googleapi.ServerResponse `json:"-"`
  496. }
  497. // ExtendedSourceContext: An ExtendedSourceContext is a SourceContext
  498. // combined with additional
  499. // details describing the context.
  500. type ExtendedSourceContext struct {
  501. // Context: Any source context.
  502. Context *SourceContext `json:"context,omitempty"`
  503. // Labels: Labels with user defined metadata.
  504. Labels map[string]string `json:"labels,omitempty"`
  505. // ForceSendFields is a list of field names (e.g. "Context") to
  506. // unconditionally include in API requests. By default, fields with
  507. // empty values are omitted from API requests. However, any non-pointer,
  508. // non-interface field appearing in ForceSendFields will be sent to the
  509. // server regardless of whether the field is empty or not. This may be
  510. // used to include empty fields in Patch requests.
  511. ForceSendFields []string `json:"-"`
  512. // NullFields is a list of field names (e.g. "Context") to include in
  513. // API requests with the JSON null value. By default, fields with empty
  514. // values are omitted from API requests. However, any field with an
  515. // empty value appearing in NullFields will be sent to the server as
  516. // null. It is an error if a field in this list has a non-empty value.
  517. // This may be used to include null fields in Patch requests.
  518. NullFields []string `json:"-"`
  519. }
  520. func (s *ExtendedSourceContext) MarshalJSON() ([]byte, error) {
  521. type NoMethod ExtendedSourceContext
  522. raw := NoMethod(*s)
  523. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  524. }
  525. // FormatMessage: Represents a message with parameters.
  526. type FormatMessage struct {
  527. // Format: Format template for the message. The `format` uses
  528. // placeholders `$0`,
  529. // `$1`, etc. to reference parameters. `$$` can be used to denote the
  530. // `$`
  531. // character.
  532. //
  533. // Examples:
  534. //
  535. // * `Failed to load '$0' which helps debug $1 the first time it
  536. // is loaded. Again, $0 is very important.`
  537. // * `Please pay $$10 to use $0 instead of $1.`
  538. Format string `json:"format,omitempty"`
  539. // Parameters: Optional parameters to be embedded into the message.
  540. Parameters []string `json:"parameters,omitempty"`
  541. // ForceSendFields is a list of field names (e.g. "Format") to
  542. // unconditionally include in API requests. By default, fields with
  543. // empty values are omitted from API requests. However, any non-pointer,
  544. // non-interface field appearing in ForceSendFields will be sent to the
  545. // server regardless of whether the field is empty or not. This may be
  546. // used to include empty fields in Patch requests.
  547. ForceSendFields []string `json:"-"`
  548. // NullFields is a list of field names (e.g. "Format") to include in API
  549. // requests with the JSON null value. By default, fields with empty
  550. // values are omitted from API requests. However, any field with an
  551. // empty value appearing in NullFields will be sent to the server as
  552. // null. It is an error if a field in this list has a non-empty value.
  553. // This may be used to include null fields in Patch requests.
  554. NullFields []string `json:"-"`
  555. }
  556. func (s *FormatMessage) MarshalJSON() ([]byte, error) {
  557. type NoMethod FormatMessage
  558. raw := NoMethod(*s)
  559. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  560. }
  561. // GerritSourceContext: A SourceContext referring to a Gerrit project.
  562. type GerritSourceContext struct {
  563. // AliasContext: An alias, which may be a branch or tag.
  564. AliasContext *AliasContext `json:"aliasContext,omitempty"`
  565. // AliasName: The name of an alias (branch, tag, etc.).
  566. AliasName string `json:"aliasName,omitempty"`
  567. // GerritProject: The full project name within the host. Projects may be
  568. // nested, so
  569. // "project/subproject" is a valid project name.
  570. // The "repo name" is hostURI/project.
  571. GerritProject string `json:"gerritProject,omitempty"`
  572. // HostUri: The URI of a running Gerrit instance.
  573. HostUri string `json:"hostUri,omitempty"`
  574. // RevisionId: A revision (commit) ID.
  575. RevisionId string `json:"revisionId,omitempty"`
  576. // ForceSendFields is a list of field names (e.g. "AliasContext") to
  577. // unconditionally include in API requests. By default, fields with
  578. // empty values are omitted from API requests. However, any non-pointer,
  579. // non-interface field appearing in ForceSendFields will be sent to the
  580. // server regardless of whether the field is empty or not. This may be
  581. // used to include empty fields in Patch requests.
  582. ForceSendFields []string `json:"-"`
  583. // NullFields is a list of field names (e.g. "AliasContext") to include
  584. // in API requests with the JSON null value. By default, fields with
  585. // empty values are omitted from API requests. However, any field with
  586. // an empty value appearing in NullFields will be sent to the server as
  587. // null. It is an error if a field in this list has a non-empty value.
  588. // This may be used to include null fields in Patch requests.
  589. NullFields []string `json:"-"`
  590. }
  591. func (s *GerritSourceContext) MarshalJSON() ([]byte, error) {
  592. type NoMethod GerritSourceContext
  593. raw := NoMethod(*s)
  594. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  595. }
  596. // GetBreakpointResponse: Response for getting breakpoint information.
  597. type GetBreakpointResponse struct {
  598. // Breakpoint: Complete breakpoint state.
  599. // The fields `id` and `location` are guaranteed to be set.
  600. Breakpoint *Breakpoint `json:"breakpoint,omitempty"`
  601. // ServerResponse contains the HTTP response code and headers from the
  602. // server.
  603. googleapi.ServerResponse `json:"-"`
  604. // ForceSendFields is a list of field names (e.g. "Breakpoint") to
  605. // unconditionally include in API requests. By default, fields with
  606. // empty values are omitted from API requests. However, any non-pointer,
  607. // non-interface field appearing in ForceSendFields will be sent to the
  608. // server regardless of whether the field is empty or not. This may be
  609. // used to include empty fields in Patch requests.
  610. ForceSendFields []string `json:"-"`
  611. // NullFields is a list of field names (e.g. "Breakpoint") to include in
  612. // API requests with the JSON null value. By default, fields with empty
  613. // values are omitted from API requests. However, any field with an
  614. // empty value appearing in NullFields will be sent to the server as
  615. // null. It is an error if a field in this list has a non-empty value.
  616. // This may be used to include null fields in Patch requests.
  617. NullFields []string `json:"-"`
  618. }
  619. func (s *GetBreakpointResponse) MarshalJSON() ([]byte, error) {
  620. type NoMethod GetBreakpointResponse
  621. raw := NoMethod(*s)
  622. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  623. }
  624. // GitSourceContext: A GitSourceContext denotes a particular revision in
  625. // a third party Git
  626. // repository (e.g. GitHub).
  627. type GitSourceContext struct {
  628. // RevisionId: Git commit hash.
  629. // required.
  630. RevisionId string `json:"revisionId,omitempty"`
  631. // Url: Git repository URL.
  632. Url string `json:"url,omitempty"`
  633. // ForceSendFields is a list of field names (e.g. "RevisionId") to
  634. // unconditionally include in API requests. By default, fields with
  635. // empty values are omitted from API requests. However, any non-pointer,
  636. // non-interface field appearing in ForceSendFields will be sent to the
  637. // server regardless of whether the field is empty or not. This may be
  638. // used to include empty fields in Patch requests.
  639. ForceSendFields []string `json:"-"`
  640. // NullFields is a list of field names (e.g. "RevisionId") to include in
  641. // API requests with the JSON null value. By default, fields with empty
  642. // values are omitted from API requests. However, any field with an
  643. // empty value appearing in NullFields will be sent to the server as
  644. // null. It is an error if a field in this list has a non-empty value.
  645. // This may be used to include null fields in Patch requests.
  646. NullFields []string `json:"-"`
  647. }
  648. func (s *GitSourceContext) MarshalJSON() ([]byte, error) {
  649. type NoMethod GitSourceContext
  650. raw := NoMethod(*s)
  651. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  652. }
  653. // ListActiveBreakpointsResponse: Response for listing active
  654. // breakpoints.
  655. type ListActiveBreakpointsResponse struct {
  656. // Breakpoints: List of all active breakpoints.
  657. // The fields `id` and `location` are guaranteed to be set on each
  658. // breakpoint.
  659. Breakpoints []*Breakpoint `json:"breakpoints,omitempty"`
  660. // NextWaitToken: A token that can be used in the next method call to
  661. // block until
  662. // the list of breakpoints changes.
  663. NextWaitToken string `json:"nextWaitToken,omitempty"`
  664. // WaitExpired: If set to `true`, indicates that there is no change to
  665. // the
  666. // list of active breakpoints and the server-selected timeout has
  667. // expired.
  668. // The `breakpoints` field would be empty and should be ignored.
  669. WaitExpired bool `json:"waitExpired,omitempty"`
  670. // ServerResponse contains the HTTP response code and headers from the
  671. // server.
  672. googleapi.ServerResponse `json:"-"`
  673. // ForceSendFields is a list of field names (e.g. "Breakpoints") to
  674. // unconditionally include in API requests. By default, fields with
  675. // empty values are omitted from API requests. However, any non-pointer,
  676. // non-interface field appearing in ForceSendFields will be sent to the
  677. // server regardless of whether the field is empty or not. This may be
  678. // used to include empty fields in Patch requests.
  679. ForceSendFields []string `json:"-"`
  680. // NullFields is a list of field names (e.g. "Breakpoints") to include
  681. // in API requests with the JSON null value. By default, fields with
  682. // empty values are omitted from API requests. However, any field with
  683. // an empty value appearing in NullFields will be sent to the server as
  684. // null. It is an error if a field in this list has a non-empty value.
  685. // This may be used to include null fields in Patch requests.
  686. NullFields []string `json:"-"`
  687. }
  688. func (s *ListActiveBreakpointsResponse) MarshalJSON() ([]byte, error) {
  689. type NoMethod ListActiveBreakpointsResponse
  690. raw := NoMethod(*s)
  691. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  692. }
  693. // ListBreakpointsResponse: Response for listing breakpoints.
  694. type ListBreakpointsResponse struct {
  695. // Breakpoints: List of breakpoints matching the request.
  696. // The fields `id` and `location` are guaranteed to be set on each
  697. // breakpoint.
  698. // The fields: `stack_frames`, `evaluated_expressions` and
  699. // `variable_table`
  700. // are cleared on each breakpoint regardless of its status.
  701. Breakpoints []*Breakpoint `json:"breakpoints,omitempty"`
  702. // NextWaitToken: A wait token that can be used in the next call to
  703. // `list` (REST) or
  704. // `ListBreakpoints` (RPC) to block until the list of breakpoints has
  705. // changes.
  706. NextWaitToken string `json:"nextWaitToken,omitempty"`
  707. // ServerResponse contains the HTTP response code and headers from the
  708. // server.
  709. googleapi.ServerResponse `json:"-"`
  710. // ForceSendFields is a list of field names (e.g. "Breakpoints") to
  711. // unconditionally include in API requests. By default, fields with
  712. // empty values are omitted from API requests. However, any non-pointer,
  713. // non-interface field appearing in ForceSendFields will be sent to the
  714. // server regardless of whether the field is empty or not. This may be
  715. // used to include empty fields in Patch requests.
  716. ForceSendFields []string `json:"-"`
  717. // NullFields is a list of field names (e.g. "Breakpoints") to include
  718. // in API requests with the JSON null value. By default, fields with
  719. // empty values are omitted from API requests. However, any field with
  720. // an empty value appearing in NullFields will be sent to the server as
  721. // null. It is an error if a field in this list has a non-empty value.
  722. // This may be used to include null fields in Patch requests.
  723. NullFields []string `json:"-"`
  724. }
  725. func (s *ListBreakpointsResponse) MarshalJSON() ([]byte, error) {
  726. type NoMethod ListBreakpointsResponse
  727. raw := NoMethod(*s)
  728. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  729. }
  730. // ListDebuggeesResponse: Response for listing debuggees.
  731. type ListDebuggeesResponse struct {
  732. // Debuggees: List of debuggees accessible to the calling user.
  733. // The fields `debuggee.id` and `description` are guaranteed to be
  734. // set.
  735. // The `description` field is a human readable field provided by agents
  736. // and
  737. // can be displayed to users.
  738. Debuggees []*Debuggee `json:"debuggees,omitempty"`
  739. // ServerResponse contains the HTTP response code and headers from the
  740. // server.
  741. googleapi.ServerResponse `json:"-"`
  742. // ForceSendFields is a list of field names (e.g. "Debuggees") to
  743. // unconditionally include in API requests. By default, fields with
  744. // empty values are omitted from API requests. However, any non-pointer,
  745. // non-interface field appearing in ForceSendFields will be sent to the
  746. // server regardless of whether the field is empty or not. This may be
  747. // used to include empty fields in Patch requests.
  748. ForceSendFields []string `json:"-"`
  749. // NullFields is a list of field names (e.g. "Debuggees") to include in
  750. // API requests with the JSON null value. By default, fields with empty
  751. // values are omitted from API requests. However, any field with an
  752. // empty value appearing in NullFields will be sent to the server as
  753. // null. It is an error if a field in this list has a non-empty value.
  754. // This may be used to include null fields in Patch requests.
  755. NullFields []string `json:"-"`
  756. }
  757. func (s *ListDebuggeesResponse) MarshalJSON() ([]byte, error) {
  758. type NoMethod ListDebuggeesResponse
  759. raw := NoMethod(*s)
  760. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  761. }
  762. // ProjectRepoId: Selects a repo using a Google Cloud Platform project
  763. // ID
  764. // (e.g. winged-cargo-31) and a repo name within that project.
  765. type ProjectRepoId struct {
  766. // ProjectId: The ID of the project.
  767. ProjectId string `json:"projectId,omitempty"`
  768. // RepoName: The name of the repo. Leave empty for the default repo.
  769. RepoName string `json:"repoName,omitempty"`
  770. // ForceSendFields is a list of field names (e.g. "ProjectId") to
  771. // unconditionally include in API requests. By default, fields with
  772. // empty values are omitted from API requests. However, any non-pointer,
  773. // non-interface field appearing in ForceSendFields will be sent to the
  774. // server regardless of whether the field is empty or not. This may be
  775. // used to include empty fields in Patch requests.
  776. ForceSendFields []string `json:"-"`
  777. // NullFields is a list of field names (e.g. "ProjectId") to include in
  778. // API requests with the JSON null value. By default, fields with empty
  779. // values are omitted from API requests. However, any field with an
  780. // empty value appearing in NullFields will be sent to the server as
  781. // null. It is an error if a field in this list has a non-empty value.
  782. // This may be used to include null fields in Patch requests.
  783. NullFields []string `json:"-"`
  784. }
  785. func (s *ProjectRepoId) MarshalJSON() ([]byte, error) {
  786. type NoMethod ProjectRepoId
  787. raw := NoMethod(*s)
  788. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  789. }
  790. // RegisterDebuggeeRequest: Request to register a debuggee.
  791. type RegisterDebuggeeRequest struct {
  792. // Debuggee: Debuggee information to register.
  793. // The fields `project`, `uniquifier`, `description` and
  794. // `agent_version`
  795. // of the debuggee must be set.
  796. Debuggee *Debuggee `json:"debuggee,omitempty"`
  797. // ForceSendFields is a list of field names (e.g. "Debuggee") to
  798. // unconditionally include in API requests. By default, fields with
  799. // empty values are omitted from API requests. However, any non-pointer,
  800. // non-interface field appearing in ForceSendFields will be sent to the
  801. // server regardless of whether the field is empty or not. This may be
  802. // used to include empty fields in Patch requests.
  803. ForceSendFields []string `json:"-"`
  804. // NullFields is a list of field names (e.g. "Debuggee") to include in
  805. // API requests with the JSON null value. By default, fields with empty
  806. // values are omitted from API requests. However, any field with an
  807. // empty value appearing in NullFields will be sent to the server as
  808. // null. It is an error if a field in this list has a non-empty value.
  809. // This may be used to include null fields in Patch requests.
  810. NullFields []string `json:"-"`
  811. }
  812. func (s *RegisterDebuggeeRequest) MarshalJSON() ([]byte, error) {
  813. type NoMethod RegisterDebuggeeRequest
  814. raw := NoMethod(*s)
  815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  816. }
  817. // RegisterDebuggeeResponse: Response for registering a debuggee.
  818. type RegisterDebuggeeResponse struct {
  819. // Debuggee: Debuggee resource.
  820. // The field `id` is guranteed to be set (in addition to the echoed
  821. // fields).
  822. // If the field `is_disabled` is set to `true`, the agent should
  823. // disable
  824. // itself by removing all breakpoints and detaching from the
  825. // application.
  826. // It should however continue to poll `RegisterDebuggee` until
  827. // reenabled.
  828. Debuggee *Debuggee `json:"debuggee,omitempty"`
  829. // ServerResponse contains the HTTP response code and headers from the
  830. // server.
  831. googleapi.ServerResponse `json:"-"`
  832. // ForceSendFields is a list of field names (e.g. "Debuggee") to
  833. // unconditionally include in API requests. By default, fields with
  834. // empty values are omitted from API requests. However, any non-pointer,
  835. // non-interface field appearing in ForceSendFields will be sent to the
  836. // server regardless of whether the field is empty or not. This may be
  837. // used to include empty fields in Patch requests.
  838. ForceSendFields []string `json:"-"`
  839. // NullFields is a list of field names (e.g. "Debuggee") to include in
  840. // API requests with the JSON null value. By default, fields with empty
  841. // values are omitted from API requests. However, any field with an
  842. // empty value appearing in NullFields will be sent to the server as
  843. // null. It is an error if a field in this list has a non-empty value.
  844. // This may be used to include null fields in Patch requests.
  845. NullFields []string `json:"-"`
  846. }
  847. func (s *RegisterDebuggeeResponse) MarshalJSON() ([]byte, error) {
  848. type NoMethod RegisterDebuggeeResponse
  849. raw := NoMethod(*s)
  850. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  851. }
  852. // RepoId: A unique identifier for a cloud repo.
  853. type RepoId struct {
  854. // ProjectRepoId: A combination of a project ID and a repo name.
  855. ProjectRepoId *ProjectRepoId `json:"projectRepoId,omitempty"`
  856. // Uid: A server-assigned, globally unique identifier.
  857. Uid string `json:"uid,omitempty"`
  858. // ForceSendFields is a list of field names (e.g. "ProjectRepoId") to
  859. // unconditionally include in API requests. By default, fields with
  860. // empty values are omitted from API requests. However, any non-pointer,
  861. // non-interface field appearing in ForceSendFields will be sent to the
  862. // server regardless of whether the field is empty or not. This may be
  863. // used to include empty fields in Patch requests.
  864. ForceSendFields []string `json:"-"`
  865. // NullFields is a list of field names (e.g. "ProjectRepoId") to include
  866. // in API requests with the JSON null value. By default, fields with
  867. // empty values are omitted from API requests. However, any field with
  868. // an empty value appearing in NullFields will be sent to the server as
  869. // null. It is an error if a field in this list has a non-empty value.
  870. // This may be used to include null fields in Patch requests.
  871. NullFields []string `json:"-"`
  872. }
  873. func (s *RepoId) MarshalJSON() ([]byte, error) {
  874. type NoMethod RepoId
  875. raw := NoMethod(*s)
  876. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  877. }
  878. // SetBreakpointResponse: Response for setting a breakpoint.
  879. type SetBreakpointResponse struct {
  880. // Breakpoint: Breakpoint resource.
  881. // The field `id` is guaranteed to be set (in addition to the echoed
  882. // fileds).
  883. Breakpoint *Breakpoint `json:"breakpoint,omitempty"`
  884. // ServerResponse contains the HTTP response code and headers from the
  885. // server.
  886. googleapi.ServerResponse `json:"-"`
  887. // ForceSendFields is a list of field names (e.g. "Breakpoint") to
  888. // unconditionally include in API requests. By default, fields with
  889. // empty values are omitted from API requests. However, any non-pointer,
  890. // non-interface field appearing in ForceSendFields will be sent to the
  891. // server regardless of whether the field is empty or not. This may be
  892. // used to include empty fields in Patch requests.
  893. ForceSendFields []string `json:"-"`
  894. // NullFields is a list of field names (e.g. "Breakpoint") to include in
  895. // API requests with the JSON null value. By default, fields with empty
  896. // values are omitted from API requests. However, any field with an
  897. // empty value appearing in NullFields will be sent to the server as
  898. // null. It is an error if a field in this list has a non-empty value.
  899. // This may be used to include null fields in Patch requests.
  900. NullFields []string `json:"-"`
  901. }
  902. func (s *SetBreakpointResponse) MarshalJSON() ([]byte, error) {
  903. type NoMethod SetBreakpointResponse
  904. raw := NoMethod(*s)
  905. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  906. }
  907. // SourceContext: A SourceContext is a reference to a tree of files. A
  908. // SourceContext together
  909. // with a path point to a unique revision of a single file or directory.
  910. type SourceContext struct {
  911. // CloudRepo: A SourceContext referring to a revision in a cloud repo.
  912. CloudRepo *CloudRepoSourceContext `json:"cloudRepo,omitempty"`
  913. // CloudWorkspace: A SourceContext referring to a snapshot in a cloud
  914. // workspace.
  915. CloudWorkspace *CloudWorkspaceSourceContext `json:"cloudWorkspace,omitempty"`
  916. // Gerrit: A SourceContext referring to a Gerrit project.
  917. Gerrit *GerritSourceContext `json:"gerrit,omitempty"`
  918. // Git: A SourceContext referring to any third party Git repo (e.g.
  919. // GitHub).
  920. Git *GitSourceContext `json:"git,omitempty"`
  921. // ForceSendFields is a list of field names (e.g. "CloudRepo") to
  922. // unconditionally include in API requests. By default, fields with
  923. // empty values are omitted from API requests. However, any non-pointer,
  924. // non-interface field appearing in ForceSendFields will be sent to the
  925. // server regardless of whether the field is empty or not. This may be
  926. // used to include empty fields in Patch requests.
  927. ForceSendFields []string `json:"-"`
  928. // NullFields is a list of field names (e.g. "CloudRepo") to include in
  929. // API requests with the JSON null value. By default, fields with empty
  930. // values are omitted from API requests. However, any field with an
  931. // empty value appearing in NullFields will be sent to the server as
  932. // null. It is an error if a field in this list has a non-empty value.
  933. // This may be used to include null fields in Patch requests.
  934. NullFields []string `json:"-"`
  935. }
  936. func (s *SourceContext) MarshalJSON() ([]byte, error) {
  937. type NoMethod SourceContext
  938. raw := NoMethod(*s)
  939. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  940. }
  941. // SourceLocation: Represents a location in the source code.
  942. type SourceLocation struct {
  943. // Line: Line inside the file. The first line in the file has the value
  944. // `1`.
  945. Line int64 `json:"line,omitempty"`
  946. // Path: Path to the source file within the source context of the target
  947. // binary.
  948. Path string `json:"path,omitempty"`
  949. // ForceSendFields is a list of field names (e.g. "Line") to
  950. // unconditionally include in API requests. By default, fields with
  951. // empty values are omitted from API requests. However, any non-pointer,
  952. // non-interface field appearing in ForceSendFields will be sent to the
  953. // server regardless of whether the field is empty or not. This may be
  954. // used to include empty fields in Patch requests.
  955. ForceSendFields []string `json:"-"`
  956. // NullFields is a list of field names (e.g. "Line") to include in API
  957. // requests with the JSON null value. By default, fields with empty
  958. // values are omitted from API requests. However, any field with an
  959. // empty value appearing in NullFields will be sent to the server as
  960. // null. It is an error if a field in this list has a non-empty value.
  961. // This may be used to include null fields in Patch requests.
  962. NullFields []string `json:"-"`
  963. }
  964. func (s *SourceLocation) MarshalJSON() ([]byte, error) {
  965. type NoMethod SourceLocation
  966. raw := NoMethod(*s)
  967. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  968. }
  969. // StackFrame: Represents a stack frame context.
  970. type StackFrame struct {
  971. // Arguments: Set of arguments passed to this function.
  972. // Note that this might not be populated for all stack frames.
  973. Arguments []*Variable `json:"arguments,omitempty"`
  974. // Function: Demangled function name at the call site.
  975. Function string `json:"function,omitempty"`
  976. // Locals: Set of local variables at the stack frame location.
  977. // Note that this might not be populated for all stack frames.
  978. Locals []*Variable `json:"locals,omitempty"`
  979. // Location: Source location of the call site.
  980. Location *SourceLocation `json:"location,omitempty"`
  981. // ForceSendFields is a list of field names (e.g. "Arguments") to
  982. // unconditionally include in API requests. By default, fields with
  983. // empty values are omitted from API requests. However, any non-pointer,
  984. // non-interface field appearing in ForceSendFields will be sent to the
  985. // server regardless of whether the field is empty or not. This may be
  986. // used to include empty fields in Patch requests.
  987. ForceSendFields []string `json:"-"`
  988. // NullFields is a list of field names (e.g. "Arguments") to include in
  989. // API requests with the JSON null value. By default, fields with empty
  990. // values are omitted from API requests. However, any field with an
  991. // empty value appearing in NullFields will be sent to the server as
  992. // null. It is an error if a field in this list has a non-empty value.
  993. // This may be used to include null fields in Patch requests.
  994. NullFields []string `json:"-"`
  995. }
  996. func (s *StackFrame) MarshalJSON() ([]byte, error) {
  997. type NoMethod StackFrame
  998. raw := NoMethod(*s)
  999. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1000. }
  1001. // StatusMessage: Represents a contextual status message.
  1002. // The message can indicate an error or informational status, and refer
  1003. // to
  1004. // specific parts of the containing object.
  1005. // For example, the `Breakpoint.status` field can indicate an error
  1006. // referring
  1007. // to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not
  1008. // found`.
  1009. type StatusMessage struct {
  1010. // Description: Status message text.
  1011. Description *FormatMessage `json:"description,omitempty"`
  1012. // IsError: Distinguishes errors from informational messages.
  1013. IsError bool `json:"isError,omitempty"`
  1014. // RefersTo: Reference to which the message applies.
  1015. //
  1016. // Possible values:
  1017. // "UNSPECIFIED" - Status doesn't refer to any particular input.
  1018. // "BREAKPOINT_SOURCE_LOCATION" - Status applies to the breakpoint and
  1019. // is related to its location.
  1020. // "BREAKPOINT_CONDITION" - Status applies to the breakpoint and is
  1021. // related to its condition.
  1022. // "BREAKPOINT_EXPRESSION" - Status applies to the breakpoint and is
  1023. // related to its expressions.
  1024. // "BREAKPOINT_AGE" - Status applies to the breakpoint and is related
  1025. // to its age.
  1026. // "VARIABLE_NAME" - Status applies to the entire variable.
  1027. // "VARIABLE_VALUE" - Status applies to variable value (variable name
  1028. // is valid).
  1029. RefersTo string `json:"refersTo,omitempty"`
  1030. // ForceSendFields is a list of field names (e.g. "Description") to
  1031. // unconditionally include in API requests. By default, fields with
  1032. // empty values are omitted from API requests. However, any non-pointer,
  1033. // non-interface field appearing in ForceSendFields will be sent to the
  1034. // server regardless of whether the field is empty or not. This may be
  1035. // used to include empty fields in Patch requests.
  1036. ForceSendFields []string `json:"-"`
  1037. // NullFields is a list of field names (e.g. "Description") to include
  1038. // in API requests with the JSON null value. By default, fields with
  1039. // empty values are omitted from API requests. However, any field with
  1040. // an empty value appearing in NullFields will be sent to the server as
  1041. // null. It is an error if a field in this list has a non-empty value.
  1042. // This may be used to include null fields in Patch requests.
  1043. NullFields []string `json:"-"`
  1044. }
  1045. func (s *StatusMessage) MarshalJSON() ([]byte, error) {
  1046. type NoMethod StatusMessage
  1047. raw := NoMethod(*s)
  1048. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1049. }
  1050. // UpdateActiveBreakpointRequest: Request to update an active
  1051. // breakpoint.
  1052. type UpdateActiveBreakpointRequest struct {
  1053. // Breakpoint: Updated breakpoint information.
  1054. // The field `id` must be set.
  1055. // The agent must echo all Breakpoint specification fields in the
  1056. // update.
  1057. Breakpoint *Breakpoint `json:"breakpoint,omitempty"`
  1058. // ForceSendFields is a list of field names (e.g. "Breakpoint") to
  1059. // unconditionally include in API requests. By default, fields with
  1060. // empty values are omitted from API requests. However, any non-pointer,
  1061. // non-interface field appearing in ForceSendFields will be sent to the
  1062. // server regardless of whether the field is empty or not. This may be
  1063. // used to include empty fields in Patch requests.
  1064. ForceSendFields []string `json:"-"`
  1065. // NullFields is a list of field names (e.g. "Breakpoint") to include in
  1066. // API requests with the JSON null value. By default, fields with empty
  1067. // values are omitted from API requests. However, any field with an
  1068. // empty value appearing in NullFields will be sent to the server as
  1069. // null. It is an error if a field in this list has a non-empty value.
  1070. // This may be used to include null fields in Patch requests.
  1071. NullFields []string `json:"-"`
  1072. }
  1073. func (s *UpdateActiveBreakpointRequest) MarshalJSON() ([]byte, error) {
  1074. type NoMethod UpdateActiveBreakpointRequest
  1075. raw := NoMethod(*s)
  1076. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1077. }
  1078. // UpdateActiveBreakpointResponse: Response for updating an active
  1079. // breakpoint.
  1080. // The message is defined to allow future extensions.
  1081. type UpdateActiveBreakpointResponse struct {
  1082. // ServerResponse contains the HTTP response code and headers from the
  1083. // server.
  1084. googleapi.ServerResponse `json:"-"`
  1085. }
  1086. // Variable: Represents a variable or an argument possibly of a compound
  1087. // object type.
  1088. // Note how the following variables are represented:
  1089. //
  1090. // 1) A simple variable:
  1091. //
  1092. // int x = 5
  1093. //
  1094. // { name: "x", value: "5", type: "int" } // Captured variable
  1095. //
  1096. // 2) A compound object:
  1097. //
  1098. // struct T {
  1099. // int m1;
  1100. // int m2;
  1101. // };
  1102. // T x = { 3, 7 };
  1103. //
  1104. // { // Captured variable
  1105. // name: "x",
  1106. // type: "T",
  1107. // members { name: "m1", value: "3", type: "int" },
  1108. // members { name: "m2", value: "7", type: "int" }
  1109. // }
  1110. //
  1111. // 3) A pointer where the pointee was captured:
  1112. //
  1113. // T x = { 3, 7 };
  1114. // T* p = &x;
  1115. //
  1116. // { // Captured variable
  1117. // name: "p",
  1118. // type: "T*",
  1119. // value: "0x00500500",
  1120. // members { name: "m1", value: "3", type: "int" },
  1121. // members { name: "m2", value: "7", type: "int" }
  1122. // }
  1123. //
  1124. // 4) A pointer where the pointee was not captured:
  1125. //
  1126. // T* p = new T;
  1127. //
  1128. // { // Captured variable
  1129. // name: "p",
  1130. // type: "T*",
  1131. // value: "0x00400400"
  1132. // status { is_error: true, description { format: "unavailable"
  1133. // } }
  1134. // }
  1135. //
  1136. // The status should describe the reason for the missing value,
  1137. // such as `<optimized out>`, `<inaccessible>`, `<pointers limit
  1138. // reached>`.
  1139. //
  1140. // Note that a null pointer should not have members.
  1141. //
  1142. // 5) An unnamed value:
  1143. //
  1144. // int* p = new int(7);
  1145. //
  1146. // { // Captured variable
  1147. // name: "p",
  1148. // value: "0x00500500",
  1149. // type: "int*",
  1150. // members { value: "7", type: "int" } }
  1151. //
  1152. // 6) An unnamed pointer where the pointee was not captured:
  1153. //
  1154. // int* p = new int(7);
  1155. // int** pp = &p;
  1156. //
  1157. // { // Captured variable
  1158. // name: "pp",
  1159. // value: "0x00500500",
  1160. // type: "int**",
  1161. // members {
  1162. // value: "0x00400400",
  1163. // type: "int*"
  1164. // status {
  1165. // is_error: true,
  1166. // description: { format: "unavailable" } }
  1167. // }
  1168. // }
  1169. // }
  1170. //
  1171. // To optimize computation, memory and network traffic, variables
  1172. // that
  1173. // repeat in the output multiple times can be stored once in a
  1174. // shared
  1175. // variable table and be referenced using the `var_table_index` field.
  1176. // The
  1177. // variables stored in the shared table are nameless and are
  1178. // essentially
  1179. // a partition of the complete variable. To reconstruct the
  1180. // complete
  1181. // variable, merge the referencing variable with the referenced
  1182. // variable.
  1183. //
  1184. // When using the shared variable table, the following variables:
  1185. //
  1186. // T x = { 3, 7 };
  1187. // T* p = &x;
  1188. // T& r = x;
  1189. //
  1190. // { name: "x", var_table_index: 3, type: "T" } // Captured
  1191. // variables
  1192. // { name: "p", value "0x00500500", type="T*", var_table_index: 3 }
  1193. // { name: "r", type="T&", var_table_index: 3 }
  1194. //
  1195. // { // Shared variable table entry #3:
  1196. // members { name: "m1", value: "3", type: "int" },
  1197. // members { name: "m2", value: "7", type: "int" }
  1198. // }
  1199. //
  1200. // Note that the pointer address is stored with the referencing
  1201. // variable
  1202. // and not with the referenced variable. This allows the referenced
  1203. // variable
  1204. // to be shared between pointers and references.
  1205. //
  1206. // The type field is optional. The debugger agent may or may not support
  1207. // it.
  1208. type Variable struct {
  1209. // Members: Members contained or pointed to by the variable.
  1210. Members []*Variable `json:"members,omitempty"`
  1211. // Name: Name of the variable, if any.
  1212. Name string `json:"name,omitempty"`
  1213. // Status: Status associated with the variable. This field will usually
  1214. // stay
  1215. // unset. A status of a single variable only applies to that variable
  1216. // or
  1217. // expression. The rest of breakpoint data still remains valid.
  1218. // Variables
  1219. // might be reported in error state even when breakpoint is not in
  1220. // final
  1221. // state.
  1222. //
  1223. // The message may refer to variable name with `refers_to` set
  1224. // to
  1225. // `VARIABLE_NAME`. Alternatively `refers_to` will be set to
  1226. // `VARIABLE_VALUE`.
  1227. // In either case variable value and members will be unset.
  1228. //
  1229. // Example of error message applied to name: `Invalid expression
  1230. // syntax`.
  1231. //
  1232. // Example of information message applied to value: `Not
  1233. // captured`.
  1234. //
  1235. // Examples of error message applied to value:
  1236. //
  1237. // * `Malformed string`,
  1238. // * `Field f not found in class C`
  1239. // * `Null pointer dereference`
  1240. Status *StatusMessage `json:"status,omitempty"`
  1241. // Type: Variable type (e.g. `MyClass`). If the variable is split
  1242. // with
  1243. // `var_table_index`, `type` goes next to `value`. The interpretation
  1244. // of
  1245. // a type is agent specific. It is recommended to include the dynamic
  1246. // type
  1247. // rather than a static type of an object.
  1248. Type string `json:"type,omitempty"`
  1249. // Value: Simple value of the variable.
  1250. Value string `json:"value,omitempty"`
  1251. // VarTableIndex: Reference to a variable in the shared variable table.
  1252. // More than
  1253. // one variable can reference the same variable in the table.
  1254. // The
  1255. // `var_table_index` field is an index into `variable_table` in
  1256. // Breakpoint.
  1257. VarTableIndex int64 `json:"varTableIndex,omitempty"`
  1258. // ForceSendFields is a list of field names (e.g. "Members") to
  1259. // unconditionally include in API requests. By default, fields with
  1260. // empty values are omitted from API requests. However, any non-pointer,
  1261. // non-interface field appearing in ForceSendFields will be sent to the
  1262. // server regardless of whether the field is empty or not. This may be
  1263. // used to include empty fields in Patch requests.
  1264. ForceSendFields []string `json:"-"`
  1265. // NullFields is a list of field names (e.g. "Members") to include in
  1266. // API requests with the JSON null value. By default, fields with empty
  1267. // values are omitted from API requests. However, any field with an
  1268. // empty value appearing in NullFields will be sent to the server as
  1269. // null. It is an error if a field in this list has a non-empty value.
  1270. // This may be used to include null fields in Patch requests.
  1271. NullFields []string `json:"-"`
  1272. }
  1273. func (s *Variable) MarshalJSON() ([]byte, error) {
  1274. type NoMethod Variable
  1275. raw := NoMethod(*s)
  1276. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1277. }
  1278. // method id "clouddebugger.controller.debuggees.register":
  1279. type ControllerDebuggeesRegisterCall struct {
  1280. s *Service
  1281. registerdebuggeerequest *RegisterDebuggeeRequest
  1282. urlParams_ gensupport.URLParams
  1283. ctx_ context.Context
  1284. header_ http.Header
  1285. }
  1286. // Register: Registers the debuggee with the controller service.
  1287. //
  1288. // All agents attached to the same application must call this method
  1289. // with
  1290. // exactly the same request content to get back the same stable
  1291. // `debuggee_id`.
  1292. // Agents should call this method again whenever
  1293. // `google.rpc.Code.NOT_FOUND`
  1294. // is returned from any controller method.
  1295. //
  1296. // This protocol allows the controller service to disable debuggees,
  1297. // recover
  1298. // from data loss, or change the `debuggee_id` format. Agents must
  1299. // handle
  1300. // `debuggee_id` value changing upon re-registration.
  1301. func (r *ControllerDebuggeesService) Register(registerdebuggeerequest *RegisterDebuggeeRequest) *ControllerDebuggeesRegisterCall {
  1302. c := &ControllerDebuggeesRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1303. c.registerdebuggeerequest = registerdebuggeerequest
  1304. return c
  1305. }
  1306. // Fields allows partial responses to be retrieved. See
  1307. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1308. // for more information.
  1309. func (c *ControllerDebuggeesRegisterCall) Fields(s ...googleapi.Field) *ControllerDebuggeesRegisterCall {
  1310. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1311. return c
  1312. }
  1313. // Context sets the context to be used in this call's Do method. Any
  1314. // pending HTTP request will be aborted if the provided context is
  1315. // canceled.
  1316. func (c *ControllerDebuggeesRegisterCall) Context(ctx context.Context) *ControllerDebuggeesRegisterCall {
  1317. c.ctx_ = ctx
  1318. return c
  1319. }
  1320. // Header returns an http.Header that can be modified by the caller to
  1321. // add HTTP headers to the request.
  1322. func (c *ControllerDebuggeesRegisterCall) Header() http.Header {
  1323. if c.header_ == nil {
  1324. c.header_ = make(http.Header)
  1325. }
  1326. return c.header_
  1327. }
  1328. func (c *ControllerDebuggeesRegisterCall) doRequest(alt string) (*http.Response, error) {
  1329. reqHeaders := make(http.Header)
  1330. for k, v := range c.header_ {
  1331. reqHeaders[k] = v
  1332. }
  1333. reqHeaders.Set("User-Agent", c.s.userAgent())
  1334. var body io.Reader = nil
  1335. body, err := googleapi.WithoutDataWrapper.JSONReader(c.registerdebuggeerequest)
  1336. if err != nil {
  1337. return nil, err
  1338. }
  1339. reqHeaders.Set("Content-Type", "application/json")
  1340. c.urlParams_.Set("alt", alt)
  1341. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/controller/debuggees/register")
  1342. urls += "?" + c.urlParams_.Encode()
  1343. req, _ := http.NewRequest("POST", urls, body)
  1344. req.Header = reqHeaders
  1345. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1346. }
  1347. // Do executes the "clouddebugger.controller.debuggees.register" call.
  1348. // Exactly one of *RegisterDebuggeeResponse or error will be non-nil.
  1349. // Any non-2xx status code is an error. Response headers are in either
  1350. // *RegisterDebuggeeResponse.ServerResponse.Header or (if a response was
  1351. // returned at all) in error.(*googleapi.Error).Header. Use
  1352. // googleapi.IsNotModified to check whether the returned error was
  1353. // because http.StatusNotModified was returned.
  1354. func (c *ControllerDebuggeesRegisterCall) Do(opts ...googleapi.CallOption) (*RegisterDebuggeeResponse, error) {
  1355. gensupport.SetOptions(c.urlParams_, opts...)
  1356. res, err := c.doRequest("json")
  1357. if res != nil && res.StatusCode == http.StatusNotModified {
  1358. if res.Body != nil {
  1359. res.Body.Close()
  1360. }
  1361. return nil, &googleapi.Error{
  1362. Code: res.StatusCode,
  1363. Header: res.Header,
  1364. }
  1365. }
  1366. if err != nil {
  1367. return nil, err
  1368. }
  1369. defer googleapi.CloseBody(res)
  1370. if err := googleapi.CheckResponse(res); err != nil {
  1371. return nil, err
  1372. }
  1373. ret := &RegisterDebuggeeResponse{
  1374. ServerResponse: googleapi.ServerResponse{
  1375. Header: res.Header,
  1376. HTTPStatusCode: res.StatusCode,
  1377. },
  1378. }
  1379. target := &ret
  1380. if err := gensupport.DecodeResponse(target, res); err != nil {
  1381. return nil, err
  1382. }
  1383. return ret, nil
  1384. // {
  1385. // "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application must call this method with\nexactly the same request content to get back the same stable `debuggee_id`.\nAgents should call this method again whenever `google.rpc.Code.NOT_FOUND`\nis returned from any controller method.\n\nThis protocol allows the controller service to disable debuggees, recover\nfrom data loss, or change the `debuggee_id` format. Agents must handle\n`debuggee_id` value changing upon re-registration.",
  1386. // "flatPath": "v2/controller/debuggees/register",
  1387. // "httpMethod": "POST",
  1388. // "id": "clouddebugger.controller.debuggees.register",
  1389. // "parameterOrder": [],
  1390. // "parameters": {},
  1391. // "path": "v2/controller/debuggees/register",
  1392. // "request": {
  1393. // "$ref": "RegisterDebuggeeRequest"
  1394. // },
  1395. // "response": {
  1396. // "$ref": "RegisterDebuggeeResponse"
  1397. // },
  1398. // "scopes": [
  1399. // "https://www.googleapis.com/auth/cloud-platform",
  1400. // "https://www.googleapis.com/auth/cloud_debugger"
  1401. // ]
  1402. // }
  1403. }
  1404. // method id "clouddebugger.controller.debuggees.breakpoints.list":
  1405. type ControllerDebuggeesBreakpointsListCall struct {
  1406. s *Service
  1407. debuggeeId string
  1408. urlParams_ gensupport.URLParams
  1409. ifNoneMatch_ string
  1410. ctx_ context.Context
  1411. header_ http.Header
  1412. }
  1413. // List: Returns the list of all active breakpoints for the
  1414. // debuggee.
  1415. //
  1416. // The breakpoint specification (`location`, `condition`, and
  1417. // `expressions`
  1418. // fields) is semantically immutable, although the field values
  1419. // may
  1420. // change. For example, an agent may update the location line number
  1421. // to reflect the actual line where the breakpoint was set, but
  1422. // this
  1423. // doesn't change the breakpoint semantics.
  1424. //
  1425. // This means that an agent does not need to check if a breakpoint has
  1426. // changed
  1427. // when it encounters the same breakpoint on a successive
  1428. // call.
  1429. // Moreover, an agent should remember the breakpoints that are
  1430. // completed
  1431. // until the controller removes them from the active list to
  1432. // avoid
  1433. // setting those breakpoints again.
  1434. func (r *ControllerDebuggeesBreakpointsService) List(debuggeeId string) *ControllerDebuggeesBreakpointsListCall {
  1435. c := &ControllerDebuggeesBreakpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1436. c.debuggeeId = debuggeeId
  1437. return c
  1438. }
  1439. // SuccessOnTimeout sets the optional parameter "successOnTimeout": If
  1440. // set to `true` (recommended), returns `google.rpc.Code.OK` status
  1441. // and
  1442. // sets the `wait_expired` response field to `true` when the
  1443. // server-selected
  1444. // timeout has expired.
  1445. //
  1446. // If set to `false` (deprecated), returns `google.rpc.Code.ABORTED`
  1447. // status
  1448. // when the server-selected timeout has expired.
  1449. func (c *ControllerDebuggeesBreakpointsListCall) SuccessOnTimeout(successOnTimeout bool) *ControllerDebuggeesBreakpointsListCall {
  1450. c.urlParams_.Set("successOnTimeout", fmt.Sprint(successOnTimeout))
  1451. return c
  1452. }
  1453. // WaitToken sets the optional parameter "waitToken": A token that, if
  1454. // specified, blocks the method call until the list
  1455. // of active breakpoints has changed, or a server-selected timeout
  1456. // has
  1457. // expired. The value should be set from the `next_wait_token` field
  1458. // in
  1459. // the last response. The initial value should be set to "init".
  1460. func (c *ControllerDebuggeesBreakpointsListCall) WaitToken(waitToken string) *ControllerDebuggeesBreakpointsListCall {
  1461. c.urlParams_.Set("waitToken", waitToken)
  1462. return c
  1463. }
  1464. // Fields allows partial responses to be retrieved. See
  1465. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1466. // for more information.
  1467. func (c *ControllerDebuggeesBreakpointsListCall) Fields(s ...googleapi.Field) *ControllerDebuggeesBreakpointsListCall {
  1468. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1469. return c
  1470. }
  1471. // IfNoneMatch sets the optional parameter which makes the operation
  1472. // fail if the object's ETag matches the given value. This is useful for
  1473. // getting updates only after the object has changed since the last
  1474. // request. Use googleapi.IsNotModified to check whether the response
  1475. // error from Do is the result of In-None-Match.
  1476. func (c *ControllerDebuggeesBreakpointsListCall) IfNoneMatch(entityTag string) *ControllerDebuggeesBreakpointsListCall {
  1477. c.ifNoneMatch_ = entityTag
  1478. return c
  1479. }
  1480. // Context sets the context to be used in this call's Do method. Any
  1481. // pending HTTP request will be aborted if the provided context is
  1482. // canceled.
  1483. func (c *ControllerDebuggeesBreakpointsListCall) Context(ctx context.Context) *ControllerDebuggeesBreakpointsListCall {
  1484. c.ctx_ = ctx
  1485. return c
  1486. }
  1487. // Header returns an http.Header that can be modified by the caller to
  1488. // add HTTP headers to the request.
  1489. func (c *ControllerDebuggeesBreakpointsListCall) Header() http.Header {
  1490. if c.header_ == nil {
  1491. c.header_ = make(http.Header)
  1492. }
  1493. return c.header_
  1494. }
  1495. func (c *ControllerDebuggeesBreakpointsListCall) doRequest(alt string) (*http.Response, error) {
  1496. reqHeaders := make(http.Header)
  1497. for k, v := range c.header_ {
  1498. reqHeaders[k] = v
  1499. }
  1500. reqHeaders.Set("User-Agent", c.s.userAgent())
  1501. if c.ifNoneMatch_ != "" {
  1502. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1503. }
  1504. var body io.Reader = nil
  1505. c.urlParams_.Set("alt", alt)
  1506. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/controller/debuggees/{debuggeeId}/breakpoints")
  1507. urls += "?" + c.urlParams_.Encode()
  1508. req, _ := http.NewRequest("GET", urls, body)
  1509. req.Header = reqHeaders
  1510. googleapi.Expand(req.URL, map[string]string{
  1511. "debuggeeId": c.debuggeeId,
  1512. })
  1513. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1514. }
  1515. // Do executes the "clouddebugger.controller.debuggees.breakpoints.list" call.
  1516. // Exactly one of *ListActiveBreakpointsResponse or error will be
  1517. // non-nil. Any non-2xx status code is an error. Response headers are in
  1518. // either *ListActiveBreakpointsResponse.ServerResponse.Header or (if a
  1519. // response was returned at all) in error.(*googleapi.Error).Header. Use
  1520. // googleapi.IsNotModified to check whether the returned error was
  1521. // because http.StatusNotModified was returned.
  1522. func (c *ControllerDebuggeesBreakpointsListCall) Do(opts ...googleapi.CallOption) (*ListActiveBreakpointsResponse, error) {
  1523. gensupport.SetOptions(c.urlParams_, opts...)
  1524. res, err := c.doRequest("json")
  1525. if res != nil && res.StatusCode == http.StatusNotModified {
  1526. if res.Body != nil {
  1527. res.Body.Close()
  1528. }
  1529. return nil, &googleapi.Error{
  1530. Code: res.StatusCode,
  1531. Header: res.Header,
  1532. }
  1533. }
  1534. if err != nil {
  1535. return nil, err
  1536. }
  1537. defer googleapi.CloseBody(res)
  1538. if err := googleapi.CheckResponse(res); err != nil {
  1539. return nil, err
  1540. }
  1541. ret := &ListActiveBreakpointsResponse{
  1542. ServerResponse: googleapi.ServerResponse{
  1543. Header: res.Header,
  1544. HTTPStatusCode: res.StatusCode,
  1545. },
  1546. }
  1547. target := &ret
  1548. if err := gensupport.DecodeResponse(target, res); err != nil {
  1549. return nil, err
  1550. }
  1551. return ret, nil
  1552. // {
  1553. // "description": "Returns the list of all active breakpoints for the debuggee.\n\nThe breakpoint specification (`location`, `condition`, and `expressions`\nfields) is semantically immutable, although the field values may\nchange. For example, an agent may update the location line number\nto reflect the actual line where the breakpoint was set, but this\ndoesn't change the breakpoint semantics.\n\nThis means that an agent does not need to check if a breakpoint has changed\nwhen it encounters the same breakpoint on a successive call.\nMoreover, an agent should remember the breakpoints that are completed\nuntil the controller removes them from the active list to avoid\nsetting those breakpoints again.",
  1554. // "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints",
  1555. // "httpMethod": "GET",
  1556. // "id": "clouddebugger.controller.debuggees.breakpoints.list",
  1557. // "parameterOrder": [
  1558. // "debuggeeId"
  1559. // ],
  1560. // "parameters": {
  1561. // "debuggeeId": {
  1562. // "description": "Identifies the debuggee.",
  1563. // "location": "path",
  1564. // "required": true,
  1565. // "type": "string"
  1566. // },
  1567. // "successOnTimeout": {
  1568. // "description": "If set to `true` (recommended), returns `google.rpc.Code.OK` status and\nsets the `wait_expired` response field to `true` when the server-selected\ntimeout has expired.\n\nIf set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status\nwhen the server-selected timeout has expired.",
  1569. // "location": "query",
  1570. // "type": "boolean"
  1571. // },
  1572. // "waitToken": {
  1573. // "description": "A token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server-selected timeout has\nexpired. The value should be set from the `next_wait_token` field in\nthe last response. The initial value should be set to `\"init\"`.",
  1574. // "location": "query",
  1575. // "type": "string"
  1576. // }
  1577. // },
  1578. // "path": "v2/controller/debuggees/{debuggeeId}/breakpoints",
  1579. // "response": {
  1580. // "$ref": "ListActiveBreakpointsResponse"
  1581. // },
  1582. // "scopes": [
  1583. // "https://www.googleapis.com/auth/cloud-platform",
  1584. // "https://www.googleapis.com/auth/cloud_debugger"
  1585. // ]
  1586. // }
  1587. }
  1588. // method id "clouddebugger.controller.debuggees.breakpoints.update":
  1589. type ControllerDebuggeesBreakpointsUpdateCall struct {
  1590. s *Service
  1591. debuggeeId string
  1592. id string
  1593. updateactivebreakpointrequest *UpdateActiveBreakpointRequest
  1594. urlParams_ gensupport.URLParams
  1595. ctx_ context.Context
  1596. header_ http.Header
  1597. }
  1598. // Update: Updates the breakpoint state or mutable fields.
  1599. // The entire Breakpoint message must be sent back to the controller
  1600. // service.
  1601. //
  1602. // Updates to active breakpoint fields are only allowed if the new
  1603. // value
  1604. // does not change the breakpoint specification. Updates to the
  1605. // `location`,
  1606. // `condition` and `expressions` fields should not alter the
  1607. // breakpoint
  1608. // semantics. These may only make changes such as canonicalizing a
  1609. // value
  1610. // or snapping the location to the correct line of code.
  1611. func (r *ControllerDebuggeesBreakpointsService) Update(debuggeeId string, id string, updateactivebreakpointrequest *UpdateActiveBreakpointRequest) *ControllerDebuggeesBreakpointsUpdateCall {
  1612. c := &ControllerDebuggeesBreakpointsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1613. c.debuggeeId = debuggeeId
  1614. c.id = id
  1615. c.updateactivebreakpointrequest = updateactivebreakpointrequest
  1616. return c
  1617. }
  1618. // Fields allows partial responses to be retrieved. See
  1619. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1620. // for more information.
  1621. func (c *ControllerDebuggeesBreakpointsUpdateCall) Fields(s ...googleapi.Field) *ControllerDebuggeesBreakpointsUpdateCall {
  1622. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1623. return c
  1624. }
  1625. // Context sets the context to be used in this call's Do method. Any
  1626. // pending HTTP request will be aborted if the provided context is
  1627. // canceled.
  1628. func (c *ControllerDebuggeesBreakpointsUpdateCall) Context(ctx context.Context) *ControllerDebuggeesBreakpointsUpdateCall {
  1629. c.ctx_ = ctx
  1630. return c
  1631. }
  1632. // Header returns an http.Header that can be modified by the caller to
  1633. // add HTTP headers to the request.
  1634. func (c *ControllerDebuggeesBreakpointsUpdateCall) Header() http.Header {
  1635. if c.header_ == nil {
  1636. c.header_ = make(http.Header)
  1637. }
  1638. return c.header_
  1639. }
  1640. func (c *ControllerDebuggeesBreakpointsUpdateCall) doRequest(alt string) (*http.Response, error) {
  1641. reqHeaders := make(http.Header)
  1642. for k, v := range c.header_ {
  1643. reqHeaders[k] = v
  1644. }
  1645. reqHeaders.Set("User-Agent", c.s.userAgent())
  1646. var body io.Reader = nil
  1647. body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateactivebreakpointrequest)
  1648. if err != nil {
  1649. return nil, err
  1650. }
  1651. reqHeaders.Set("Content-Type", "application/json")
  1652. c.urlParams_.Set("alt", alt)
  1653. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}")
  1654. urls += "?" + c.urlParams_.Encode()
  1655. req, _ := http.NewRequest("PUT", urls, body)
  1656. req.Header = reqHeaders
  1657. googleapi.Expand(req.URL, map[string]string{
  1658. "debuggeeId": c.debuggeeId,
  1659. "id": c.id,
  1660. })
  1661. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1662. }
  1663. // Do executes the "clouddebugger.controller.debuggees.breakpoints.update" call.
  1664. // Exactly one of *UpdateActiveBreakpointResponse or error will be
  1665. // non-nil. Any non-2xx status code is an error. Response headers are in
  1666. // either *UpdateActiveBreakpointResponse.ServerResponse.Header or (if a
  1667. // response was returned at all) in error.(*googleapi.Error).Header. Use
  1668. // googleapi.IsNotModified to check whether the returned error was
  1669. // because http.StatusNotModified was returned.
  1670. func (c *ControllerDebuggeesBreakpointsUpdateCall) Do(opts ...googleapi.CallOption) (*UpdateActiveBreakpointResponse, error) {
  1671. gensupport.SetOptions(c.urlParams_, opts...)
  1672. res, err := c.doRequest("json")
  1673. if res != nil && res.StatusCode == http.StatusNotModified {
  1674. if res.Body != nil {
  1675. res.Body.Close()
  1676. }
  1677. return nil, &googleapi.Error{
  1678. Code: res.StatusCode,
  1679. Header: res.Header,
  1680. }
  1681. }
  1682. if err != nil {
  1683. return nil, err
  1684. }
  1685. defer googleapi.CloseBody(res)
  1686. if err := googleapi.CheckResponse(res); err != nil {
  1687. return nil, err
  1688. }
  1689. ret := &UpdateActiveBreakpointResponse{
  1690. ServerResponse: googleapi.ServerResponse{
  1691. Header: res.Header,
  1692. HTTPStatusCode: res.StatusCode,
  1693. },
  1694. }
  1695. target := &ret
  1696. if err := gensupport.DecodeResponse(target, res); err != nil {
  1697. return nil, err
  1698. }
  1699. return ret, nil
  1700. // {
  1701. // "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller service.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expressions` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code.",
  1702. // "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}",
  1703. // "httpMethod": "PUT",
  1704. // "id": "clouddebugger.controller.debuggees.breakpoints.update",
  1705. // "parameterOrder": [
  1706. // "debuggeeId",
  1707. // "id"
  1708. // ],
  1709. // "parameters": {
  1710. // "debuggeeId": {
  1711. // "description": "Identifies the debuggee being debugged.",
  1712. // "location": "path",
  1713. // "required": true,
  1714. // "type": "string"
  1715. // },
  1716. // "id": {
  1717. // "description": "Breakpoint identifier, unique in the scope of the debuggee.",
  1718. // "location": "path",
  1719. // "required": true,
  1720. // "type": "string"
  1721. // }
  1722. // },
  1723. // "path": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}",
  1724. // "request": {
  1725. // "$ref": "UpdateActiveBreakpointRequest"
  1726. // },
  1727. // "response": {
  1728. // "$ref": "UpdateActiveBreakpointResponse"
  1729. // },
  1730. // "scopes": [
  1731. // "https://www.googleapis.com/auth/cloud-platform",
  1732. // "https://www.googleapis.com/auth/cloud_debugger"
  1733. // ]
  1734. // }
  1735. }
  1736. // method id "clouddebugger.debugger.debuggees.list":
  1737. type DebuggerDebuggeesListCall struct {
  1738. s *Service
  1739. urlParams_ gensupport.URLParams
  1740. ifNoneMatch_ string
  1741. ctx_ context.Context
  1742. header_ http.Header
  1743. }
  1744. // List: Lists all the debuggees that the user has access to.
  1745. func (r *DebuggerDebuggeesService) List() *DebuggerDebuggeesListCall {
  1746. c := &DebuggerDebuggeesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1747. return c
  1748. }
  1749. // ClientVersion sets the optional parameter "clientVersion": The client
  1750. // version making the call.
  1751. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  1752. func (c *DebuggerDebuggeesListCall) ClientVersion(clientVersion string) *DebuggerDebuggeesListCall {
  1753. c.urlParams_.Set("clientVersion", clientVersion)
  1754. return c
  1755. }
  1756. // IncludeInactive sets the optional parameter "includeInactive": When
  1757. // set to `true`, the result includes all debuggees. Otherwise,
  1758. // the
  1759. // result includes only debuggees that are active.
  1760. func (c *DebuggerDebuggeesListCall) IncludeInactive(includeInactive bool) *DebuggerDebuggeesListCall {
  1761. c.urlParams_.Set("includeInactive", fmt.Sprint(includeInactive))
  1762. return c
  1763. }
  1764. // Project sets the optional parameter "project": Project number of a
  1765. // Google Cloud project whose debuggees to list.
  1766. func (c *DebuggerDebuggeesListCall) Project(project string) *DebuggerDebuggeesListCall {
  1767. c.urlParams_.Set("project", project)
  1768. return c
  1769. }
  1770. // Fields allows partial responses to be retrieved. See
  1771. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1772. // for more information.
  1773. func (c *DebuggerDebuggeesListCall) Fields(s ...googleapi.Field) *DebuggerDebuggeesListCall {
  1774. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1775. return c
  1776. }
  1777. // IfNoneMatch sets the optional parameter which makes the operation
  1778. // fail if the object's ETag matches the given value. This is useful for
  1779. // getting updates only after the object has changed since the last
  1780. // request. Use googleapi.IsNotModified to check whether the response
  1781. // error from Do is the result of In-None-Match.
  1782. func (c *DebuggerDebuggeesListCall) IfNoneMatch(entityTag string) *DebuggerDebuggeesListCall {
  1783. c.ifNoneMatch_ = entityTag
  1784. return c
  1785. }
  1786. // Context sets the context to be used in this call's Do method. Any
  1787. // pending HTTP request will be aborted if the provided context is
  1788. // canceled.
  1789. func (c *DebuggerDebuggeesListCall) Context(ctx context.Context) *DebuggerDebuggeesListCall {
  1790. c.ctx_ = ctx
  1791. return c
  1792. }
  1793. // Header returns an http.Header that can be modified by the caller to
  1794. // add HTTP headers to the request.
  1795. func (c *DebuggerDebuggeesListCall) Header() http.Header {
  1796. if c.header_ == nil {
  1797. c.header_ = make(http.Header)
  1798. }
  1799. return c.header_
  1800. }
  1801. func (c *DebuggerDebuggeesListCall) doRequest(alt string) (*http.Response, error) {
  1802. reqHeaders := make(http.Header)
  1803. for k, v := range c.header_ {
  1804. reqHeaders[k] = v
  1805. }
  1806. reqHeaders.Set("User-Agent", c.s.userAgent())
  1807. if c.ifNoneMatch_ != "" {
  1808. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1809. }
  1810. var body io.Reader = nil
  1811. c.urlParams_.Set("alt", alt)
  1812. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/debugger/debuggees")
  1813. urls += "?" + c.urlParams_.Encode()
  1814. req, _ := http.NewRequest("GET", urls, body)
  1815. req.Header = reqHeaders
  1816. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1817. }
  1818. // Do executes the "clouddebugger.debugger.debuggees.list" call.
  1819. // Exactly one of *ListDebuggeesResponse or error will be non-nil. Any
  1820. // non-2xx status code is an error. Response headers are in either
  1821. // *ListDebuggeesResponse.ServerResponse.Header or (if a response was
  1822. // returned at all) in error.(*googleapi.Error).Header. Use
  1823. // googleapi.IsNotModified to check whether the returned error was
  1824. // because http.StatusNotModified was returned.
  1825. func (c *DebuggerDebuggeesListCall) Do(opts ...googleapi.CallOption) (*ListDebuggeesResponse, error) {
  1826. gensupport.SetOptions(c.urlParams_, opts...)
  1827. res, err := c.doRequest("json")
  1828. if res != nil && res.StatusCode == http.StatusNotModified {
  1829. if res.Body != nil {
  1830. res.Body.Close()
  1831. }
  1832. return nil, &googleapi.Error{
  1833. Code: res.StatusCode,
  1834. Header: res.Header,
  1835. }
  1836. }
  1837. if err != nil {
  1838. return nil, err
  1839. }
  1840. defer googleapi.CloseBody(res)
  1841. if err := googleapi.CheckResponse(res); err != nil {
  1842. return nil, err
  1843. }
  1844. ret := &ListDebuggeesResponse{
  1845. ServerResponse: googleapi.ServerResponse{
  1846. Header: res.Header,
  1847. HTTPStatusCode: res.StatusCode,
  1848. },
  1849. }
  1850. target := &ret
  1851. if err := gensupport.DecodeResponse(target, res); err != nil {
  1852. return nil, err
  1853. }
  1854. return ret, nil
  1855. // {
  1856. // "description": "Lists all the debuggees that the user has access to.",
  1857. // "flatPath": "v2/debugger/debuggees",
  1858. // "httpMethod": "GET",
  1859. // "id": "clouddebugger.debugger.debuggees.list",
  1860. // "parameterOrder": [],
  1861. // "parameters": {
  1862. // "clientVersion": {
  1863. // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).",
  1864. // "location": "query",
  1865. // "type": "string"
  1866. // },
  1867. // "includeInactive": {
  1868. // "description": "When set to `true`, the result includes all debuggees. Otherwise, the\nresult includes only debuggees that are active.",
  1869. // "location": "query",
  1870. // "type": "boolean"
  1871. // },
  1872. // "project": {
  1873. // "description": "Project number of a Google Cloud project whose debuggees to list.",
  1874. // "location": "query",
  1875. // "type": "string"
  1876. // }
  1877. // },
  1878. // "path": "v2/debugger/debuggees",
  1879. // "response": {
  1880. // "$ref": "ListDebuggeesResponse"
  1881. // },
  1882. // "scopes": [
  1883. // "https://www.googleapis.com/auth/cloud-platform",
  1884. // "https://www.googleapis.com/auth/cloud_debugger"
  1885. // ]
  1886. // }
  1887. }
  1888. // method id "clouddebugger.debugger.debuggees.breakpoints.delete":
  1889. type DebuggerDebuggeesBreakpointsDeleteCall struct {
  1890. s *Service
  1891. debuggeeId string
  1892. breakpointId string
  1893. urlParams_ gensupport.URLParams
  1894. ctx_ context.Context
  1895. header_ http.Header
  1896. }
  1897. // Delete: Deletes the breakpoint from the debuggee.
  1898. func (r *DebuggerDebuggeesBreakpointsService) Delete(debuggeeId string, breakpointId string) *DebuggerDebuggeesBreakpointsDeleteCall {
  1899. c := &DebuggerDebuggeesBreakpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1900. c.debuggeeId = debuggeeId
  1901. c.breakpointId = breakpointId
  1902. return c
  1903. }
  1904. // ClientVersion sets the optional parameter "clientVersion": The client
  1905. // version making the call.
  1906. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  1907. func (c *DebuggerDebuggeesBreakpointsDeleteCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsDeleteCall {
  1908. c.urlParams_.Set("clientVersion", clientVersion)
  1909. return c
  1910. }
  1911. // Fields allows partial responses to be retrieved. See
  1912. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1913. // for more information.
  1914. func (c *DebuggerDebuggeesBreakpointsDeleteCall) Fields(s ...googleapi.Field) *DebuggerDebuggeesBreakpointsDeleteCall {
  1915. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1916. return c
  1917. }
  1918. // Context sets the context to be used in this call's Do method. Any
  1919. // pending HTTP request will be aborted if the provided context is
  1920. // canceled.
  1921. func (c *DebuggerDebuggeesBreakpointsDeleteCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsDeleteCall {
  1922. c.ctx_ = ctx
  1923. return c
  1924. }
  1925. // Header returns an http.Header that can be modified by the caller to
  1926. // add HTTP headers to the request.
  1927. func (c *DebuggerDebuggeesBreakpointsDeleteCall) Header() http.Header {
  1928. if c.header_ == nil {
  1929. c.header_ = make(http.Header)
  1930. }
  1931. return c.header_
  1932. }
  1933. func (c *DebuggerDebuggeesBreakpointsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1934. reqHeaders := make(http.Header)
  1935. for k, v := range c.header_ {
  1936. reqHeaders[k] = v
  1937. }
  1938. reqHeaders.Set("User-Agent", c.s.userAgent())
  1939. var body io.Reader = nil
  1940. c.urlParams_.Set("alt", alt)
  1941. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}")
  1942. urls += "?" + c.urlParams_.Encode()
  1943. req, _ := http.NewRequest("DELETE", urls, body)
  1944. req.Header = reqHeaders
  1945. googleapi.Expand(req.URL, map[string]string{
  1946. "debuggeeId": c.debuggeeId,
  1947. "breakpointId": c.breakpointId,
  1948. })
  1949. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1950. }
  1951. // Do executes the "clouddebugger.debugger.debuggees.breakpoints.delete" call.
  1952. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  1953. // code is an error. Response headers are in either
  1954. // *Empty.ServerResponse.Header or (if a response was returned at all)
  1955. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1956. // check whether the returned error was because http.StatusNotModified
  1957. // was returned.
  1958. func (c *DebuggerDebuggeesBreakpointsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1959. gensupport.SetOptions(c.urlParams_, opts...)
  1960. res, err := c.doRequest("json")
  1961. if res != nil && res.StatusCode == http.StatusNotModified {
  1962. if res.Body != nil {
  1963. res.Body.Close()
  1964. }
  1965. return nil, &googleapi.Error{
  1966. Code: res.StatusCode,
  1967. Header: res.Header,
  1968. }
  1969. }
  1970. if err != nil {
  1971. return nil, err
  1972. }
  1973. defer googleapi.CloseBody(res)
  1974. if err := googleapi.CheckResponse(res); err != nil {
  1975. return nil, err
  1976. }
  1977. ret := &Empty{
  1978. ServerResponse: googleapi.ServerResponse{
  1979. Header: res.Header,
  1980. HTTPStatusCode: res.StatusCode,
  1981. },
  1982. }
  1983. target := &ret
  1984. if err := gensupport.DecodeResponse(target, res); err != nil {
  1985. return nil, err
  1986. }
  1987. return ret, nil
  1988. // {
  1989. // "description": "Deletes the breakpoint from the debuggee.",
  1990. // "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}",
  1991. // "httpMethod": "DELETE",
  1992. // "id": "clouddebugger.debugger.debuggees.breakpoints.delete",
  1993. // "parameterOrder": [
  1994. // "debuggeeId",
  1995. // "breakpointId"
  1996. // ],
  1997. // "parameters": {
  1998. // "breakpointId": {
  1999. // "description": "ID of the breakpoint to delete.",
  2000. // "location": "path",
  2001. // "required": true,
  2002. // "type": "string"
  2003. // },
  2004. // "clientVersion": {
  2005. // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).",
  2006. // "location": "query",
  2007. // "type": "string"
  2008. // },
  2009. // "debuggeeId": {
  2010. // "description": "ID of the debuggee whose breakpoint to delete.",
  2011. // "location": "path",
  2012. // "required": true,
  2013. // "type": "string"
  2014. // }
  2015. // },
  2016. // "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}",
  2017. // "response": {
  2018. // "$ref": "Empty"
  2019. // },
  2020. // "scopes": [
  2021. // "https://www.googleapis.com/auth/cloud-platform",
  2022. // "https://www.googleapis.com/auth/cloud_debugger"
  2023. // ]
  2024. // }
  2025. }
  2026. // method id "clouddebugger.debugger.debuggees.breakpoints.get":
  2027. type DebuggerDebuggeesBreakpointsGetCall struct {
  2028. s *Service
  2029. debuggeeId string
  2030. breakpointId string
  2031. urlParams_ gensupport.URLParams
  2032. ifNoneMatch_ string
  2033. ctx_ context.Context
  2034. header_ http.Header
  2035. }
  2036. // Get: Gets breakpoint information.
  2037. func (r *DebuggerDebuggeesBreakpointsService) Get(debuggeeId string, breakpointId string) *DebuggerDebuggeesBreakpointsGetCall {
  2038. c := &DebuggerDebuggeesBreakpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2039. c.debuggeeId = debuggeeId
  2040. c.breakpointId = breakpointId
  2041. return c
  2042. }
  2043. // ClientVersion sets the optional parameter "clientVersion": The client
  2044. // version making the call.
  2045. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  2046. func (c *DebuggerDebuggeesBreakpointsGetCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsGetCall {
  2047. c.urlParams_.Set("clientVersion", clientVersion)
  2048. return c
  2049. }
  2050. // Fields allows partial responses to be retrieved. See
  2051. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2052. // for more information.
  2053. func (c *DebuggerDebuggeesBreakpointsGetCall) Fields(s ...googleapi.Field) *DebuggerDebuggeesBreakpointsGetCall {
  2054. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2055. return c
  2056. }
  2057. // IfNoneMatch sets the optional parameter which makes the operation
  2058. // fail if the object's ETag matches the given value. This is useful for
  2059. // getting updates only after the object has changed since the last
  2060. // request. Use googleapi.IsNotModified to check whether the response
  2061. // error from Do is the result of In-None-Match.
  2062. func (c *DebuggerDebuggeesBreakpointsGetCall) IfNoneMatch(entityTag string) *DebuggerDebuggeesBreakpointsGetCall {
  2063. c.ifNoneMatch_ = entityTag
  2064. return c
  2065. }
  2066. // Context sets the context to be used in this call's Do method. Any
  2067. // pending HTTP request will be aborted if the provided context is
  2068. // canceled.
  2069. func (c *DebuggerDebuggeesBreakpointsGetCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsGetCall {
  2070. c.ctx_ = ctx
  2071. return c
  2072. }
  2073. // Header returns an http.Header that can be modified by the caller to
  2074. // add HTTP headers to the request.
  2075. func (c *DebuggerDebuggeesBreakpointsGetCall) Header() http.Header {
  2076. if c.header_ == nil {
  2077. c.header_ = make(http.Header)
  2078. }
  2079. return c.header_
  2080. }
  2081. func (c *DebuggerDebuggeesBreakpointsGetCall) doRequest(alt string) (*http.Response, error) {
  2082. reqHeaders := make(http.Header)
  2083. for k, v := range c.header_ {
  2084. reqHeaders[k] = v
  2085. }
  2086. reqHeaders.Set("User-Agent", c.s.userAgent())
  2087. if c.ifNoneMatch_ != "" {
  2088. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2089. }
  2090. var body io.Reader = nil
  2091. c.urlParams_.Set("alt", alt)
  2092. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}")
  2093. urls += "?" + c.urlParams_.Encode()
  2094. req, _ := http.NewRequest("GET", urls, body)
  2095. req.Header = reqHeaders
  2096. googleapi.Expand(req.URL, map[string]string{
  2097. "debuggeeId": c.debuggeeId,
  2098. "breakpointId": c.breakpointId,
  2099. })
  2100. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2101. }
  2102. // Do executes the "clouddebugger.debugger.debuggees.breakpoints.get" call.
  2103. // Exactly one of *GetBreakpointResponse or error will be non-nil. Any
  2104. // non-2xx status code is an error. Response headers are in either
  2105. // *GetBreakpointResponse.ServerResponse.Header or (if a response was
  2106. // returned at all) in error.(*googleapi.Error).Header. Use
  2107. // googleapi.IsNotModified to check whether the returned error was
  2108. // because http.StatusNotModified was returned.
  2109. func (c *DebuggerDebuggeesBreakpointsGetCall) Do(opts ...googleapi.CallOption) (*GetBreakpointResponse, error) {
  2110. gensupport.SetOptions(c.urlParams_, opts...)
  2111. res, err := c.doRequest("json")
  2112. if res != nil && res.StatusCode == http.StatusNotModified {
  2113. if res.Body != nil {
  2114. res.Body.Close()
  2115. }
  2116. return nil, &googleapi.Error{
  2117. Code: res.StatusCode,
  2118. Header: res.Header,
  2119. }
  2120. }
  2121. if err != nil {
  2122. return nil, err
  2123. }
  2124. defer googleapi.CloseBody(res)
  2125. if err := googleapi.CheckResponse(res); err != nil {
  2126. return nil, err
  2127. }
  2128. ret := &GetBreakpointResponse{
  2129. ServerResponse: googleapi.ServerResponse{
  2130. Header: res.Header,
  2131. HTTPStatusCode: res.StatusCode,
  2132. },
  2133. }
  2134. target := &ret
  2135. if err := gensupport.DecodeResponse(target, res); err != nil {
  2136. return nil, err
  2137. }
  2138. return ret, nil
  2139. // {
  2140. // "description": "Gets breakpoint information.",
  2141. // "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}",
  2142. // "httpMethod": "GET",
  2143. // "id": "clouddebugger.debugger.debuggees.breakpoints.get",
  2144. // "parameterOrder": [
  2145. // "debuggeeId",
  2146. // "breakpointId"
  2147. // ],
  2148. // "parameters": {
  2149. // "breakpointId": {
  2150. // "description": "ID of the breakpoint to get.",
  2151. // "location": "path",
  2152. // "required": true,
  2153. // "type": "string"
  2154. // },
  2155. // "clientVersion": {
  2156. // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).",
  2157. // "location": "query",
  2158. // "type": "string"
  2159. // },
  2160. // "debuggeeId": {
  2161. // "description": "ID of the debuggee whose breakpoint to get.",
  2162. // "location": "path",
  2163. // "required": true,
  2164. // "type": "string"
  2165. // }
  2166. // },
  2167. // "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}",
  2168. // "response": {
  2169. // "$ref": "GetBreakpointResponse"
  2170. // },
  2171. // "scopes": [
  2172. // "https://www.googleapis.com/auth/cloud-platform",
  2173. // "https://www.googleapis.com/auth/cloud_debugger"
  2174. // ]
  2175. // }
  2176. }
  2177. // method id "clouddebugger.debugger.debuggees.breakpoints.list":
  2178. type DebuggerDebuggeesBreakpointsListCall struct {
  2179. s *Service
  2180. debuggeeId string
  2181. urlParams_ gensupport.URLParams
  2182. ifNoneMatch_ string
  2183. ctx_ context.Context
  2184. header_ http.Header
  2185. }
  2186. // List: Lists all breakpoints for the debuggee.
  2187. func (r *DebuggerDebuggeesBreakpointsService) List(debuggeeId string) *DebuggerDebuggeesBreakpointsListCall {
  2188. c := &DebuggerDebuggeesBreakpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2189. c.debuggeeId = debuggeeId
  2190. return c
  2191. }
  2192. // ActionValue sets the optional parameter "action.value": Only
  2193. // breakpoints with the specified action will pass the filter.
  2194. //
  2195. // Possible values:
  2196. // "CAPTURE"
  2197. // "LOG"
  2198. func (c *DebuggerDebuggeesBreakpointsListCall) ActionValue(actionValue string) *DebuggerDebuggeesBreakpointsListCall {
  2199. c.urlParams_.Set("action.value", actionValue)
  2200. return c
  2201. }
  2202. // ClientVersion sets the optional parameter "clientVersion": The client
  2203. // version making the call.
  2204. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  2205. func (c *DebuggerDebuggeesBreakpointsListCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsListCall {
  2206. c.urlParams_.Set("clientVersion", clientVersion)
  2207. return c
  2208. }
  2209. // IncludeAllUsers sets the optional parameter "includeAllUsers": When
  2210. // set to `true`, the response includes the list of breakpoints set
  2211. // by
  2212. // any user. Otherwise, it includes only breakpoints set by the caller.
  2213. func (c *DebuggerDebuggeesBreakpointsListCall) IncludeAllUsers(includeAllUsers bool) *DebuggerDebuggeesBreakpointsListCall {
  2214. c.urlParams_.Set("includeAllUsers", fmt.Sprint(includeAllUsers))
  2215. return c
  2216. }
  2217. // IncludeInactive sets the optional parameter "includeInactive": When
  2218. // set to `true`, the response includes active and inactive
  2219. // breakpoints. Otherwise, it includes only active breakpoints.
  2220. func (c *DebuggerDebuggeesBreakpointsListCall) IncludeInactive(includeInactive bool) *DebuggerDebuggeesBreakpointsListCall {
  2221. c.urlParams_.Set("includeInactive", fmt.Sprint(includeInactive))
  2222. return c
  2223. }
  2224. // StripResults sets the optional parameter "stripResults": This field
  2225. // is deprecated. The following fields are always stripped out of
  2226. // the result: `stack_frames`, `evaluated_expressions` and
  2227. // `variable_table`.
  2228. func (c *DebuggerDebuggeesBreakpointsListCall) StripResults(stripResults bool) *DebuggerDebuggeesBreakpointsListCall {
  2229. c.urlParams_.Set("stripResults", fmt.Sprint(stripResults))
  2230. return c
  2231. }
  2232. // WaitToken sets the optional parameter "waitToken": A wait token that,
  2233. // if specified, blocks the call until the breakpoints
  2234. // list has changed, or a server selected timeout has expired. The
  2235. // value
  2236. // should be set from the last response. The error
  2237. // code
  2238. // `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout,
  2239. // which
  2240. // should be called again with the same `wait_token`.
  2241. func (c *DebuggerDebuggeesBreakpointsListCall) WaitToken(waitToken string) *DebuggerDebuggeesBreakpointsListCall {
  2242. c.urlParams_.Set("waitToken", waitToken)
  2243. return c
  2244. }
  2245. // Fields allows partial responses to be retrieved. See
  2246. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2247. // for more information.
  2248. func (c *DebuggerDebuggeesBreakpointsListCall) Fields(s ...googleapi.Field) *DebuggerDebuggeesBreakpointsListCall {
  2249. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2250. return c
  2251. }
  2252. // IfNoneMatch sets the optional parameter which makes the operation
  2253. // fail if the object's ETag matches the given value. This is useful for
  2254. // getting updates only after the object has changed since the last
  2255. // request. Use googleapi.IsNotModified to check whether the response
  2256. // error from Do is the result of In-None-Match.
  2257. func (c *DebuggerDebuggeesBreakpointsListCall) IfNoneMatch(entityTag string) *DebuggerDebuggeesBreakpointsListCall {
  2258. c.ifNoneMatch_ = entityTag
  2259. return c
  2260. }
  2261. // Context sets the context to be used in this call's Do method. Any
  2262. // pending HTTP request will be aborted if the provided context is
  2263. // canceled.
  2264. func (c *DebuggerDebuggeesBreakpointsListCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsListCall {
  2265. c.ctx_ = ctx
  2266. return c
  2267. }
  2268. // Header returns an http.Header that can be modified by the caller to
  2269. // add HTTP headers to the request.
  2270. func (c *DebuggerDebuggeesBreakpointsListCall) Header() http.Header {
  2271. if c.header_ == nil {
  2272. c.header_ = make(http.Header)
  2273. }
  2274. return c.header_
  2275. }
  2276. func (c *DebuggerDebuggeesBreakpointsListCall) doRequest(alt string) (*http.Response, error) {
  2277. reqHeaders := make(http.Header)
  2278. for k, v := range c.header_ {
  2279. reqHeaders[k] = v
  2280. }
  2281. reqHeaders.Set("User-Agent", c.s.userAgent())
  2282. if c.ifNoneMatch_ != "" {
  2283. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2284. }
  2285. var body io.Reader = nil
  2286. c.urlParams_.Set("alt", alt)
  2287. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/debugger/debuggees/{debuggeeId}/breakpoints")
  2288. urls += "?" + c.urlParams_.Encode()
  2289. req, _ := http.NewRequest("GET", urls, body)
  2290. req.Header = reqHeaders
  2291. googleapi.Expand(req.URL, map[string]string{
  2292. "debuggeeId": c.debuggeeId,
  2293. })
  2294. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2295. }
  2296. // Do executes the "clouddebugger.debugger.debuggees.breakpoints.list" call.
  2297. // Exactly one of *ListBreakpointsResponse or error will be non-nil. Any
  2298. // non-2xx status code is an error. Response headers are in either
  2299. // *ListBreakpointsResponse.ServerResponse.Header or (if a response was
  2300. // returned at all) in error.(*googleapi.Error).Header. Use
  2301. // googleapi.IsNotModified to check whether the returned error was
  2302. // because http.StatusNotModified was returned.
  2303. func (c *DebuggerDebuggeesBreakpointsListCall) Do(opts ...googleapi.CallOption) (*ListBreakpointsResponse, error) {
  2304. gensupport.SetOptions(c.urlParams_, opts...)
  2305. res, err := c.doRequest("json")
  2306. if res != nil && res.StatusCode == http.StatusNotModified {
  2307. if res.Body != nil {
  2308. res.Body.Close()
  2309. }
  2310. return nil, &googleapi.Error{
  2311. Code: res.StatusCode,
  2312. Header: res.Header,
  2313. }
  2314. }
  2315. if err != nil {
  2316. return nil, err
  2317. }
  2318. defer googleapi.CloseBody(res)
  2319. if err := googleapi.CheckResponse(res); err != nil {
  2320. return nil, err
  2321. }
  2322. ret := &ListBreakpointsResponse{
  2323. ServerResponse: googleapi.ServerResponse{
  2324. Header: res.Header,
  2325. HTTPStatusCode: res.StatusCode,
  2326. },
  2327. }
  2328. target := &ret
  2329. if err := gensupport.DecodeResponse(target, res); err != nil {
  2330. return nil, err
  2331. }
  2332. return ret, nil
  2333. // {
  2334. // "description": "Lists all breakpoints for the debuggee.",
  2335. // "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints",
  2336. // "httpMethod": "GET",
  2337. // "id": "clouddebugger.debugger.debuggees.breakpoints.list",
  2338. // "parameterOrder": [
  2339. // "debuggeeId"
  2340. // ],
  2341. // "parameters": {
  2342. // "action.value": {
  2343. // "description": "Only breakpoints with the specified action will pass the filter.",
  2344. // "enum": [
  2345. // "CAPTURE",
  2346. // "LOG"
  2347. // ],
  2348. // "location": "query",
  2349. // "type": "string"
  2350. // },
  2351. // "clientVersion": {
  2352. // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).",
  2353. // "location": "query",
  2354. // "type": "string"
  2355. // },
  2356. // "debuggeeId": {
  2357. // "description": "ID of the debuggee whose breakpoints to list.",
  2358. // "location": "path",
  2359. // "required": true,
  2360. // "type": "string"
  2361. // },
  2362. // "includeAllUsers": {
  2363. // "description": "When set to `true`, the response includes the list of breakpoints set by\nany user. Otherwise, it includes only breakpoints set by the caller.",
  2364. // "location": "query",
  2365. // "type": "boolean"
  2366. // },
  2367. // "includeInactive": {
  2368. // "description": "When set to `true`, the response includes active and inactive\nbreakpoints. Otherwise, it includes only active breakpoints.",
  2369. // "location": "query",
  2370. // "type": "boolean"
  2371. // },
  2372. // "stripResults": {
  2373. // "description": "This field is deprecated. The following fields are always stripped out of\nthe result: `stack_frames`, `evaluated_expressions` and `variable_table`.",
  2374. // "location": "query",
  2375. // "type": "boolean"
  2376. // },
  2377. // "waitToken": {
  2378. // "description": "A wait token that, if specified, blocks the call until the breakpoints\nlist has changed, or a server selected timeout has expired. The value\nshould be set from the last response. The error code\n`google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which\nshould be called again with the same `wait_token`.",
  2379. // "location": "query",
  2380. // "type": "string"
  2381. // }
  2382. // },
  2383. // "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints",
  2384. // "response": {
  2385. // "$ref": "ListBreakpointsResponse"
  2386. // },
  2387. // "scopes": [
  2388. // "https://www.googleapis.com/auth/cloud-platform",
  2389. // "https://www.googleapis.com/auth/cloud_debugger"
  2390. // ]
  2391. // }
  2392. }
  2393. // method id "clouddebugger.debugger.debuggees.breakpoints.set":
  2394. type DebuggerDebuggeesBreakpointsSetCall struct {
  2395. s *Service
  2396. debuggeeId string
  2397. breakpoint *Breakpoint
  2398. urlParams_ gensupport.URLParams
  2399. ctx_ context.Context
  2400. header_ http.Header
  2401. }
  2402. // Set: Sets the breakpoint to the debuggee.
  2403. func (r *DebuggerDebuggeesBreakpointsService) Set(debuggeeId string, breakpoint *Breakpoint) *DebuggerDebuggeesBreakpointsSetCall {
  2404. c := &DebuggerDebuggeesBreakpointsSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2405. c.debuggeeId = debuggeeId
  2406. c.breakpoint = breakpoint
  2407. return c
  2408. }
  2409. // ClientVersion sets the optional parameter "clientVersion": The client
  2410. // version making the call.
  2411. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
  2412. func (c *DebuggerDebuggeesBreakpointsSetCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsSetCall {
  2413. c.urlParams_.Set("clientVersion", clientVersion)
  2414. return c
  2415. }
  2416. // Fields allows partial responses to be retrieved. See
  2417. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2418. // for more information.
  2419. func (c *DebuggerDebuggeesBreakpointsSetCall) Fields(s ...googleapi.Field) *DebuggerDebuggeesBreakpointsSetCall {
  2420. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2421. return c
  2422. }
  2423. // Context sets the context to be used in this call's Do method. Any
  2424. // pending HTTP request will be aborted if the provided context is
  2425. // canceled.
  2426. func (c *DebuggerDebuggeesBreakpointsSetCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsSetCall {
  2427. c.ctx_ = ctx
  2428. return c
  2429. }
  2430. // Header returns an http.Header that can be modified by the caller to
  2431. // add HTTP headers to the request.
  2432. func (c *DebuggerDebuggeesBreakpointsSetCall) Header() http.Header {
  2433. if c.header_ == nil {
  2434. c.header_ = make(http.Header)
  2435. }
  2436. return c.header_
  2437. }
  2438. func (c *DebuggerDebuggeesBreakpointsSetCall) doRequest(alt string) (*http.Response, error) {
  2439. reqHeaders := make(http.Header)
  2440. for k, v := range c.header_ {
  2441. reqHeaders[k] = v
  2442. }
  2443. reqHeaders.Set("User-Agent", c.s.userAgent())
  2444. var body io.Reader = nil
  2445. body, err := googleapi.WithoutDataWrapper.JSONReader(c.breakpoint)
  2446. if err != nil {
  2447. return nil, err
  2448. }
  2449. reqHeaders.Set("Content-Type", "application/json")
  2450. c.urlParams_.Set("alt", alt)
  2451. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/debugger/debuggees/{debuggeeId}/breakpoints/set")
  2452. urls += "?" + c.urlParams_.Encode()
  2453. req, _ := http.NewRequest("POST", urls, body)
  2454. req.Header = reqHeaders
  2455. googleapi.Expand(req.URL, map[string]string{
  2456. "debuggeeId": c.debuggeeId,
  2457. })
  2458. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2459. }
  2460. // Do executes the "clouddebugger.debugger.debuggees.breakpoints.set" call.
  2461. // Exactly one of *SetBreakpointResponse or error will be non-nil. Any
  2462. // non-2xx status code is an error. Response headers are in either
  2463. // *SetBreakpointResponse.ServerResponse.Header or (if a response was
  2464. // returned at all) in error.(*googleapi.Error).Header. Use
  2465. // googleapi.IsNotModified to check whether the returned error was
  2466. // because http.StatusNotModified was returned.
  2467. func (c *DebuggerDebuggeesBreakpointsSetCall) Do(opts ...googleapi.CallOption) (*SetBreakpointResponse, error) {
  2468. gensupport.SetOptions(c.urlParams_, opts...)
  2469. res, err := c.doRequest("json")
  2470. if res != nil && res.StatusCode == http.StatusNotModified {
  2471. if res.Body != nil {
  2472. res.Body.Close()
  2473. }
  2474. return nil, &googleapi.Error{
  2475. Code: res.StatusCode,
  2476. Header: res.Header,
  2477. }
  2478. }
  2479. if err != nil {
  2480. return nil, err
  2481. }
  2482. defer googleapi.CloseBody(res)
  2483. if err := googleapi.CheckResponse(res); err != nil {
  2484. return nil, err
  2485. }
  2486. ret := &SetBreakpointResponse{
  2487. ServerResponse: googleapi.ServerResponse{
  2488. Header: res.Header,
  2489. HTTPStatusCode: res.StatusCode,
  2490. },
  2491. }
  2492. target := &ret
  2493. if err := gensupport.DecodeResponse(target, res); err != nil {
  2494. return nil, err
  2495. }
  2496. return ret, nil
  2497. // {
  2498. // "description": "Sets the breakpoint to the debuggee.",
  2499. // "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set",
  2500. // "httpMethod": "POST",
  2501. // "id": "clouddebugger.debugger.debuggees.breakpoints.set",
  2502. // "parameterOrder": [
  2503. // "debuggeeId"
  2504. // ],
  2505. // "parameters": {
  2506. // "clientVersion": {
  2507. // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).",
  2508. // "location": "query",
  2509. // "type": "string"
  2510. // },
  2511. // "debuggeeId": {
  2512. // "description": "ID of the debuggee where the breakpoint is to be set.",
  2513. // "location": "path",
  2514. // "required": true,
  2515. // "type": "string"
  2516. // }
  2517. // },
  2518. // "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set",
  2519. // "request": {
  2520. // "$ref": "Breakpoint"
  2521. // },
  2522. // "response": {
  2523. // "$ref": "SetBreakpointResponse"
  2524. // },
  2525. // "scopes": [
  2526. // "https://www.googleapis.com/auth/cloud-platform",
  2527. // "https://www.googleapis.com/auth/cloud_debugger"
  2528. // ]
  2529. // }
  2530. }