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