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\GoogleCloudContactcenterinsightsV1Analysis; 21use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1ListAnalysesResponse; 22use Google\Service\Contactcenterinsights\GoogleLongrunningOperation; 23use Google\Service\Contactcenterinsights\GoogleProtobufEmpty; 24 25/** 26 * The "analyses" collection of methods. 27 * Typical usage is: 28 * <code> 29 * $contactcenterinsightsService = new Google\Service\Contactcenterinsights(...); 30 * $analyses = $contactcenterinsightsService->analyses; 31 * </code> 32 */ 33class ProjectsLocationsConversationsAnalyses extends \Google\Service\Resource 34{ 35 /** 36 * Creates an analysis. The long running operation is done when the analysis has 37 * completed. (analyses.create) 38 * 39 * @param string $parent Required. The parent resource of the analysis. 40 * @param GoogleCloudContactcenterinsightsV1Analysis $postBody 41 * @param array $optParams Optional parameters. 42 * @return GoogleLongrunningOperation 43 */ 44 public function create($parent, GoogleCloudContactcenterinsightsV1Analysis $postBody, $optParams = []) 45 { 46 $params = ['parent' => $parent, 'postBody' => $postBody]; 47 $params = array_merge($params, $optParams); 48 return $this->call('create', [$params], GoogleLongrunningOperation::class); 49 } 50 /** 51 * Deletes an analysis. (analyses.delete) 52 * 53 * @param string $name Required. The name of the analysis 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 an analysis. (analyses.get) 65 * 66 * @param string $name Required. The name of the analysis to get. 67 * @param array $optParams Optional parameters. 68 * @return GoogleCloudContactcenterinsightsV1Analysis 69 */ 70 public function get($name, $optParams = []) 71 { 72 $params = ['name' => $name]; 73 $params = array_merge($params, $optParams); 74 return $this->call('get', [$params], GoogleCloudContactcenterinsightsV1Analysis::class); 75 } 76 /** 77 * Lists analyses. (analyses.listProjectsLocationsConversationsAnalyses) 78 * 79 * @param string $parent Required. The parent resource of the analyses. 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 conversations with specific properties. 84 * @opt_param int pageSize The maximum number of analyses to return in the 85 * response. If this value is zero, the service will select a default size. A 86 * call might return fewer objects than requested. A non-empty `next_page_token` 87 * in the response indicates that more data is available. 88 * @opt_param string pageToken The value returned by the last 89 * `ListAnalysesResponse`; indicates that this is a continuation of a prior 90 * `ListAnalyses` call and the system should return the next page of data. 91 * @return GoogleCloudContactcenterinsightsV1ListAnalysesResponse 92 */ 93 public function listProjectsLocationsConversationsAnalyses($parent, $optParams = []) 94 { 95 $params = ['parent' => $parent]; 96 $params = array_merge($params, $optParams); 97 return $this->call('list', [$params], GoogleCloudContactcenterinsightsV1ListAnalysesResponse::class); 98 } 99} 100 101// Adding a class alias for backwards compatibility with the previous class name. 102class_alias(ProjectsLocationsConversationsAnalyses::class, 'Google_Service_Contactcenterinsights_Resource_ProjectsLocationsConversationsAnalyses'); 103