source: vendor/google/apiclient-services/src/Bigquery/Resource/Models.php

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

Upload project files

  • Property mode set to 100644
File size: 4.2 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\Bigquery\Resource;
19
20use Google\Service\Bigquery\ListModelsResponse;
21use Google\Service\Bigquery\Model;
22
23/**
24 * The "models" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $bigqueryService = new Google\Service\Bigquery(...);
28 * $models = $bigqueryService->models;
29 * </code>
30 */
31class Models extends \Google\Service\Resource
32{
33 /**
34 * Deletes the model specified by modelId from the dataset. (models.delete)
35 *
36 * @param string $projectId Required. Project ID of the model to delete.
37 * @param string $datasetId Required. Dataset ID of the model to delete.
38 * @param string $modelId Required. Model ID of the model to delete.
39 * @param array $optParams Optional parameters.
40 * @throws \Google\Service\Exception
41 */
42 public function delete($projectId, $datasetId, $modelId, $optParams = [])
43 {
44 $params = ['projectId' => $projectId, 'datasetId' => $datasetId, 'modelId' => $modelId];
45 $params = array_merge($params, $optParams);
46 return $this->call('delete', [$params]);
47 }
48 /**
49 * Gets the specified model resource by model ID. (models.get)
50 *
51 * @param string $projectId Required. Project ID of the requested model.
52 * @param string $datasetId Required. Dataset ID of the requested model.
53 * @param string $modelId Required. Model ID of the requested model.
54 * @param array $optParams Optional parameters.
55 * @return Model
56 * @throws \Google\Service\Exception
57 */
58 public function get($projectId, $datasetId, $modelId, $optParams = [])
59 {
60 $params = ['projectId' => $projectId, 'datasetId' => $datasetId, 'modelId' => $modelId];
61 $params = array_merge($params, $optParams);
62 return $this->call('get', [$params], Model::class);
63 }
64 /**
65 * Lists all models in the specified dataset. Requires the READER dataset role.
66 * After retrieving the list of models, you can get information about a
67 * particular model by calling the models.get method. (models.listModels)
68 *
69 * @param string $projectId Required. Project ID of the models to list.
70 * @param string $datasetId Required. Dataset ID of the models to list.
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param string maxResults The maximum number of results to return in a
74 * single response page. Leverage the page tokens to iterate through the entire
75 * collection.
76 * @opt_param string pageToken Page token, returned by a previous call to
77 * request the next page of results
78 * @return ListModelsResponse
79 * @throws \Google\Service\Exception
80 */
81 public function listModels($projectId, $datasetId, $optParams = [])
82 {
83 $params = ['projectId' => $projectId, 'datasetId' => $datasetId];
84 $params = array_merge($params, $optParams);
85 return $this->call('list', [$params], ListModelsResponse::class);
86 }
87 /**
88 * Patch specific fields in the specified model. (models.patch)
89 *
90 * @param string $projectId Required. Project ID of the model to patch.
91 * @param string $datasetId Required. Dataset ID of the model to patch.
92 * @param string $modelId Required. Model ID of the model to patch.
93 * @param Model $postBody
94 * @param array $optParams Optional parameters.
95 * @return Model
96 * @throws \Google\Service\Exception
97 */
98 public function patch($projectId, $datasetId, $modelId, Model $postBody, $optParams = [])
99 {
100 $params = ['projectId' => $projectId, 'datasetId' => $datasetId, 'modelId' => $modelId, 'postBody' => $postBody];
101 $params = array_merge($params, $optParams);
102 return $this->call('patch', [$params], Model::class);
103 }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(Models::class, 'Google_Service_Bigquery_Resource_Models');
Note: See TracBrowser for help on using the repository browser.