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\Aiplatform\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse;
|
---|
21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ModelDeploymentMonitoringJob;
|
---|
22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest;
|
---|
23 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest;
|
---|
24 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest;
|
---|
25 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse;
|
---|
26 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
27 | use Google\Service\Aiplatform\GoogleProtobufEmpty;
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * The "modelDeploymentMonitoringJobs" collection of methods.
|
---|
31 | * Typical usage is:
|
---|
32 | * <code>
|
---|
33 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
34 | * $modelDeploymentMonitoringJobs = $aiplatformService->projects_locations_modelDeploymentMonitoringJobs;
|
---|
35 | * </code>
|
---|
36 | */
|
---|
37 | class ProjectsLocationsModelDeploymentMonitoringJobs extends \Google\Service\Resource
|
---|
38 | {
|
---|
39 | /**
|
---|
40 | * Creates a ModelDeploymentMonitoringJob. It will run periodically on a
|
---|
41 | * configured interval. (modelDeploymentMonitoringJobs.create)
|
---|
42 | *
|
---|
43 | * @param string $parent Required. The parent of the
|
---|
44 | * ModelDeploymentMonitoringJob. Format:
|
---|
45 | * `projects/{project}/locations/{location}`
|
---|
46 | * @param GoogleCloudAiplatformV1ModelDeploymentMonitoringJob $postBody
|
---|
47 | * @param array $optParams Optional parameters.
|
---|
48 | * @return GoogleCloudAiplatformV1ModelDeploymentMonitoringJob
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function create($parent, GoogleCloudAiplatformV1ModelDeploymentMonitoringJob $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('create', [$params], GoogleCloudAiplatformV1ModelDeploymentMonitoringJob::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Deletes a ModelDeploymentMonitoringJob.
|
---|
59 | * (modelDeploymentMonitoringJobs.delete)
|
---|
60 | *
|
---|
61 | * @param string $name Required. The resource name of the model monitoring job
|
---|
62 | * to delete. Format: `projects/{project}/locations/{location}/modelDeploymentMo
|
---|
63 | * nitoringJobs/{model_deployment_monitoring_job}`
|
---|
64 | * @param array $optParams Optional parameters.
|
---|
65 | * @return GoogleLongrunningOperation
|
---|
66 | * @throws \Google\Service\Exception
|
---|
67 | */
|
---|
68 | public function delete($name, $optParams = [])
|
---|
69 | {
|
---|
70 | $params = ['name' => $name];
|
---|
71 | $params = array_merge($params, $optParams);
|
---|
72 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
73 | }
|
---|
74 | /**
|
---|
75 | * Gets a ModelDeploymentMonitoringJob. (modelDeploymentMonitoringJobs.get)
|
---|
76 | *
|
---|
77 | * @param string $name Required. The resource name of the
|
---|
78 | * ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location
|
---|
79 | * }/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
|
---|
80 | * @param array $optParams Optional parameters.
|
---|
81 | * @return GoogleCloudAiplatformV1ModelDeploymentMonitoringJob
|
---|
82 | * @throws \Google\Service\Exception
|
---|
83 | */
|
---|
84 | public function get($name, $optParams = [])
|
---|
85 | {
|
---|
86 | $params = ['name' => $name];
|
---|
87 | $params = array_merge($params, $optParams);
|
---|
88 | return $this->call('get', [$params], GoogleCloudAiplatformV1ModelDeploymentMonitoringJob::class);
|
---|
89 | }
|
---|
90 | /**
|
---|
91 | * Lists ModelDeploymentMonitoringJobs in a Location. (modelDeploymentMonitoring
|
---|
92 | * Jobs.listProjectsLocationsModelDeploymentMonitoringJobs)
|
---|
93 | *
|
---|
94 | * @param string $parent Required. The parent of the
|
---|
95 | * ModelDeploymentMonitoringJob. Format:
|
---|
96 | * `projects/{project}/locations/{location}`
|
---|
97 | * @param array $optParams Optional parameters.
|
---|
98 | *
|
---|
99 | * @opt_param string filter The standard list filter. Supported fields: *
|
---|
100 | * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. * `state`
|
---|
101 | * supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`<`,
|
---|
102 | * `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 format. *
|
---|
103 | * `labels` supports general map functions that is: `labels.key=value` -
|
---|
104 | * key:value equality `labels.key:* - key existence Some examples of using the
|
---|
105 | * filter are: * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` *
|
---|
106 | * `state!="JOB_STATE_FAILED" OR display_name="my_job"` * `NOT
|
---|
107 | * display_name="my_job"` * `create_time>"2021-05-18T00:00:00Z"` *
|
---|
108 | * `labels.keyA=valueA` * `labels.keyB:*`
|
---|
109 | * @opt_param int pageSize The standard list page size.
|
---|
110 | * @opt_param string pageToken The standard list page token.
|
---|
111 | * @opt_param string readMask Mask specifying which fields to read
|
---|
112 | * @return GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse
|
---|
113 | * @throws \Google\Service\Exception
|
---|
114 | */
|
---|
115 | public function listProjectsLocationsModelDeploymentMonitoringJobs($parent, $optParams = [])
|
---|
116 | {
|
---|
117 | $params = ['parent' => $parent];
|
---|
118 | $params = array_merge($params, $optParams);
|
---|
119 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse::class);
|
---|
120 | }
|
---|
121 | /**
|
---|
122 | * Updates a ModelDeploymentMonitoringJob. (modelDeploymentMonitoringJobs.patch)
|
---|
123 | *
|
---|
124 | * @param string $name Output only. Resource name of a
|
---|
125 | * ModelDeploymentMonitoringJob.
|
---|
126 | * @param GoogleCloudAiplatformV1ModelDeploymentMonitoringJob $postBody
|
---|
127 | * @param array $optParams Optional parameters.
|
---|
128 | *
|
---|
129 | * @opt_param string updateMask Required. The update mask is used to specify the
|
---|
130 | * fields to be overwritten in the ModelDeploymentMonitoringJob resource by the
|
---|
131 | * update. The fields specified in the update_mask are relative to the resource,
|
---|
132 | * not the full request. A field will be overwritten if it is in the mask. If
|
---|
133 | * the user does not provide a mask then only the non-empty fields present in
|
---|
134 | * the request will be overwritten. Set the update_mask to `*` to override all
|
---|
135 | * fields. For the objective config, the user can either provide the update mask
|
---|
136 | * for model_deployment_monitoring_objective_configs or any combination of its
|
---|
137 | * nested fields, such as: model_deployment_monitoring_objective_configs.objecti
|
---|
138 | * ve_config.training_dataset. Updatable fields: * `display_name` *
|
---|
139 | * `model_deployment_monitoring_schedule_config` *
|
---|
140 | * `model_monitoring_alert_config` * `logging_sampling_strategy` * `labels` *
|
---|
141 | * `log_ttl` * `enable_monitoring_pipeline_logs` . and *
|
---|
142 | * `model_deployment_monitoring_objective_configs` . or * `model_deployment_moni
|
---|
143 | * toring_objective_configs.objective_config.training_dataset` * `model_deployme
|
---|
144 | * nt_monitoring_objective_configs.objective_config.training_prediction_skew_det
|
---|
145 | * ection_config` * `model_deployment_monitoring_objective_configs.objective_con
|
---|
146 | * fig.prediction_drift_detection_config`
|
---|
147 | * @return GoogleLongrunningOperation
|
---|
148 | * @throws \Google\Service\Exception
|
---|
149 | */
|
---|
150 | public function patch($name, GoogleCloudAiplatformV1ModelDeploymentMonitoringJob $postBody, $optParams = [])
|
---|
151 | {
|
---|
152 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
153 | $params = array_merge($params, $optParams);
|
---|
154 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
155 | }
|
---|
156 | /**
|
---|
157 | * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server
|
---|
158 | * makes a best effort to cancel the job. Will mark
|
---|
159 | * ModelDeploymentMonitoringJob.state to 'PAUSED'.
|
---|
160 | * (modelDeploymentMonitoringJobs.pause)
|
---|
161 | *
|
---|
162 | * @param string $name Required. The resource name of the
|
---|
163 | * ModelDeploymentMonitoringJob to pause. Format: `projects/{project}/locations/
|
---|
164 | * {location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
|
---|
165 | * @param GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest $postBody
|
---|
166 | * @param array $optParams Optional parameters.
|
---|
167 | * @return GoogleProtobufEmpty
|
---|
168 | * @throws \Google\Service\Exception
|
---|
169 | */
|
---|
170 | public function pause($name, GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest $postBody, $optParams = [])
|
---|
171 | {
|
---|
172 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
173 | $params = array_merge($params, $optParams);
|
---|
174 | return $this->call('pause', [$params], GoogleProtobufEmpty::class);
|
---|
175 | }
|
---|
176 | /**
|
---|
177 | * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next
|
---|
178 | * scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.
|
---|
179 | * (modelDeploymentMonitoringJobs.resume)
|
---|
180 | *
|
---|
181 | * @param string $name Required. The resource name of the
|
---|
182 | * ModelDeploymentMonitoringJob to resume. Format: `projects/{project}/locations
|
---|
183 | * /{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
|
---|
184 | * @param GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest $postBody
|
---|
185 | * @param array $optParams Optional parameters.
|
---|
186 | * @return GoogleProtobufEmpty
|
---|
187 | * @throws \Google\Service\Exception
|
---|
188 | */
|
---|
189 | public function resume($name, GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest $postBody, $optParams = [])
|
---|
190 | {
|
---|
191 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
192 | $params = array_merge($params, $optParams);
|
---|
193 | return $this->call('resume', [$params], GoogleProtobufEmpty::class);
|
---|
194 | }
|
---|
195 | /**
|
---|
196 | * Searches Model Monitoring Statistics generated within a given time window.
|
---|
197 | * (modelDeploymentMonitoringJobs.searchModelDeploymentMonitoringStatsAnomalies)
|
---|
198 | *
|
---|
199 | * @param string $modelDeploymentMonitoringJob Required.
|
---|
200 | * ModelDeploymentMonitoring Job resource name. Format: `projects/{project}/loca
|
---|
201 | * tions/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_j
|
---|
202 | * ob}`
|
---|
203 | * @param GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest $postBody
|
---|
204 | * @param array $optParams Optional parameters.
|
---|
205 | * @return GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse
|
---|
206 | * @throws \Google\Service\Exception
|
---|
207 | */
|
---|
208 | public function searchModelDeploymentMonitoringStatsAnomalies($modelDeploymentMonitoringJob, GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest $postBody, $optParams = [])
|
---|
209 | {
|
---|
210 | $params = ['modelDeploymentMonitoringJob' => $modelDeploymentMonitoringJob, 'postBody' => $postBody];
|
---|
211 | $params = array_merge($params, $optParams);
|
---|
212 | return $this->call('searchModelDeploymentMonitoringStatsAnomalies', [$params], GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse::class);
|
---|
213 | }
|
---|
214 | }
|
---|
215 |
|
---|
216 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
217 | class_alias(ProjectsLocationsModelDeploymentMonitoringJobs::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsModelDeploymentMonitoringJobs');
|
---|