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\BigLakeService\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\BigLakeService\Catalog;
|
---|
21 | use Google\Service\BigLakeService\ListCatalogsResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "catalogs" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $biglakeService = new Google\Service\BigLakeService(...);
|
---|
28 | * $catalogs = $biglakeService->projects_locations_catalogs;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class ProjectsLocationsCatalogs extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Creates a new catalog. (catalogs.create)
|
---|
35 | *
|
---|
36 | * @param string $parent Required. The parent resource where this catalog will
|
---|
37 | * be created. Format: projects/{project_id_or_number}/locations/{location_id}
|
---|
38 | * @param Catalog $postBody
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | *
|
---|
41 | * @opt_param string catalogId Required. The ID to use for the catalog, which
|
---|
42 | * will become the final component of the catalog's resource name.
|
---|
43 | * @return Catalog
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($parent, Catalog $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], Catalog::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Deletes an existing catalog specified by the catalog ID. (catalogs.delete)
|
---|
54 | *
|
---|
55 | * @param string $name Required. The name of the catalog to delete. Format:
|
---|
56 | * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | * @return Catalog
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function delete($name, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['name' => $name];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('delete', [$params], Catalog::class);
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * Gets the catalog specified by the resource name. (catalogs.get)
|
---|
69 | *
|
---|
70 | * @param string $name Required. The name of the catalog to retrieve. Format:
|
---|
71 | * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | * @return Catalog
|
---|
74 | * @throws \Google\Service\Exception
|
---|
75 | */
|
---|
76 | public function get($name, $optParams = [])
|
---|
77 | {
|
---|
78 | $params = ['name' => $name];
|
---|
79 | $params = array_merge($params, $optParams);
|
---|
80 | return $this->call('get', [$params], Catalog::class);
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * List all catalogs in a specified project.
|
---|
84 | * (catalogs.listProjectsLocationsCatalogs)
|
---|
85 | *
|
---|
86 | * @param string $parent Required. The parent, which owns this collection of
|
---|
87 | * catalogs. Format: projects/{project_id_or_number}/locations/{location_id}
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | *
|
---|
90 | * @opt_param int pageSize The maximum number of catalogs to return. The service
|
---|
91 | * may return fewer than this value. If unspecified, at most 50 catalogs will be
|
---|
92 | * returned. The maximum value is 1000; values above 1000 will be coerced to
|
---|
93 | * 1000.
|
---|
94 | * @opt_param string pageToken A page token, received from a previous
|
---|
95 | * `ListCatalogs` call. Provide this to retrieve the subsequent page. When
|
---|
96 | * paginating, all other parameters provided to `ListCatalogs` must match the
|
---|
97 | * call that provided the page token.
|
---|
98 | * @return ListCatalogsResponse
|
---|
99 | * @throws \Google\Service\Exception
|
---|
100 | */
|
---|
101 | public function listProjectsLocationsCatalogs($parent, $optParams = [])
|
---|
102 | {
|
---|
103 | $params = ['parent' => $parent];
|
---|
104 | $params = array_merge($params, $optParams);
|
---|
105 | return $this->call('list', [$params], ListCatalogsResponse::class);
|
---|
106 | }
|
---|
107 | }
|
---|
108 |
|
---|
109 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
110 | class_alias(ProjectsLocationsCatalogs::class, 'Google_Service_BigLakeService_Resource_ProjectsLocationsCatalogs');
|
---|