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\CloudMachineLearningEngine\Resource;
19
20use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListStudiesResponse;
21use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Study;
22use Google\Service\CloudMachineLearningEngine\GoogleProtobufEmpty;
23
24/**
25 * The "studies" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $mlService = new Google\Service\CloudMachineLearningEngine(...);
29 *   $studies = $mlService->studies;
30 *  </code>
31 */
32class ProjectsLocationsStudies extends \Google\Service\Resource
33{
34  /**
35   * Creates a study. (studies.create)
36   *
37   * @param string $parent Required. The project and location that the study
38   * belongs to. Format: projects/{project}/locations/{location}
39   * @param GoogleCloudMlV1Study $postBody
40   * @param array $optParams Optional parameters.
41   *
42   * @opt_param string studyId Required. The ID to use for the study, which will
43   * become the final component of the study's resource name.
44   * @return GoogleCloudMlV1Study
45   */
46  public function create($parent, GoogleCloudMlV1Study $postBody, $optParams = [])
47  {
48    $params = ['parent' => $parent, 'postBody' => $postBody];
49    $params = array_merge($params, $optParams);
50    return $this->call('create', [$params], GoogleCloudMlV1Study::class);
51  }
52  /**
53   * Deletes a study. (studies.delete)
54   *
55   * @param string $name Required. The study name.
56   * @param array $optParams Optional parameters.
57   * @return GoogleProtobufEmpty
58   */
59  public function delete($name, $optParams = [])
60  {
61    $params = ['name' => $name];
62    $params = array_merge($params, $optParams);
63    return $this->call('delete', [$params], GoogleProtobufEmpty::class);
64  }
65  /**
66   * Gets a study. (studies.get)
67   *
68   * @param string $name Required. The study name.
69   * @param array $optParams Optional parameters.
70   * @return GoogleCloudMlV1Study
71   */
72  public function get($name, $optParams = [])
73  {
74    $params = ['name' => $name];
75    $params = array_merge($params, $optParams);
76    return $this->call('get', [$params], GoogleCloudMlV1Study::class);
77  }
78  /**
79   * Lists all the studies in a region for an associated project.
80   * (studies.listProjectsLocationsStudies)
81   *
82   * @param string $parent Required. The project and location that the study
83   * belongs to. Format: projects/{project}/locations/{location}
84   * @param array $optParams Optional parameters.
85   * @return GoogleCloudMlV1ListStudiesResponse
86   */
87  public function listProjectsLocationsStudies($parent, $optParams = [])
88  {
89    $params = ['parent' => $parent];
90    $params = array_merge($params, $optParams);
91    return $this->call('list', [$params], GoogleCloudMlV1ListStudiesResponse::class);
92  }
93}
94
95// Adding a class alias for backwards compatibility with the previous class name.
96class_alias(ProjectsLocationsStudies::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsLocationsStudies');
97