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 |
|
---|
18 | namespace Google\Service\Dialogflow\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Experiment;
|
---|
21 | use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListExperimentsResponse;
|
---|
22 | use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3StartExperimentRequest;
|
---|
23 | use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3StopExperimentRequest;
|
---|
24 | use Google\Service\Dialogflow\GoogleProtobufEmpty;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "experiments" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $dialogflowService = new Google\Service\Dialogflow(...);
|
---|
31 | * $experiments = $dialogflowService->projects_locations_agents_environments_experiments;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsLocationsAgentsEnvironmentsExperiments extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Creates an Experiment in the specified Environment. (experiments.create)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. The Agent to create an Environment for.
|
---|
40 | * Format: `projects//locations//agents//environments/`.
|
---|
41 | * @param GoogleCloudDialogflowCxV3Experiment $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | * @return GoogleCloudDialogflowCxV3Experiment
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($parent, GoogleCloudDialogflowCxV3Experiment $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], GoogleCloudDialogflowCxV3Experiment::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Deletes the specified Experiment. (experiments.delete)
|
---|
54 | *
|
---|
55 | * @param string $name Required. The name of the Environment to delete. Format:
|
---|
56 | * `projects//locations//agents//environments//experiments/`.
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | * @return GoogleProtobufEmpty
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function delete($name, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['name' => $name];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * Retrieves the specified Experiment. (experiments.get)
|
---|
69 | *
|
---|
70 | * @param string $name Required. The name of the Environment. Format:
|
---|
71 | * `projects//locations//agents//environments//experiments/`.
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | * @return GoogleCloudDialogflowCxV3Experiment
|
---|
74 | * @throws \Google\Service\Exception
|
---|
75 | */
|
---|
76 | public function get($name, $optParams = [])
|
---|
77 | {
|
---|
78 | $params = ['name' => $name];
|
---|
79 | $params = array_merge($params, $optParams);
|
---|
80 | return $this->call('get', [$params], GoogleCloudDialogflowCxV3Experiment::class);
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * Returns the list of all experiments in the specified Environment.
|
---|
84 | * (experiments.listProjectsLocationsAgentsEnvironmentsExperiments)
|
---|
85 | *
|
---|
86 | * @param string $parent Required. The Environment to list all environments for.
|
---|
87 | * Format: `projects//locations//agents//environments/`.
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | *
|
---|
90 | * @opt_param int pageSize The maximum number of items to return in a single
|
---|
91 | * page. By default 20 and at most 100.
|
---|
92 | * @opt_param string pageToken The next_page_token value returned from a
|
---|
93 | * previous list request.
|
---|
94 | * @return GoogleCloudDialogflowCxV3ListExperimentsResponse
|
---|
95 | * @throws \Google\Service\Exception
|
---|
96 | */
|
---|
97 | public function listProjectsLocationsAgentsEnvironmentsExperiments($parent, $optParams = [])
|
---|
98 | {
|
---|
99 | $params = ['parent' => $parent];
|
---|
100 | $params = array_merge($params, $optParams);
|
---|
101 | return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListExperimentsResponse::class);
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * Updates the specified Experiment. (experiments.patch)
|
---|
105 | *
|
---|
106 | * @param string $name The name of the experiment. Format:
|
---|
107 | * projects//locations//agents//environments//experiments/.
|
---|
108 | * @param GoogleCloudDialogflowCxV3Experiment $postBody
|
---|
109 | * @param array $optParams Optional parameters.
|
---|
110 | *
|
---|
111 | * @opt_param string updateMask Required. The mask to control which fields get
|
---|
112 | * updated.
|
---|
113 | * @return GoogleCloudDialogflowCxV3Experiment
|
---|
114 | * @throws \Google\Service\Exception
|
---|
115 | */
|
---|
116 | public function patch($name, GoogleCloudDialogflowCxV3Experiment $postBody, $optParams = [])
|
---|
117 | {
|
---|
118 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
119 | $params = array_merge($params, $optParams);
|
---|
120 | return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Experiment::class);
|
---|
121 | }
|
---|
122 | /**
|
---|
123 | * Starts the specified Experiment. This rpc only changes the state of
|
---|
124 | * experiment from PENDING to RUNNING. (experiments.start)
|
---|
125 | *
|
---|
126 | * @param string $name Required. Resource name of the experiment to start.
|
---|
127 | * Format: `projects//locations//agents//environments//experiments/`.
|
---|
128 | * @param GoogleCloudDialogflowCxV3StartExperimentRequest $postBody
|
---|
129 | * @param array $optParams Optional parameters.
|
---|
130 | * @return GoogleCloudDialogflowCxV3Experiment
|
---|
131 | * @throws \Google\Service\Exception
|
---|
132 | */
|
---|
133 | public function start($name, GoogleCloudDialogflowCxV3StartExperimentRequest $postBody, $optParams = [])
|
---|
134 | {
|
---|
135 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
136 | $params = array_merge($params, $optParams);
|
---|
137 | return $this->call('start', [$params], GoogleCloudDialogflowCxV3Experiment::class);
|
---|
138 | }
|
---|
139 | /**
|
---|
140 | * Stops the specified Experiment. This rpc only changes the state of experiment
|
---|
141 | * from RUNNING to DONE. (experiments.stop)
|
---|
142 | *
|
---|
143 | * @param string $name Required. Resource name of the experiment to stop.
|
---|
144 | * Format: `projects//locations//agents//environments//experiments/`.
|
---|
145 | * @param GoogleCloudDialogflowCxV3StopExperimentRequest $postBody
|
---|
146 | * @param array $optParams Optional parameters.
|
---|
147 | * @return GoogleCloudDialogflowCxV3Experiment
|
---|
148 | * @throws \Google\Service\Exception
|
---|
149 | */
|
---|
150 | public function stop($name, GoogleCloudDialogflowCxV3StopExperimentRequest $postBody, $optParams = [])
|
---|
151 | {
|
---|
152 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
153 | $params = array_merge($params, $optParams);
|
---|
154 | return $this->call('stop', [$params], GoogleCloudDialogflowCxV3Experiment::class);
|
---|
155 | }
|
---|
156 | }
|
---|
157 |
|
---|
158 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
159 | class_alias(ProjectsLocationsAgentsEnvironmentsExperiments::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEnvironmentsExperiments');
|
---|