source: vendor/google/apiclient-services/src/HangoutsChat/Resource/DmsConversations.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 2.9 KB
Line 
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\HangoutsChat\Resource;
19
20use Google\Service\HangoutsChat\Message;
21
22/**
23 * The "conversations" collection of methods.
24 * Typical usage is:
25 * <code>
26 * $chatService = new Google\Service\HangoutsChat(...);
27 * $conversations = $chatService->dms_conversations;
28 * </code>
29 */
30class DmsConversations extends \Google\Service\Resource
31{
32 /**
33 * Legacy path for creating message. Calling these will result in a BadRequest
34 * response. (conversations.messages)
35 *
36 * @param string $parent Required. The resource name of the space in which to
37 * create a message. Format: spaces/{space}
38 * @param Message $postBody
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string messageId Optional. A custom name for a Chat message
42 * assigned at creation. Must start with `client-` and contain only lowercase
43 * letters, numbers, and hyphens up to 63 characters in length. Specify this
44 * field to get, update, or delete the message with the specified value. For
45 * example usage, see [Name a created message](https://developers.google.com/cha
46 * t/api/guides/crudl/messages#name_a_created_message).
47 * @opt_param string messageReplyOption Optional. Specifies whether a message
48 * starts a thread or replies to one. Only supported in named spaces.
49 * @opt_param string requestId Optional. A unique request ID for this message.
50 * Specifying an existing request ID returns the message created with that ID
51 * instead of creating a new message.
52 * @opt_param string threadKey Optional. Deprecated: Use thread.thread_key
53 * instead. Opaque thread identifier. To start or add to a thread, create a
54 * message and specify a `threadKey` or the thread.name. For example usage, see
55 * [Start or reply to a message
56 * thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
57 * @return Message
58 */
59 public function messages($parent, Message $postBody, $optParams = [])
60 {
61 $params = ['parent' => $parent, 'postBody' => $postBody];
62 $params = array_merge($params, $optParams);
63 return $this->call('messages', [$params], Message::class);
64 }
65}
66
67// Adding a class alias for backwards compatibility with the previous class name.
68class_alias(DmsConversations::class, 'Google_Service_HangoutsChat_Resource_DmsConversations');
Note: See TracBrowser for help on using the repository browser.