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 Safebrowsing (v4).
20 *
21 * <p>
22 * Enables client applications to check web resources (most commonly URLs)
23 * against Google-generated lists of unsafe web resources.</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/safe-browsing/" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_Safebrowsing extends Google_Service
33{
34
35
36  public $encodedFullHashes;
37  public $encodedUpdates;
38  public $fullHashes;
39  public $threatHits;
40  public $threatListUpdates;
41  public $threatLists;
42  public $threatMatches;
43
44  /**
45   * Constructs the internal representation of the Safebrowsing service.
46   *
47   * @param Google_Client $client
48   */
49  public function __construct(Google_Client $client)
50  {
51    parent::__construct($client);
52    $this->rootUrl = 'https://safebrowsing.googleapis.com/';
53    $this->servicePath = '';
54    $this->batchPath = 'batch';
55    $this->version = 'v4';
56    $this->serviceName = 'safebrowsing';
57
58    $this->encodedFullHashes = new Google_Service_Safebrowsing_Resource_EncodedFullHashes(
59        $this,
60        $this->serviceName,
61        'encodedFullHashes',
62        array(
63          'methods' => array(
64            'get' => array(
65              'path' => 'v4/encodedFullHashes/{encodedRequest}',
66              'httpMethod' => 'GET',
67              'parameters' => array(
68                'encodedRequest' => array(
69                  'location' => 'path',
70                  'type' => 'string',
71                  'required' => true,
72                ),
73                'clientId' => array(
74                  'location' => 'query',
75                  'type' => 'string',
76                ),
77                'clientVersion' => array(
78                  'location' => 'query',
79                  'type' => 'string',
80                ),
81              ),
82            ),
83          )
84        )
85    );
86    $this->encodedUpdates = new Google_Service_Safebrowsing_Resource_EncodedUpdates(
87        $this,
88        $this->serviceName,
89        'encodedUpdates',
90        array(
91          'methods' => array(
92            'get' => array(
93              'path' => 'v4/encodedUpdates/{encodedRequest}',
94              'httpMethod' => 'GET',
95              'parameters' => array(
96                'encodedRequest' => array(
97                  'location' => 'path',
98                  'type' => 'string',
99                  'required' => true,
100                ),
101                'clientId' => array(
102                  'location' => 'query',
103                  'type' => 'string',
104                ),
105                'clientVersion' => array(
106                  'location' => 'query',
107                  'type' => 'string',
108                ),
109              ),
110            ),
111          )
112        )
113    );
114    $this->fullHashes = new Google_Service_Safebrowsing_Resource_FullHashes(
115        $this,
116        $this->serviceName,
117        'fullHashes',
118        array(
119          'methods' => array(
120            'find' => array(
121              'path' => 'v4/fullHashes:find',
122              'httpMethod' => 'POST',
123              'parameters' => array(),
124            ),
125          )
126        )
127    );
128    $this->threatHits = new Google_Service_Safebrowsing_Resource_ThreatHits(
129        $this,
130        $this->serviceName,
131        'threatHits',
132        array(
133          'methods' => array(
134            'create' => array(
135              'path' => 'v4/threatHits',
136              'httpMethod' => 'POST',
137              'parameters' => array(),
138            ),
139          )
140        )
141    );
142    $this->threatListUpdates = new Google_Service_Safebrowsing_Resource_ThreatListUpdates(
143        $this,
144        $this->serviceName,
145        'threatListUpdates',
146        array(
147          'methods' => array(
148            'fetch' => array(
149              'path' => 'v4/threatListUpdates:fetch',
150              'httpMethod' => 'POST',
151              'parameters' => array(),
152            ),
153          )
154        )
155    );
156    $this->threatLists = new Google_Service_Safebrowsing_Resource_ThreatLists(
157        $this,
158        $this->serviceName,
159        'threatLists',
160        array(
161          'methods' => array(
162            'list' => array(
163              'path' => 'v4/threatLists',
164              'httpMethod' => 'GET',
165              'parameters' => array(),
166            ),
167          )
168        )
169    );
170    $this->threatMatches = new Google_Service_Safebrowsing_Resource_ThreatMatches(
171        $this,
172        $this->serviceName,
173        'threatMatches',
174        array(
175          'methods' => array(
176            'find' => array(
177              'path' => 'v4/threatMatches:find',
178              'httpMethod' => 'POST',
179              'parameters' => array(),
180            ),
181          )
182        )
183    );
184  }
185}
186