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\APIManagement\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\APIManagement\ApiObservation;
|
---|
21 | use Google\Service\APIManagement\BatchEditTagsApiObservationsRequest;
|
---|
22 | use Google\Service\APIManagement\BatchEditTagsApiObservationsResponse;
|
---|
23 | use Google\Service\APIManagement\ListApiObservationsResponse;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "apiObservations" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $apimService = new Google\Service\APIManagement(...);
|
---|
30 | * $apiObservations = $apimService->projects_locations_observationJobs_apiObservations;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsLocationsObservationJobsApiObservations extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * BatchEditTagsApiObservations adds or removes Tags for ApiObservations.
|
---|
37 | * (apiObservations.batchEditTags)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. The parent resource shared by all
|
---|
40 | * ApiObservations being edited. Format:
|
---|
41 | * projects/{project}/locations/{location}/observationJobs/{observation_job}
|
---|
42 | * @param BatchEditTagsApiObservationsRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return BatchEditTagsApiObservationsResponse
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function batchEditTags($parent, BatchEditTagsApiObservationsRequest $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('batchEditTags', [$params], BatchEditTagsApiObservationsResponse::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * GetApiObservation retrieves a single ApiObservation by name.
|
---|
55 | * (apiObservations.get)
|
---|
56 | *
|
---|
57 | * @param string $name Required. The name of the ApiObservation to retrieve.
|
---|
58 | * Format: projects/{project}/locations/{location}/observationJobs/{observation_
|
---|
59 | * job}/apiObservations/{api_observation}
|
---|
60 | * @param array $optParams Optional parameters.
|
---|
61 | * @return ApiObservation
|
---|
62 | * @throws \Google\Service\Exception
|
---|
63 | */
|
---|
64 | public function get($name, $optParams = [])
|
---|
65 | {
|
---|
66 | $params = ['name' => $name];
|
---|
67 | $params = array_merge($params, $optParams);
|
---|
68 | return $this->call('get', [$params], ApiObservation::class);
|
---|
69 | }
|
---|
70 | /**
|
---|
71 | * ListApiObservations gets all ApiObservations for a given project and location
|
---|
72 | * and ObservationJob.
|
---|
73 | * (apiObservations.listProjectsLocationsObservationJobsApiObservations)
|
---|
74 | *
|
---|
75 | * @param string $parent Required. The parent, which owns this collection of
|
---|
76 | * ApiObservations. Format:
|
---|
77 | * projects/{project}/locations/{location}/observationJobs/{observation_job}
|
---|
78 | * @param array $optParams Optional parameters.
|
---|
79 | *
|
---|
80 | * @opt_param int pageSize Optional. The maximum number of ApiObservations to
|
---|
81 | * return. The service may return fewer than this value. If unspecified, at most
|
---|
82 | * 10 ApiObservations will be returned. The maximum value is 1000; values above
|
---|
83 | * 1000 will be coerced to 1000.
|
---|
84 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
85 | * `ListApiObservations` call. Provide this to retrieve the subsequent page.
|
---|
86 | * When paginating, all other parameters provided to `ListApiObservations` must
|
---|
87 | * match the call that provided the page token.
|
---|
88 | * @return ListApiObservationsResponse
|
---|
89 | * @throws \Google\Service\Exception
|
---|
90 | */
|
---|
91 | public function listProjectsLocationsObservationJobsApiObservations($parent, $optParams = [])
|
---|
92 | {
|
---|
93 | $params = ['parent' => $parent];
|
---|
94 | $params = array_merge($params, $optParams);
|
---|
95 | return $this->call('list', [$params], ListApiObservationsResponse::class);
|
---|
96 | }
|
---|
97 | }
|
---|
98 |
|
---|
99 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
100 | class_alias(ProjectsLocationsObservationJobsApiObservations::class, 'Google_Service_APIManagement_Resource_ProjectsLocationsObservationJobsApiObservations');
|
---|