DomainsRDAP.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for DomainsRDAP (v1).
  21. *
  22. * <p>
  23. * Read-only public API that lets users search for information about domain
  24. * names.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/domains/rdap/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class DomainsRDAP extends \Google\Service
  34. {
  35. public $autnum;
  36. public $domain;
  37. public $entity;
  38. public $ip;
  39. public $nameserver;
  40. public $v1;
  41. public $rootUrlTemplate;
  42. /**
  43. * Constructs the internal representation of the DomainsRDAP service.
  44. *
  45. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  46. * config array to pass to a new Client instance.
  47. * @param string $rootUrl The root URL used for requests to the service.
  48. */
  49. public function __construct($clientOrConfig = [], $rootUrl = null)
  50. {
  51. parent::__construct($clientOrConfig);
  52. $this->rootUrl = $rootUrl ?: 'https://domainsrdap.googleapis.com/';
  53. $this->rootUrlTemplate = $rootUrl ?: 'https://domainsrdap.UNIVERSE_DOMAIN/';
  54. $this->servicePath = '';
  55. $this->batchPath = 'batch';
  56. $this->version = 'v1';
  57. $this->serviceName = 'domainsrdap';
  58. $this->autnum = new DomainsRDAP\Resource\Autnum(
  59. $this,
  60. $this->serviceName,
  61. 'autnum',
  62. [
  63. 'methods' => [
  64. 'get' => [
  65. 'path' => 'v1/autnum/{autnumId}',
  66. 'httpMethod' => 'GET',
  67. 'parameters' => [
  68. 'autnumId' => [
  69. 'location' => 'path',
  70. 'type' => 'string',
  71. 'required' => true,
  72. ],
  73. ],
  74. ],
  75. ]
  76. ]
  77. );
  78. $this->domain = new DomainsRDAP\Resource\Domain(
  79. $this,
  80. $this->serviceName,
  81. 'domain',
  82. [
  83. 'methods' => [
  84. 'get' => [
  85. 'path' => 'v1/domain/{+domainName}',
  86. 'httpMethod' => 'GET',
  87. 'parameters' => [
  88. 'domainName' => [
  89. 'location' => 'path',
  90. 'type' => 'string',
  91. 'required' => true,
  92. ],
  93. ],
  94. ],
  95. ]
  96. ]
  97. );
  98. $this->entity = new DomainsRDAP\Resource\Entity(
  99. $this,
  100. $this->serviceName,
  101. 'entity',
  102. [
  103. 'methods' => [
  104. 'get' => [
  105. 'path' => 'v1/entity/{entityId}',
  106. 'httpMethod' => 'GET',
  107. 'parameters' => [
  108. 'entityId' => [
  109. 'location' => 'path',
  110. 'type' => 'string',
  111. 'required' => true,
  112. ],
  113. ],
  114. ],
  115. ]
  116. ]
  117. );
  118. $this->ip = new DomainsRDAP\Resource\Ip(
  119. $this,
  120. $this->serviceName,
  121. 'ip',
  122. [
  123. 'methods' => [
  124. 'get' => [
  125. 'path' => 'v1/ip/{ipId}/{ipId1}',
  126. 'httpMethod' => 'GET',
  127. 'parameters' => [
  128. 'ipId' => [
  129. 'location' => 'path',
  130. 'type' => 'string',
  131. 'required' => true,
  132. ],
  133. 'ipId1' => [
  134. 'location' => 'path',
  135. 'type' => 'string',
  136. 'required' => true,
  137. ],
  138. ],
  139. ],
  140. ]
  141. ]
  142. );
  143. $this->nameserver = new DomainsRDAP\Resource\Nameserver(
  144. $this,
  145. $this->serviceName,
  146. 'nameserver',
  147. [
  148. 'methods' => [
  149. 'get' => [
  150. 'path' => 'v1/nameserver/{nameserverId}',
  151. 'httpMethod' => 'GET',
  152. 'parameters' => [
  153. 'nameserverId' => [
  154. 'location' => 'path',
  155. 'type' => 'string',
  156. 'required' => true,
  157. ],
  158. ],
  159. ],
  160. ]
  161. ]
  162. );
  163. $this->v1 = new DomainsRDAP\Resource\V1(
  164. $this,
  165. $this->serviceName,
  166. 'v1',
  167. [
  168. 'methods' => [
  169. 'getDomains' => [
  170. 'path' => 'v1/domains',
  171. 'httpMethod' => 'GET',
  172. 'parameters' => [],
  173. ],'getEntities' => [
  174. 'path' => 'v1/entities',
  175. 'httpMethod' => 'GET',
  176. 'parameters' => [],
  177. ],'getHelp' => [
  178. 'path' => 'v1/help',
  179. 'httpMethod' => 'GET',
  180. 'parameters' => [],
  181. ],'getIp' => [
  182. 'path' => 'v1/ip',
  183. 'httpMethod' => 'GET',
  184. 'parameters' => [],
  185. ],'getNameservers' => [
  186. 'path' => 'v1/nameservers',
  187. 'httpMethod' => 'GET',
  188. 'parameters' => [],
  189. ],
  190. ]
  191. ]
  192. );
  193. }
  194. }
  195. // Adding a class alias for backwards compatibility with the previous class name.
  196. class_alias(DomainsRDAP::class, 'Google_Service_DomainsRDAP');