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\YouTube\Resource;
19
20use Google\Service\YouTube\LiveChatModerator;
21use Google\Service\YouTube\LiveChatModeratorListResponse;
22
23/**
24 * The "liveChatModerators" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $youtubeService = new Google\Service\YouTube(...);
28 *   $liveChatModerators = $youtubeService->liveChatModerators;
29 *  </code>
30 */
31class LiveChatModerators extends \Google\Service\Resource
32{
33  /**
34   * Deletes a chat moderator. (liveChatModerators.delete)
35   *
36   * @param string $id
37   * @param array $optParams Optional parameters.
38   */
39  public function delete($id, $optParams = [])
40  {
41    $params = ['id' => $id];
42    $params = array_merge($params, $optParams);
43    return $this->call('delete', [$params]);
44  }
45  /**
46   * Inserts a new resource into this collection. (liveChatModerators.insert)
47   *
48   * @param string|array $part The *part* parameter serves two purposes in this
49   * operation. It identifies the properties that the write operation will set as
50   * well as the properties that the API response returns. Set the parameter value
51   * to snippet.
52   * @param LiveChatModerator $postBody
53   * @param array $optParams Optional parameters.
54   * @return LiveChatModerator
55   */
56  public function insert($part, LiveChatModerator $postBody, $optParams = [])
57  {
58    $params = ['part' => $part, 'postBody' => $postBody];
59    $params = array_merge($params, $optParams);
60    return $this->call('insert', [$params], LiveChatModerator::class);
61  }
62  /**
63   * Retrieves a list of resources, possibly filtered.
64   * (liveChatModerators.listLiveChatModerators)
65   *
66   * @param string $liveChatId The id of the live chat for which moderators should
67   * be returned.
68   * @param string|array $part The *part* parameter specifies the
69   * liveChatModerator resource parts that the API response will include.
70   * Supported values are id and snippet.
71   * @param array $optParams Optional parameters.
72   *
73   * @opt_param string maxResults The *maxResults* parameter specifies the maximum
74   * number of items that should be returned in the result set.
75   * @opt_param string pageToken The *pageToken* parameter identifies a specific
76   * page in the result set that should be returned. In an API response, the
77   * nextPageToken and prevPageToken properties identify other pages that could be
78   * retrieved.
79   * @return LiveChatModeratorListResponse
80   */
81  public function listLiveChatModerators($liveChatId, $part, $optParams = [])
82  {
83    $params = ['liveChatId' => $liveChatId, 'part' => $part];
84    $params = array_merge($params, $optParams);
85    return $this->call('list', [$params], LiveChatModeratorListResponse::class);
86  }
87}
88
89// Adding a class alias for backwards compatibility with the previous class name.
90class_alias(LiveChatModerators::class, 'Google_Service_YouTube_Resource_LiveChatModerators');
91