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\GoogleCloudAiplatformV1BatchCreateTensorboardRunsRequest;
|
---|
21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1BatchCreateTensorboardRunsResponse;
|
---|
22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListTensorboardRunsResponse;
|
---|
23 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1TensorboardRun;
|
---|
24 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1WriteTensorboardRunDataRequest;
|
---|
25 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1WriteTensorboardRunDataResponse;
|
---|
26 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * The "runs" collection of methods.
|
---|
30 | * Typical usage is:
|
---|
31 | * <code>
|
---|
32 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
33 | * $runs = $aiplatformService->projects_locations_tensorboards_experiments_runs;
|
---|
34 | * </code>
|
---|
35 | */
|
---|
36 | class ProjectsLocationsTensorboardsExperimentsRuns extends \Google\Service\Resource
|
---|
37 | {
|
---|
38 | /**
|
---|
39 | * Batch create TensorboardRuns. (runs.batchCreate)
|
---|
40 | *
|
---|
41 | * @param string $parent Required. The resource name of the
|
---|
42 | * TensorboardExperiment to create the TensorboardRuns in. Format: `projects/{pr
|
---|
43 | * oject}/locations/{location}/tensorboards/{tensorboard}/experiments/{experimen
|
---|
44 | * t}` The parent field in the CreateTensorboardRunRequest messages must match
|
---|
45 | * this field.
|
---|
46 | * @param GoogleCloudAiplatformV1BatchCreateTensorboardRunsRequest $postBody
|
---|
47 | * @param array $optParams Optional parameters.
|
---|
48 | * @return GoogleCloudAiplatformV1BatchCreateTensorboardRunsResponse
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function batchCreate($parent, GoogleCloudAiplatformV1BatchCreateTensorboardRunsRequest $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('batchCreate', [$params], GoogleCloudAiplatformV1BatchCreateTensorboardRunsResponse::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Creates a TensorboardRun. (runs.create)
|
---|
59 | *
|
---|
60 | * @param string $parent Required. The resource name of the
|
---|
61 | * TensorboardExperiment to create the TensorboardRun in. Format: `projects/{pro
|
---|
62 | * ject}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment
|
---|
63 | * }`
|
---|
64 | * @param GoogleCloudAiplatformV1TensorboardRun $postBody
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | *
|
---|
67 | * @opt_param string tensorboardRunId Required. The ID to use for the
|
---|
68 | * Tensorboard run, which becomes the final component of the Tensorboard run's
|
---|
69 | * resource name. This value should be 1-128 characters, and valid characters
|
---|
70 | * are `/a-z-/`.
|
---|
71 | * @return GoogleCloudAiplatformV1TensorboardRun
|
---|
72 | * @throws \Google\Service\Exception
|
---|
73 | */
|
---|
74 | public function create($parent, GoogleCloudAiplatformV1TensorboardRun $postBody, $optParams = [])
|
---|
75 | {
|
---|
76 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
77 | $params = array_merge($params, $optParams);
|
---|
78 | return $this->call('create', [$params], GoogleCloudAiplatformV1TensorboardRun::class);
|
---|
79 | }
|
---|
80 | /**
|
---|
81 | * Deletes a TensorboardRun. (runs.delete)
|
---|
82 | *
|
---|
83 | * @param string $name Required. The name of the TensorboardRun to be deleted.
|
---|
84 | * Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}/e
|
---|
85 | * xperiments/{experiment}/runs/{run}`
|
---|
86 | * @param array $optParams Optional parameters.
|
---|
87 | * @return GoogleLongrunningOperation
|
---|
88 | * @throws \Google\Service\Exception
|
---|
89 | */
|
---|
90 | public function delete($name, $optParams = [])
|
---|
91 | {
|
---|
92 | $params = ['name' => $name];
|
---|
93 | $params = array_merge($params, $optParams);
|
---|
94 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
95 | }
|
---|
96 | /**
|
---|
97 | * Gets a TensorboardRun. (runs.get)
|
---|
98 | *
|
---|
99 | * @param string $name Required. The name of the TensorboardRun resource.
|
---|
100 | * Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}/e
|
---|
101 | * xperiments/{experiment}/runs/{run}`
|
---|
102 | * @param array $optParams Optional parameters.
|
---|
103 | * @return GoogleCloudAiplatformV1TensorboardRun
|
---|
104 | * @throws \Google\Service\Exception
|
---|
105 | */
|
---|
106 | public function get($name, $optParams = [])
|
---|
107 | {
|
---|
108 | $params = ['name' => $name];
|
---|
109 | $params = array_merge($params, $optParams);
|
---|
110 | return $this->call('get', [$params], GoogleCloudAiplatformV1TensorboardRun::class);
|
---|
111 | }
|
---|
112 | /**
|
---|
113 | * Lists TensorboardRuns in a Location.
|
---|
114 | * (runs.listProjectsLocationsTensorboardsExperimentsRuns)
|
---|
115 | *
|
---|
116 | * @param string $parent Required. The resource name of the
|
---|
117 | * TensorboardExperiment to list TensorboardRuns. Format: `projects/{project}/lo
|
---|
118 | * cations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
|
---|
119 | * @param array $optParams Optional parameters.
|
---|
120 | *
|
---|
121 | * @opt_param string filter Lists the TensorboardRuns that match the filter
|
---|
122 | * expression.
|
---|
123 | * @opt_param string orderBy Field to use to sort the list.
|
---|
124 | * @opt_param int pageSize The maximum number of TensorboardRuns to return. The
|
---|
125 | * service may return fewer than this value. If unspecified, at most 50
|
---|
126 | * TensorboardRuns are returned. The maximum value is 1000; values above 1000
|
---|
127 | * are coerced to 1000.
|
---|
128 | * @opt_param string pageToken A page token, received from a previous
|
---|
129 | * TensorboardService.ListTensorboardRuns call. Provide this to retrieve the
|
---|
130 | * subsequent page. When paginating, all other parameters provided to
|
---|
131 | * TensorboardService.ListTensorboardRuns must match the call that provided the
|
---|
132 | * page token.
|
---|
133 | * @opt_param string readMask Mask specifying which fields to read.
|
---|
134 | * @return GoogleCloudAiplatformV1ListTensorboardRunsResponse
|
---|
135 | * @throws \Google\Service\Exception
|
---|
136 | */
|
---|
137 | public function listProjectsLocationsTensorboardsExperimentsRuns($parent, $optParams = [])
|
---|
138 | {
|
---|
139 | $params = ['parent' => $parent];
|
---|
140 | $params = array_merge($params, $optParams);
|
---|
141 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListTensorboardRunsResponse::class);
|
---|
142 | }
|
---|
143 | /**
|
---|
144 | * Updates a TensorboardRun. (runs.patch)
|
---|
145 | *
|
---|
146 | * @param string $name Output only. Name of the TensorboardRun. Format: `project
|
---|
147 | * s/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{expe
|
---|
148 | * riment}/runs/{run}`
|
---|
149 | * @param GoogleCloudAiplatformV1TensorboardRun $postBody
|
---|
150 | * @param array $optParams Optional parameters.
|
---|
151 | *
|
---|
152 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
153 | * fields to be overwritten in the TensorboardRun resource by the update. The
|
---|
154 | * fields specified in the update_mask are relative to the resource, not the
|
---|
155 | * full request. A field is overwritten if it's in the mask. If the user does
|
---|
156 | * not provide a mask then all fields are overwritten if new values are
|
---|
157 | * specified.
|
---|
158 | * @return GoogleCloudAiplatformV1TensorboardRun
|
---|
159 | * @throws \Google\Service\Exception
|
---|
160 | */
|
---|
161 | public function patch($name, GoogleCloudAiplatformV1TensorboardRun $postBody, $optParams = [])
|
---|
162 | {
|
---|
163 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
164 | $params = array_merge($params, $optParams);
|
---|
165 | return $this->call('patch', [$params], GoogleCloudAiplatformV1TensorboardRun::class);
|
---|
166 | }
|
---|
167 | /**
|
---|
168 | * Write time series data points into multiple TensorboardTimeSeries under a
|
---|
169 | * TensorboardRun. If any data fail to be ingested, an error is returned.
|
---|
170 | * (runs.write)
|
---|
171 | *
|
---|
172 | * @param string $tensorboardRun Required. The resource name of the
|
---|
173 | * TensorboardRun to write data to. Format: `projects/{project}/locations/{locat
|
---|
174 | * ion}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
|
---|
175 | * @param GoogleCloudAiplatformV1WriteTensorboardRunDataRequest $postBody
|
---|
176 | * @param array $optParams Optional parameters.
|
---|
177 | * @return GoogleCloudAiplatformV1WriteTensorboardRunDataResponse
|
---|
178 | * @throws \Google\Service\Exception
|
---|
179 | */
|
---|
180 | public function write($tensorboardRun, GoogleCloudAiplatformV1WriteTensorboardRunDataRequest $postBody, $optParams = [])
|
---|
181 | {
|
---|
182 | $params = ['tensorboardRun' => $tensorboardRun, 'postBody' => $postBody];
|
---|
183 | $params = array_merge($params, $optParams);
|
---|
184 | return $this->call('write', [$params], GoogleCloudAiplatformV1WriteTensorboardRunDataResponse::class);
|
---|
185 | }
|
---|
186 | }
|
---|
187 |
|
---|
188 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
189 | class_alias(ProjectsLocationsTensorboardsExperimentsRuns::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsTensorboardsExperimentsRuns');
|
---|