PageRenderTime 25ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/google/apiclient-services/src/CertificateAuthorityService/Resource/ProjectsLocationsCaPoolsCertificates.php

https://gitlab.com/Japang-Jawara/jawara-penilaian
PHP | 171 lines | 39 code | 4 blank | 128 comment | 0 complexity | 50e0d13325df07b9d4cab3583885b438 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\CertificateAuthorityService\Resource;
  18. use Google\Service\CertificateAuthorityService\Certificate;
  19. use Google\Service\CertificateAuthorityService\ListCertificatesResponse;
  20. use Google\Service\CertificateAuthorityService\RevokeCertificateRequest;
  21. /**
  22. * The "certificates" collection of methods.
  23. * Typical usage is:
  24. * <code>
  25. * $privatecaService = new Google\Service\CertificateAuthorityService(...);
  26. * $certificates = $privatecaService->certificates;
  27. * </code>
  28. */
  29. class ProjectsLocationsCaPoolsCertificates extends \Google\Service\Resource
  30. {
  31. /**
  32. * Create a new Certificate in a given Project, Location from a particular
  33. * CaPool. (certificates.create)
  34. *
  35. * @param string $parent Required. The resource name of the CaPool associated
  36. * with the Certificate, in the format `projects/locations/caPools`.
  37. * @param Certificate $postBody
  38. * @param array $optParams Optional parameters.
  39. *
  40. * @opt_param string certificateId Optional. It must be unique within a location
  41. * and match the regular expression `[a-zA-Z0-9_-]{1,63}`. This field is
  42. * required when using a CertificateAuthority in the Enterprise
  43. * CertificateAuthority.Tier, but is optional and its value is ignored
  44. * otherwise.
  45. * @opt_param string issuingCertificateAuthorityId Optional. The resource ID of
  46. * the CertificateAuthority that should issue the certificate. This optional
  47. * field will ignore the load-balancing scheme of the Pool and directly issue
  48. * the certificate from the CA with the specified ID, contained in the same
  49. * CaPool referenced by `parent`. Per-CA quota rules apply. If left empty, a
  50. * CertificateAuthority will be chosen from the CaPool by the service. For
  51. * example, to issue a Certificate from a Certificate Authority with resource
  52. * name "projects/my-project/locations/us-central1/caPools/my-
  53. * pool/certificateAuthorities/my-ca", you can set the parent to "projects/my-
  54. * project/locations/us-central1/caPools/my-pool" and the
  55. * issuing_certificate_authority_id to "my-ca".
  56. * @opt_param string requestId Optional. An ID to identify requests. Specify a
  57. * unique request ID so that if you must retry your request, the server will
  58. * know to ignore the request if it has already been completed. The server will
  59. * guarantee that for at least 60 minutes since the first request. For example,
  60. * consider a situation where you make an initial request and the request times
  61. * out. If you make the request again with the same request ID, the server can
  62. * check if original operation with the same request ID was received, and if so,
  63. * will ignore the second request. This prevents clients from accidentally
  64. * creating duplicate commitments. The request ID must be a valid UUID with the
  65. * exception that zero UUID is not supported
  66. * (00000000-0000-0000-0000-000000000000).
  67. * @opt_param bool validateOnly Optional. If this is true, no Certificate
  68. * resource will be persisted regardless of the CaPool's tier, and the returned
  69. * Certificate will not contain the pem_certificate field.
  70. * @return Certificate
  71. */
  72. public function create($parent, Certificate $postBody, $optParams = [])
  73. {
  74. $params = ['parent' => $parent, 'postBody' => $postBody];
  75. $params = array_merge($params, $optParams);
  76. return $this->call('create', [$params], Certificate::class);
  77. }
  78. /**
  79. * Returns a Certificate. (certificates.get)
  80. *
  81. * @param string $name Required. The name of the Certificate to get.
  82. * @param array $optParams Optional parameters.
  83. * @return Certificate
  84. */
  85. public function get($name, $optParams = [])
  86. {
  87. $params = ['name' => $name];
  88. $params = array_merge($params, $optParams);
  89. return $this->call('get', [$params], Certificate::class);
  90. }
  91. /**
  92. * Lists Certificates. (certificates.listProjectsLocationsCaPoolsCertificates)
  93. *
  94. * @param string $parent Required. The resource name of the location associated
  95. * with the Certificates, in the format `projects/locations/caPools`.
  96. * @param array $optParams Optional parameters.
  97. *
  98. * @opt_param string filter Optional. Only include resources that match the
  99. * filter in the response. For details on supported filters and syntax, see
  100. * [Certificates Filtering documentation](https://cloud.google.com/certificate-
  101. * authority-service/docs/sorting-filtering-certificates#filtering_support).
  102. * @opt_param string orderBy Optional. Specify how the results should be sorted.
  103. * For details on supported fields and syntax, see [Certificates Sorting
  104. * documentation](https://cloud.google.com/certificate-authority-service/docs
  105. * /sorting-filtering-certificates#sorting_support).
  106. * @opt_param int pageSize Optional. Limit on the number of Certificates to
  107. * include in the response. Further Certificates can subsequently be obtained by
  108. * including the ListCertificatesResponse.next_page_token in a subsequent
  109. * request. If unspecified, the server will pick an appropriate default.
  110. * @opt_param string pageToken Optional. Pagination token, returned earlier via
  111. * ListCertificatesResponse.next_page_token.
  112. * @return ListCertificatesResponse
  113. */
  114. public function listProjectsLocationsCaPoolsCertificates($parent, $optParams = [])
  115. {
  116. $params = ['parent' => $parent];
  117. $params = array_merge($params, $optParams);
  118. return $this->call('list', [$params], ListCertificatesResponse::class);
  119. }
  120. /**
  121. * Update a Certificate. Currently, the only field you can update is the labels
  122. * field. (certificates.patch)
  123. *
  124. * @param string $name Output only. The resource name for this Certificate in
  125. * the format `projects/locations/caPools/certificates`.
  126. * @param Certificate $postBody
  127. * @param array $optParams Optional parameters.
  128. *
  129. * @opt_param string requestId Optional. An ID to identify requests. Specify a
  130. * unique request ID so that if you must retry your request, the server will
  131. * know to ignore the request if it has already been completed. The server will
  132. * guarantee that for at least 60 minutes since the first request. For example,
  133. * consider a situation where you make an initial request and t he request times
  134. * out. If you make the request again with the same request ID, the server can
  135. * check if original operation with the same request ID was received, and if so,
  136. * will ignore the second request. This prevents clients from accidentally
  137. * creating duplicate commitments. The request ID must be a valid UUID with the
  138. * exception that zero UUID is not supported
  139. * (00000000-0000-0000-0000-000000000000).
  140. * @opt_param string updateMask Required. A list of fields to be updated in this
  141. * request.
  142. * @return Certificate
  143. */
  144. public function patch($name, Certificate $postBody, $optParams = [])
  145. {
  146. $params = ['name' => $name, 'postBody' => $postBody];
  147. $params = array_merge($params, $optParams);
  148. return $this->call('patch', [$params], Certificate::class);
  149. }
  150. /**
  151. * Revoke a Certificate. (certificates.revoke)
  152. *
  153. * @param string $name Required. The resource name for this Certificate in the
  154. * format `projects/locations/caPools/certificates`.
  155. * @param RevokeCertificateRequest $postBody
  156. * @param array $optParams Optional parameters.
  157. * @return Certificate
  158. */
  159. public function revoke($name, RevokeCertificateRequest $postBody, $optParams = [])
  160. {
  161. $params = ['name' => $name, 'postBody' => $postBody];
  162. $params = array_merge($params, $optParams);
  163. return $this->call('revoke', [$params], Certificate::class);
  164. }
  165. }
  166. // Adding a class alias for backwards compatibility with the previous class name.
  167. class_alias(ProjectsLocationsCaPoolsCertificates::class, 'Google_Service_CertificateAuthorityService_Resource_ProjectsLocationsCaPoolsCertificates');