source: vendor/google/apiclient-services/src/Dialogflow/Resource/ProjectsLocationsAgentsFlowsVersions.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: 7.5 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\GoogleCloudDialogflowCxV3CompareVersionsRequest;
21use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3CompareVersionsResponse;
22use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListVersionsResponse;
23use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3LoadVersionRequest;
24use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Version;
25use Google\Service\Dialogflow\GoogleLongrunningOperation;
26use Google\Service\Dialogflow\GoogleProtobufEmpty;
27
28/**
29 * The "versions" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $dialogflowService = new Google\Service\Dialogflow(...);
33 * $versions = $dialogflowService->projects_locations_agents_flows_versions;
34 * </code>
35 */
36class ProjectsLocationsAgentsFlowsVersions extends \Google\Service\Resource
37{
38 /**
39 * Compares the specified base version with target version.
40 * (versions.compareVersions)
41 *
42 * @param string $baseVersion Required. Name of the base flow version to compare
43 * with the target version. Use version ID `0` to indicate the draft version of
44 * the specified flow. Format: `projects//locations//agents//flows//versions/`.
45 * @param GoogleCloudDialogflowCxV3CompareVersionsRequest $postBody
46 * @param array $optParams Optional parameters.
47 * @return GoogleCloudDialogflowCxV3CompareVersionsResponse
48 * @throws \Google\Service\Exception
49 */
50 public function compareVersions($baseVersion, GoogleCloudDialogflowCxV3CompareVersionsRequest $postBody, $optParams = [])
51 {
52 $params = ['baseVersion' => $baseVersion, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('compareVersions', [$params], GoogleCloudDialogflowCxV3CompareVersionsResponse::class);
55 }
56 /**
57 * Creates a Version in the specified Flow. This method is a [long-running
58 * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
59 * operation). The returned `Operation` type has the following method-specific
60 * fields: - `metadata`: CreateVersionOperationMetadata - `response`: Version
61 * (versions.create)
62 *
63 * @param string $parent Required. The Flow to create an Version for. Format:
64 * `projects//locations//agents//flows/`.
65 * @param GoogleCloudDialogflowCxV3Version $postBody
66 * @param array $optParams Optional parameters.
67 * @return GoogleLongrunningOperation
68 * @throws \Google\Service\Exception
69 */
70 public function create($parent, GoogleCloudDialogflowCxV3Version $postBody, $optParams = [])
71 {
72 $params = ['parent' => $parent, 'postBody' => $postBody];
73 $params = array_merge($params, $optParams);
74 return $this->call('create', [$params], GoogleLongrunningOperation::class);
75 }
76 /**
77 * Deletes the specified Version. (versions.delete)
78 *
79 * @param string $name Required. The name of the Version to delete. Format:
80 * `projects//locations//agents//flows//versions/`.
81 * @param array $optParams Optional parameters.
82 * @return GoogleProtobufEmpty
83 * @throws \Google\Service\Exception
84 */
85 public function delete($name, $optParams = [])
86 {
87 $params = ['name' => $name];
88 $params = array_merge($params, $optParams);
89 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
90 }
91 /**
92 * Retrieves the specified Version. (versions.get)
93 *
94 * @param string $name Required. The name of the Version. Format:
95 * `projects//locations//agents//flows//versions/`.
96 * @param array $optParams Optional parameters.
97 * @return GoogleCloudDialogflowCxV3Version
98 * @throws \Google\Service\Exception
99 */
100 public function get($name, $optParams = [])
101 {
102 $params = ['name' => $name];
103 $params = array_merge($params, $optParams);
104 return $this->call('get', [$params], GoogleCloudDialogflowCxV3Version::class);
105 }
106 /**
107 * Returns the list of all versions in the specified Flow.
108 * (versions.listProjectsLocationsAgentsFlowsVersions)
109 *
110 * @param string $parent Required. The Flow to list all versions for. Format:
111 * `projects//locations//agents//flows/`.
112 * @param array $optParams Optional parameters.
113 *
114 * @opt_param int pageSize The maximum number of items to return in a single
115 * page. By default 20 and at most 100.
116 * @opt_param string pageToken The next_page_token value returned from a
117 * previous list request.
118 * @return GoogleCloudDialogflowCxV3ListVersionsResponse
119 * @throws \Google\Service\Exception
120 */
121 public function listProjectsLocationsAgentsFlowsVersions($parent, $optParams = [])
122 {
123 $params = ['parent' => $parent];
124 $params = array_merge($params, $optParams);
125 return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListVersionsResponse::class);
126 }
127 /**
128 * Loads resources in the specified version to the draft flow. This method is a
129 * [long-running
130 * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
131 * operation). The returned `Operation` type has the following method-specific
132 * fields: - `metadata`: An empty [Struct
133 * message](https://developers.google.com/protocol-
134 * buffers/docs/reference/google.protobuf#struct) - `response`: An [Empty
135 * message](https://developers.google.com/protocol-
136 * buffers/docs/reference/google.protobuf#empty) (versions.load)
137 *
138 * @param string $name Required. The Version to be loaded to draft flow. Format:
139 * `projects//locations//agents//flows//versions/`.
140 * @param GoogleCloudDialogflowCxV3LoadVersionRequest $postBody
141 * @param array $optParams Optional parameters.
142 * @return GoogleLongrunningOperation
143 * @throws \Google\Service\Exception
144 */
145 public function load($name, GoogleCloudDialogflowCxV3LoadVersionRequest $postBody, $optParams = [])
146 {
147 $params = ['name' => $name, 'postBody' => $postBody];
148 $params = array_merge($params, $optParams);
149 return $this->call('load', [$params], GoogleLongrunningOperation::class);
150 }
151 /**
152 * Updates the specified Version. (versions.patch)
153 *
154 * @param string $name Format: projects//locations//agents//flows//versions/.
155 * Version ID is a self-increasing number generated by Dialogflow upon version
156 * creation.
157 * @param GoogleCloudDialogflowCxV3Version $postBody
158 * @param array $optParams Optional parameters.
159 *
160 * @opt_param string updateMask Required. The mask to control which fields get
161 * updated. Currently only `description` and `display_name` can be updated.
162 * @return GoogleCloudDialogflowCxV3Version
163 * @throws \Google\Service\Exception
164 */
165 public function patch($name, GoogleCloudDialogflowCxV3Version $postBody, $optParams = [])
166 {
167 $params = ['name' => $name, 'postBody' => $postBody];
168 $params = array_merge($params, $optParams);
169 return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Version::class);
170 }
171}
172
173// Adding a class alias for backwards compatibility with the previous class name.
174class_alias(ProjectsLocationsAgentsFlowsVersions::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsFlowsVersions');
Note: See TracBrowser for help on using the repository browser.