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 |
|
---|
18 | namespace Google\Service\CloudControlsPartnerService\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudControlsPartnerService\EkmConnections;
|
---|
21 | use Google\Service\CloudControlsPartnerService\ListWorkloadsResponse;
|
---|
22 | use Google\Service\CloudControlsPartnerService\PartnerPermissions;
|
---|
23 | use Google\Service\CloudControlsPartnerService\Workload;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "workloads" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $cloudcontrolspartnerService = new Google\Service\CloudControlsPartnerService(...);
|
---|
30 | * $workloads = $cloudcontrolspartnerService->organizations_locations_customers_workloads;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class OrganizationsLocationsCustomersWorkloads extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Gets details of a single workload (workloads.get)
|
---|
37 | *
|
---|
38 | * @param string $name Required. Format: `organizations/{organization}/locations
|
---|
39 | * /{location}/customers/{customer}/workloads/{workload}`
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return Workload
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function get($name, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['name' => $name];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('get', [$params], Workload::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Gets the EKM connections associated with a workload
|
---|
52 | * (workloads.getEkmConnections)
|
---|
53 | *
|
---|
54 | * @param string $name Required. Format: `organizations/{organization}/locations
|
---|
55 | * /{location}/customers/{customer}/workloads/{workload}/ekmConnections`
|
---|
56 | * @param array $optParams Optional parameters.
|
---|
57 | * @return EkmConnections
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function getEkmConnections($name, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['name' => $name];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('getEkmConnections', [$params], EkmConnections::class);
|
---|
65 | }
|
---|
66 | /**
|
---|
67 | * Gets the partner permissions granted for a workload
|
---|
68 | * (workloads.getPartnerPermissions)
|
---|
69 | *
|
---|
70 | * @param string $name Required. Name of the resource to get in the format: `org
|
---|
71 | * anizations/{organization}/locations/{location}/customers/{customer}/workloads
|
---|
72 | * /{workload}/partnerPermissions`
|
---|
73 | * @param array $optParams Optional parameters.
|
---|
74 | * @return PartnerPermissions
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function getPartnerPermissions($name, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['name' => $name];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('getPartnerPermissions', [$params], PartnerPermissions::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Lists customer workloads for a given customer org id
|
---|
85 | * (workloads.listOrganizationsLocationsCustomersWorkloads)
|
---|
86 | *
|
---|
87 | * @param string $parent Required. Parent resource Format:
|
---|
88 | * `organizations/{organization}/locations/{location}/customers/{customer}`
|
---|
89 | * @param array $optParams Optional parameters.
|
---|
90 | *
|
---|
91 | * @opt_param string filter Optional. Filtering results.
|
---|
92 | * @opt_param string orderBy Optional. Hint for how to order the results.
|
---|
93 | * @opt_param int pageSize The maximum number of workloads to return. The
|
---|
94 | * service may return fewer than this value. If unspecified, at most 500
|
---|
95 | * workloads will be returned.
|
---|
96 | * @opt_param string pageToken A page token, received from a previous
|
---|
97 | * `ListWorkloads` call. Provide this to retrieve the subsequent page.
|
---|
98 | * @return ListWorkloadsResponse
|
---|
99 | * @throws \Google\Service\Exception
|
---|
100 | */
|
---|
101 | public function listOrganizationsLocationsCustomersWorkloads($parent, $optParams = [])
|
---|
102 | {
|
---|
103 | $params = ['parent' => $parent];
|
---|
104 | $params = array_merge($params, $optParams);
|
---|
105 | return $this->call('list', [$params], ListWorkloadsResponse::class);
|
---|
106 | }
|
---|
107 | }
|
---|
108 |
|
---|
109 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
110 | class_alias(OrganizationsLocationsCustomersWorkloads::class, 'Google_Service_CloudControlsPartnerService_Resource_OrganizationsLocationsCustomersWorkloads');
|
---|