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