PageRenderTime 60ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/google/apiclient-services/src/BinaryAuthorization.php

https://gitlab.com/Japang-Jawara/jawara-penilaian
PHP | 278 lines | 232 code | 7 blank | 39 comment | 0 complexity | 435013cc9240d4af1630e93bae2740a8 MD5 | raw file
  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 BinaryAuthorization (v1).
  21. *
  22. * <p>
  23. * The management interface for Binary Authorization, a service that provides
  24. * policy-based deployment validation and control for images deployed to Google
  25. * Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run.</p>
  26. *
  27. * <p>
  28. * For more information about this service, see the API
  29. * <a href="https://cloud.google.com/binary-authorization/" target="_blank">Documentation</a>
  30. * </p>
  31. *
  32. * @author Google, Inc.
  33. */
  34. class BinaryAuthorization extends \Google\Service
  35. {
  36. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  37. const CLOUD_PLATFORM =
  38. "https://www.googleapis.com/auth/cloud-platform";
  39. public $projects;
  40. public $projects_attestors;
  41. public $projects_policy;
  42. public $systempolicy;
  43. /**
  44. * Constructs the internal representation of the BinaryAuthorization service.
  45. *
  46. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  47. * config array to pass to a new Client instance.
  48. * @param string $rootUrl The root URL used for requests to the service.
  49. */
  50. public function __construct($clientOrConfig = [], $rootUrl = null)
  51. {
  52. parent::__construct($clientOrConfig);
  53. $this->rootUrl = $rootUrl ?: 'https://binaryauthorization.googleapis.com/';
  54. $this->servicePath = '';
  55. $this->batchPath = 'batch';
  56. $this->version = 'v1';
  57. $this->serviceName = 'binaryauthorization';
  58. $this->projects = new BinaryAuthorization\Resource\Projects(
  59. $this,
  60. $this->serviceName,
  61. 'projects',
  62. [
  63. 'methods' => [
  64. 'getPolicy' => [
  65. 'path' => 'v1/{+name}',
  66. 'httpMethod' => 'GET',
  67. 'parameters' => [
  68. 'name' => [
  69. 'location' => 'path',
  70. 'type' => 'string',
  71. 'required' => true,
  72. ],
  73. ],
  74. ],'updatePolicy' => [
  75. 'path' => 'v1/{+name}',
  76. 'httpMethod' => 'PUT',
  77. 'parameters' => [
  78. 'name' => [
  79. 'location' => 'path',
  80. 'type' => 'string',
  81. 'required' => true,
  82. ],
  83. ],
  84. ],
  85. ]
  86. ]
  87. );
  88. $this->projects_attestors = new BinaryAuthorization\Resource\ProjectsAttestors(
  89. $this,
  90. $this->serviceName,
  91. 'attestors',
  92. [
  93. 'methods' => [
  94. 'create' => [
  95. 'path' => 'v1/{+parent}/attestors',
  96. 'httpMethod' => 'POST',
  97. 'parameters' => [
  98. 'parent' => [
  99. 'location' => 'path',
  100. 'type' => 'string',
  101. 'required' => true,
  102. ],
  103. 'attestorId' => [
  104. 'location' => 'query',
  105. 'type' => 'string',
  106. ],
  107. ],
  108. ],'delete' => [
  109. 'path' => 'v1/{+name}',
  110. 'httpMethod' => 'DELETE',
  111. 'parameters' => [
  112. 'name' => [
  113. 'location' => 'path',
  114. 'type' => 'string',
  115. 'required' => true,
  116. ],
  117. ],
  118. ],'get' => [
  119. 'path' => 'v1/{+name}',
  120. 'httpMethod' => 'GET',
  121. 'parameters' => [
  122. 'name' => [
  123. 'location' => 'path',
  124. 'type' => 'string',
  125. 'required' => true,
  126. ],
  127. ],
  128. ],'getIamPolicy' => [
  129. 'path' => 'v1/{+resource}:getIamPolicy',
  130. 'httpMethod' => 'GET',
  131. 'parameters' => [
  132. 'resource' => [
  133. 'location' => 'path',
  134. 'type' => 'string',
  135. 'required' => true,
  136. ],
  137. 'options.requestedPolicyVersion' => [
  138. 'location' => 'query',
  139. 'type' => 'integer',
  140. ],
  141. ],
  142. ],'list' => [
  143. 'path' => 'v1/{+parent}/attestors',
  144. 'httpMethod' => 'GET',
  145. 'parameters' => [
  146. 'parent' => [
  147. 'location' => 'path',
  148. 'type' => 'string',
  149. 'required' => true,
  150. ],
  151. 'pageSize' => [
  152. 'location' => 'query',
  153. 'type' => 'integer',
  154. ],
  155. 'pageToken' => [
  156. 'location' => 'query',
  157. 'type' => 'string',
  158. ],
  159. ],
  160. ],'setIamPolicy' => [
  161. 'path' => 'v1/{+resource}:setIamPolicy',
  162. 'httpMethod' => 'POST',
  163. 'parameters' => [
  164. 'resource' => [
  165. 'location' => 'path',
  166. 'type' => 'string',
  167. 'required' => true,
  168. ],
  169. ],
  170. ],'testIamPermissions' => [
  171. 'path' => 'v1/{+resource}:testIamPermissions',
  172. 'httpMethod' => 'POST',
  173. 'parameters' => [
  174. 'resource' => [
  175. 'location' => 'path',
  176. 'type' => 'string',
  177. 'required' => true,
  178. ],
  179. ],
  180. ],'update' => [
  181. 'path' => 'v1/{+name}',
  182. 'httpMethod' => 'PUT',
  183. 'parameters' => [
  184. 'name' => [
  185. 'location' => 'path',
  186. 'type' => 'string',
  187. 'required' => true,
  188. ],
  189. ],
  190. ],'validateAttestationOccurrence' => [
  191. 'path' => 'v1/{+attestor}:validateAttestationOccurrence',
  192. 'httpMethod' => 'POST',
  193. 'parameters' => [
  194. 'attestor' => [
  195. 'location' => 'path',
  196. 'type' => 'string',
  197. 'required' => true,
  198. ],
  199. ],
  200. ],
  201. ]
  202. ]
  203. );
  204. $this->projects_policy = new BinaryAuthorization\Resource\ProjectsPolicy(
  205. $this,
  206. $this->serviceName,
  207. 'policy',
  208. [
  209. 'methods' => [
  210. 'getIamPolicy' => [
  211. 'path' => 'v1/{+resource}:getIamPolicy',
  212. 'httpMethod' => 'GET',
  213. 'parameters' => [
  214. 'resource' => [
  215. 'location' => 'path',
  216. 'type' => 'string',
  217. 'required' => true,
  218. ],
  219. 'options.requestedPolicyVersion' => [
  220. 'location' => 'query',
  221. 'type' => 'integer',
  222. ],
  223. ],
  224. ],'setIamPolicy' => [
  225. 'path' => 'v1/{+resource}:setIamPolicy',
  226. 'httpMethod' => 'POST',
  227. 'parameters' => [
  228. 'resource' => [
  229. 'location' => 'path',
  230. 'type' => 'string',
  231. 'required' => true,
  232. ],
  233. ],
  234. ],'testIamPermissions' => [
  235. 'path' => 'v1/{+resource}:testIamPermissions',
  236. 'httpMethod' => 'POST',
  237. 'parameters' => [
  238. 'resource' => [
  239. 'location' => 'path',
  240. 'type' => 'string',
  241. 'required' => true,
  242. ],
  243. ],
  244. ],
  245. ]
  246. ]
  247. );
  248. $this->systempolicy = new BinaryAuthorization\Resource\Systempolicy(
  249. $this,
  250. $this->serviceName,
  251. 'systempolicy',
  252. [
  253. 'methods' => [
  254. 'getPolicy' => [
  255. 'path' => 'v1/{+name}',
  256. 'httpMethod' => 'GET',
  257. 'parameters' => [
  258. 'name' => [
  259. 'location' => 'path',
  260. 'type' => 'string',
  261. 'required' => true,
  262. ],
  263. ],
  264. ],
  265. ]
  266. ]
  267. );
  268. }
  269. }
  270. // Adding a class alias for backwards compatibility with the previous class name.
  271. class_alias(BinaryAuthorization::class, 'Google_Service_BinaryAuthorization');