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 OrganizationsApiproductsAttributes extends \Google\Service\Resource
32{
33  /**
34   * Deletes an API product attribute. (attributes.delete)
35   *
36   * @param string $name Required. Name of the API product attribute. Use the
37   * following structure in your request:
38   * `organizations/{org}/apiproducts/{apiproduct}/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   * Gets the value of an API product attribute. (attributes.get)
50   *
51   * @param string $name Required. Name of the API product attribute. Use the
52   * following structure in your request:
53   * `organizations/{org}/apiproducts/{apiproduct}/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   * Lists all API product attributes.
65   * (attributes.listOrganizationsApiproductsAttributes)
66   *
67   * @param string $parent Required. Name of the API product. Use the following
68   * structure in your request: `organizations/{org}/apiproducts/{apiproduct}`
69   * @param array $optParams Optional parameters.
70   * @return GoogleCloudApigeeV1Attributes
71   */
72  public function listOrganizationsApiproductsAttributes($parent, $optParams = [])
73  {
74    $params = ['parent' => $parent];
75    $params = array_merge($params, $optParams);
76    return $this->call('list', [$params], GoogleCloudApigeeV1Attributes::class);
77  }
78  /**
79   * Updates the value of an API product attribute. **Note**: OAuth access tokens
80   * and Key Management Service (KMS) entities (apps, developers, and API
81   * products) are cached for 180 seconds (current default). Any custom attributes
82   * associated with entities also get cached for at least 180 seconds after
83   * entity is accessed during runtime. In this case, the `ExpiresIn` element on
84   * the OAuthV2 policy won't be able to expire an access token in less than 180
85   * seconds. (attributes.updateApiProductAttribute)
86   *
87   * @param string $name Required. Name of the API product. Use the following
88   * structure in your request: `organizations/{org}/apiproducts/{apiproduct}`
89   * @param GoogleCloudApigeeV1Attribute $postBody
90   * @param array $optParams Optional parameters.
91   * @return GoogleCloudApigeeV1Attribute
92   */
93  public function updateApiProductAttribute($name, GoogleCloudApigeeV1Attribute $postBody, $optParams = [])
94  {
95    $params = ['name' => $name, 'postBody' => $postBody];
96    $params = array_merge($params, $optParams);
97    return $this->call('updateApiProductAttribute', [$params], GoogleCloudApigeeV1Attribute::class);
98  }
99}
100
101// Adding a class alias for backwards compatibility with the previous class name.
102class_alias(OrganizationsApiproductsAttributes::class, 'Google_Service_Apigee_Resource_OrganizationsApiproductsAttributes');
103