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 HangoutsChat (v1).
20 *
21 * <p>
22 * Enables bots to fetch information and perform actions in Hangouts Chat.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://developers.google.com/hangouts/chat" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31class Google_Service_HangoutsChat extends Google_Service
32{
33
34
35  public $spaces;
36  public $spaces_members;
37  public $spaces_messages;
38
39  /**
40   * Constructs the internal representation of the HangoutsChat service.
41   *
42   * @param Google_Client $client
43   */
44  public function __construct(Google_Client $client)
45  {
46    parent::__construct($client);
47    $this->rootUrl = 'https://chat.googleapis.com/';
48    $this->servicePath = '';
49    $this->batchPath = 'batch';
50    $this->version = 'v1';
51    $this->serviceName = 'chat';
52
53    $this->spaces = new Google_Service_HangoutsChat_Resource_Spaces(
54        $this,
55        $this->serviceName,
56        'spaces',
57        array(
58          'methods' => array(
59            'get' => array(
60              'path' => 'v1/{+name}',
61              'httpMethod' => 'GET',
62              'parameters' => array(
63                'name' => array(
64                  'location' => 'path',
65                  'type' => 'string',
66                  'required' => true,
67                ),
68              ),
69            ),'list' => array(
70              'path' => 'v1/spaces',
71              'httpMethod' => 'GET',
72              'parameters' => array(
73                'pageToken' => array(
74                  'location' => 'query',
75                  'type' => 'string',
76                ),
77                'pageSize' => array(
78                  'location' => 'query',
79                  'type' => 'integer',
80                ),
81              ),
82            ),
83          )
84        )
85    );
86    $this->spaces_members = new Google_Service_HangoutsChat_Resource_SpacesMembers(
87        $this,
88        $this->serviceName,
89        'members',
90        array(
91          'methods' => array(
92            'get' => array(
93              'path' => 'v1/{+name}',
94              'httpMethod' => 'GET',
95              'parameters' => array(
96                'name' => array(
97                  'location' => 'path',
98                  'type' => 'string',
99                  'required' => true,
100                ),
101              ),
102            ),'list' => array(
103              'path' => 'v1/{+parent}/members',
104              'httpMethod' => 'GET',
105              'parameters' => array(
106                'parent' => array(
107                  'location' => 'path',
108                  'type' => 'string',
109                  'required' => true,
110                ),
111                'pageToken' => array(
112                  'location' => 'query',
113                  'type' => 'string',
114                ),
115                'pageSize' => array(
116                  'location' => 'query',
117                  'type' => 'integer',
118                ),
119              ),
120            ),
121          )
122        )
123    );
124    $this->spaces_messages = new Google_Service_HangoutsChat_Resource_SpacesMessages(
125        $this,
126        $this->serviceName,
127        'messages',
128        array(
129          'methods' => array(
130            'create' => array(
131              'path' => 'v1/{+parent}/messages',
132              'httpMethod' => 'POST',
133              'parameters' => array(
134                'parent' => array(
135                  'location' => 'path',
136                  'type' => 'string',
137                  'required' => true,
138                ),
139                'threadKey' => array(
140                  'location' => 'query',
141                  'type' => 'string',
142                ),
143              ),
144            ),'delete' => array(
145              'path' => 'v1/{+name}',
146              'httpMethod' => 'DELETE',
147              'parameters' => array(
148                'name' => array(
149                  'location' => 'path',
150                  'type' => 'string',
151                  'required' => true,
152                ),
153              ),
154            ),'get' => array(
155              'path' => 'v1/{+name}',
156              'httpMethod' => 'GET',
157              'parameters' => array(
158                'name' => array(
159                  'location' => 'path',
160                  'type' => 'string',
161                  'required' => true,
162                ),
163              ),
164            ),'update' => array(
165              'path' => 'v1/{+name}',
166              'httpMethod' => 'PUT',
167              'parameters' => array(
168                'name' => array(
169                  'location' => 'path',
170                  'type' => 'string',
171                  'required' => true,
172                ),
173                'updateMask' => array(
174                  'location' => 'query',
175                  'type' => 'string',
176                ),
177              ),
178            ),
179          )
180        )
181    );
182  }
183}
184