Skip to content

Commit 2451ca0

Browse files
1 parent 69b46be commit 2451ca0

File tree

6 files changed

+402
-2
lines changed

6 files changed

+402
-2
lines changed

src/HangoutsChat.php

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ class HangoutsChat extends \Google\Service
6565
/** Private Service: https://www.googleapis.com/auth/chat.bot. */
6666
const CHAT_BOT =
6767
"https://www.googleapis.com/auth/chat.bot";
68+
/** View, create, and delete custom emoji in Google Chat. */
69+
const CHAT_CUSTOMEMOJIS =
70+
"https://www.googleapis.com/auth/chat.customemojis";
71+
/** View custom emoji in Google Chat. */
72+
const CHAT_CUSTOMEMOJIS_READONLY =
73+
"https://www.googleapis.com/auth/chat.customemojis.readonly";
6874
/** Delete conversations and spaces and remove access to associated files in Google Chat. */
6975
const CHAT_DELETE =
7076
"https://www.googleapis.com/auth/chat.delete";
@@ -117,6 +123,7 @@ class HangoutsChat extends \Google\Service
117123
const CHAT_USERS_SPACESETTINGS =
118124
"https://www.googleapis.com/auth/chat.users.spacesettings";
119125

126+
public $customEmojis;
120127
public $media;
121128
public $spaces;
122129
public $spaces_members;
@@ -146,6 +153,57 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
146153
$this->version = 'v1';
147154
$this->serviceName = 'chat';
148155

156+
$this->customEmojis = new HangoutsChat\Resource\CustomEmojis(
157+
$this,
158+
$this->serviceName,
159+
'customEmojis',
160+
[
161+
'methods' => [
162+
'create' => [
163+
'path' => 'v1/customEmojis',
164+
'httpMethod' => 'POST',
165+
'parameters' => [],
166+
],'delete' => [
167+
'path' => 'v1/{+name}',
168+
'httpMethod' => 'DELETE',
169+
'parameters' => [
170+
'name' => [
171+
'location' => 'path',
172+
'type' => 'string',
173+
'required' => true,
174+
],
175+
],
176+
],'get' => [
177+
'path' => 'v1/{+name}',
178+
'httpMethod' => 'GET',
179+
'parameters' => [
180+
'name' => [
181+
'location' => 'path',
182+
'type' => 'string',
183+
'required' => true,
184+
],
185+
],
186+
],'list' => [
187+
'path' => 'v1/customEmojis',
188+
'httpMethod' => 'GET',
189+
'parameters' => [
190+
'filter' => [
191+
'location' => 'query',
192+
'type' => 'string',
193+
],
194+
'pageSize' => [
195+
'location' => 'query',
196+
'type' => 'integer',
197+
],
198+
'pageToken' => [
199+
'location' => 'query',
200+
'type' => 'string',
201+
],
202+
],
203+
],
204+
]
205+
]
206+
);
149207
$this->media = new HangoutsChat\Resource\Media(
150208
$this,
151209
$this->serviceName,

src/HangoutsChat/CustomEmoji.php

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,81 @@
1919

2020
class CustomEmoji extends \Google\Model
2121
{
22+
/**
23+
* @var string
24+
*/
25+
public $emojiName;
26+
/**
27+
* @var string
28+
*/
29+
public $name;
30+
protected $payloadType = CustomEmojiPayload::class;
31+
protected $payloadDataType = '';
32+
/**
33+
* @var string
34+
*/
35+
public $temporaryImageUri;
2236
/**
2337
* @var string
2438
*/
2539
public $uid;
2640

41+
/**
42+
* @param string
43+
*/
44+
public function setEmojiName($emojiName)
45+
{
46+
$this->emojiName = $emojiName;
47+
}
48+
/**
49+
* @return string
50+
*/
51+
public function getEmojiName()
52+
{
53+
return $this->emojiName;
54+
}
55+
/**
56+
* @param string
57+
*/
58+
public function setName($name)
59+
{
60+
$this->name = $name;
61+
}
62+
/**
63+
* @return string
64+
*/
65+
public function getName()
66+
{
67+
return $this->name;
68+
}
69+
/**
70+
* @param CustomEmojiPayload
71+
*/
72+
public function setPayload(CustomEmojiPayload $payload)
73+
{
74+
$this->payload = $payload;
75+
}
76+
/**
77+
* @return CustomEmojiPayload
78+
*/
79+
public function getPayload()
80+
{
81+
return $this->payload;
82+
}
83+
/**
84+
* @param string
85+
*/
86+
public function setTemporaryImageUri($temporaryImageUri)
87+
{
88+
$this->temporaryImageUri = $temporaryImageUri;
89+
}
90+
/**
91+
* @return string
92+
*/
93+
public function getTemporaryImageUri()
94+
{
95+
return $this->temporaryImageUri;
96+
}
2797
/**
2898
* @param string
2999
*/
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
namespace Google\Service\HangoutsChat;
19+
20+
class CustomEmojiPayload extends \Google\Model
21+
{
22+
/**
23+
* @var string
24+
*/
25+
public $fileContent;
26+
/**
27+
* @var string
28+
*/
29+
public $filename;
30+
31+
/**
32+
* @param string
33+
*/
34+
public function setFileContent($fileContent)
35+
{
36+
$this->fileContent = $fileContent;
37+
}
38+
/**
39+
* @return string
40+
*/
41+
public function getFileContent()
42+
{
43+
return $this->fileContent;
44+
}
45+
/**
46+
* @param string
47+
*/
48+
public function setFilename($filename)
49+
{
50+
$this->filename = $filename;
51+
}
52+
/**
53+
* @return string
54+
*/
55+
public function getFilename()
56+
{
57+
return $this->filename;
58+
}
59+
}
60+
61+
// Adding a class alias for backwards compatibility with the previous class name.
62+
class_alias(CustomEmojiPayload::class, 'Google_Service_HangoutsChat_CustomEmojiPayload');
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
namespace Google\Service\HangoutsChat;
19+
20+
class ListCustomEmojisResponse extends \Google\Collection
21+
{
22+
protected $collection_key = 'customEmojis';
23+
protected $customEmojisType = CustomEmoji::class;
24+
protected $customEmojisDataType = 'array';
25+
/**
26+
* @var string
27+
*/
28+
public $nextPageToken;
29+
30+
/**
31+
* @param CustomEmoji[]
32+
*/
33+
public function setCustomEmojis($customEmojis)
34+
{
35+
$this->customEmojis = $customEmojis;
36+
}
37+
/**
38+
* @return CustomEmoji[]
39+
*/
40+
public function getCustomEmojis()
41+
{
42+
return $this->customEmojis;
43+
}
44+
/**
45+
* @param string
46+
*/
47+
public function setNextPageToken($nextPageToken)
48+
{
49+
$this->nextPageToken = $nextPageToken;
50+
}
51+
/**
52+
* @return string
53+
*/
54+
public function getNextPageToken()
55+
{
56+
return $this->nextPageToken;
57+
}
58+
}
59+
60+
// Adding a class alias for backwards compatibility with the previous class name.
61+
class_alias(ListCustomEmojisResponse::class, 'Google_Service_HangoutsChat_ListCustomEmojisResponse');

0 commit comments

Comments
 (0)