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 18namespace Google\Service\Appengine\Resource; 19 20use Google\Service\Appengine\AppengineEmpty; 21use Google\Service\Appengine\AuthorizedCertificate; 22use Google\Service\Appengine\ListAuthorizedCertificatesResponse; 23 24/** 25 * The "authorizedCertificates" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $appengineService = new Google\Service\Appengine(...); 29 * $authorizedCertificates = $appengineService->authorizedCertificates; 30 * </code> 31 */ 32class AppsAuthorizedCertificates extends \Google\Service\Resource 33{ 34 /** 35 * Uploads the specified SSL certificate. (authorizedCertificates.create) 36 * 37 * @param string $appsId Part of `parent`. Name of the parent Application 38 * resource. Example: apps/myapp. 39 * @param AuthorizedCertificate $postBody 40 * @param array $optParams Optional parameters. 41 * @return AuthorizedCertificate 42 */ 43 public function create($appsId, AuthorizedCertificate $postBody, $optParams = []) 44 { 45 $params = ['appsId' => $appsId, 'postBody' => $postBody]; 46 $params = array_merge($params, $optParams); 47 return $this->call('create', [$params], AuthorizedCertificate::class); 48 } 49 /** 50 * Deletes the specified SSL certificate. (authorizedCertificates.delete) 51 * 52 * @param string $appsId Part of `name`. Name of the resource to delete. 53 * Example: apps/myapp/authorizedCertificates/12345. 54 * @param string $authorizedCertificatesId Part of `name`. See documentation of 55 * `appsId`. 56 * @param array $optParams Optional parameters. 57 * @return AppengineEmpty 58 */ 59 public function delete($appsId, $authorizedCertificatesId, $optParams = []) 60 { 61 $params = ['appsId' => $appsId, 'authorizedCertificatesId' => $authorizedCertificatesId]; 62 $params = array_merge($params, $optParams); 63 return $this->call('delete', [$params], AppengineEmpty::class); 64 } 65 /** 66 * Gets the specified SSL certificate. (authorizedCertificates.get) 67 * 68 * @param string $appsId Part of `name`. Name of the resource requested. 69 * Example: apps/myapp/authorizedCertificates/12345. 70 * @param string $authorizedCertificatesId Part of `name`. See documentation of 71 * `appsId`. 72 * @param array $optParams Optional parameters. 73 * 74 * @opt_param string view Controls the set of fields returned in the GET 75 * response. 76 * @return AuthorizedCertificate 77 */ 78 public function get($appsId, $authorizedCertificatesId, $optParams = []) 79 { 80 $params = ['appsId' => $appsId, 'authorizedCertificatesId' => $authorizedCertificatesId]; 81 $params = array_merge($params, $optParams); 82 return $this->call('get', [$params], AuthorizedCertificate::class); 83 } 84 /** 85 * Lists all SSL certificates the user is authorized to administer. 86 * (authorizedCertificates.listAppsAuthorizedCertificates) 87 * 88 * @param string $appsId Part of `parent`. Name of the parent Application 89 * resource. Example: apps/myapp. 90 * @param array $optParams Optional parameters. 91 * 92 * @opt_param int pageSize Maximum results to return per page. 93 * @opt_param string pageToken Continuation token for fetching the next page of 94 * results. 95 * @opt_param string view Controls the set of fields returned in the LIST 96 * response. 97 * @return ListAuthorizedCertificatesResponse 98 */ 99 public function listAppsAuthorizedCertificates($appsId, $optParams = []) 100 { 101 $params = ['appsId' => $appsId]; 102 $params = array_merge($params, $optParams); 103 return $this->call('list', [$params], ListAuthorizedCertificatesResponse::class); 104 } 105 /** 106 * Updates the specified SSL certificate. To renew a certificate and maintain 107 * its existing domain mappings, update certificate_data with a new certificate. 108 * The new certificate must be applicable to the same domains as the original 109 * certificate. The certificate display_name may also be updated. 110 * (authorizedCertificates.patch) 111 * 112 * @param string $appsId Part of `name`. Name of the resource to update. 113 * Example: apps/myapp/authorizedCertificates/12345. 114 * @param string $authorizedCertificatesId Part of `name`. See documentation of 115 * `appsId`. 116 * @param AuthorizedCertificate $postBody 117 * @param array $optParams Optional parameters. 118 * 119 * @opt_param string updateMask Standard field mask for the set of fields to be 120 * updated. Updates are only supported on the certificate_raw_data and 121 * display_name fields. 122 * @return AuthorizedCertificate 123 */ 124 public function patch($appsId, $authorizedCertificatesId, AuthorizedCertificate $postBody, $optParams = []) 125 { 126 $params = ['appsId' => $appsId, 'authorizedCertificatesId' => $authorizedCertificatesId, 'postBody' => $postBody]; 127 $params = array_merge($params, $optParams); 128 return $this->call('patch', [$params], AuthorizedCertificate::class); 129 } 130} 131 132// Adding a class alias for backwards compatibility with the previous class name. 133class_alias(AppsAuthorizedCertificates::class, 'Google_Service_Appengine_Resource_AppsAuthorizedCertificates'); 134