source: vendor/google/apiclient-services/src/Gmail/Resource/UsersSettingsForwardingAddresses.php

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

Upload project files

  • Property mode set to 100644
File size: 4.3 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\Gmail\Resource;
19
20use Google\Service\Gmail\ForwardingAddress;
21use Google\Service\Gmail\ListForwardingAddressesResponse;
22
23/**
24 * The "forwardingAddresses" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $gmailService = new Google\Service\Gmail(...);
28 * $forwardingAddresses = $gmailService->users_settings_forwardingAddresses;
29 * </code>
30 */
31class UsersSettingsForwardingAddresses extends \Google\Service\Resource
32{
33 /**
34 * Creates a forwarding address. If ownership verification is required, a
35 * message will be sent to the recipient and the resource's verification status
36 * will be set to `pending`; otherwise, the resource will be created with
37 * verification status set to `accepted`. This method is only available to
38 * service account clients that have been delegated domain-wide authority.
39 * (forwardingAddresses.create)
40 *
41 * @param string $userId User's email address. The special value "me" can be
42 * used to indicate the authenticated user.
43 * @param ForwardingAddress $postBody
44 * @param array $optParams Optional parameters.
45 * @return ForwardingAddress
46 * @throws \Google\Service\Exception
47 */
48 public function create($userId, ForwardingAddress $postBody, $optParams = [])
49 {
50 $params = ['userId' => $userId, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], ForwardingAddress::class);
53 }
54 /**
55 * Deletes the specified forwarding address and revokes any verification that
56 * may have been required. This method is only available to service account
57 * clients that have been delegated domain-wide authority.
58 * (forwardingAddresses.delete)
59 *
60 * @param string $userId User's email address. The special value "me" can be
61 * used to indicate the authenticated user.
62 * @param string $forwardingEmail The forwarding address to be deleted.
63 * @param array $optParams Optional parameters.
64 * @throws \Google\Service\Exception
65 */
66 public function delete($userId, $forwardingEmail, $optParams = [])
67 {
68 $params = ['userId' => $userId, 'forwardingEmail' => $forwardingEmail];
69 $params = array_merge($params, $optParams);
70 return $this->call('delete', [$params]);
71 }
72 /**
73 * Gets the specified forwarding address. (forwardingAddresses.get)
74 *
75 * @param string $userId User's email address. The special value "me" can be
76 * used to indicate the authenticated user.
77 * @param string $forwardingEmail The forwarding address to be retrieved.
78 * @param array $optParams Optional parameters.
79 * @return ForwardingAddress
80 * @throws \Google\Service\Exception
81 */
82 public function get($userId, $forwardingEmail, $optParams = [])
83 {
84 $params = ['userId' => $userId, 'forwardingEmail' => $forwardingEmail];
85 $params = array_merge($params, $optParams);
86 return $this->call('get', [$params], ForwardingAddress::class);
87 }
88 /**
89 * Lists the forwarding addresses for the specified account.
90 * (forwardingAddresses.listUsersSettingsForwardingAddresses)
91 *
92 * @param string $userId User's email address. The special value "me" can be
93 * used to indicate the authenticated user.
94 * @param array $optParams Optional parameters.
95 * @return ListForwardingAddressesResponse
96 * @throws \Google\Service\Exception
97 */
98 public function listUsersSettingsForwardingAddresses($userId, $optParams = [])
99 {
100 $params = ['userId' => $userId];
101 $params = array_merge($params, $optParams);
102 return $this->call('list', [$params], ListForwardingAddressesResponse::class);
103 }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(UsersSettingsForwardingAddresses::class, 'Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses');
Note: See TracBrowser for help on using the repository browser.