source: vendor/google/apiclient-services/src/APIManagement/Resource/ProjectsLocationsObservationJobs.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 7.0 KB
Line 
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
18namespace Google\Service\APIManagement\Resource;
19
20use Google\Service\APIManagement\DisableObservationJobRequest;
21use Google\Service\APIManagement\EnableObservationJobRequest;
22use Google\Service\APIManagement\ListObservationJobsResponse;
23use Google\Service\APIManagement\ObservationJob;
24use Google\Service\APIManagement\Operation;
25
26/**
27 * The "observationJobs" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $apimService = new Google\Service\APIManagement(...);
31 * $observationJobs = $apimService->projects_locations_observationJobs;
32 * </code>
33 */
34class ProjectsLocationsObservationJobs extends \Google\Service\Resource
35{
36 /**
37 * CreateObservationJob creates a new ObservationJob but does not have any
38 * effecton its own. It is a configuration that can be used in an Observation
39 * Job to collect data about existing APIs. (observationJobs.create)
40 *
41 * @param string $parent Required. The parent resource where this ObservationJob
42 * will be created. Format: projects/{project}/locations/{location}
43 * @param ObservationJob $postBody
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string observationJobId Required. The ID to use for the
47 * Observation Job. This value should be 4-63 characters, and valid characters
48 * are /a-z-/.
49 * @opt_param string requestId Optional. An optional request ID to identify
50 * requests. Specify a unique request ID so that if you must retry your request,
51 * the server will know to ignore the request if it has already been completed.
52 * The server will guarantee that for at least 60 minutes since the first
53 * request. For example, consider a situation where you make an initial request
54 * and the request times out. If you make the request again with the same
55 * request ID, the server can check if original operation with the same request
56 * ID was received, and if so, will ignore the second request. This prevents
57 * clients from accidentally creating duplicate commitments. The request ID must
58 * be a valid UUID with the exception that zero UUID is not supported
59 * (00000000-0000-0000-0000-000000000000).
60 * @return Operation
61 * @throws \Google\Service\Exception
62 */
63 public function create($parent, ObservationJob $postBody, $optParams = [])
64 {
65 $params = ['parent' => $parent, 'postBody' => $postBody];
66 $params = array_merge($params, $optParams);
67 return $this->call('create', [$params], Operation::class);
68 }
69 /**
70 * DeleteObservationJob deletes an ObservationJob. This method will fail if the
71 * observation job is currently being used by any ObservationSource, even if not
72 * enabled. (observationJobs.delete)
73 *
74 * @param string $name Required. Name of the resource Format:
75 * projects/{project}/locations/{location}/observationJobs/{observation_job}
76 * @param array $optParams Optional parameters.
77 * @return Operation
78 * @throws \Google\Service\Exception
79 */
80 public function delete($name, $optParams = [])
81 {
82 $params = ['name' => $name];
83 $params = array_merge($params, $optParams);
84 return $this->call('delete', [$params], Operation::class);
85 }
86 /**
87 * Disables the given ObservationJob. (observationJobs.disable)
88 *
89 * @param string $name Required. The name of the ObservationJob to disable.
90 * Format: projects/{project}/locations/{location}/observationJobs/{job}
91 * @param DisableObservationJobRequest $postBody
92 * @param array $optParams Optional parameters.
93 * @return Operation
94 * @throws \Google\Service\Exception
95 */
96 public function disable($name, DisableObservationJobRequest $postBody, $optParams = [])
97 {
98 $params = ['name' => $name, 'postBody' => $postBody];
99 $params = array_merge($params, $optParams);
100 return $this->call('disable', [$params], Operation::class);
101 }
102 /**
103 * Enables the given ObservationJob. (observationJobs.enable)
104 *
105 * @param string $name Required. The name of the ObservationJob to enable.
106 * Format: projects/{project}/locations/{location}/observationJobs/{job}
107 * @param EnableObservationJobRequest $postBody
108 * @param array $optParams Optional parameters.
109 * @return Operation
110 * @throws \Google\Service\Exception
111 */
112 public function enable($name, EnableObservationJobRequest $postBody, $optParams = [])
113 {
114 $params = ['name' => $name, 'postBody' => $postBody];
115 $params = array_merge($params, $optParams);
116 return $this->call('enable', [$params], Operation::class);
117 }
118 /**
119 * GetObservationJob retrieves a single ObservationJob by name.
120 * (observationJobs.get)
121 *
122 * @param string $name Required. The name of the ObservationJob to retrieve.
123 * Format: projects/{project}/locations/{location}/observationJobs/{job}
124 * @param array $optParams Optional parameters.
125 * @return ObservationJob
126 * @throws \Google\Service\Exception
127 */
128 public function get($name, $optParams = [])
129 {
130 $params = ['name' => $name];
131 $params = array_merge($params, $optParams);
132 return $this->call('get', [$params], ObservationJob::class);
133 }
134 /**
135 * ListObservationJobs gets all ObservationJobs for a given project and
136 * location. (observationJobs.listProjectsLocationsObservationJobs)
137 *
138 * @param string $parent Required. The parent, which owns this collection of
139 * ObservationJobs. Format: projects/{project}/locations/{location}
140 * @param array $optParams Optional parameters.
141 *
142 * @opt_param int pageSize Optional. The maximum number of ObservationJobs to
143 * return. The service may return fewer than this value. If unspecified, at most
144 * 10 ObservationJobs will be returned. The maximum value is 1000; values above
145 * 1000 will be coerced to 1000.
146 * @opt_param string pageToken Optional. A page token, received from a previous
147 * `ListObservationJobs` call. Provide this to retrieve the subsequent page.
148 * When paginating, all other parameters provided to `ListObservationJobs` must
149 * match the call that provided the page token.
150 * @return ListObservationJobsResponse
151 * @throws \Google\Service\Exception
152 */
153 public function listProjectsLocationsObservationJobs($parent, $optParams = [])
154 {
155 $params = ['parent' => $parent];
156 $params = array_merge($params, $optParams);
157 return $this->call('list', [$params], ListObservationJobsResponse::class);
158 }
159}
160
161// Adding a class alias for backwards compatibility with the previous class name.
162class_alias(ProjectsLocationsObservationJobs::class, 'Google_Service_APIManagement_Resource_ProjectsLocationsObservationJobs');
Note: See TracBrowser for help on using the repository browser.