source: vendor/google/apiclient-services/src/Translate/Resource/ProjectsLocationsGlossariesGlossaryEntries.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 4.6 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\Translate\Resource;
19
20use Google\Service\Translate\GlossaryEntry;
21use Google\Service\Translate\ListGlossaryEntriesResponse;
22use Google\Service\Translate\TranslateEmpty;
23
24/**
25 * The "glossaryEntries" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $translateService = new Google\Service\Translate(...);
29 * $glossaryEntries = $translateService->projects_locations_glossaries_glossaryEntries;
30 * </code>
31 */
32class ProjectsLocationsGlossariesGlossaryEntries extends \Google\Service\Resource
33{
34 /**
35 * Creates a glossary entry. (glossaryEntries.create)
36 *
37 * @param string $parent Required. The resource name of the glossary to create
38 * the entry under.
39 * @param GlossaryEntry $postBody
40 * @param array $optParams Optional parameters.
41 * @return GlossaryEntry
42 * @throws \Google\Service\Exception
43 */
44 public function create($parent, GlossaryEntry $postBody, $optParams = [])
45 {
46 $params = ['parent' => $parent, 'postBody' => $postBody];
47 $params = array_merge($params, $optParams);
48 return $this->call('create', [$params], GlossaryEntry::class);
49 }
50 /**
51 * Deletes a single entry from the glossary (glossaryEntries.delete)
52 *
53 * @param string $name Required. The resource name of the glossary entry to
54 * delete
55 * @param array $optParams Optional parameters.
56 * @return TranslateEmpty
57 * @throws \Google\Service\Exception
58 */
59 public function delete($name, $optParams = [])
60 {
61 $params = ['name' => $name];
62 $params = array_merge($params, $optParams);
63 return $this->call('delete', [$params], TranslateEmpty::class);
64 }
65 /**
66 * Gets a single glossary entry by the given id. (glossaryEntries.get)
67 *
68 * @param string $name Required. The resource name of the glossary entry to get
69 * @param array $optParams Optional parameters.
70 * @return GlossaryEntry
71 * @throws \Google\Service\Exception
72 */
73 public function get($name, $optParams = [])
74 {
75 $params = ['name' => $name];
76 $params = array_merge($params, $optParams);
77 return $this->call('get', [$params], GlossaryEntry::class);
78 }
79 /**
80 * List the entries for the glossary.
81 * (glossaryEntries.listProjectsLocationsGlossariesGlossaryEntries)
82 *
83 * @param string $parent Required. The parent glossary resource name for listing
84 * the glossary's entries.
85 * @param array $optParams Optional parameters.
86 *
87 * @opt_param int pageSize Optional. Requested page size. The server may return
88 * fewer glossary entries than requested. If unspecified, the server picks an
89 * appropriate default.
90 * @opt_param string pageToken Optional. A token identifying a page of results
91 * the server should return. Typically, this is the value of
92 * [ListGlossaryEntriesResponse.next_page_token] returned from the previous
93 * call. The first page is returned if `page_token`is empty or missing.
94 * @return ListGlossaryEntriesResponse
95 * @throws \Google\Service\Exception
96 */
97 public function listProjectsLocationsGlossariesGlossaryEntries($parent, $optParams = [])
98 {
99 $params = ['parent' => $parent];
100 $params = array_merge($params, $optParams);
101 return $this->call('list', [$params], ListGlossaryEntriesResponse::class);
102 }
103 /**
104 * Updates a glossary entry. (glossaryEntries.patch)
105 *
106 * @param string $name Identifier. The resource name of the entry. Format:
107 * `projects/locations/glossaries/glossaryEntries`
108 * @param GlossaryEntry $postBody
109 * @param array $optParams Optional parameters.
110 * @return GlossaryEntry
111 * @throws \Google\Service\Exception
112 */
113 public function patch($name, GlossaryEntry $postBody, $optParams = [])
114 {
115 $params = ['name' => $name, 'postBody' => $postBody];
116 $params = array_merge($params, $optParams);
117 return $this->call('patch', [$params], GlossaryEntry::class);
118 }
119}
120
121// Adding a class alias for backwards compatibility with the previous class name.
122class_alias(ProjectsLocationsGlossariesGlossaryEntries::class, 'Google_Service_Translate_Resource_ProjectsLocationsGlossariesGlossaryEntries');
Note: See TracBrowser for help on using the repository browser.