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\CloudDataplex\Resource;
19
20use Google\Service\CloudDataplex\DataplexEmpty;
21use Google\Service\CloudDataplex\GoogleCloudDataplexV1Entity;
22use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListEntitiesResponse;
23
24/**
25 * The "entities" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $dataplexService = new Google\Service\CloudDataplex(...);
29 *   $entities = $dataplexService->entities;
30 *  </code>
31 */
32class ProjectsLocationsLakesZonesEntities extends \Google\Service\Resource
33{
34  /**
35   * Create a metadata entity. (entities.create)
36   *
37   * @param string $parent Required. The resource name of the parent zone: project
38   * s/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.
39   * @param GoogleCloudDataplexV1Entity $postBody
40   * @param array $optParams Optional parameters.
41   *
42   * @opt_param bool validateOnly Optional. Only validate the request, but do not
43   * perform mutations. The default is false.
44   * @return GoogleCloudDataplexV1Entity
45   */
46  public function create($parent, GoogleCloudDataplexV1Entity $postBody, $optParams = [])
47  {
48    $params = ['parent' => $parent, 'postBody' => $postBody];
49    $params = array_merge($params, $optParams);
50    return $this->call('create', [$params], GoogleCloudDataplexV1Entity::class);
51  }
52  /**
53   * Delete a metadata entity. (entities.delete)
54   *
55   * @param string $name Required. The resource name of the entity: projects/{proj
56   * ect_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/
57   * {entity_id}.
58   * @param array $optParams Optional parameters.
59   *
60   * @opt_param string etag Required. The etag associated with the entity, which
61   * can be retrieved with a GetEntity request.
62   * @return DataplexEmpty
63   */
64  public function delete($name, $optParams = [])
65  {
66    $params = ['name' => $name];
67    $params = array_merge($params, $optParams);
68    return $this->call('delete', [$params], DataplexEmpty::class);
69  }
70  /**
71   * Get a metadata entity. (entities.get)
72   *
73   * @param string $name Required. The resource name of the entity: projects/{proj
74   * ect_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/
75   * {entity_id}.
76   * @param array $optParams Optional parameters.
77   *
78   * @opt_param string view Optional. Used to select the subset of entity
79   * information to return. Defaults to BASIC.
80   * @return GoogleCloudDataplexV1Entity
81   */
82  public function get($name, $optParams = [])
83  {
84    $params = ['name' => $name];
85    $params = array_merge($params, $optParams);
86    return $this->call('get', [$params], GoogleCloudDataplexV1Entity::class);
87  }
88  /**
89   * List metadata entities in a zone.
90   * (entities.listProjectsLocationsLakesZonesEntities)
91   *
92   * @param string $parent Required. The resource name of the parent zone: project
93   * s/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.
94   * @param array $optParams Optional parameters.
95   *
96   * @opt_param string filter Optional. The following filter parameters can be
97   * added to the URL to limit the entities returned by the API: Entity ID:
98   * ?filter="id=entityID" Asset ID: ?filter="asset=assetID" Data path
99   * ?filter="data_path=gs://my-bucket" Is HIVE compatible:
100   * ?filter="hive_compatible=true" Is BigQuery compatible:
101   * ?filter="bigquery_compatible=true"
102   * @opt_param int pageSize Optional. Maximum number of entities to return. The
103   * service may return fewer than this value. If unspecified, 100 entities will
104   * be returned by default. The maximum value is 500; larger values will will be
105   * truncated to 500.
106   * @opt_param string pageToken Optional. Page token received from a previous
107   * ListEntities call. Provide this to retrieve the subsequent page. When
108   * paginating, all other parameters provided to ListEntities must match the call
109   * that provided the page token.
110   * @opt_param string view Required. Specify the entity view to make a partial
111   * list request.
112   * @return GoogleCloudDataplexV1ListEntitiesResponse
113   */
114  public function listProjectsLocationsLakesZonesEntities($parent, $optParams = [])
115  {
116    $params = ['parent' => $parent];
117    $params = array_merge($params, $optParams);
118    return $this->call('list', [$params], GoogleCloudDataplexV1ListEntitiesResponse::class);
119  }
120  /**
121   * Update a metadata entity. Only supports full resource update.
122   * (entities.update)
123   *
124   * @param string $name Output only. The resource name of the entity, of the
125   * form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones
126   * /{zone_id}/entities/{id}.
127   * @param GoogleCloudDataplexV1Entity $postBody
128   * @param array $optParams Optional parameters.
129   *
130   * @opt_param bool validateOnly Optional. Only validate the request, but do not
131   * perform mutations. The default is false.
132   * @return GoogleCloudDataplexV1Entity
133   */
134  public function update($name, GoogleCloudDataplexV1Entity $postBody, $optParams = [])
135  {
136    $params = ['name' => $name, 'postBody' => $postBody];
137    $params = array_merge($params, $optParams);
138    return $this->call('update', [$params], GoogleCloudDataplexV1Entity::class);
139  }
140}
141
142// Adding a class alias for backwards compatibility with the previous class name.
143class_alias(ProjectsLocationsLakesZonesEntities::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsLakesZonesEntities');
144