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\GoogleCloudApigeeV1Attribute; 21use Google\Service\Apigee\GoogleCloudApigeeV1Attributes; 22 23/** 24 * The "attributes" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $apigeeService = new Google\Service\Apigee(...); 28 * $attributes = $apigeeService->attributes; 29 * </code> 30 */ 31class OrganizationsDevelopersAttributes extends \Google\Service\Resource 32{ 33 /** 34 * Deletes a developer attribute. (attributes.delete) 35 * 36 * @param string $name Required. Name of the developer attribute. Use the 37 * following structure in your request: 38 * `organizations/{org}/developers/{developer_email}/attributes/{attribute}` 39 * @param array $optParams Optional parameters. 40 * @return GoogleCloudApigeeV1Attribute 41 */ 42 public function delete($name, $optParams = []) 43 { 44 $params = ['name' => $name]; 45 $params = array_merge($params, $optParams); 46 return $this->call('delete', [$params], GoogleCloudApigeeV1Attribute::class); 47 } 48 /** 49 * Returns the value of the specified developer attribute. (attributes.get) 50 * 51 * @param string $name Required. Name of the developer attribute. Use the 52 * following structure in your request: 53 * `organizations/{org}/developers/{developer_email}/attributes/{attribute}` 54 * @param array $optParams Optional parameters. 55 * @return GoogleCloudApigeeV1Attribute 56 */ 57 public function get($name, $optParams = []) 58 { 59 $params = ['name' => $name]; 60 $params = array_merge($params, $optParams); 61 return $this->call('get', [$params], GoogleCloudApigeeV1Attribute::class); 62 } 63 /** 64 * Returns a list of all developer attributes. 65 * (attributes.listOrganizationsDevelopersAttributes) 66 * 67 * @param string $parent Required. Email address of the developer for which 68 * attributes are being listed. Use the following structure in your request: 69 * `organizations/{org}/developers/{developer_email}` 70 * @param array $optParams Optional parameters. 71 * @return GoogleCloudApigeeV1Attributes 72 */ 73 public function listOrganizationsDevelopersAttributes($parent, $optParams = []) 74 { 75 $params = ['parent' => $parent]; 76 $params = array_merge($params, $optParams); 77 return $this->call('list', [$params], GoogleCloudApigeeV1Attributes::class); 78 } 79 /** 80 * Updates a developer attribute. **Note**: OAuth access tokens and Key 81 * Management Service (KMS) entities (apps, developers, and API products) are 82 * cached for 180 seconds (default). Any custom attributes associated with these 83 * entities are cached for at least 180 seconds after the entity is accessed at 84 * runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be 85 * able to expire an access token in less than 180 seconds. 86 * (attributes.updateDeveloperAttribute) 87 * 88 * @param string $name Required. Name of the developer attribute. Use the 89 * following structure in your request: 90 * `organizations/{org}/developers/{developer_email}/attributes/{attribute}` 91 * @param GoogleCloudApigeeV1Attribute $postBody 92 * @param array $optParams Optional parameters. 93 * @return GoogleCloudApigeeV1Attribute 94 */ 95 public function updateDeveloperAttribute($name, GoogleCloudApigeeV1Attribute $postBody, $optParams = []) 96 { 97 $params = ['name' => $name, 'postBody' => $postBody]; 98 $params = array_merge($params, $optParams); 99 return $this->call('updateDeveloperAttribute', [$params], GoogleCloudApigeeV1Attribute::class); 100 } 101} 102 103// Adding a class alias for backwards compatibility with the previous class name. 104class_alias(OrganizationsDevelopersAttributes::class, 'Google_Service_Apigee_Resource_OrganizationsDevelopersAttributes'); 105