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/**
19 * Service definition for CloudDebugger (v2).
20 *
21 * <p>
22 * Examines the call stack and variables of a running application without
23 * stopping or slowing it down.</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://cloud.google.com/debugger" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_CloudDebugger extends Google_Service
33{
34  /** See, edit, configure, and delete your Google Cloud Platform data. */
35  const CLOUD_PLATFORM =
36      "https://www.googleapis.com/auth/cloud-platform";
37  /** Use Stackdriver Debugger. */
38  const CLOUD_DEBUGGER =
39      "https://www.googleapis.com/auth/cloud_debugger";
40
41  public $controller_debuggees;
42  public $controller_debuggees_breakpoints;
43  public $debugger_debuggees;
44  public $debugger_debuggees_breakpoints;
45
46  /**
47   * Constructs the internal representation of the CloudDebugger service.
48   *
49   * @param Google_Client $client The client used to deliver requests.
50   * @param string $rootUrl The root URL used for requests to the service.
51   */
52  public function __construct(Google_Client $client, $rootUrl = null)
53  {
54    parent::__construct($client);
55    $this->rootUrl = $rootUrl ?: 'https://clouddebugger.googleapis.com/';
56    $this->servicePath = '';
57    $this->batchPath = 'batch';
58    $this->version = 'v2';
59    $this->serviceName = 'clouddebugger';
60
61    $this->controller_debuggees = new Google_Service_CloudDebugger_Resource_ControllerDebuggees(
62        $this,
63        $this->serviceName,
64        'debuggees',
65        array(
66          'methods' => array(
67            'register' => array(
68              'path' => 'v2/controller/debuggees/register',
69              'httpMethod' => 'POST',
70              'parameters' => array(),
71            ),
72          )
73        )
74    );
75    $this->controller_debuggees_breakpoints = new Google_Service_CloudDebugger_Resource_ControllerDebuggeesBreakpoints(
76        $this,
77        $this->serviceName,
78        'breakpoints',
79        array(
80          'methods' => array(
81            'list' => array(
82              'path' => 'v2/controller/debuggees/{debuggeeId}/breakpoints',
83              'httpMethod' => 'GET',
84              'parameters' => array(
85                'debuggeeId' => array(
86                  'location' => 'path',
87                  'type' => 'string',
88                  'required' => true,
89                ),
90                'agentId' => array(
91                  'location' => 'query',
92                  'type' => 'string',
93                ),
94                'successOnTimeout' => array(
95                  'location' => 'query',
96                  'type' => 'boolean',
97                ),
98                'waitToken' => array(
99                  'location' => 'query',
100                  'type' => 'string',
101                ),
102              ),
103            ),'update' => array(
104              'path' => 'v2/controller/debuggees/{debuggeeId}/breakpoints/{id}',
105              'httpMethod' => 'PUT',
106              'parameters' => array(
107                'debuggeeId' => array(
108                  'location' => 'path',
109                  'type' => 'string',
110                  'required' => true,
111                ),
112                'id' => array(
113                  'location' => 'path',
114                  'type' => 'string',
115                  'required' => true,
116                ),
117              ),
118            ),
119          )
120        )
121    );
122    $this->debugger_debuggees = new Google_Service_CloudDebugger_Resource_DebuggerDebuggees(
123        $this,
124        $this->serviceName,
125        'debuggees',
126        array(
127          'methods' => array(
128            'list' => array(
129              'path' => 'v2/debugger/debuggees',
130              'httpMethod' => 'GET',
131              'parameters' => array(
132                'clientVersion' => array(
133                  'location' => 'query',
134                  'type' => 'string',
135                ),
136                'includeInactive' => array(
137                  'location' => 'query',
138                  'type' => 'boolean',
139                ),
140                'project' => array(
141                  'location' => 'query',
142                  'type' => 'string',
143                ),
144              ),
145            ),
146          )
147        )
148    );
149    $this->debugger_debuggees_breakpoints = new Google_Service_CloudDebugger_Resource_DebuggerDebuggeesBreakpoints(
150        $this,
151        $this->serviceName,
152        'breakpoints',
153        array(
154          'methods' => array(
155            'delete' => array(
156              'path' => 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}',
157              'httpMethod' => 'DELETE',
158              'parameters' => array(
159                'debuggeeId' => array(
160                  'location' => 'path',
161                  'type' => 'string',
162                  'required' => true,
163                ),
164                'breakpointId' => array(
165                  'location' => 'path',
166                  'type' => 'string',
167                  'required' => true,
168                ),
169                'clientVersion' => array(
170                  'location' => 'query',
171                  'type' => 'string',
172                ),
173              ),
174            ),'get' => array(
175              'path' => 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}',
176              'httpMethod' => 'GET',
177              'parameters' => array(
178                'debuggeeId' => array(
179                  'location' => 'path',
180                  'type' => 'string',
181                  'required' => true,
182                ),
183                'breakpointId' => array(
184                  'location' => 'path',
185                  'type' => 'string',
186                  'required' => true,
187                ),
188                'clientVersion' => array(
189                  'location' => 'query',
190                  'type' => 'string',
191                ),
192              ),
193            ),'list' => array(
194              'path' => 'v2/debugger/debuggees/{debuggeeId}/breakpoints',
195              'httpMethod' => 'GET',
196              'parameters' => array(
197                'debuggeeId' => array(
198                  'location' => 'path',
199                  'type' => 'string',
200                  'required' => true,
201                ),
202                'action.value' => array(
203                  'location' => 'query',
204                  'type' => 'string',
205                ),
206                'clientVersion' => array(
207                  'location' => 'query',
208                  'type' => 'string',
209                ),
210                'includeAllUsers' => array(
211                  'location' => 'query',
212                  'type' => 'boolean',
213                ),
214                'includeInactive' => array(
215                  'location' => 'query',
216                  'type' => 'boolean',
217                ),
218                'stripResults' => array(
219                  'location' => 'query',
220                  'type' => 'boolean',
221                ),
222                'waitToken' => array(
223                  'location' => 'query',
224                  'type' => 'string',
225                ),
226              ),
227            ),'set' => array(
228              'path' => 'v2/debugger/debuggees/{debuggeeId}/breakpoints/set',
229              'httpMethod' => 'POST',
230              'parameters' => array(
231                'debuggeeId' => array(
232                  'location' => 'path',
233                  'type' => 'string',
234                  'required' => true,
235                ),
236                'canaryOption' => array(
237                  'location' => 'query',
238                  'type' => 'string',
239                ),
240                'clientVersion' => array(
241                  'location' => 'query',
242                  'type' => 'string',
243                ),
244              ),
245            ),
246          )
247        )
248    );
249  }
250}
251