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\Drive\Resource;
19
20use Google\Service\Drive\Reply;
21use Google\Service\Drive\ReplyList;
22
23/**
24 * The "replies" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $driveService = new Google\Service\Drive(...);
28 *   $replies = $driveService->replies;
29 *  </code>
30 */
31class Replies extends \Google\Service\Resource
32{
33  /**
34   * Creates a new reply to a comment. (replies.create)
35   *
36   * @param string $fileId The ID of the file.
37   * @param string $commentId The ID of the comment.
38   * @param Reply $postBody
39   * @param array $optParams Optional parameters.
40   * @return Reply
41   */
42  public function create($fileId, $commentId, Reply $postBody, $optParams = [])
43  {
44    $params = ['fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody];
45    $params = array_merge($params, $optParams);
46    return $this->call('create', [$params], Reply::class);
47  }
48  /**
49   * Deletes a reply. (replies.delete)
50   *
51   * @param string $fileId The ID of the file.
52   * @param string $commentId The ID of the comment.
53   * @param string $replyId The ID of the reply.
54   * @param array $optParams Optional parameters.
55   */
56  public function delete($fileId, $commentId, $replyId, $optParams = [])
57  {
58    $params = ['fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId];
59    $params = array_merge($params, $optParams);
60    return $this->call('delete', [$params]);
61  }
62  /**
63   * Gets a reply by ID. (replies.get)
64   *
65   * @param string $fileId The ID of the file.
66   * @param string $commentId The ID of the comment.
67   * @param string $replyId The ID of the reply.
68   * @param array $optParams Optional parameters.
69   *
70   * @opt_param bool includeDeleted Whether to return deleted replies. Deleted
71   * replies will not include their original content.
72   * @return Reply
73   */
74  public function get($fileId, $commentId, $replyId, $optParams = [])
75  {
76    $params = ['fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId];
77    $params = array_merge($params, $optParams);
78    return $this->call('get', [$params], Reply::class);
79  }
80  /**
81   * Lists a comment's replies. (replies.listReplies)
82   *
83   * @param string $fileId The ID of the file.
84   * @param string $commentId The ID of the comment.
85   * @param array $optParams Optional parameters.
86   *
87   * @opt_param bool includeDeleted Whether to include deleted replies. Deleted
88   * replies will not include their original content.
89   * @opt_param int pageSize The maximum number of replies to return per page.
90   * @opt_param string pageToken The token for continuing a previous list request
91   * on the next page. This should be set to the value of 'nextPageToken' from the
92   * previous response.
93   * @return ReplyList
94   */
95  public function listReplies($fileId, $commentId, $optParams = [])
96  {
97    $params = ['fileId' => $fileId, 'commentId' => $commentId];
98    $params = array_merge($params, $optParams);
99    return $this->call('list', [$params], ReplyList::class);
100  }
101  /**
102   * Updates a reply with patch semantics. (replies.update)
103   *
104   * @param string $fileId The ID of the file.
105   * @param string $commentId The ID of the comment.
106   * @param string $replyId The ID of the reply.
107   * @param Reply $postBody
108   * @param array $optParams Optional parameters.
109   * @return Reply
110   */
111  public function update($fileId, $commentId, $replyId, Reply $postBody, $optParams = [])
112  {
113    $params = ['fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody];
114    $params = array_merge($params, $optParams);
115    return $this->call('update', [$params], Reply::class);
116  }
117}
118
119// Adding a class alias for backwards compatibility with the previous class name.
120class_alias(Replies::class, 'Google_Service_Drive_Resource_Replies');
121