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\GoogleCloudApigeeV1EnvironmentGroup;
21use Google\Service\Apigee\GoogleCloudApigeeV1ListEnvironmentGroupsResponse;
22use Google\Service\Apigee\GoogleLongrunningOperation;
23
24/**
25 * The "envgroups" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $apigeeService = new Google\Service\Apigee(...);
29 *   $envgroups = $apigeeService->envgroups;
30 *  </code>
31 */
32class OrganizationsEnvgroups extends \Google\Service\Resource
33{
34  /**
35   * Creates a new environment group. (envgroups.create)
36   *
37   * @param string $parent Required. Name of the organization in which to create
38   * the environment group in the following format: `organizations/{org}`.
39   * @param GoogleCloudApigeeV1EnvironmentGroup $postBody
40   * @param array $optParams Optional parameters.
41   *
42   * @opt_param string name ID of the environment group. Overrides any ID in the
43   * environment_group resource.
44   * @return GoogleLongrunningOperation
45   */
46  public function create($parent, GoogleCloudApigeeV1EnvironmentGroup $postBody, $optParams = [])
47  {
48    $params = ['parent' => $parent, 'postBody' => $postBody];
49    $params = array_merge($params, $optParams);
50    return $this->call('create', [$params], GoogleLongrunningOperation::class);
51  }
52  /**
53   * Deletes an environment group. (envgroups.delete)
54   *
55   * @param string $name Required. Name of the environment group in the following
56   * format: `organizations/{org}/envgroups/{envgroup}`.
57   * @param array $optParams Optional parameters.
58   * @return GoogleLongrunningOperation
59   */
60  public function delete($name, $optParams = [])
61  {
62    $params = ['name' => $name];
63    $params = array_merge($params, $optParams);
64    return $this->call('delete', [$params], GoogleLongrunningOperation::class);
65  }
66  /**
67   * Gets an environment group. (envgroups.get)
68   *
69   * @param string $name Required. Name of the environment group in the following
70   * format: `organizations/{org}/envgroups/{envgroup}`.
71   * @param array $optParams Optional parameters.
72   * @return GoogleCloudApigeeV1EnvironmentGroup
73   */
74  public function get($name, $optParams = [])
75  {
76    $params = ['name' => $name];
77    $params = array_merge($params, $optParams);
78    return $this->call('get', [$params], GoogleCloudApigeeV1EnvironmentGroup::class);
79  }
80  /**
81   * Lists all environment groups. (envgroups.listOrganizationsEnvgroups)
82   *
83   * @param string $parent Required. Name of the organization for which to list
84   * environment groups in the following format: `organizations/{org}`.
85   * @param array $optParams Optional parameters.
86   *
87   * @opt_param int pageSize Maximum number of environment groups to return. The
88   * page size defaults to 25.
89   * @opt_param string pageToken Page token, returned from a previous
90   * ListEnvironmentGroups call, that you can use to retrieve the next page.
91   * @return GoogleCloudApigeeV1ListEnvironmentGroupsResponse
92   */
93  public function listOrganizationsEnvgroups($parent, $optParams = [])
94  {
95    $params = ['parent' => $parent];
96    $params = array_merge($params, $optParams);
97    return $this->call('list', [$params], GoogleCloudApigeeV1ListEnvironmentGroupsResponse::class);
98  }
99  /**
100   * Updates an environment group. (envgroups.patch)
101   *
102   * @param string $name Required. Name of the environment group to update in the
103   * format: `organizations/{org}/envgroups/{envgroup}.
104   * @param GoogleCloudApigeeV1EnvironmentGroup $postBody
105   * @param array $optParams Optional parameters.
106   *
107   * @opt_param string updateMask List of fields to be updated.
108   * @return GoogleLongrunningOperation
109   */
110  public function patch($name, GoogleCloudApigeeV1EnvironmentGroup $postBody, $optParams = [])
111  {
112    $params = ['name' => $name, 'postBody' => $postBody];
113    $params = array_merge($params, $optParams);
114    return $this->call('patch', [$params], GoogleLongrunningOperation::class);
115  }
116}
117
118// Adding a class alias for backwards compatibility with the previous class name.
119class_alias(OrganizationsEnvgroups::class, 'Google_Service_Apigee_Resource_OrganizationsEnvgroups');
120