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;
19
20use Google\Client;
21
22/**
23 * Service definition for CloudVideoIntelligence (v1).
24 *
25 * <p>
26 * Detects objects, explicit content, and scene changes in videos. It also
27 * specifies the region for annotation and transcribes speech to text. Supports
28 * both asynchronous API and streaming API.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://cloud.google.com/video-intelligence/docs/" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class CloudVideoIntelligence extends \Google\Service
38{
39  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
40  const CLOUD_PLATFORM =
41      "https://www.googleapis.com/auth/cloud-platform";
42
43  public $operations_projects_locations_operations;
44  public $projects_locations_operations;
45  public $videos;
46
47  /**
48   * Constructs the internal representation of the CloudVideoIntelligence
49   * service.
50   *
51   * @param Client|array $clientOrConfig The client used to deliver requests, or a
52   *                                     config array to pass to a new Client instance.
53   * @param string $rootUrl The root URL used for requests to the service.
54   */
55  public function __construct($clientOrConfig = [], $rootUrl = null)
56  {
57    parent::__construct($clientOrConfig);
58    $this->rootUrl = $rootUrl ?: 'https://videointelligence.googleapis.com/';
59    $this->servicePath = '';
60    $this->batchPath = 'batch';
61    $this->version = 'v1';
62    $this->serviceName = 'videointelligence';
63
64    $this->operations_projects_locations_operations = new CloudVideoIntelligence\Resource\OperationsProjectsLocationsOperations(
65        $this,
66        $this->serviceName,
67        'operations',
68        [
69          'methods' => [
70            'cancel' => [
71              'path' => 'v1/operations/{+name}:cancel',
72              'httpMethod' => 'POST',
73              'parameters' => [
74                'name' => [
75                  'location' => 'path',
76                  'type' => 'string',
77                  'required' => true,
78                ],
79              ],
80            ],'delete' => [
81              'path' => 'v1/operations/{+name}',
82              'httpMethod' => 'DELETE',
83              'parameters' => [
84                'name' => [
85                  'location' => 'path',
86                  'type' => 'string',
87                  'required' => true,
88                ],
89              ],
90            ],'get' => [
91              'path' => 'v1/operations/{+name}',
92              'httpMethod' => 'GET',
93              'parameters' => [
94                'name' => [
95                  'location' => 'path',
96                  'type' => 'string',
97                  'required' => true,
98                ],
99              ],
100            ],
101          ]
102        ]
103    );
104    $this->projects_locations_operations = new CloudVideoIntelligence\Resource\ProjectsLocationsOperations(
105        $this,
106        $this->serviceName,
107        'operations',
108        [
109          'methods' => [
110            'cancel' => [
111              'path' => 'v1/{+name}:cancel',
112              'httpMethod' => 'POST',
113              'parameters' => [
114                'name' => [
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ],
119              ],
120            ],'delete' => [
121              'path' => 'v1/{+name}',
122              'httpMethod' => 'DELETE',
123              'parameters' => [
124                'name' => [
125                  'location' => 'path',
126                  'type' => 'string',
127                  'required' => true,
128                ],
129              ],
130            ],'get' => [
131              'path' => 'v1/{+name}',
132              'httpMethod' => 'GET',
133              'parameters' => [
134                'name' => [
135                  'location' => 'path',
136                  'type' => 'string',
137                  'required' => true,
138                ],
139              ],
140            ],'list' => [
141              'path' => 'v1/{+name}/operations',
142              'httpMethod' => 'GET',
143              'parameters' => [
144                'name' => [
145                  'location' => 'path',
146                  'type' => 'string',
147                  'required' => true,
148                ],
149                'filter' => [
150                  'location' => 'query',
151                  'type' => 'string',
152                ],
153                'pageSize' => [
154                  'location' => 'query',
155                  'type' => 'integer',
156                ],
157                'pageToken' => [
158                  'location' => 'query',
159                  'type' => 'string',
160                ],
161              ],
162            ],
163          ]
164        ]
165    );
166    $this->videos = new CloudVideoIntelligence\Resource\Videos(
167        $this,
168        $this->serviceName,
169        'videos',
170        [
171          'methods' => [
172            'annotate' => [
173              'path' => 'v1/videos:annotate',
174              'httpMethod' => 'POST',
175              'parameters' => [],
176            ],
177          ]
178        ]
179    );
180  }
181}
182
183// Adding a class alias for backwards compatibility with the previous class name.
184class_alias(CloudVideoIntelligence::class, 'Google_Service_CloudVideoIntelligence');
185