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 18/** 19 * The "apiproducts" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $apigeeService = new Google_Service_Apigee(...); 23 * $apiproducts = $apigeeService->apiproducts; 24 * </code> 25 */ 26class Google_Service_Apigee_Resource_OrganizationsDevelopersAppsKeysApiproducts extends Google_Service_Resource 27{ 28 /** 29 * Removes an API product from an app's consumer key. After the API product is 30 * removed, the app cannot access the API resources defined in that API product. 31 * **Note**: The consumer key is not removed, only its association with the API 32 * product. (apiproducts.delete) 33 * 34 * @param string $name Name of the API product in the developer app key in the 35 * following format: `organizations/{org}/developers/{developer_email}/apps/{app 36 * }/keys/{key}/apiproducts/{apiproduct}` 37 * @param array $optParams Optional parameters. 38 * @return Google_Service_Apigee_GoogleCloudApigeeV1DeveloperAppKey 39 */ 40 public function delete($name, $optParams = array()) 41 { 42 $params = array('name' => $name); 43 $params = array_merge($params, $optParams); 44 return $this->call('delete', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1DeveloperAppKey"); 45 } 46 /** 47 * Approves or revokes the consumer key for an API product. After a consumer key 48 * is approved, the app can use it to access APIs. A consumer key that is 49 * revoked or pending cannot be used to access an API. Any access tokens 50 * associated with a revoked consumer key will remain active. However, Apigee 51 * checks the status of the consumer key and if set to `revoked` will not allow 52 * access to the API. (apiproducts.updateDeveloperAppKeyApiProduct) 53 * 54 * @param string $name Name of the API product in the developer app key in the 55 * following format: `organizations/{org}/developers/{developer_email}/apps/{app 56 * }/keys/{key}/apiproducts/{apiproduct}` 57 * @param array $optParams Optional parameters. 58 * 59 * @opt_param string action Approve or revoke the consumer key by setting this 60 * value to `approve` or `revoke`, respectively. 61 * @return Google_Service_Apigee_GoogleProtobufEmpty 62 */ 63 public function updateDeveloperAppKeyApiProduct($name, $optParams = array()) 64 { 65 $params = array('name' => $name); 66 $params = array_merge($params, $optParams); 67 return $this->call('updateDeveloperAppKeyApiProduct', array($params), "Google_Service_Apigee_GoogleProtobufEmpty"); 68 } 69} 70