source: vendor/google/apiclient-services/src/HangoutsChat/Resource/UsersSpaces.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 4.0 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\SpaceReadState;
21
22/**
23 * The "spaces" collection of methods.
24 * Typical usage is:
25 * <code>
26 * $chatService = new Google\Service\HangoutsChat(...);
27 * $spaces = $chatService->users_spaces;
28 * </code>
29 */
30class UsersSpaces extends \Google\Service\Resource
31{
32 /**
33 * Returns details about a user's read state within a space, used to identify
34 * read and unread messages. For an example, see [Get details about a user's
35 * space read state](https://developers.google.com/workspace/chat/get-space-
36 * read-state). Requires [user
37 * authentication](https://developers.google.com/workspace/chat/authenticate-
38 * authorize-chat-user). (spaces.getSpaceReadState)
39 *
40 * @param string $name Required. Resource name of the space read state to
41 * retrieve. Only supports getting read state for the calling user. To refer to
42 * the calling user, set one of the following: - The `me` alias. For example,
43 * `users/me/spaces/{space}/spaceReadState`. - Their Workspace email address.
44 * For example, `users/user@example.com/spaces/{space}/spaceReadState`. - Their
45 * user id. For example, `users/123456789/spaces/{space}/spaceReadState`.
46 * Format: users/{user}/spaces/{space}/spaceReadState
47 * @param array $optParams Optional parameters.
48 * @return SpaceReadState
49 * @throws \Google\Service\Exception
50 */
51 public function getSpaceReadState($name, $optParams = [])
52 {
53 $params = ['name' => $name];
54 $params = array_merge($params, $optParams);
55 return $this->call('getSpaceReadState', [$params], SpaceReadState::class);
56 }
57 /**
58 * Updates a user's read state within a space, used to identify read and unread
59 * messages. For an example, see [Update a user's space read
60 * state](https://developers.google.com/workspace/chat/update-space-read-state).
61 * Requires [user
62 * authentication](https://developers.google.com/workspace/chat/authenticate-
63 * authorize-chat-user). (spaces.updateSpaceReadState)
64 *
65 * @param string $name Resource name of the space read state. Format:
66 * `users/{user}/spaces/{space}/spaceReadState`
67 * @param SpaceReadState $postBody
68 * @param array $optParams Optional parameters.
69 *
70 * @opt_param string updateMask Required. The field paths to update. Currently
71 * supported field paths: - `last_read_time` When the `last_read_time` is before
72 * the latest message create time, the space appears as unread in the UI. To
73 * mark the space as read, set `last_read_time` to any value later (larger) than
74 * the latest message create time. The `last_read_time` is coerced to match the
75 * latest message create time. Note that the space read state only affects the
76 * read state of messages that are visible in the space's top-level
77 * conversation. Replies in threads are unaffected by this timestamp, and
78 * instead rely on the thread read state.
79 * @return SpaceReadState
80 * @throws \Google\Service\Exception
81 */
82 public function updateSpaceReadState($name, SpaceReadState $postBody, $optParams = [])
83 {
84 $params = ['name' => $name, 'postBody' => $postBody];
85 $params = array_merge($params, $optParams);
86 return $this->call('updateSpaceReadState', [$params], SpaceReadState::class);
87 }
88}
89
90// Adding a class alias for backwards compatibility with the previous class name.
91class_alias(UsersSpaces::class, 'Google_Service_HangoutsChat_Resource_UsersSpaces');
Note: See TracBrowser for help on using the repository browser.