[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\GoogleCloudApigeeV1AppGroupAppKey;
|
---|
| 21 | use Google\Service\Apigee\GoogleCloudApigeeV1UpdateAppGroupAppKeyRequest;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "keys" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
| 28 | * $keys = $apigeeService->organizations_appgroups_apps_keys;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class OrganizationsAppgroupsAppsKeys extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Creates a custom consumer key and secret for a AppGroup app. This is
|
---|
| 35 | * particularly useful if you want to migrate existing consumer keys and secrets
|
---|
| 36 | * to Apigee from another system. Consumer keys and secrets can contain letters,
|
---|
| 37 | * numbers, underscores, and hyphens. No other special characters are allowed.
|
---|
| 38 | * To avoid service disruptions, a consumer key and secret should not exceed 2
|
---|
| 39 | * KBs each. **Note**: When creating the consumer key and secret, an association
|
---|
| 40 | * to API products will not be made. Therefore, you should not specify the
|
---|
| 41 | * associated API products in your request. Instead, use the
|
---|
| 42 | * ProductizeAppGroupAppKey API to make the association after the consumer key
|
---|
| 43 | * and secret are created. If a consumer key and secret already exist, you can
|
---|
| 44 | * keep them or delete them using the DeleteAppGroupAppKey API. (keys.create)
|
---|
| 45 | *
|
---|
| 46 | * @param string $parent Required. Parent of the AppGroup app key. Use the
|
---|
| 47 | * following structure in your request:
|
---|
| 48 | * `organizations/{org}/appgroups/{app_group_name}/apps/{app}/keys`
|
---|
| 49 | * @param GoogleCloudApigeeV1AppGroupAppKey $postBody
|
---|
| 50 | * @param array $optParams Optional parameters.
|
---|
| 51 | * @return GoogleCloudApigeeV1AppGroupAppKey
|
---|
| 52 | * @throws \Google\Service\Exception
|
---|
| 53 | */
|
---|
| 54 | public function create($parent, GoogleCloudApigeeV1AppGroupAppKey $postBody, $optParams = [])
|
---|
| 55 | {
|
---|
| 56 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 57 | $params = array_merge($params, $optParams);
|
---|
| 58 | return $this->call('create', [$params], GoogleCloudApigeeV1AppGroupAppKey::class);
|
---|
| 59 | }
|
---|
| 60 | /**
|
---|
| 61 | * Deletes an app's consumer key and removes all API products associated with
|
---|
| 62 | * the app. After the consumer key is deleted, it cannot be used to access any
|
---|
| 63 | * APIs. (keys.delete)
|
---|
| 64 | *
|
---|
| 65 | * @param string $name Required. Name of the AppGroup app key. Use the following
|
---|
| 66 | * structure in your request:
|
---|
| 67 | * `organizations/{org}/appgroups/{app_group_name}/apps/{app}/keys/{key}`
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | * @return GoogleCloudApigeeV1AppGroupAppKey
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function delete($name, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['name' => $name];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('delete', [$params], GoogleCloudApigeeV1AppGroupAppKey::class);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Gets details for a consumer key for a AppGroup app, including the key and
|
---|
| 80 | * secret value, associated API products, and other information. (keys.get)
|
---|
| 81 | *
|
---|
| 82 | * @param string $name Required. Name of the AppGroup app key. Use the following
|
---|
| 83 | * structure in your request:
|
---|
| 84 | * `organizations/{org}/appgroups/{app_group_name}/apps/{app}/keys/{key}`
|
---|
| 85 | * @param array $optParams Optional parameters.
|
---|
| 86 | * @return GoogleCloudApigeeV1AppGroupAppKey
|
---|
| 87 | * @throws \Google\Service\Exception
|
---|
| 88 | */
|
---|
| 89 | public function get($name, $optParams = [])
|
---|
| 90 | {
|
---|
| 91 | $params = ['name' => $name];
|
---|
| 92 | $params = array_merge($params, $optParams);
|
---|
| 93 | return $this->call('get', [$params], GoogleCloudApigeeV1AppGroupAppKey::class);
|
---|
| 94 | }
|
---|
| 95 | /**
|
---|
| 96 | * Adds an API product to an AppGroupAppKey, enabling the app that holds the key
|
---|
| 97 | * to access the API resources bundled in the API product. In addition, you can
|
---|
| 98 | * add attributes to the AppGroupAppKey. This API replaces the existing
|
---|
| 99 | * attributes with those specified in the request. Include or exclude any
|
---|
| 100 | * existing attributes that you want to retain or delete, respectively. You can
|
---|
| 101 | * use the same key to access all API products associated with the app.
|
---|
| 102 | * (keys.updateAppGroupAppKey)
|
---|
| 103 | *
|
---|
| 104 | * @param string $name Required. Name of the AppGroup app key. Use the following
|
---|
| 105 | * structure in your request:
|
---|
| 106 | * `organizations/{org}/appgroups/{app_group_name}/apps/{app}/keys/{key}`
|
---|
| 107 | * @param GoogleCloudApigeeV1UpdateAppGroupAppKeyRequest $postBody
|
---|
| 108 | * @param array $optParams Optional parameters.
|
---|
| 109 | * @return GoogleCloudApigeeV1AppGroupAppKey
|
---|
| 110 | * @throws \Google\Service\Exception
|
---|
| 111 | */
|
---|
| 112 | public function updateAppGroupAppKey($name, GoogleCloudApigeeV1UpdateAppGroupAppKeyRequest $postBody, $optParams = [])
|
---|
| 113 | {
|
---|
| 114 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 115 | $params = array_merge($params, $optParams);
|
---|
| 116 | return $this->call('updateAppGroupAppKey', [$params], GoogleCloudApigeeV1AppGroupAppKey::class);
|
---|
| 117 | }
|
---|
| 118 | }
|
---|
| 119 |
|
---|
| 120 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 121 | class_alias(OrganizationsAppgroupsAppsKeys::class, 'Google_Service_Apigee_Resource_OrganizationsAppgroupsAppsKeys');
|
---|