1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\CloudDebugger\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudDebugger\ListActiveBreakpointsResponse;
|
---|
21 | use Google\Service\CloudDebugger\UpdateActiveBreakpointRequest;
|
---|
22 | use Google\Service\CloudDebugger\UpdateActiveBreakpointResponse;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "breakpoints" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $clouddebuggerService = new Google\Service\CloudDebugger(...);
|
---|
29 | * $breakpoints = $clouddebuggerService->controller_debuggees_breakpoints;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ControllerDebuggeesBreakpoints extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Returns the list of all active breakpoints for the debuggee. The breakpoint
|
---|
36 | * specification (`location`, `condition`, and `expressions` fields) is
|
---|
37 | * semantically immutable, although the field values may change. For example, an
|
---|
38 | * agent may update the location line number to reflect the actual line where
|
---|
39 | * the breakpoint was set, but this doesn't change the breakpoint semantics.
|
---|
40 | * This means that an agent does not need to check if a breakpoint has changed
|
---|
41 | * when it encounters the same breakpoint on a successive call. Moreover, an
|
---|
42 | * agent should remember the breakpoints that are completed until the controller
|
---|
43 | * removes them from the active list to avoid setting those breakpoints again.
|
---|
44 | * (breakpoints.listControllerDebuggeesBreakpoints)
|
---|
45 | *
|
---|
46 | * @param string $debuggeeId Required. Identifies the debuggee.
|
---|
47 | * @param array $optParams Optional parameters.
|
---|
48 | *
|
---|
49 | * @opt_param string agentId Identifies the agent. This is the ID returned in
|
---|
50 | * the RegisterDebuggee response.
|
---|
51 | * @opt_param bool successOnTimeout If set to `true` (recommended), returns
|
---|
52 | * `google.rpc.Code.OK` status and sets the `wait_expired` response field to
|
---|
53 | * `true` when the server-selected timeout has expired. If set to `false`
|
---|
54 | * (deprecated), returns `google.rpc.Code.ABORTED` status when the server-
|
---|
55 | * selected timeout has expired.
|
---|
56 | * @opt_param string waitToken A token that, if specified, blocks the method
|
---|
57 | * call until the list of active breakpoints has changed, or a server-selected
|
---|
58 | * timeout has expired. The value should be set from the `next_wait_token` field
|
---|
59 | * in the last response. The initial value should be set to `"init"`.
|
---|
60 | * @return ListActiveBreakpointsResponse
|
---|
61 | */
|
---|
62 | public function listControllerDebuggeesBreakpoints($debuggeeId, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['debuggeeId' => $debuggeeId];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('list', [$params], ListActiveBreakpointsResponse::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Updates the breakpoint state or mutable fields. The entire Breakpoint message
|
---|
70 | * must be sent back to the controller service. Updates to active breakpoint
|
---|
71 | * fields are only allowed if the new value does not change the breakpoint
|
---|
72 | * specification. Updates to the `location`, `condition` and `expressions`
|
---|
73 | * fields should not alter the breakpoint semantics. These may only make changes
|
---|
74 | * such as canonicalizing a value or snapping the location to the correct line
|
---|
75 | * of code. (breakpoints.update)
|
---|
76 | *
|
---|
77 | * @param string $debuggeeId Required. Identifies the debuggee being debugged.
|
---|
78 | * @param string $id Breakpoint identifier, unique in the scope of the debuggee.
|
---|
79 | * @param UpdateActiveBreakpointRequest $postBody
|
---|
80 | * @param array $optParams Optional parameters.
|
---|
81 | * @return UpdateActiveBreakpointResponse
|
---|
82 | */
|
---|
83 | public function update($debuggeeId, $id, UpdateActiveBreakpointRequest $postBody, $optParams = [])
|
---|
84 | {
|
---|
85 | $params = ['debuggeeId' => $debuggeeId, 'id' => $id, 'postBody' => $postBody];
|
---|
86 | $params = array_merge($params, $optParams);
|
---|
87 | return $this->call('update', [$params], UpdateActiveBreakpointResponse::class);
|
---|
88 | }
|
---|
89 | }
|
---|
90 |
|
---|
91 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
92 | class_alias(ControllerDebuggeesBreakpoints::class, 'Google_Service_CloudDebugger_Resource_ControllerDebuggeesBreakpoints');
|
---|