source: vendor/google/apiclient-services/src/Contentwarehouse/Resource/ProjectsLocationsDocumentSchemas.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload new project files

  • Property mode set to 100644
File size: 5.7 KB
Line 
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\Contentwarehouse\Resource;
19
20use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1DocumentSchema;
21use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1ListDocumentSchemasResponse;
22use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest;
23use Google\Service\Contentwarehouse\GoogleProtobufEmpty;
24
25/**
26 * The "documentSchemas" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $contentwarehouseService = new Google\Service\Contentwarehouse(...);
30 * $documentSchemas = $contentwarehouseService->projects_locations_documentSchemas;
31 * </code>
32 */
33class ProjectsLocationsDocumentSchemas extends \Google\Service\Resource
34{
35 /**
36 * Creates a document schema. (documentSchemas.create)
37 *
38 * @param string $parent Required. The parent name.
39 * @param GoogleCloudContentwarehouseV1DocumentSchema $postBody
40 * @param array $optParams Optional parameters.
41 * @return GoogleCloudContentwarehouseV1DocumentSchema
42 * @throws \Google\Service\Exception
43 */
44 public function create($parent, GoogleCloudContentwarehouseV1DocumentSchema $postBody, $optParams = [])
45 {
46 $params = ['parent' => $parent, 'postBody' => $postBody];
47 $params = array_merge($params, $optParams);
48 return $this->call('create', [$params], GoogleCloudContentwarehouseV1DocumentSchema::class);
49 }
50 /**
51 * Deletes a document schema. Returns NOT_FOUND if the document schema does not
52 * exist. Returns BAD_REQUEST if the document schema has documents depending on
53 * it. (documentSchemas.delete)
54 *
55 * @param string $name Required. The name of the document schema to delete.
56 * @param array $optParams Optional parameters.
57 * @return GoogleProtobufEmpty
58 * @throws \Google\Service\Exception
59 */
60 public function delete($name, $optParams = [])
61 {
62 $params = ['name' => $name];
63 $params = array_merge($params, $optParams);
64 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
65 }
66 /**
67 * Gets a document schema. Returns NOT_FOUND if the document schema does not
68 * exist. (documentSchemas.get)
69 *
70 * @param string $name Required. The name of the document schema to retrieve.
71 * @param array $optParams Optional parameters.
72 * @return GoogleCloudContentwarehouseV1DocumentSchema
73 * @throws \Google\Service\Exception
74 */
75 public function get($name, $optParams = [])
76 {
77 $params = ['name' => $name];
78 $params = array_merge($params, $optParams);
79 return $this->call('get', [$params], GoogleCloudContentwarehouseV1DocumentSchema::class);
80 }
81 /**
82 * Lists document schemas.
83 * (documentSchemas.listProjectsLocationsDocumentSchemas)
84 *
85 * @param string $parent Required. The parent, which owns this collection of
86 * document schemas. Format: projects/{project_number}/locations/{location}.
87 * @param array $optParams Optional parameters.
88 *
89 * @opt_param int pageSize The maximum number of document schemas to return. The
90 * service may return fewer than this value. If unspecified, at most 50 document
91 * schemas will be returned. The maximum value is 1000; values above 1000 will
92 * be coerced to 1000.
93 * @opt_param string pageToken A page token, received from a previous
94 * `ListDocumentSchemas` call. Provide this to retrieve the subsequent page.
95 * When paginating, all other parameters provided to `ListDocumentSchemas` must
96 * match the call that provided the page token.
97 * @return GoogleCloudContentwarehouseV1ListDocumentSchemasResponse
98 * @throws \Google\Service\Exception
99 */
100 public function listProjectsLocationsDocumentSchemas($parent, $optParams = [])
101 {
102 $params = ['parent' => $parent];
103 $params = array_merge($params, $optParams);
104 return $this->call('list', [$params], GoogleCloudContentwarehouseV1ListDocumentSchemasResponse::class);
105 }
106 /**
107 * Updates a Document Schema. Returns INVALID_ARGUMENT if the name of the
108 * Document Schema is non-empty and does not equal the existing name. Supports
109 * only appending new properties, adding new ENUM possible values, and updating
110 * the EnumTypeOptions.validation_check_disabled flag for ENUM possible values.
111 * Updating existing properties will result into INVALID_ARGUMENT.
112 * (documentSchemas.patch)
113 *
114 * @param string $name Required. The name of the document schema to update.
115 * Format: projects/{project_number}/locations/{location}/documentSchemas/{docum
116 * ent_schema_id}.
117 * @param GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest $postBody
118 * @param array $optParams Optional parameters.
119 * @return GoogleCloudContentwarehouseV1DocumentSchema
120 * @throws \Google\Service\Exception
121 */
122 public function patch($name, GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest $postBody, $optParams = [])
123 {
124 $params = ['name' => $name, 'postBody' => $postBody];
125 $params = array_merge($params, $optParams);
126 return $this->call('patch', [$params], GoogleCloudContentwarehouseV1DocumentSchema::class);
127 }
128}
129
130// Adding a class alias for backwards compatibility with the previous class name.
131class_alias(ProjectsLocationsDocumentSchemas::class, 'Google_Service_Contentwarehouse_Resource_ProjectsLocationsDocumentSchemas');
Note: See TracBrowser for help on using the repository browser.