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\SASPortalTesting\Resource; 19 20use Google\Service\SASPortalTesting\SasPortalCustomer; 21use Google\Service\SASPortalTesting\SasPortalListCustomersResponse; 22 23/** 24 * The "customers" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $prod_tt_sasportalService = new Google\Service\SASPortalTesting(...); 28 * $customers = $prod_tt_sasportalService->customers; 29 * </code> 30 */ 31class Customers extends \Google\Service\Resource 32{ 33 /** 34 * Returns a requested customer. (customers.get) 35 * 36 * @param string $name Required. The name of the customer. 37 * @param array $optParams Optional parameters. 38 * @return SasPortalCustomer 39 */ 40 public function get($name, $optParams = []) 41 { 42 $params = ['name' => $name]; 43 $params = array_merge($params, $optParams); 44 return $this->call('get', [$params], SasPortalCustomer::class); 45 } 46 /** 47 * Returns a list of requested customers. (customers.listCustomers) 48 * 49 * @param array $optParams Optional parameters. 50 * 51 * @opt_param int pageSize The maximum number of customers to return in the 52 * response. 53 * @opt_param string pageToken A pagination token returned from a previous call 54 * to ListCustomers that indicates where this listing should continue from. 55 * @return SasPortalListCustomersResponse 56 */ 57 public function listCustomers($optParams = []) 58 { 59 $params = []; 60 $params = array_merge($params, $optParams); 61 return $this->call('list', [$params], SasPortalListCustomersResponse::class); 62 } 63 /** 64 * Updates an existing customer. (customers.patch) 65 * 66 * @param string $name Output only. Resource name of the customer. 67 * @param SasPortalCustomer $postBody 68 * @param array $optParams Optional parameters. 69 * 70 * @opt_param string updateMask Fields to be updated. 71 * @return SasPortalCustomer 72 */ 73 public function patch($name, SasPortalCustomer $postBody, $optParams = []) 74 { 75 $params = ['name' => $name, 'postBody' => $postBody]; 76 $params = array_merge($params, $optParams); 77 return $this->call('patch', [$params], SasPortalCustomer::class); 78 } 79} 80 81// Adding a class alias for backwards compatibility with the previous class name. 82class_alias(Customers::class, 'Google_Service_SASPortalTesting_Resource_Customers'); 83