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\Contactcenterinsights\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1ListQaQuestionsResponse;
|
---|
21 | use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1QaQuestion;
|
---|
22 | use Google\Service\Contactcenterinsights\GoogleProtobufEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "qaQuestions" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $contactcenterinsightsService = new Google\Service\Contactcenterinsights(...);
|
---|
29 | * $qaQuestions = $contactcenterinsightsService->projects_locations_qaScorecards_revisions_qaQuestions;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsQaScorecardsRevisionsQaQuestions extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Create a QaQuestion. (qaQuestions.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The parent resource of the QaQuestion.
|
---|
38 | * @param GoogleCloudContactcenterinsightsV1QaQuestion $postBody
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | *
|
---|
41 | * @opt_param string qaQuestionId Optional. A unique ID for the new question.
|
---|
42 | * This ID will become the final component of the question's resource name. If
|
---|
43 | * no ID is specified, a server-generated ID will be used. This value should be
|
---|
44 | * 4-64 characters and must match the regular expression `^[a-z0-9-]{4,64}$`.
|
---|
45 | * Valid characters are `a-z-`.
|
---|
46 | * @return GoogleCloudContactcenterinsightsV1QaQuestion
|
---|
47 | * @throws \Google\Service\Exception
|
---|
48 | */
|
---|
49 | public function create($parent, GoogleCloudContactcenterinsightsV1QaQuestion $postBody, $optParams = [])
|
---|
50 | {
|
---|
51 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
52 | $params = array_merge($params, $optParams);
|
---|
53 | return $this->call('create', [$params], GoogleCloudContactcenterinsightsV1QaQuestion::class);
|
---|
54 | }
|
---|
55 | /**
|
---|
56 | * Deletes a QaQuestion. (qaQuestions.delete)
|
---|
57 | *
|
---|
58 | * @param string $name Required. The name of the QaQuestion to delete.
|
---|
59 | * @param array $optParams Optional parameters.
|
---|
60 | * @return GoogleProtobufEmpty
|
---|
61 | * @throws \Google\Service\Exception
|
---|
62 | */
|
---|
63 | public function delete($name, $optParams = [])
|
---|
64 | {
|
---|
65 | $params = ['name' => $name];
|
---|
66 | $params = array_merge($params, $optParams);
|
---|
67 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
68 | }
|
---|
69 | /**
|
---|
70 | * Gets a QaQuestion. (qaQuestions.get)
|
---|
71 | *
|
---|
72 | * @param string $name Required. The name of the QaQuestion to get.
|
---|
73 | * @param array $optParams Optional parameters.
|
---|
74 | * @return GoogleCloudContactcenterinsightsV1QaQuestion
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function get($name, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['name' => $name];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('get', [$params], GoogleCloudContactcenterinsightsV1QaQuestion::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Lists QaQuestions.
|
---|
85 | * (qaQuestions.listProjectsLocationsQaScorecardsRevisionsQaQuestions)
|
---|
86 | *
|
---|
87 | * @param string $parent Required. The parent resource of the questions.
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | *
|
---|
90 | * @opt_param int pageSize Optional. The maximum number of questions to return
|
---|
91 | * in the response. If the value is zero, the service will select a default
|
---|
92 | * size. A call might return fewer objects than requested. A non-empty
|
---|
93 | * `next_page_token` in the response indicates that more data is available.
|
---|
94 | * @opt_param string pageToken Optional. The value returned by the last
|
---|
95 | * `ListQaQuestionsResponse`. This value indicates that this is a continuation
|
---|
96 | * of a prior `ListQaQuestions` call and that the system should return the next
|
---|
97 | * page of data.
|
---|
98 | * @return GoogleCloudContactcenterinsightsV1ListQaQuestionsResponse
|
---|
99 | * @throws \Google\Service\Exception
|
---|
100 | */
|
---|
101 | public function listProjectsLocationsQaScorecardsRevisionsQaQuestions($parent, $optParams = [])
|
---|
102 | {
|
---|
103 | $params = ['parent' => $parent];
|
---|
104 | $params = array_merge($params, $optParams);
|
---|
105 | return $this->call('list', [$params], GoogleCloudContactcenterinsightsV1ListQaQuestionsResponse::class);
|
---|
106 | }
|
---|
107 | /**
|
---|
108 | * Updates a QaQuestion. (qaQuestions.patch)
|
---|
109 | *
|
---|
110 | * @param string $name Identifier. The resource name of the question. Format: pr
|
---|
111 | * ojects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{
|
---|
112 | * revision}/qaQuestions/{qa_question}
|
---|
113 | * @param GoogleCloudContactcenterinsightsV1QaQuestion $postBody
|
---|
114 | * @param array $optParams Optional parameters.
|
---|
115 | *
|
---|
116 | * @opt_param string updateMask Required. The list of fields to be updated. All
|
---|
117 | * possible fields can be updated by passing `*`, or a subset of the following
|
---|
118 | * updateable fields can be provided: * `abbreviation` * `answer_choices` *
|
---|
119 | * `answer_instructions` * `order` * `question_body` * `tags`
|
---|
120 | * @return GoogleCloudContactcenterinsightsV1QaQuestion
|
---|
121 | * @throws \Google\Service\Exception
|
---|
122 | */
|
---|
123 | public function patch($name, GoogleCloudContactcenterinsightsV1QaQuestion $postBody, $optParams = [])
|
---|
124 | {
|
---|
125 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
126 | $params = array_merge($params, $optParams);
|
---|
127 | return $this->call('patch', [$params], GoogleCloudContactcenterinsightsV1QaQuestion::class);
|
---|
128 | }
|
---|
129 | }
|
---|
130 |
|
---|
131 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
132 | class_alias(ProjectsLocationsQaScorecardsRevisionsQaQuestions::class, 'Google_Service_Contactcenterinsights_Resource_ProjectsLocationsQaScorecardsRevisionsQaQuestions');
|
---|