source: vendor/google/apiclient-services/src/Aiplatform/Resource/ProjectsLocationsSchedules.php

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

Upload project files

  • Property mode set to 100644
File size: 9.1 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\Aiplatform\Resource;
19
20use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListSchedulesResponse;
21use Google\Service\Aiplatform\GoogleCloudAiplatformV1PauseScheduleRequest;
22use Google\Service\Aiplatform\GoogleCloudAiplatformV1ResumeScheduleRequest;
23use Google\Service\Aiplatform\GoogleCloudAiplatformV1Schedule;
24use Google\Service\Aiplatform\GoogleLongrunningOperation;
25use Google\Service\Aiplatform\GoogleProtobufEmpty;
26
27/**
28 * The "schedules" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $aiplatformService = new Google\Service\Aiplatform(...);
32 * $schedules = $aiplatformService->projects_locations_schedules;
33 * </code>
34 */
35class ProjectsLocationsSchedules extends \Google\Service\Resource
36{
37 /**
38 * Creates a Schedule. (schedules.create)
39 *
40 * @param string $parent Required. The resource name of the Location to create
41 * the Schedule in. Format: `projects/{project}/locations/{location}`
42 * @param GoogleCloudAiplatformV1Schedule $postBody
43 * @param array $optParams Optional parameters.
44 * @return GoogleCloudAiplatformV1Schedule
45 * @throws \Google\Service\Exception
46 */
47 public function create($parent, GoogleCloudAiplatformV1Schedule $postBody, $optParams = [])
48 {
49 $params = ['parent' => $parent, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('create', [$params], GoogleCloudAiplatformV1Schedule::class);
52 }
53 /**
54 * Deletes a Schedule. (schedules.delete)
55 *
56 * @param string $name Required. The name of the Schedule resource to be
57 * deleted. Format:
58 * `projects/{project}/locations/{location}/schedules/{schedule}`
59 * @param array $optParams Optional parameters.
60 * @return GoogleLongrunningOperation
61 * @throws \Google\Service\Exception
62 */
63 public function delete($name, $optParams = [])
64 {
65 $params = ['name' => $name];
66 $params = array_merge($params, $optParams);
67 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
68 }
69 /**
70 * Gets a Schedule. (schedules.get)
71 *
72 * @param string $name Required. The name of the Schedule resource. Format:
73 * `projects/{project}/locations/{location}/schedules/{schedule}`
74 * @param array $optParams Optional parameters.
75 * @return GoogleCloudAiplatformV1Schedule
76 * @throws \Google\Service\Exception
77 */
78 public function get($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('get', [$params], GoogleCloudAiplatformV1Schedule::class);
83 }
84 /**
85 * Lists Schedules in a Location. (schedules.listProjectsLocationsSchedules)
86 *
87 * @param string $parent Required. The resource name of the Location to list the
88 * Schedules from. Format: `projects/{project}/locations/{location}`
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param string filter Lists the Schedules that match the filter
92 * expression. The following fields are supported: * `display_name`: Supports
93 * `=`, `!=` comparisons, and `:` wildcard. * `state`: Supports `=` and `!=`
94 * comparisons. * `request`: Supports existence of the check. (e.g.
95 * `create_pipeline_job_request:*` --> Schedule has
96 * create_pipeline_job_request). * `create_time`: Supports `=`, `!=`, `<`, `>`,
97 * `<=`, and `>=` comparisons. Values must be in RFC 3339 format. *
98 * `start_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
99 * Values must be in RFC 3339 format. * `end_time`: Supports `=`, `!=`, `<`,
100 * `>`, `<=`, `>=` comparisons and `:*` existence check. Values must be in RFC
101 * 3339 format. * `next_run_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=`
102 * comparisons. Values must be in RFC 3339 format. Filter expressions can be
103 * combined together using logical operators (`NOT`, `AND` & `OR`). The syntax
104 * to define filter expression is based on https://google.aip.dev/160. Examples:
105 * * `state="ACTIVE" AND display_name:"my_schedule_*"` * `NOT
106 * display_name="my_schedule"` * `create_time>"2021-05-18T00:00:00Z"` *
107 * `end_time>"2021-05-18T00:00:00Z" OR NOT end_time:*` *
108 * `create_pipeline_job_request:*`
109 * @opt_param string orderBy A comma-separated list of fields to order by. The
110 * default sort order is in ascending order. Use "desc" after a field name for
111 * descending. You can have multiple order_by fields provided. For example,
112 * using "create_time desc, end_time" will order results by create time in
113 * descending order, and if there are multiple schedules having the same create
114 * time, order them by the end time in ascending order. If order_by is not
115 * specified, it will order by default with create_time in descending order.
116 * Supported fields: * `create_time` * `start_time` * `end_time` *
117 * `next_run_time`
118 * @opt_param int pageSize The standard list page size. Default to 100 if not
119 * specified.
120 * @opt_param string pageToken The standard list page token. Typically obtained
121 * via ListSchedulesResponse.next_page_token of the previous
122 * ScheduleService.ListSchedules call.
123 * @return GoogleCloudAiplatformV1ListSchedulesResponse
124 * @throws \Google\Service\Exception
125 */
126 public function listProjectsLocationsSchedules($parent, $optParams = [])
127 {
128 $params = ['parent' => $parent];
129 $params = array_merge($params, $optParams);
130 return $this->call('list', [$params], GoogleCloudAiplatformV1ListSchedulesResponse::class);
131 }
132 /**
133 * Updates an active or paused Schedule. When the Schedule is updated, new runs
134 * will be scheduled starting from the updated next execution time after the
135 * update time based on the time_specification in the updated Schedule. All
136 * unstarted runs before the update time will be skipped while already created
137 * runs will NOT be paused or canceled. (schedules.patch)
138 *
139 * @param string $name Immutable. The resource name of the Schedule.
140 * @param GoogleCloudAiplatformV1Schedule $postBody
141 * @param array $optParams Optional parameters.
142 *
143 * @opt_param string updateMask Required. The update mask applies to the
144 * resource. See google.protobuf.FieldMask.
145 * @return GoogleCloudAiplatformV1Schedule
146 * @throws \Google\Service\Exception
147 */
148 public function patch($name, GoogleCloudAiplatformV1Schedule $postBody, $optParams = [])
149 {
150 $params = ['name' => $name, 'postBody' => $postBody];
151 $params = array_merge($params, $optParams);
152 return $this->call('patch', [$params], GoogleCloudAiplatformV1Schedule::class);
153 }
154 /**
155 * Pauses a Schedule. Will mark Schedule.state to 'PAUSED'. If the schedule is
156 * paused, no new runs will be created. Already created runs will NOT be paused
157 * or canceled. (schedules.pause)
158 *
159 * @param string $name Required. The name of the Schedule resource to be paused.
160 * Format: `projects/{project}/locations/{location}/schedules/{schedule}`
161 * @param GoogleCloudAiplatformV1PauseScheduleRequest $postBody
162 * @param array $optParams Optional parameters.
163 * @return GoogleProtobufEmpty
164 * @throws \Google\Service\Exception
165 */
166 public function pause($name, GoogleCloudAiplatformV1PauseScheduleRequest $postBody, $optParams = [])
167 {
168 $params = ['name' => $name, 'postBody' => $postBody];
169 $params = array_merge($params, $optParams);
170 return $this->call('pause', [$params], GoogleProtobufEmpty::class);
171 }
172 /**
173 * Resumes a paused Schedule to start scheduling new runs. Will mark
174 * Schedule.state to 'ACTIVE'. Only paused Schedule can be resumed. When the
175 * Schedule is resumed, new runs will be scheduled starting from the next
176 * execution time after the current time based on the time_specification in the
177 * Schedule. If Schedule.catch_up is set up true, all missed runs will be
178 * scheduled for backfill first. (schedules.resume)
179 *
180 * @param string $name Required. The name of the Schedule resource to be
181 * resumed. Format:
182 * `projects/{project}/locations/{location}/schedules/{schedule}`
183 * @param GoogleCloudAiplatformV1ResumeScheduleRequest $postBody
184 * @param array $optParams Optional parameters.
185 * @return GoogleProtobufEmpty
186 * @throws \Google\Service\Exception
187 */
188 public function resume($name, GoogleCloudAiplatformV1ResumeScheduleRequest $postBody, $optParams = [])
189 {
190 $params = ['name' => $name, 'postBody' => $postBody];
191 $params = array_merge($params, $optParams);
192 return $this->call('resume', [$params], GoogleProtobufEmpty::class);
193 }
194}
195
196// Adding a class alias for backwards compatibility with the previous class name.
197class_alias(ProjectsLocationsSchedules::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsSchedules');
Note: See TracBrowser for help on using the repository browser.