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\Apigee\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Apigee\GoogleCloudApigeeV1DebugSession;
|
---|
21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListDebugSessionsResponse;
|
---|
22 | use Google\Service\Apigee\GoogleProtobufEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "debugsessions" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
29 | * $debugsessions = $apigeeService->organizations_environments_apis_revisions_debugsessions;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class OrganizationsEnvironmentsApisRevisionsDebugsessions extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a debug session for a deployed API Proxy revision.
|
---|
36 | * (debugsessions.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The resource name of the API Proxy revision
|
---|
39 | * deployment for which to create the DebugSession. Must be of the form `organiz
|
---|
40 | * ations/{organization}/environments/{environment}/apis/{api}/revisions/{revisi
|
---|
41 | * on}`.
|
---|
42 | * @param GoogleCloudApigeeV1DebugSession $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | *
|
---|
45 | * @opt_param string timeout Optional. The time in seconds after which this
|
---|
46 | * DebugSession should end. A timeout specified in DebugSession will overwrite
|
---|
47 | * this value.
|
---|
48 | * @return GoogleCloudApigeeV1DebugSession
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function create($parent, GoogleCloudApigeeV1DebugSession $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('create', [$params], GoogleCloudApigeeV1DebugSession::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Deletes the data from a debug session. This does not cancel the debug session
|
---|
59 | * or prevent further data from being collected if the session is still active
|
---|
60 | * in runtime pods. (debugsessions.deleteData)
|
---|
61 | *
|
---|
62 | * @param string $name Required. The name of the debug session to delete. Must
|
---|
63 | * be of the form: `organizations/{organization}/environments/{environment}/apis
|
---|
64 | * /{api}/revisions/{revision}/debugsessions/{debugsession}`.
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | * @return GoogleProtobufEmpty
|
---|
67 | * @throws \Google\Service\Exception
|
---|
68 | */
|
---|
69 | public function deleteData($name, $optParams = [])
|
---|
70 | {
|
---|
71 | $params = ['name' => $name];
|
---|
72 | $params = array_merge($params, $optParams);
|
---|
73 | return $this->call('deleteData', [$params], GoogleProtobufEmpty::class);
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * Retrieves a debug session. (debugsessions.get)
|
---|
77 | *
|
---|
78 | * @param string $name Required. The name of the debug session to retrieve. Must
|
---|
79 | * be of the form: `organizations/{organization}/environments/{environment}/apis
|
---|
80 | * /{api}/revisions/{revision}/debugsessions/{session}`.
|
---|
81 | * @param array $optParams Optional parameters.
|
---|
82 | * @return GoogleCloudApigeeV1DebugSession
|
---|
83 | * @throws \Google\Service\Exception
|
---|
84 | */
|
---|
85 | public function get($name, $optParams = [])
|
---|
86 | {
|
---|
87 | $params = ['name' => $name];
|
---|
88 | $params = array_merge($params, $optParams);
|
---|
89 | return $this->call('get', [$params], GoogleCloudApigeeV1DebugSession::class);
|
---|
90 | }
|
---|
91 | /**
|
---|
92 | * Lists debug sessions that are currently active in the given API Proxy
|
---|
93 | * revision.
|
---|
94 | * (debugsessions.listOrganizationsEnvironmentsApisRevisionsDebugsessions)
|
---|
95 | *
|
---|
96 | * @param string $parent Required. The name of the API Proxy revision deployment
|
---|
97 | * for which to list debug sessions. Must be of the form: `organizations/{organi
|
---|
98 | * zation}/environments/{environment}/apis/{api}/revisions/{revision}`.
|
---|
99 | * @param array $optParams Optional parameters.
|
---|
100 | *
|
---|
101 | * @opt_param int pageSize Maximum number of debug sessions to return. The page
|
---|
102 | * size defaults to 25.
|
---|
103 | * @opt_param string pageToken Page token, returned from a previous
|
---|
104 | * ListDebugSessions call, that you can use to retrieve the next page.
|
---|
105 | * @return GoogleCloudApigeeV1ListDebugSessionsResponse
|
---|
106 | * @throws \Google\Service\Exception
|
---|
107 | */
|
---|
108 | public function listOrganizationsEnvironmentsApisRevisionsDebugsessions($parent, $optParams = [])
|
---|
109 | {
|
---|
110 | $params = ['parent' => $parent];
|
---|
111 | $params = array_merge($params, $optParams);
|
---|
112 | return $this->call('list', [$params], GoogleCloudApigeeV1ListDebugSessionsResponse::class);
|
---|
113 | }
|
---|
114 | }
|
---|
115 |
|
---|
116 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
117 | class_alias(OrganizationsEnvironmentsApisRevisionsDebugsessions::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsApisRevisionsDebugsessions');
|
---|