source: vendor/google/apiclient-services/src/Dialogflow/Resource/ProjectsLocationsAgentsGenerators.php

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

Upload 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\Dialogflow\Resource;
19
20use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Generator;
21use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListGeneratorsResponse;
22use Google\Service\Dialogflow\GoogleProtobufEmpty;
23
24/**
25 * The "generators" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $dialogflowService = new Google\Service\Dialogflow(...);
29 * $generators = $dialogflowService->projects_locations_agents_generators;
30 * </code>
31 */
32class ProjectsLocationsAgentsGenerators extends \Google\Service\Resource
33{
34 /**
35 * Creates a generator in the specified agent. (generators.create)
36 *
37 * @param string $parent Required. The agent to create a generator for. Format:
38 * `projects//locations//agents/`.
39 * @param GoogleCloudDialogflowCxV3Generator $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string languageCode The language to create generators for the
43 * following fields: * `Generator.prompt_text.text` If not specified, the
44 * agent's default language is used.
45 * @return GoogleCloudDialogflowCxV3Generator
46 * @throws \Google\Service\Exception
47 */
48 public function create($parent, GoogleCloudDialogflowCxV3Generator $postBody, $optParams = [])
49 {
50 $params = ['parent' => $parent, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], GoogleCloudDialogflowCxV3Generator::class);
53 }
54 /**
55 * Deletes the specified generators. (generators.delete)
56 *
57 * @param string $name Required. The name of the generator to delete. Format:
58 * `projects//locations//agents//generators/`.
59 * @param array $optParams Optional parameters.
60 *
61 * @opt_param bool force This field has no effect for generators not being used.
62 * For generators that are used by pages/flows/transition route groups: * If
63 * `force` is set to false, an error will be returned with message indicating
64 * the referenced resources. * If `force` is set to true, Dialogflow will remove
65 * the generator, as well as any references to the generator (i.e. Generator) in
66 * fulfillments.
67 * @return GoogleProtobufEmpty
68 * @throws \Google\Service\Exception
69 */
70 public function delete($name, $optParams = [])
71 {
72 $params = ['name' => $name];
73 $params = array_merge($params, $optParams);
74 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
75 }
76 /**
77 * Retrieves the specified generator. (generators.get)
78 *
79 * @param string $name Required. The name of the generator. Format:
80 * `projects//locations//agents//generators/`.
81 * @param array $optParams Optional parameters.
82 *
83 * @opt_param string languageCode The language to list generators for.
84 * @return GoogleCloudDialogflowCxV3Generator
85 * @throws \Google\Service\Exception
86 */
87 public function get($name, $optParams = [])
88 {
89 $params = ['name' => $name];
90 $params = array_merge($params, $optParams);
91 return $this->call('get', [$params], GoogleCloudDialogflowCxV3Generator::class);
92 }
93 /**
94 * Returns the list of all generators in the specified agent.
95 * (generators.listProjectsLocationsAgentsGenerators)
96 *
97 * @param string $parent Required. The agent to list all generators for. Format:
98 * `projects//locations//agents/`.
99 * @param array $optParams Optional parameters.
100 *
101 * @opt_param string languageCode The language to list generators for.
102 * @opt_param int pageSize The maximum number of items to return in a single
103 * page. By default 100 and at most 1000.
104 * @opt_param string pageToken The next_page_token value returned from a
105 * previous list request.
106 * @return GoogleCloudDialogflowCxV3ListGeneratorsResponse
107 * @throws \Google\Service\Exception
108 */
109 public function listProjectsLocationsAgentsGenerators($parent, $optParams = [])
110 {
111 $params = ['parent' => $parent];
112 $params = array_merge($params, $optParams);
113 return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListGeneratorsResponse::class);
114 }
115 /**
116 * Update the specified generator. (generators.patch)
117 *
118 * @param string $name The unique identifier of the generator. Must be set for
119 * the Generators.UpdateGenerator method. Generators.CreateGenerate populates
120 * the name automatically. Format: `projects//locations//agents//generators/`.
121 * @param GoogleCloudDialogflowCxV3Generator $postBody
122 * @param array $optParams Optional parameters.
123 *
124 * @opt_param string languageCode The language to list generators for.
125 * @opt_param string updateMask The mask to control which fields get updated. If
126 * the mask is not present, all fields will be updated.
127 * @return GoogleCloudDialogflowCxV3Generator
128 * @throws \Google\Service\Exception
129 */
130 public function patch($name, GoogleCloudDialogflowCxV3Generator $postBody, $optParams = [])
131 {
132 $params = ['name' => $name, 'postBody' => $postBody];
133 $params = array_merge($params, $optParams);
134 return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Generator::class);
135 }
136}
137
138// Adding a class alias for backwards compatibility with the previous class name.
139class_alias(ProjectsLocationsAgentsGenerators::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsGenerators');
Note: See TracBrowser for help on using the repository browser.