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/**
19 * Service definition for Prediction (v1.6).
20 *
21 * <p>
22 * Lets you access a cloud hosted machine learning service that makes it easy to
23 * build smart apps</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/prediction/docs/developer-guide" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_Prediction extends Google_Service
33{
34  /** View and manage your data across Google Cloud Platform services. */
35  const CLOUD_PLATFORM =
36      "https://www.googleapis.com/auth/cloud-platform";
37  /** Manage your data and permissions in Google Cloud Storage. */
38  const DEVSTORAGE_FULL_CONTROL =
39      "https://www.googleapis.com/auth/devstorage.full_control";
40  /** View your data in Google Cloud Storage. */
41  const DEVSTORAGE_READ_ONLY =
42      "https://www.googleapis.com/auth/devstorage.read_only";
43  /** Manage your data in Google Cloud Storage. */
44  const DEVSTORAGE_READ_WRITE =
45      "https://www.googleapis.com/auth/devstorage.read_write";
46  /** Manage your data in the Google Prediction API. */
47  const PREDICTION =
48      "https://www.googleapis.com/auth/prediction";
49
50  public $hostedmodels;
51  public $trainedmodels;
52
53  /**
54   * Constructs the internal representation of the Prediction service.
55   *
56   * @param Google_Client $client
57   */
58  public function __construct(Google_Client $client)
59  {
60    parent::__construct($client);
61    $this->rootUrl = 'https://www.googleapis.com/';
62    $this->servicePath = 'prediction/v1.6/projects/';
63    $this->version = 'v1.6';
64    $this->serviceName = 'prediction';
65
66    $this->hostedmodels = new Google_Service_Prediction_Resource_Hostedmodels(
67        $this,
68        $this->serviceName,
69        'hostedmodels',
70        array(
71          'methods' => array(
72            'predict' => array(
73              'path' => '{project}/hostedmodels/{hostedModelName}/predict',
74              'httpMethod' => 'POST',
75              'parameters' => array(
76                'project' => array(
77                  'location' => 'path',
78                  'type' => 'string',
79                  'required' => true,
80                ),
81                'hostedModelName' => array(
82                  'location' => 'path',
83                  'type' => 'string',
84                  'required' => true,
85                ),
86              ),
87            ),
88          )
89        )
90    );
91    $this->trainedmodels = new Google_Service_Prediction_Resource_Trainedmodels(
92        $this,
93        $this->serviceName,
94        'trainedmodels',
95        array(
96          'methods' => array(
97            'analyze' => array(
98              'path' => '{project}/trainedmodels/{id}/analyze',
99              'httpMethod' => 'GET',
100              'parameters' => array(
101                'project' => array(
102                  'location' => 'path',
103                  'type' => 'string',
104                  'required' => true,
105                ),
106                'id' => array(
107                  'location' => 'path',
108                  'type' => 'string',
109                  'required' => true,
110                ),
111              ),
112            ),'delete' => array(
113              'path' => '{project}/trainedmodels/{id}',
114              'httpMethod' => 'DELETE',
115              'parameters' => array(
116                'project' => array(
117                  'location' => 'path',
118                  'type' => 'string',
119                  'required' => true,
120                ),
121                'id' => array(
122                  'location' => 'path',
123                  'type' => 'string',
124                  'required' => true,
125                ),
126              ),
127            ),'get' => array(
128              'path' => '{project}/trainedmodels/{id}',
129              'httpMethod' => 'GET',
130              'parameters' => array(
131                'project' => array(
132                  'location' => 'path',
133                  'type' => 'string',
134                  'required' => true,
135                ),
136                'id' => array(
137                  'location' => 'path',
138                  'type' => 'string',
139                  'required' => true,
140                ),
141              ),
142            ),'insert' => array(
143              'path' => '{project}/trainedmodels',
144              'httpMethod' => 'POST',
145              'parameters' => array(
146                'project' => array(
147                  'location' => 'path',
148                  'type' => 'string',
149                  'required' => true,
150                ),
151              ),
152            ),'list' => array(
153              'path' => '{project}/trainedmodels/list',
154              'httpMethod' => 'GET',
155              'parameters' => array(
156                'project' => array(
157                  'location' => 'path',
158                  'type' => 'string',
159                  'required' => true,
160                ),
161                'maxResults' => array(
162                  'location' => 'query',
163                  'type' => 'integer',
164                ),
165                'pageToken' => array(
166                  'location' => 'query',
167                  'type' => 'string',
168                ),
169              ),
170            ),'predict' => array(
171              'path' => '{project}/trainedmodels/{id}/predict',
172              'httpMethod' => 'POST',
173              'parameters' => array(
174                'project' => array(
175                  'location' => 'path',
176                  'type' => 'string',
177                  'required' => true,
178                ),
179                'id' => array(
180                  'location' => 'path',
181                  'type' => 'string',
182                  'required' => true,
183                ),
184              ),
185            ),'update' => array(
186              'path' => '{project}/trainedmodels/{id}',
187              'httpMethod' => 'PUT',
188              'parameters' => array(
189                'project' => array(
190                  'location' => 'path',
191                  'type' => 'string',
192                  'required' => true,
193                ),
194                'id' => array(
195                  'location' => 'path',
196                  'type' => 'string',
197                  'required' => true,
198                ),
199              ),
200            ),
201          )
202        )
203    );
204  }
205}
206