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