[e3d4e0a] | 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\AppHub\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AppHub\DiscoveredWorkload;
|
---|
| 21 | use Google\Service\AppHub\ListDiscoveredWorkloadsResponse;
|
---|
| 22 | use Google\Service\AppHub\LookupDiscoveredWorkloadResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "discoveredWorkloads" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $apphubService = new Google\Service\AppHub(...);
|
---|
| 29 | * $discoveredWorkloads = $apphubService->projects_locations_discoveredWorkloads;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsDiscoveredWorkloads extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Gets a Discovered Workload in a host project and location.
|
---|
| 36 | * (discoveredWorkloads.get)
|
---|
| 37 | *
|
---|
| 38 | * @param string $name Required. Fully qualified name of the Discovered Workload
|
---|
| 39 | * to fetch. Expected format: `projects/{project}/locations/{location}/discovere
|
---|
| 40 | * dWorkloads/{discoveredWorkload}`.
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | * @return DiscoveredWorkload
|
---|
| 43 | * @throws \Google\Service\Exception
|
---|
| 44 | */
|
---|
| 45 | public function get($name, $optParams = [])
|
---|
| 46 | {
|
---|
| 47 | $params = ['name' => $name];
|
---|
| 48 | $params = array_merge($params, $optParams);
|
---|
| 49 | return $this->call('get', [$params], DiscoveredWorkload::class);
|
---|
| 50 | }
|
---|
| 51 | /**
|
---|
| 52 | * Lists Discovered Workloads that can be added to an Application in a host
|
---|
| 53 | * project and location.
|
---|
| 54 | * (discoveredWorkloads.listProjectsLocationsDiscoveredWorkloads)
|
---|
| 55 | *
|
---|
| 56 | * @param string $parent Required. Project and location to list Discovered
|
---|
| 57 | * Workloads on. Expected format: `projects/{project}/locations/{location}`.
|
---|
| 58 | * @param array $optParams Optional parameters.
|
---|
| 59 | *
|
---|
| 60 | * @opt_param string filter Optional. Filtering results.
|
---|
| 61 | * @opt_param string orderBy Optional. Hint for how to order the results.
|
---|
| 62 | * @opt_param int pageSize Optional. Requested page size. Server may return
|
---|
| 63 | * fewer items than requested. If unspecified, server will pick an appropriate
|
---|
| 64 | * default.
|
---|
| 65 | * @opt_param string pageToken Optional. A token identifying a page of results
|
---|
| 66 | * the server should return.
|
---|
| 67 | * @return ListDiscoveredWorkloadsResponse
|
---|
| 68 | * @throws \Google\Service\Exception
|
---|
| 69 | */
|
---|
| 70 | public function listProjectsLocationsDiscoveredWorkloads($parent, $optParams = [])
|
---|
| 71 | {
|
---|
| 72 | $params = ['parent' => $parent];
|
---|
| 73 | $params = array_merge($params, $optParams);
|
---|
| 74 | return $this->call('list', [$params], ListDiscoveredWorkloadsResponse::class);
|
---|
| 75 | }
|
---|
| 76 | /**
|
---|
| 77 | * Lists a Discovered Workload in a host project and location, with a given
|
---|
| 78 | * resource URI. (discoveredWorkloads.lookup)
|
---|
| 79 | *
|
---|
| 80 | * @param string $parent Required. Host project ID and location to lookup
|
---|
| 81 | * Discovered Workload in. Expected format:
|
---|
| 82 | * `projects/{project}/locations/{location}`.
|
---|
| 83 | * @param array $optParams Optional parameters.
|
---|
| 84 | *
|
---|
| 85 | * @opt_param string uri Required. Resource URI to find Discovered Workload for.
|
---|
| 86 | * Accepts both project number and project ID and does translation when needed.
|
---|
| 87 | * @return LookupDiscoveredWorkloadResponse
|
---|
| 88 | * @throws \Google\Service\Exception
|
---|
| 89 | */
|
---|
| 90 | public function lookup($parent, $optParams = [])
|
---|
| 91 | {
|
---|
| 92 | $params = ['parent' => $parent];
|
---|
| 93 | $params = array_merge($params, $optParams);
|
---|
| 94 | return $this->call('lookup', [$params], LookupDiscoveredWorkloadResponse::class);
|
---|
| 95 | }
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 99 | class_alias(ProjectsLocationsDiscoveredWorkloads::class, 'Google_Service_AppHub_Resource_ProjectsLocationsDiscoveredWorkloads');
|
---|