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\PostmasterTools\Resource; 19 20use Google\Service\PostmasterTools\Domain; 21use Google\Service\PostmasterTools\ListDomainsResponse; 22 23/** 24 * The "domains" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $gmailpostmastertoolsService = new Google\Service\PostmasterTools(...); 28 * $domains = $gmailpostmastertoolsService->domains; 29 * </code> 30 */ 31class Domains extends \Google\Service\Resource 32{ 33 /** 34 * Gets a specific domain registered by the client. Returns NOT_FOUND if the 35 * domain does not exist. (domains.get) 36 * 37 * @param string $name The resource name of the domain. It should have the form 38 * `domains/{domain_name}`, where domain_name is the fully qualified domain 39 * name. 40 * @param array $optParams Optional parameters. 41 * @return Domain 42 */ 43 public function get($name, $optParams = []) 44 { 45 $params = ['name' => $name]; 46 $params = array_merge($params, $optParams); 47 return $this->call('get', [$params], Domain::class); 48 } 49 /** 50 * Lists the domains that have been registered by the client. The order of 51 * domains in the response is unspecified and non-deterministic. Newly created 52 * domains will not necessarily be added to the end of this list. 53 * (domains.listDomains) 54 * 55 * @param array $optParams Optional parameters. 56 * 57 * @opt_param int pageSize Requested page size. Server may return fewer domains 58 * than requested. If unspecified, server will pick an appropriate default. 59 * @opt_param string pageToken The next_page_token value returned from a 60 * previous List request, if any. This is the value of 61 * ListDomainsResponse.next_page_token returned from the previous call to 62 * `ListDomains` method. 63 * @return ListDomainsResponse 64 */ 65 public function listDomains($optParams = []) 66 { 67 $params = []; 68 $params = array_merge($params, $optParams); 69 return $this->call('list', [$params], ListDomainsResponse::class); 70 } 71} 72 73// Adding a class alias for backwards compatibility with the previous class name. 74class_alias(Domains::class, 'Google_Service_PostmasterTools_Resource_Domains'); 75