ACMEDNS.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 ACMEDNS (v1).
  21. *
  22. * <p>
  23. * Google Domains ACME DNS API that allows users to complete ACME DNS-01
  24. * challenges for a domain.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/domains/acme-dns/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class ACMEDNS extends \Google\Service
  34. {
  35. public $acmeChallengeSets;
  36. public $rootUrlTemplate;
  37. /**
  38. * Constructs the internal representation of the ACMEDNS service.
  39. *
  40. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  41. * config array to pass to a new Client instance.
  42. * @param string $rootUrl The root URL used for requests to the service.
  43. */
  44. public function __construct($clientOrConfig = [], $rootUrl = null)
  45. {
  46. parent::__construct($clientOrConfig);
  47. $this->rootUrl = $rootUrl ?: 'https://acmedns.googleapis.com/';
  48. $this->rootUrlTemplate = $rootUrl ?: 'https://acmedns.UNIVERSE_DOMAIN/';
  49. $this->servicePath = '';
  50. $this->batchPath = 'batch';
  51. $this->version = 'v1';
  52. $this->serviceName = 'acmedns';
  53. $this->acmeChallengeSets = new ACMEDNS\Resource\AcmeChallengeSets(
  54. $this,
  55. $this->serviceName,
  56. 'acmeChallengeSets',
  57. [
  58. 'methods' => [
  59. 'get' => [
  60. 'path' => 'v1/acmeChallengeSets/{rootDomain}',
  61. 'httpMethod' => 'GET',
  62. 'parameters' => [
  63. 'rootDomain' => [
  64. 'location' => 'path',
  65. 'type' => 'string',
  66. 'required' => true,
  67. ],
  68. ],
  69. ],'rotateChallenges' => [
  70. 'path' => 'v1/acmeChallengeSets/{rootDomain}:rotateChallenges',
  71. 'httpMethod' => 'POST',
  72. 'parameters' => [
  73. 'rootDomain' => [
  74. 'location' => 'path',
  75. 'type' => 'string',
  76. 'required' => true,
  77. ],
  78. ],
  79. ],
  80. ]
  81. ]
  82. );
  83. }
  84. }
  85. // Adding a class alias for backwards compatibility with the previous class name.
  86. class_alias(ACMEDNS::class, 'Google_Service_ACMEDNS');