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\GoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse; 21use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1DeployIssueModelRequest; 22use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1IssueModel; 23use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1ListIssueModelsResponse; 24use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1UndeployIssueModelRequest; 25use Google\Service\Contactcenterinsights\GoogleLongrunningOperation; 26 27/** 28 * The "issueModels" collection of methods. 29 * Typical usage is: 30 * <code> 31 * $contactcenterinsightsService = new Google\Service\Contactcenterinsights(...); 32 * $issueModels = $contactcenterinsightsService->issueModels; 33 * </code> 34 */ 35class ProjectsLocationsIssueModels extends \Google\Service\Resource 36{ 37 /** 38 * Gets an issue model's statistics. (issueModels.calculateIssueModelStats) 39 * 40 * @param string $issueModel Required. The resource name of the issue model to 41 * query against. 42 * @param array $optParams Optional parameters. 43 * @return GoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse 44 */ 45 public function calculateIssueModelStats($issueModel, $optParams = []) 46 { 47 $params = ['issueModel' => $issueModel]; 48 $params = array_merge($params, $optParams); 49 return $this->call('calculateIssueModelStats', [$params], GoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse::class); 50 } 51 /** 52 * Creates an issue model. (issueModels.create) 53 * 54 * @param string $parent Required. The parent resource of the issue model. 55 * @param GoogleCloudContactcenterinsightsV1IssueModel $postBody 56 * @param array $optParams Optional parameters. 57 * @return GoogleLongrunningOperation 58 */ 59 public function create($parent, GoogleCloudContactcenterinsightsV1IssueModel $postBody, $optParams = []) 60 { 61 $params = ['parent' => $parent, 'postBody' => $postBody]; 62 $params = array_merge($params, $optParams); 63 return $this->call('create', [$params], GoogleLongrunningOperation::class); 64 } 65 /** 66 * Deletes an issue model. (issueModels.delete) 67 * 68 * @param string $name Required. The name of the issue model to delete. 69 * @param array $optParams Optional parameters. 70 * @return GoogleLongrunningOperation 71 */ 72 public function delete($name, $optParams = []) 73 { 74 $params = ['name' => $name]; 75 $params = array_merge($params, $optParams); 76 return $this->call('delete', [$params], GoogleLongrunningOperation::class); 77 } 78 /** 79 * Deploys an issue model. Returns an error if a model is already deployed. An 80 * issue model can only be used in analysis after it has been deployed. 81 * (issueModels.deploy) 82 * 83 * @param string $name Required. The issue model to deploy. 84 * @param GoogleCloudContactcenterinsightsV1DeployIssueModelRequest $postBody 85 * @param array $optParams Optional parameters. 86 * @return GoogleLongrunningOperation 87 */ 88 public function deploy($name, GoogleCloudContactcenterinsightsV1DeployIssueModelRequest $postBody, $optParams = []) 89 { 90 $params = ['name' => $name, 'postBody' => $postBody]; 91 $params = array_merge($params, $optParams); 92 return $this->call('deploy', [$params], GoogleLongrunningOperation::class); 93 } 94 /** 95 * Gets an issue model. (issueModels.get) 96 * 97 * @param string $name Required. The name of the issue model to get. 98 * @param array $optParams Optional parameters. 99 * @return GoogleCloudContactcenterinsightsV1IssueModel 100 */ 101 public function get($name, $optParams = []) 102 { 103 $params = ['name' => $name]; 104 $params = array_merge($params, $optParams); 105 return $this->call('get', [$params], GoogleCloudContactcenterinsightsV1IssueModel::class); 106 } 107 /** 108 * Lists issue models. (issueModels.listProjectsLocationsIssueModels) 109 * 110 * @param string $parent Required. The parent resource of the issue model. 111 * @param array $optParams Optional parameters. 112 * @return GoogleCloudContactcenterinsightsV1ListIssueModelsResponse 113 */ 114 public function listProjectsLocationsIssueModels($parent, $optParams = []) 115 { 116 $params = ['parent' => $parent]; 117 $params = array_merge($params, $optParams); 118 return $this->call('list', [$params], GoogleCloudContactcenterinsightsV1ListIssueModelsResponse::class); 119 } 120 /** 121 * Updates an issue model. (issueModels.patch) 122 * 123 * @param string $name Immutable. The resource name of the issue model. Format: 124 * projects/{project}/locations/{location}/issueModels/{issue_model} 125 * @param GoogleCloudContactcenterinsightsV1IssueModel $postBody 126 * @param array $optParams Optional parameters. 127 * 128 * @opt_param string updateMask The list of fields to be updated. 129 * @return GoogleCloudContactcenterinsightsV1IssueModel 130 */ 131 public function patch($name, GoogleCloudContactcenterinsightsV1IssueModel $postBody, $optParams = []) 132 { 133 $params = ['name' => $name, 'postBody' => $postBody]; 134 $params = array_merge($params, $optParams); 135 return $this->call('patch', [$params], GoogleCloudContactcenterinsightsV1IssueModel::class); 136 } 137 /** 138 * Undeploys an issue model. An issue model can not be used in analysis after it 139 * has been undeployed. (issueModels.undeploy) 140 * 141 * @param string $name Required. The issue model to undeploy. 142 * @param GoogleCloudContactcenterinsightsV1UndeployIssueModelRequest $postBody 143 * @param array $optParams Optional parameters. 144 * @return GoogleLongrunningOperation 145 */ 146 public function undeploy($name, GoogleCloudContactcenterinsightsV1UndeployIssueModelRequest $postBody, $optParams = []) 147 { 148 $params = ['name' => $name, 'postBody' => $postBody]; 149 $params = array_merge($params, $optParams); 150 return $this->call('undeploy', [$params], GoogleLongrunningOperation::class); 151 } 152} 153 154// Adding a class alias for backwards compatibility with the previous class name. 155class_alias(ProjectsLocationsIssueModels::class, 'Google_Service_Contactcenterinsights_Resource_ProjectsLocationsIssueModels'); 156