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\Contactcenterinsights\Resource; 19 20use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1ListPhraseMatchersResponse; 21use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1PhraseMatcher; 22use Google\Service\Contactcenterinsights\GoogleProtobufEmpty; 23 24/** 25 * The "phraseMatchers" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $contactcenterinsightsService = new Google\Service\Contactcenterinsights(...); 29 * $phraseMatchers = $contactcenterinsightsService->phraseMatchers; 30 * </code> 31 */ 32class ProjectsLocationsPhraseMatchers extends \Google\Service\Resource 33{ 34 /** 35 * Creates a phrase matcher. (phraseMatchers.create) 36 * 37 * @param string $parent Required. The parent resource of the phrase matcher. 38 * Required. The location to create a phrase matcher for. Format: 39 * `projects//locations/` or `projects//locations/` 40 * @param GoogleCloudContactcenterinsightsV1PhraseMatcher $postBody 41 * @param array $optParams Optional parameters. 42 * @return GoogleCloudContactcenterinsightsV1PhraseMatcher 43 */ 44 public function create($parent, GoogleCloudContactcenterinsightsV1PhraseMatcher $postBody, $optParams = []) 45 { 46 $params = ['parent' => $parent, 'postBody' => $postBody]; 47 $params = array_merge($params, $optParams); 48 return $this->call('create', [$params], GoogleCloudContactcenterinsightsV1PhraseMatcher::class); 49 } 50 /** 51 * Deletes a phrase matcher. (phraseMatchers.delete) 52 * 53 * @param string $name Required. The name of the phrase matcher to delete. 54 * @param array $optParams Optional parameters. 55 * @return GoogleProtobufEmpty 56 */ 57 public function delete($name, $optParams = []) 58 { 59 $params = ['name' => $name]; 60 $params = array_merge($params, $optParams); 61 return $this->call('delete', [$params], GoogleProtobufEmpty::class); 62 } 63 /** 64 * Gets a phrase matcher. (phraseMatchers.get) 65 * 66 * @param string $name Required. The name of the phrase matcher to get. 67 * @param array $optParams Optional parameters. 68 * @return GoogleCloudContactcenterinsightsV1PhraseMatcher 69 */ 70 public function get($name, $optParams = []) 71 { 72 $params = ['name' => $name]; 73 $params = array_merge($params, $optParams); 74 return $this->call('get', [$params], GoogleCloudContactcenterinsightsV1PhraseMatcher::class); 75 } 76 /** 77 * Lists phrase matchers. (phraseMatchers.listProjectsLocationsPhraseMatchers) 78 * 79 * @param string $parent Required. The parent resource of the phrase matcher. 80 * @param array $optParams Optional parameters. 81 * 82 * @opt_param string filter A filter to reduce results to a specific subset. 83 * Useful for querying phrase matchers with specific properties. 84 * @opt_param int pageSize The maximum number of phrase matchers to return in 85 * the response. If this value is zero, the service will select a default size. 86 * A call might return fewer objects than requested. A non-empty 87 * `next_page_token` in the response indicates that more data is available. 88 * @opt_param string pageToken The value returned by the last 89 * `ListPhraseMatchersResponse`. This value indicates that this is a 90 * continuation of a prior `ListPhraseMatchers` call and that the system should 91 * return the next page of data. 92 * @return GoogleCloudContactcenterinsightsV1ListPhraseMatchersResponse 93 */ 94 public function listProjectsLocationsPhraseMatchers($parent, $optParams = []) 95 { 96 $params = ['parent' => $parent]; 97 $params = array_merge($params, $optParams); 98 return $this->call('list', [$params], GoogleCloudContactcenterinsightsV1ListPhraseMatchersResponse::class); 99 } 100 /** 101 * Updates a phrase matcher. (phraseMatchers.patch) 102 * 103 * @param string $name The resource name of the phrase matcher. Format: 104 * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} 105 * @param GoogleCloudContactcenterinsightsV1PhraseMatcher $postBody 106 * @param array $optParams Optional parameters. 107 * 108 * @opt_param string updateMask The list of fields to be updated. 109 * @return GoogleCloudContactcenterinsightsV1PhraseMatcher 110 */ 111 public function patch($name, GoogleCloudContactcenterinsightsV1PhraseMatcher $postBody, $optParams = []) 112 { 113 $params = ['name' => $name, 'postBody' => $postBody]; 114 $params = array_merge($params, $optParams); 115 return $this->call('patch', [$params], GoogleCloudContactcenterinsightsV1PhraseMatcher::class); 116 } 117} 118 119// Adding a class alias for backwards compatibility with the previous class name. 120class_alias(ProjectsLocationsPhraseMatchers::class, 'Google_Service_Contactcenterinsights_Resource_ProjectsLocationsPhraseMatchers'); 121