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\GoogleCloudDataplexV1ListPartitionsResponse; 22use Google\Service\CloudDataplex\GoogleCloudDataplexV1Partition; 23 24/** 25 * The "partitions" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $dataplexService = new Google\Service\CloudDataplex(...); 29 * $partitions = $dataplexService->partitions; 30 * </code> 31 */ 32class ProjectsLocationsLakesZonesEntitiesPartitions extends \Google\Service\Resource 33{ 34 /** 35 * Create a metadata partition. (partitions.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}/en 39 * tities/{entity_id}. 40 * @param GoogleCloudDataplexV1Partition $postBody 41 * @param array $optParams Optional parameters. 42 * 43 * @opt_param bool validateOnly Optional. Only validate the request, but do not 44 * perform mutations. The default is false. 45 * @return GoogleCloudDataplexV1Partition 46 */ 47 public function create($parent, GoogleCloudDataplexV1Partition $postBody, $optParams = []) 48 { 49 $params = ['parent' => $parent, 'postBody' => $postBody]; 50 $params = array_merge($params, $optParams); 51 return $this->call('create', [$params], GoogleCloudDataplexV1Partition::class); 52 } 53 /** 54 * Delete a metadata partition. (partitions.delete) 55 * 56 * @param string $name Required. The resource name of the partition. format: pro 57 * jects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id 58 * }/entities/{entity_id}/partitions/{partition_value_path}. The 59 * {partition_value_path} segment consists of an ordered sequence of partition 60 * values separated by "/". All values must be provided. 61 * @param array $optParams Optional parameters. 62 * 63 * @opt_param string etag Optional. The etag associated with the partition. 64 * @return DataplexEmpty 65 */ 66 public function delete($name, $optParams = []) 67 { 68 $params = ['name' => $name]; 69 $params = array_merge($params, $optParams); 70 return $this->call('delete', [$params], DataplexEmpty::class); 71 } 72 /** 73 * Get a metadata partition of an entity. (partitions.get) 74 * 75 * @param string $name Required. The resource name of the partition: projects/{p 76 * roject_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entiti 77 * es/{entity_id}/partitions/{partition_value_path}. The {partition_value_path} 78 * segment consists of an ordered sequence of partition values separated by "/". 79 * All values must be provided. 80 * @param array $optParams Optional parameters. 81 * @return GoogleCloudDataplexV1Partition 82 */ 83 public function get($name, $optParams = []) 84 { 85 $params = ['name' => $name]; 86 $params = array_merge($params, $optParams); 87 return $this->call('get', [$params], GoogleCloudDataplexV1Partition::class); 88 } 89 /** 90 * List metadata partitions of an entity. 91 * (partitions.listProjectsLocationsLakesZonesEntitiesPartitions) 92 * 93 * @param string $parent Required. The resource name of the parent entity: proje 94 * cts/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/ 95 * entities/{entity_id}. 96 * @param array $optParams Optional parameters. 97 * 98 * @opt_param string filter Optional. Filter the partitions returned to the 99 * caller using a key value pair expression. Supported operators and syntax: 100 * logic operators: AND, OR comparison operators: <, >, >=, <= ,=, != LIKE 101 * operators: The right hand of a LIKE operator supports "." and "*" for 102 * wildcard searches, for example "value1 LIKE ".*oo.*" parenthetical grouping: 103 * ( )Sample filter expression: `?filter="key1 < value1 OR key2 > value2"Notes: 104 * Keys to the left of operators are case insensitive. Partition results are 105 * sorted first by creation time, then by lexicographic order. Up to 20 key 106 * value filter pairs are allowed, but due to performance considerations, only 107 * the first 10 will be used as a filter. 108 * @opt_param int pageSize Optional. Maximum number of partitions to return. The 109 * service may return fewer than this value. If unspecified, 100 partitions will 110 * be returned by default. The maximum page size is 500; larger values will will 111 * be truncated to 500. 112 * @opt_param string pageToken Optional. Page token received from a previous 113 * ListPartitions call. Provide this to retrieve the subsequent page. When 114 * paginating, all other parameters provided to ListPartitions must match the 115 * call that provided the page token. 116 * @return GoogleCloudDataplexV1ListPartitionsResponse 117 */ 118 public function listProjectsLocationsLakesZonesEntitiesPartitions($parent, $optParams = []) 119 { 120 $params = ['parent' => $parent]; 121 $params = array_merge($params, $optParams); 122 return $this->call('list', [$params], GoogleCloudDataplexV1ListPartitionsResponse::class); 123 } 124} 125 126// Adding a class alias for backwards compatibility with the previous class name. 127class_alias(ProjectsLocationsLakesZonesEntitiesPartitions::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsLakesZonesEntitiesPartitions'); 128