Digitalassetlinks.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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 Digitalassetlinks (v1).
  21. *
  22. * <p>
  23. * Discovers relationships between online assets such as websites or mobile
  24. * apps.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/digital-asset-links/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class Digitalassetlinks extends \Google\Service
  34. {
  35. public $assetlinks;
  36. public $statements;
  37. public $rootUrlTemplate;
  38. /**
  39. * Constructs the internal representation of the Digitalassetlinks service.
  40. *
  41. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  42. * config array to pass to a new Client instance.
  43. * @param string $rootUrl The root URL used for requests to the service.
  44. */
  45. public function __construct($clientOrConfig = [], $rootUrl = null)
  46. {
  47. parent::__construct($clientOrConfig);
  48. $this->rootUrl = $rootUrl ?: 'https://digitalassetlinks.googleapis.com/';
  49. $this->rootUrlTemplate = $rootUrl ?: 'https://digitalassetlinks.UNIVERSE_DOMAIN/';
  50. $this->servicePath = '';
  51. $this->batchPath = 'batch';
  52. $this->version = 'v1';
  53. $this->serviceName = 'digitalassetlinks';
  54. $this->assetlinks = new Digitalassetlinks\Resource\Assetlinks(
  55. $this,
  56. $this->serviceName,
  57. 'assetlinks',
  58. [
  59. 'methods' => [
  60. 'bulkCheck' => [
  61. 'path' => 'v1/assetlinks:bulkCheck',
  62. 'httpMethod' => 'POST',
  63. 'parameters' => [],
  64. ],'check' => [
  65. 'path' => 'v1/assetlinks:check',
  66. 'httpMethod' => 'GET',
  67. 'parameters' => [
  68. 'relation' => [
  69. 'location' => 'query',
  70. 'type' => 'string',
  71. ],
  72. 'returnRelationExtensions' => [
  73. 'location' => 'query',
  74. 'type' => 'boolean',
  75. ],
  76. 'source.androidApp.certificate.sha256Fingerprint' => [
  77. 'location' => 'query',
  78. 'type' => 'string',
  79. ],
  80. 'source.androidApp.packageName' => [
  81. 'location' => 'query',
  82. 'type' => 'string',
  83. ],
  84. 'source.web.site' => [
  85. 'location' => 'query',
  86. 'type' => 'string',
  87. ],
  88. 'target.androidApp.certificate.sha256Fingerprint' => [
  89. 'location' => 'query',
  90. 'type' => 'string',
  91. ],
  92. 'target.androidApp.packageName' => [
  93. 'location' => 'query',
  94. 'type' => 'string',
  95. ],
  96. 'target.web.site' => [
  97. 'location' => 'query',
  98. 'type' => 'string',
  99. ],
  100. ],
  101. ],
  102. ]
  103. ]
  104. );
  105. $this->statements = new Digitalassetlinks\Resource\Statements(
  106. $this,
  107. $this->serviceName,
  108. 'statements',
  109. [
  110. 'methods' => [
  111. 'list' => [
  112. 'path' => 'v1/statements:list',
  113. 'httpMethod' => 'GET',
  114. 'parameters' => [
  115. 'relation' => [
  116. 'location' => 'query',
  117. 'type' => 'string',
  118. ],
  119. 'returnRelationExtensions' => [
  120. 'location' => 'query',
  121. 'type' => 'boolean',
  122. ],
  123. 'source.androidApp.certificate.sha256Fingerprint' => [
  124. 'location' => 'query',
  125. 'type' => 'string',
  126. ],
  127. 'source.androidApp.packageName' => [
  128. 'location' => 'query',
  129. 'type' => 'string',
  130. ],
  131. 'source.web.site' => [
  132. 'location' => 'query',
  133. 'type' => 'string',
  134. ],
  135. ],
  136. ],
  137. ]
  138. ]
  139. );
  140. }
  141. }
  142. // Adding a class alias for backwards compatibility with the previous class name.
  143. class_alias(Digitalassetlinks::class, 'Google_Service_Digitalassetlinks');