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\GoogleCloudDataplexV1Content; 22use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListContentResponse; 23 24/** 25 * The "contentitems" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $dataplexService = new Google\Service\CloudDataplex(...); 29 * $contentitems = $dataplexService->contentitems; 30 * </code> 31 */ 32class ProjectsLocationsLakesContentitems extends \Google\Service\Resource 33{ 34 /** 35 * Create a content. (contentitems.create) 36 * 37 * @param string $parent Required. The resource name of the parent lake: 38 * projects/{project_id}/locations/{location_id}/lakes/{lake_id} 39 * @param GoogleCloudDataplexV1Content $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 GoogleCloudDataplexV1Content 45 */ 46 public function create($parent, GoogleCloudDataplexV1Content $postBody, $optParams = []) 47 { 48 $params = ['parent' => $parent, 'postBody' => $postBody]; 49 $params = array_merge($params, $optParams); 50 return $this->call('create', [$params], GoogleCloudDataplexV1Content::class); 51 } 52 /** 53 * Delete a content. (contentitems.delete) 54 * 55 * @param string $name Required. The resource name of the content: projects/{pro 56 * ject_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} 57 * @param array $optParams Optional parameters. 58 * @return DataplexEmpty 59 */ 60 public function delete($name, $optParams = []) 61 { 62 $params = ['name' => $name]; 63 $params = array_merge($params, $optParams); 64 return $this->call('delete', [$params], DataplexEmpty::class); 65 } 66 /** 67 * Get a content resource. (contentitems.get) 68 * 69 * @param string $name Required. The resource name of the content: projects/{pro 70 * ject_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} 71 * @param array $optParams Optional parameters. 72 * 73 * @opt_param string view Optional. Specify content view to make a partial 74 * request. 75 * @return GoogleCloudDataplexV1Content 76 */ 77 public function get($name, $optParams = []) 78 { 79 $params = ['name' => $name]; 80 $params = array_merge($params, $optParams); 81 return $this->call('get', [$params], GoogleCloudDataplexV1Content::class); 82 } 83 /** 84 * List content. (contentitems.listProjectsLocationsLakesContentitems) 85 * 86 * @param string $parent Required. The resource name of the parent lake: 87 * projects/{project_id}/locations/{location_id}/lakes/{lake_id} 88 * @param array $optParams Optional parameters. 89 * 90 * @opt_param string filter Optional. Filter request. Filters are case- 91 * sensitive. The following formats are supported:labels.key1 = "value1" 92 * labels:key1 type = "NOTEBOOK" type = "SQL_SCRIPT"These restrictions can be 93 * coinjoined with AND, OR and NOT conjunctions. 94 * @opt_param int pageSize Optional. Maximum number of content to return. The 95 * service may return fewer than this value. If unspecified, at most 10 content 96 * will be returned. The maximum value is 1000; values above 1000 will be 97 * coerced to 1000. 98 * @opt_param string pageToken Optional. Page token received from a previous 99 * ListContent call. Provide this to retrieve the subsequent page. When 100 * paginating, all other parameters provided to ListContent must match the call 101 * that provided the page token. 102 * @return GoogleCloudDataplexV1ListContentResponse 103 */ 104 public function listProjectsLocationsLakesContentitems($parent, $optParams = []) 105 { 106 $params = ['parent' => $parent]; 107 $params = array_merge($params, $optParams); 108 return $this->call('list', [$params], GoogleCloudDataplexV1ListContentResponse::class); 109 } 110 /** 111 * Update a content. Only supports full resource update. (contentitems.patch) 112 * 113 * @param string $name Output only. The relative resource name of the content, 114 * of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/co 115 * ntent/{content_id} 116 * @param GoogleCloudDataplexV1Content $postBody 117 * @param array $optParams Optional parameters. 118 * 119 * @opt_param string updateMask Required. Mask of fields to update. 120 * @opt_param bool validateOnly Optional. Only validate the request, but do not 121 * perform mutations. The default is false. 122 * @return GoogleCloudDataplexV1Content 123 */ 124 public function patch($name, GoogleCloudDataplexV1Content $postBody, $optParams = []) 125 { 126 $params = ['name' => $name, 'postBody' => $postBody]; 127 $params = array_merge($params, $optParams); 128 return $this->call('patch', [$params], GoogleCloudDataplexV1Content::class); 129 } 130} 131 132// Adding a class alias for backwards compatibility with the previous class name. 133class_alias(ProjectsLocationsLakesContentitems::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsLakesContentitems'); 134