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\Groupssettings\Resource; 19 20use Google\Service\Groupssettings\Groups as GroupsModel; 21 22/** 23 * The "groups" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $groupssettingsService = new Google\Service\Groupssettings(...); 27 * $groups = $groupssettingsService->groups; 28 * </code> 29 */ 30class Groups extends \Google\Service\Resource 31{ 32 /** 33 * Gets one resource by id. (groups.get) 34 * 35 * @param string $groupUniqueId The group's email address. 36 * @param array $optParams Optional parameters. 37 * @return GroupsModel 38 */ 39 public function get($groupUniqueId, $optParams = []) 40 { 41 $params = ['groupUniqueId' => $groupUniqueId]; 42 $params = array_merge($params, $optParams); 43 return $this->call('get', [$params], GroupsModel::class); 44 } 45 /** 46 * Updates an existing resource. This method supports patch semantics. 47 * (groups.patch) 48 * 49 * @param string $groupUniqueId The group's email address. 50 * @param GroupsModel $postBody 51 * @param array $optParams Optional parameters. 52 * @return GroupsModel 53 */ 54 public function patch($groupUniqueId, GroupsModel $postBody, $optParams = []) 55 { 56 $params = ['groupUniqueId' => $groupUniqueId, 'postBody' => $postBody]; 57 $params = array_merge($params, $optParams); 58 return $this->call('patch', [$params], GroupsModel::class); 59 } 60 /** 61 * Updates an existing resource. (groups.update) 62 * 63 * @param string $groupUniqueId The group's email address. 64 * @param GroupsModel $postBody 65 * @param array $optParams Optional parameters. 66 * @return GroupsModel 67 */ 68 public function update($groupUniqueId, GroupsModel $postBody, $optParams = []) 69 { 70 $params = ['groupUniqueId' => $groupUniqueId, 'postBody' => $postBody]; 71 $params = array_merge($params, $optParams); 72 return $this->call('update', [$params], GroupsModel::class); 73 } 74} 75 76// Adding a class alias for backwards compatibility with the previous class name. 77class_alias(Groups::class, 'Google_Service_Groupssettings_Resource_Groups'); 78