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 "apis" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $apigeeService = new Google_Service_Apigee(...); 23 * $apis = $apigeeService->apis; 24 * </code> 25 */ 26class Google_Service_Apigee_Resource_OrganizationsApis extends Google_Service_Resource 27{ 28 /** 29 * Creates an API proxy. The API proxy created will not be accessible at runtime 30 * until it is deployed to an environment. Create a new API proxy by setting the 31 * `name` query parameter to the name of the API proxy. Import an API proxy 32 * configuration bundle stored in zip format on your local machine to your 33 * organization by doing the following: * Set the `name` query parameter to the 34 * name of the API proxy. * Set the `action` query parameter to `import`. * Set 35 * the `Content-Type` header to `multipart/form-data`. * Pass as a file the name 36 * of API proxy configuration bundle stored in zip format on your local machine 37 * using the `file` form field. **Note**: To validate the API proxy 38 * configuration bundle only without importing it, set the `action` query 39 * parameter to `validate`. When importing an API proxy configuration bundle, if 40 * the API proxy does not exist, it will be created. If the API proxy exists, 41 * then a new revision is created. Invalid API proxy configurations are 42 * rejected, and a list of validation errors is returned to the client. 43 * (apis.create) 44 * 45 * @param string $parent Required. Name of the organization in the following 46 * format: `organizations/{org}` 47 * @param Google_Service_Apigee_GoogleApiHttpBody $postBody 48 * @param array $optParams Optional parameters. 49 * 50 * @opt_param string action Action to perform when importing an API proxy 51 * configuration bundle. Set this parameter to one of the following values: * 52 * `import` to import the API proxy configuration bundle. * `validate` to 53 * validate the API proxy configuration bundle without importing it. 54 * @opt_param string name Name of the API proxy. Restrict the characters used 55 * to: A-Za-z0-9._- 56 * @opt_param bool validate Ignored. All uploads are validated regardless of the 57 * value of this field. Maintained for compatibility with Apigee Edge API. 58 * @return Google_Service_Apigee_GoogleCloudApigeeV1ApiProxyRevision 59 */ 60 public function create($parent, Google_Service_Apigee_GoogleApiHttpBody $postBody, $optParams = array()) 61 { 62 $params = array('parent' => $parent, 'postBody' => $postBody); 63 $params = array_merge($params, $optParams); 64 return $this->call('create', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1ApiProxyRevision"); 65 } 66 /** 67 * Deletes an API proxy and all associated endpoints, policies, resources, and 68 * revisions. The API proxy must be undeployed before you can delete it. 69 * (apis.delete) 70 * 71 * @param string $name Required. Name of the API proxy in the following format: 72 * `organizations/{org}/apis/{api}` 73 * @param array $optParams Optional parameters. 74 * @return Google_Service_Apigee_GoogleCloudApigeeV1ApiProxy 75 */ 76 public function delete($name, $optParams = array()) 77 { 78 $params = array('name' => $name); 79 $params = array_merge($params, $optParams); 80 return $this->call('delete', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1ApiProxy"); 81 } 82 /** 83 * Gets an API proxy including a list of existing revisions. (apis.get) 84 * 85 * @param string $name Required. Name of the API proxy in the following format: 86 * `organizations/{org}/apis/{api}` 87 * @param array $optParams Optional parameters. 88 * @return Google_Service_Apigee_GoogleCloudApigeeV1ApiProxy 89 */ 90 public function get($name, $optParams = array()) 91 { 92 $params = array('name' => $name); 93 $params = array_merge($params, $optParams); 94 return $this->call('get', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1ApiProxy"); 95 } 96 /** 97 * Lists the names of all API proxies in an organization. The names returned 98 * correspond to the names defined in the configuration files for each API 99 * proxy. (apis.listOrganizationsApis) 100 * 101 * @param string $parent Required. Name of the organization in the following 102 * format: `organizations/{org}` 103 * @param array $optParams Optional parameters. 104 * 105 * @opt_param bool includeMetaData Flag that specifies whether to include API 106 * proxy metadata in the response. 107 * @opt_param bool includeRevisions Flag that specifies whether to include a 108 * list of revisions in the response. 109 * @return Google_Service_Apigee_GoogleCloudApigeeV1ListApiProxiesResponse 110 */ 111 public function listOrganizationsApis($parent, $optParams = array()) 112 { 113 $params = array('parent' => $parent); 114 $params = array_merge($params, $optParams); 115 return $this->call('list', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1ListApiProxiesResponse"); 116 } 117} 118