[e3d4e0a] | 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 | namespace Google\Service\Apigee\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Apigee\GoogleCloudApigeeV1AppGroupApp;
|
---|
| 21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListAppGroupAppsResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "apps" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
| 28 | * $apps = $apigeeService->organizations_appgroups_apps;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class OrganizationsAppgroupsApps extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Creates an app and associates it with an AppGroup. This API associates the
|
---|
| 35 | * AppGroup app with the specified API product and auto-generates an API key for
|
---|
| 36 | * the app to use in calls to API proxies inside that API product. The `name` is
|
---|
| 37 | * the unique ID of the app that you can use in API calls. (apps.create)
|
---|
| 38 | *
|
---|
| 39 | * @param string $parent Required. Name of the AppGroup. Use the following
|
---|
| 40 | * structure in your request: `organizations/{org}/appgroups/{app_group_name}`
|
---|
| 41 | * @param GoogleCloudApigeeV1AppGroupApp $postBody
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | * @return GoogleCloudApigeeV1AppGroupApp
|
---|
| 44 | * @throws \Google\Service\Exception
|
---|
| 45 | */
|
---|
| 46 | public function create($parent, GoogleCloudApigeeV1AppGroupApp $postBody, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('create', [$params], GoogleCloudApigeeV1AppGroupApp::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Deletes an AppGroup app. **Note**: The delete operation is asynchronous. The
|
---|
| 54 | * AppGroup app is deleted immediately, but its associated resources, such as
|
---|
| 55 | * app keys or access tokens, may take anywhere from a few seconds to a few
|
---|
| 56 | * minutes to be deleted. (apps.delete)
|
---|
| 57 | *
|
---|
| 58 | * @param string $name Required. Name of the AppGroup app. Use the following
|
---|
| 59 | * structure in your request:
|
---|
| 60 | * `organizations/{org}/appgroups/{app_group_name}/apps/{app}`
|
---|
| 61 | * @param array $optParams Optional parameters.
|
---|
| 62 | * @return GoogleCloudApigeeV1AppGroupApp
|
---|
| 63 | * @throws \Google\Service\Exception
|
---|
| 64 | */
|
---|
| 65 | public function delete($name, $optParams = [])
|
---|
| 66 | {
|
---|
| 67 | $params = ['name' => $name];
|
---|
| 68 | $params = array_merge($params, $optParams);
|
---|
| 69 | return $this->call('delete', [$params], GoogleCloudApigeeV1AppGroupApp::class);
|
---|
| 70 | }
|
---|
| 71 | /**
|
---|
| 72 | * Returns the details for an AppGroup app. (apps.get)
|
---|
| 73 | *
|
---|
| 74 | * @param string $name Required. Name of the AppGroup app. Use the following
|
---|
| 75 | * structure in your request:
|
---|
| 76 | * `organizations/{org}/appgroups/{app_group_name}/apps/{app}`
|
---|
| 77 | * @param array $optParams Optional parameters.
|
---|
| 78 | * @return GoogleCloudApigeeV1AppGroupApp
|
---|
| 79 | * @throws \Google\Service\Exception
|
---|
| 80 | */
|
---|
| 81 | public function get($name, $optParams = [])
|
---|
| 82 | {
|
---|
| 83 | $params = ['name' => $name];
|
---|
| 84 | $params = array_merge($params, $optParams);
|
---|
| 85 | return $this->call('get', [$params], GoogleCloudApigeeV1AppGroupApp::class);
|
---|
| 86 | }
|
---|
| 87 | /**
|
---|
| 88 | * Lists all apps created by an AppGroup in an Apigee organization. Optionally,
|
---|
| 89 | * you can request an expanded view of the AppGroup apps. Lists all AppGroupApps
|
---|
| 90 | * in an AppGroup. A maximum of 1000 AppGroup apps are returned in the response
|
---|
| 91 | * if PageSize is not specified, or if the PageSize is greater than 1000.
|
---|
| 92 | * (apps.listOrganizationsAppgroupsApps)
|
---|
| 93 | *
|
---|
| 94 | * @param string $parent Required. Name of the AppGroup. Use the following
|
---|
| 95 | * structure in your request: `organizations/{org}/appgroups/{app_group_name}`
|
---|
| 96 | * @param array $optParams Optional parameters.
|
---|
| 97 | *
|
---|
| 98 | * @opt_param int pageSize Optional. Maximum number entries to return. If
|
---|
| 99 | * unspecified, at most 1000 entries will be returned.
|
---|
| 100 | * @opt_param string pageToken Optional. Page token. If provides, must be a
|
---|
| 101 | * valid AppGroup app returned from a previous call that can be used to retrieve
|
---|
| 102 | * the next page.
|
---|
| 103 | * @return GoogleCloudApigeeV1ListAppGroupAppsResponse
|
---|
| 104 | * @throws \Google\Service\Exception
|
---|
| 105 | */
|
---|
| 106 | public function listOrganizationsAppgroupsApps($parent, $optParams = [])
|
---|
| 107 | {
|
---|
| 108 | $params = ['parent' => $parent];
|
---|
| 109 | $params = array_merge($params, $optParams);
|
---|
| 110 | return $this->call('list', [$params], GoogleCloudApigeeV1ListAppGroupAppsResponse::class);
|
---|
| 111 | }
|
---|
| 112 | /**
|
---|
| 113 | * Updates the details for an AppGroup app. In addition, you can add an API
|
---|
| 114 | * product to an AppGroup app and automatically generate an API key for the app
|
---|
| 115 | * to use when calling APIs in the API product. If you want to use an existing
|
---|
| 116 | * API key for the API product, add the API product to the API key using the
|
---|
| 117 | * UpdateAppGroupAppKey API. Using this API, you cannot update the app name, as
|
---|
| 118 | * it is the primary key used to identify the app and cannot be changed. This
|
---|
| 119 | * API replaces the existing attributes with those specified in the request.
|
---|
| 120 | * Include or exclude any existing attributes that you want to retain or delete,
|
---|
| 121 | * respectively. (apps.update)
|
---|
| 122 | *
|
---|
| 123 | * @param string $name Required. Name of the AppGroup app. Use the following
|
---|
| 124 | * structure in your request:
|
---|
| 125 | * `organizations/{org}/appgroups/{app_group_name}/apps/{app}`
|
---|
| 126 | * @param GoogleCloudApigeeV1AppGroupApp $postBody
|
---|
| 127 | * @param array $optParams Optional parameters.
|
---|
| 128 | *
|
---|
| 129 | * @opt_param string action Approve or revoke the consumer key by setting this
|
---|
| 130 | * value to `approve` or `revoke`. The `Content-Type` header must be set to
|
---|
| 131 | * `application/octet-stream`, with empty body.
|
---|
| 132 | * @return GoogleCloudApigeeV1AppGroupApp
|
---|
| 133 | * @throws \Google\Service\Exception
|
---|
| 134 | */
|
---|
| 135 | public function update($name, GoogleCloudApigeeV1AppGroupApp $postBody, $optParams = [])
|
---|
| 136 | {
|
---|
| 137 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 138 | $params = array_merge($params, $optParams);
|
---|
| 139 | return $this->call('update', [$params], GoogleCloudApigeeV1AppGroupApp::class);
|
---|
| 140 | }
|
---|
| 141 | }
|
---|
| 142 |
|
---|
| 143 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 144 | class_alias(OrganizationsAppgroupsApps::class, 'Google_Service_Apigee_Resource_OrganizationsAppgroupsApps');
|
---|