source: vendor/google/apiclient-services/src/Apigee/Resource/OrganizationsDevelopersApps.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 11.0 KB
Line 
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\GoogleCloudApigeeV1Attributes;
21use Google\Service\Apigee\GoogleCloudApigeeV1DeveloperApp;
22use Google\Service\Apigee\GoogleCloudApigeeV1ListDeveloperAppsResponse;
23
24/**
25 * The "apps" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $apigeeService = new Google\Service\Apigee(...);
29 * $apps = $apigeeService->organizations_developers_apps;
30 * </code>
31 */
32class OrganizationsDevelopersApps extends \Google\Service\Resource
33{
34 /**
35 * Updates attributes for a developer app. This API replaces the current
36 * attributes with those specified in the request. (apps.attributes)
37 *
38 * @param string $name Required. Name of the developer app. Use the following
39 * structure in your request:
40 * `organizations/{org}/developers/{developer_email}/apps/{app}`
41 * @param GoogleCloudApigeeV1Attributes $postBody
42 * @param array $optParams Optional parameters.
43 * @return GoogleCloudApigeeV1Attributes
44 * @throws \Google\Service\Exception
45 */
46 public function attributes($name, GoogleCloudApigeeV1Attributes $postBody, $optParams = [])
47 {
48 $params = ['name' => $name, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('attributes', [$params], GoogleCloudApigeeV1Attributes::class);
51 }
52 /**
53 * Creates an app associated with a developer. This API associates the developer
54 * app with the specified API product and auto-generates an API key for the app
55 * to use in calls to API proxies inside that API product. The `name` is the
56 * unique ID of the app that you can use in API calls. The `DisplayName` (set as
57 * an attribute) appears in the UI. If you don't set the `DisplayName`
58 * attribute, the `name` appears in the UI. (apps.create)
59 *
60 * @param string $parent Required. Name of the developer. Use the following
61 * structure in your request: `organizations/{org}/developers/{developer_email}`
62 * @param GoogleCloudApigeeV1DeveloperApp $postBody
63 * @param array $optParams Optional parameters.
64 * @return GoogleCloudApigeeV1DeveloperApp
65 * @throws \Google\Service\Exception
66 */
67 public function create($parent, GoogleCloudApigeeV1DeveloperApp $postBody, $optParams = [])
68 {
69 $params = ['parent' => $parent, 'postBody' => $postBody];
70 $params = array_merge($params, $optParams);
71 return $this->call('create', [$params], GoogleCloudApigeeV1DeveloperApp::class);
72 }
73 /**
74 * Deletes a developer app. **Note**: The delete operation is asynchronous. The
75 * developer app is deleted immediately, but its associated resources, such as
76 * app keys or access tokens, may take anywhere from a few seconds to a few
77 * minutes to be deleted. (apps.delete)
78 *
79 * @param string $name Required. Name of the developer app. Use the following
80 * structure in your request:
81 * `organizations/{org}/developers/{developer_email}/apps/{app}`
82 * @param array $optParams Optional parameters.
83 * @return GoogleCloudApigeeV1DeveloperApp
84 * @throws \Google\Service\Exception
85 */
86 public function delete($name, $optParams = [])
87 {
88 $params = ['name' => $name];
89 $params = array_merge($params, $optParams);
90 return $this->call('delete', [$params], GoogleCloudApigeeV1DeveloperApp::class);
91 }
92 /**
93 * Manages access to a developer app by enabling you to: * Approve or revoke a
94 * developer app * Generate a new consumer key and secret for a developer app To
95 * approve or revoke a developer app, set the `action` query parameter to
96 * `approve` or `revoke`, respectively, and the `Content-Type` header to
97 * `application/octet-stream`. If a developer app is revoked, none of its API
98 * keys are valid for API calls even though the keys are still approved. If
99 * successful, the API call returns the following HTTP status code: `204 No
100 * Content` To generate a new consumer key and secret for a developer app, pass
101 * the new key/secret details. Rather than replace an existing key, this API
102 * generates a new key. In this case, multiple key pairs may be associated with
103 * a single developer app. Each key pair has an independent status (`approve` or
104 * `revoke`) and expiration time. Any approved, non-expired key can be used in
105 * an API call. For example, if you're using API key rotation, you can generate
106 * new keys with expiration times that overlap keys that are going to expire.
107 * You might also generate a new consumer key/secret if the security of the
108 * original key/secret is compromised. The `keyExpiresIn` property defines the
109 * expiration time for the API key in milliseconds. If you don't set this
110 * property or set it to `-1`, the API key never expires. **Notes**: * When
111 * generating a new key/secret, this API replaces the existing attributes,
112 * notes, and callback URLs with those specified in the request. Include or
113 * exclude any existing information that you want to retain or delete,
114 * respectively. * To migrate existing consumer keys and secrets to hybrid from
115 * another system, see the CreateDeveloperAppKey API.
116 * (apps.generateKeyPairOrUpdateDeveloperAppStatus)
117 *
118 * @param string $name Required. Name of the developer app. Use the following
119 * structure in your request:
120 * `organizations/{org}/developers/{developer_email}/apps/{app}`
121 * @param GoogleCloudApigeeV1DeveloperApp $postBody
122 * @param array $optParams Optional parameters.
123 *
124 * @opt_param string action Action. Valid values are `approve` or `revoke`.
125 * @return GoogleCloudApigeeV1DeveloperApp
126 * @throws \Google\Service\Exception
127 */
128 public function generateKeyPairOrUpdateDeveloperAppStatus($name, GoogleCloudApigeeV1DeveloperApp $postBody, $optParams = [])
129 {
130 $params = ['name' => $name, 'postBody' => $postBody];
131 $params = array_merge($params, $optParams);
132 return $this->call('generateKeyPairOrUpdateDeveloperAppStatus', [$params], GoogleCloudApigeeV1DeveloperApp::class);
133 }
134 /**
135 * Returns the details for a developer app. (apps.get)
136 *
137 * @param string $name Required. Name of the developer app. Use the following
138 * structure in your request:
139 * `organizations/{org}/developers/{developer_email}/apps/{app}`
140 * @param array $optParams Optional parameters.
141 *
142 * @opt_param string entity **Note**: Must be used in conjunction with the
143 * `query` parameter. Set to `apiresources` to return the number of API
144 * resources that have been approved for access by a developer app in the
145 * specified Apigee organization.
146 * @opt_param string query **Note**: Must be used in conjunction with the
147 * `entity` parameter. Set to `count` to return the number of API resources that
148 * have been approved for access by a developer app in the specified Apigee
149 * organization.
150 * @return GoogleCloudApigeeV1DeveloperApp
151 * @throws \Google\Service\Exception
152 */
153 public function get($name, $optParams = [])
154 {
155 $params = ['name' => $name];
156 $params = array_merge($params, $optParams);
157 return $this->call('get', [$params], GoogleCloudApigeeV1DeveloperApp::class);
158 }
159 /**
160 * Lists all apps created by a developer in an Apigee organization. Optionally,
161 * you can request an expanded view of the developer apps. A maximum of 100
162 * developer apps are returned per API call. You can paginate the list of
163 * deveoper apps returned using the `startKey` and `count` query parameters.
164 * (apps.listOrganizationsDevelopersApps)
165 *
166 * @param string $parent Required. Name of the developer. Use the following
167 * structure in your request: `organizations/{org}/developers/{developer_email}`
168 * @param array $optParams Optional parameters.
169 *
170 * @opt_param string count Number of developer apps to return in the API call.
171 * Use with the `startKey` parameter to provide more targeted filtering. The
172 * limit is 1000.
173 * @opt_param bool expand Optional. Specifies whether to expand the results. Set
174 * to `true` to expand the results. This query parameter is not valid if you use
175 * the `count` or `startKey` query parameters.
176 * @opt_param bool shallowExpand Optional. Specifies whether to expand the
177 * results in shallow mode. Set to `true` to expand the results in shallow mode.
178 * @opt_param string startKey **Note**: Must be used in conjunction with the
179 * `count` parameter. Name of the developer app from which to start displaying
180 * the list of developer apps. For example, if you're returning 50 developer
181 * apps at a time (using the `count` query parameter), you can view developer
182 * apps 50-99 by entering the name of the 50th developer app. The developer app
183 * name is case sensitive.
184 * @return GoogleCloudApigeeV1ListDeveloperAppsResponse
185 * @throws \Google\Service\Exception
186 */
187 public function listOrganizationsDevelopersApps($parent, $optParams = [])
188 {
189 $params = ['parent' => $parent];
190 $params = array_merge($params, $optParams);
191 return $this->call('list', [$params], GoogleCloudApigeeV1ListDeveloperAppsResponse::class);
192 }
193 /**
194 * Updates the details for a developer app. In addition, you can add an API
195 * product to a developer app and automatically generate an API key for the app
196 * to use when calling APIs in the API product. If you want to use an existing
197 * API key for the API product, add the API product to the API key using the
198 * UpdateDeveloperAppKey API. Using this API, you cannot update the following: *
199 * App name as it is the primary key used to identify the app and cannot be
200 * changed. * Scopes associated with the app. Instead, use the
201 * ReplaceDeveloperAppKey API. This API replaces the existing attributes with
202 * those specified in the request. Include or exclude any existing attributes
203 * that you want to retain or delete, respectively. (apps.update)
204 *
205 * @param string $name Required. Name of the developer app. Use the following
206 * structure in your request:
207 * `organizations/{org}/developers/{developer_email}/apps/{app}`
208 * @param GoogleCloudApigeeV1DeveloperApp $postBody
209 * @param array $optParams Optional parameters.
210 * @return GoogleCloudApigeeV1DeveloperApp
211 * @throws \Google\Service\Exception
212 */
213 public function update($name, GoogleCloudApigeeV1DeveloperApp $postBody, $optParams = [])
214 {
215 $params = ['name' => $name, 'postBody' => $postBody];
216 $params = array_merge($params, $optParams);
217 return $this->call('update', [$params], GoogleCloudApigeeV1DeveloperApp::class);
218 }
219}
220
221// Adding a class alias for backwards compatibility with the previous class name.
222class_alias(OrganizationsDevelopersApps::class, 'Google_Service_Apigee_Resource_OrganizationsDevelopersApps');
Note: See TracBrowser for help on using the repository browser.