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\Dialogflow\Resource;
19
20use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListSecuritySettingsResponse;
21use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3SecuritySettings;
22use Google\Service\Dialogflow\GoogleProtobufEmpty;
23
24/**
25 * The "securitySettings" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $dialogflowService = new Google\Service\Dialogflow(...);
29 *   $securitySettings = $dialogflowService->securitySettings;
30 *  </code>
31 */
32class ProjectsLocationsSecuritySettings extends \Google\Service\Resource
33{
34  /**
35   * Create security settings in the specified location. (securitySettings.create)
36   *
37   * @param string $parent Required. The location to create an SecuritySettings
38   * for. Format: `projects//locations/`.
39   * @param GoogleCloudDialogflowCxV3SecuritySettings $postBody
40   * @param array $optParams Optional parameters.
41   * @return GoogleCloudDialogflowCxV3SecuritySettings
42   */
43  public function create($parent, GoogleCloudDialogflowCxV3SecuritySettings $postBody, $optParams = [])
44  {
45    $params = ['parent' => $parent, 'postBody' => $postBody];
46    $params = array_merge($params, $optParams);
47    return $this->call('create', [$params], GoogleCloudDialogflowCxV3SecuritySettings::class);
48  }
49  /**
50   * Deletes the specified SecuritySettings. (securitySettings.delete)
51   *
52   * @param string $name Required. The name of the SecuritySettings to delete.
53   * Format: `projects//locations//securitySettings/`.
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   * Retrieves the specified SecuritySettings. The returned settings may be stale
65   * by up to 1 minute. (securitySettings.get)
66   *
67   * @param string $name Required. Resource name of the settings. Format:
68   * `projects//locations//securitySettings/`.
69   * @param array $optParams Optional parameters.
70   * @return GoogleCloudDialogflowCxV3SecuritySettings
71   */
72  public function get($name, $optParams = [])
73  {
74    $params = ['name' => $name];
75    $params = array_merge($params, $optParams);
76    return $this->call('get', [$params], GoogleCloudDialogflowCxV3SecuritySettings::class);
77  }
78  /**
79   * Returns the list of all security settings in the specified location.
80   * (securitySettings.listProjectsLocationsSecuritySettings)
81   *
82   * @param string $parent Required. The location to list all security settings
83   * for. Format: `projects//locations/`.
84   * @param array $optParams Optional parameters.
85   *
86   * @opt_param int pageSize The maximum number of items to return in a single
87   * page. By default 20 and at most 100.
88   * @opt_param string pageToken The next_page_token value returned from a
89   * previous list request.
90   * @return GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
91   */
92  public function listProjectsLocationsSecuritySettings($parent, $optParams = [])
93  {
94    $params = ['parent' => $parent];
95    $params = array_merge($params, $optParams);
96    return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListSecuritySettingsResponse::class);
97  }
98  /**
99   * Updates the specified SecuritySettings. (securitySettings.patch)
100   *
101   * @param string $name Resource name of the settings. Required for the
102   * SecuritySettingsService.UpdateSecuritySettings method.
103   * SecuritySettingsService.CreateSecuritySettings populates the name
104   * automatically. Format: `projects//locations//securitySettings/`.
105   * @param GoogleCloudDialogflowCxV3SecuritySettings $postBody
106   * @param array $optParams Optional parameters.
107   *
108   * @opt_param string updateMask Required. The mask to control which fields get
109   * updated. If the mask is not present, all fields will be updated.
110   * @return GoogleCloudDialogflowCxV3SecuritySettings
111   */
112  public function patch($name, GoogleCloudDialogflowCxV3SecuritySettings $postBody, $optParams = [])
113  {
114    $params = ['name' => $name, 'postBody' => $postBody];
115    $params = array_merge($params, $optParams);
116    return $this->call('patch', [$params], GoogleCloudDialogflowCxV3SecuritySettings::class);
117  }
118}
119
120// Adding a class alias for backwards compatibility with the previous class name.
121class_alias(ProjectsLocationsSecuritySettings::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsSecuritySettings');
122