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\Apigee\Resource; 19 20use Google\Service\Apigee\GoogleCloudApigeeV1Keystore; 21 22/** 23 * The "keystores" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $apigeeService = new Google\Service\Apigee(...); 27 * $keystores = $apigeeService->keystores; 28 * </code> 29 */ 30class OrganizationsEnvironmentsKeystores extends \Google\Service\Resource 31{ 32 /** 33 * Creates a keystore or truststore. - Keystore: Contains certificates and their 34 * associated keys. - Truststore: Contains trusted certificates used to validate 35 * a server's certificate. These certificates are typically self-signed 36 * certificates or certificates that are not signed by a trusted CA. 37 * (keystores.create) 38 * 39 * @param string $parent Required. Name of the environment in which to create 40 * the keystore. Use the following format in your request: 41 * `organizations/{org}/environments/{env}` 42 * @param GoogleCloudApigeeV1Keystore $postBody 43 * @param array $optParams Optional parameters. 44 * 45 * @opt_param string name Optional. Name of the keystore. Overrides the value in 46 * Keystore. 47 * @return GoogleCloudApigeeV1Keystore 48 */ 49 public function create($parent, GoogleCloudApigeeV1Keystore $postBody, $optParams = []) 50 { 51 $params = ['parent' => $parent, 'postBody' => $postBody]; 52 $params = array_merge($params, $optParams); 53 return $this->call('create', [$params], GoogleCloudApigeeV1Keystore::class); 54 } 55 /** 56 * Deletes a keystore or truststore. (keystores.delete) 57 * 58 * @param string $name Required. Name of the keystore. Use the following format 59 * in your request: 60 * `organizations/{org}/environments/{env}/keystores/{keystore}` 61 * @param array $optParams Optional parameters. 62 * @return GoogleCloudApigeeV1Keystore 63 */ 64 public function delete($name, $optParams = []) 65 { 66 $params = ['name' => $name]; 67 $params = array_merge($params, $optParams); 68 return $this->call('delete', [$params], GoogleCloudApigeeV1Keystore::class); 69 } 70 /** 71 * Gets a keystore or truststore. (keystores.get) 72 * 73 * @param string $name Required. Name of the keystore. Use the following format 74 * in your request: 75 * `organizations/{org}/environments/{env}/keystores/{keystore}`. 76 * @param array $optParams Optional parameters. 77 * @return GoogleCloudApigeeV1Keystore 78 */ 79 public function get($name, $optParams = []) 80 { 81 $params = ['name' => $name]; 82 $params = array_merge($params, $optParams); 83 return $this->call('get', [$params], GoogleCloudApigeeV1Keystore::class); 84 } 85} 86 87// Adding a class alias for backwards compatibility with the previous class name. 88class_alias(OrganizationsEnvironmentsKeystores::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsKeystores'); 89