PageRenderTime 26ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/google/apiclient-services/src/Dialogflow/Resource/ProjectsLocationsAgentsFlowsTransitionRouteGroups.php

https://gitlab.com/Japang-Jawara/jawara-penilaian
PHP | 169 lines | 39 code | 4 blank | 126 comment | 0 complexity | 6197557f18205c156dc6aa47e5840416 MD5 | raw file
  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. namespace Google\Service\Dialogflow\Resource;
  18. use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse;
  19. use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3TransitionRouteGroup;
  20. use Google\Service\Dialogflow\GoogleProtobufEmpty;
  21. /**
  22. * The "transitionRouteGroups" collection of methods.
  23. * Typical usage is:
  24. * <code>
  25. * $dialogflowService = new Google\Service\Dialogflow(...);
  26. * $transitionRouteGroups = $dialogflowService->transitionRouteGroups;
  27. * </code>
  28. */
  29. class ProjectsLocationsAgentsFlowsTransitionRouteGroups extends \Google\Service\Resource
  30. {
  31. /**
  32. * Creates an TransitionRouteGroup in the specified flow. Note: You should
  33. * always train a flow prior to sending it queries. See the [training
  34. * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
  35. * (transitionRouteGroups.create)
  36. *
  37. * @param string $parent Required. The flow to create an TransitionRouteGroup
  38. * for. Format: `projects//locations//agents//flows/`.
  39. * @param GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody
  40. * @param array $optParams Optional parameters.
  41. *
  42. * @opt_param string languageCode The language of the following fields in
  43. * `TransitionRouteGroup`: *
  44. * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
  45. * sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
  46. * not specified, the agent's default language is used. [Many
  47. * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  48. * are supported. Note: languages must be enabled in the agent before they can
  49. * be used.
  50. * @return GoogleCloudDialogflowCxV3TransitionRouteGroup
  51. */
  52. public function create($parent, GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody, $optParams = [])
  53. {
  54. $params = ['parent' => $parent, 'postBody' => $postBody];
  55. $params = array_merge($params, $optParams);
  56. return $this->call('create', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
  57. }
  58. /**
  59. * Deletes the specified TransitionRouteGroup. Note: You should always train a
  60. * flow prior to sending it queries. See the [training
  61. * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
  62. * (transitionRouteGroups.delete)
  63. *
  64. * @param string $name Required. The name of the TransitionRouteGroup to delete.
  65. * Format: `projects//locations//agents//flows//transitionRouteGroups/`.
  66. * @param array $optParams Optional parameters.
  67. *
  68. * @opt_param bool force This field has no effect for transition route group
  69. * that no page is using. If the transition route group is referenced by any
  70. * page: * If `force` is set to false, an error will be returned with message
  71. * indicating pages that reference the transition route group. * If `force` is
  72. * set to true, Dialogflow will remove the transition route group, as well as
  73. * any reference to it.
  74. * @return GoogleProtobufEmpty
  75. */
  76. public function delete($name, $optParams = [])
  77. {
  78. $params = ['name' => $name];
  79. $params = array_merge($params, $optParams);
  80. return $this->call('delete', [$params], GoogleProtobufEmpty::class);
  81. }
  82. /**
  83. * Retrieves the specified TransitionRouteGroup. (transitionRouteGroups.get)
  84. *
  85. * @param string $name Required. The name of the TransitionRouteGroup. Format:
  86. * `projects//locations//agents//flows//transitionRouteGroups/`.
  87. * @param array $optParams Optional parameters.
  88. *
  89. * @opt_param string languageCode The language to retrieve the transition route
  90. * group for. The following fields are language dependent: *
  91. * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
  92. * sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
  93. * not specified, the agent's default language is used. [Many
  94. * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  95. * are supported. Note: languages must be enabled in the agent before they can
  96. * be used.
  97. * @return GoogleCloudDialogflowCxV3TransitionRouteGroup
  98. */
  99. public function get($name, $optParams = [])
  100. {
  101. $params = ['name' => $name];
  102. $params = array_merge($params, $optParams);
  103. return $this->call('get', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
  104. }
  105. /**
  106. * Returns the list of all transition route groups in the specified flow.
  107. * (transitionRouteGroups.listProjectsLocationsAgentsFlowsTransitionRouteGroups)
  108. *
  109. * @param string $parent Required. The flow to list all transition route groups
  110. * for. Format: `projects//locations//agents//flows/`.
  111. * @param array $optParams Optional parameters.
  112. *
  113. * @opt_param string languageCode The language to list transition route groups
  114. * for. The following fields are language dependent: *
  115. * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
  116. * sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
  117. * not specified, the agent's default language is used. [Many
  118. * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  119. * are supported. Note: languages must be enabled in the agent before they can
  120. * be used.
  121. * @opt_param int pageSize The maximum number of items to return in a single
  122. * page. By default 100 and at most 1000.
  123. * @opt_param string pageToken The next_page_token value returned from a
  124. * previous list request.
  125. * @return GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
  126. */
  127. public function listProjectsLocationsAgentsFlowsTransitionRouteGroups($parent, $optParams = [])
  128. {
  129. $params = ['parent' => $parent];
  130. $params = array_merge($params, $optParams);
  131. return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse::class);
  132. }
  133. /**
  134. * Updates the specified TransitionRouteGroup. Note: You should always train a
  135. * flow prior to sending it queries. See the [training
  136. * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
  137. * (transitionRouteGroups.patch)
  138. *
  139. * @param string $name The unique identifier of the transition route group.
  140. * TransitionRouteGroups.CreateTransitionRouteGroup populates the name
  141. * automatically. Format:
  142. * `projects//locations//agents//flows//transitionRouteGroups/`.
  143. * @param GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody
  144. * @param array $optParams Optional parameters.
  145. *
  146. * @opt_param string languageCode The language of the following fields in
  147. * `TransitionRouteGroup`: *
  148. * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
  149. * sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
  150. * not specified, the agent's default language is used. [Many
  151. * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  152. * are supported. Note: languages must be enabled in the agent before they can
  153. * be used.
  154. * @opt_param string updateMask The mask to control which fields get updated.
  155. * @return GoogleCloudDialogflowCxV3TransitionRouteGroup
  156. */
  157. public function patch($name, GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody, $optParams = [])
  158. {
  159. $params = ['name' => $name, 'postBody' => $postBody];
  160. $params = array_merge($params, $optParams);
  161. return $this->call('patch', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
  162. }
  163. }
  164. // Adding a class alias for backwards compatibility with the previous class name.
  165. class_alias(ProjectsLocationsAgentsFlowsTransitionRouteGroups::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsFlowsTransitionRouteGroups');