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\GoogleCloudApigeeV1DeveloperAppKey;
21
22/**
23 * The "create" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $apigeeService = new Google\Service\Apigee(...);
27 *   $create = $apigeeService->create;
28 *  </code>
29 */
30class OrganizationsDevelopersAppsKeysCreate extends \Google\Service\Resource
31{
32  /**
33   * Creates a custom consumer key and secret for a developer app. This is
34   * particularly useful if you want to migrate existing consumer keys and secrets
35   * to Apigee from another system. Consumer keys and secrets can contain letters,
36   * numbers, underscores, and hyphens. No other special characters are allowed.
37   * To avoid service disruptions, a consumer key and secret should not exceed 2
38   * KBs each. **Note**: When creating the consumer key and secret, an association
39   * to API products will not be made. Therefore, you should not specify the
40   * associated API products in your request. Instead, use the
41   * UpdateDeveloperAppKey API to make the association after the consumer key and
42   * secret are created. If a consumer key and secret already exist, you can keep
43   * them or delete them using the DeleteDeveloperAppKey API. (create.create)
44   *
45   * @param string $parent Parent of the developer app key. Use the following
46   * structure in your request:
47   * `organizations/{org}/developers/{developer_email}/apps`
48   * @param GoogleCloudApigeeV1DeveloperAppKey $postBody
49   * @param array $optParams Optional parameters.
50   * @return GoogleCloudApigeeV1DeveloperAppKey
51   */
52  public function create($parent, GoogleCloudApigeeV1DeveloperAppKey $postBody, $optParams = [])
53  {
54    $params = ['parent' => $parent, 'postBody' => $postBody];
55    $params = array_merge($params, $optParams);
56    return $this->call('create', [$params], GoogleCloudApigeeV1DeveloperAppKey::class);
57  }
58}
59
60// Adding a class alias for backwards compatibility with the previous class name.
61class_alias(OrganizationsDevelopersAppsKeysCreate::class, 'Google_Service_Apigee_Resource_OrganizationsDevelopersAppsKeysCreate');
62