[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\DiscoveryEngine\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1Control;
|
---|
| 21 | use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1ListControlsResponse;
|
---|
| 22 | use Google\Service\DiscoveryEngine\GoogleProtobufEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "controls" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $discoveryengineService = new Google\Service\DiscoveryEngine(...);
|
---|
| 29 | * $controls = $discoveryengineService->projects_locations_collections_engines_controls;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsCollectionsEnginesControls extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a Control. By default 1000 controls are allowed for a data store. A
|
---|
| 36 | * request can be submitted to adjust this limit. If the Control to create
|
---|
| 37 | * already exists, an ALREADY_EXISTS error is returned. (controls.create)
|
---|
| 38 | *
|
---|
| 39 | * @param string $parent Required. Full resource name of parent data store.
|
---|
| 40 | * Format: `projects/{project}/locations/{location}/collections/{collection_id}/
|
---|
| 41 | * dataStores/{data_store_id}` or `projects/{project}/locations/{location}/colle
|
---|
| 42 | * ctions/{collection_id}/engines/{engine_id}`.
|
---|
| 43 | * @param GoogleCloudDiscoveryengineV1Control $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | *
|
---|
| 46 | * @opt_param string controlId Required. The ID to use for the Control, which
|
---|
| 47 | * will become the final component of the Control's resource name. This value
|
---|
| 48 | * must be within 1-63 characters. Valid characters are /a-z-_/.
|
---|
| 49 | * @return GoogleCloudDiscoveryengineV1Control
|
---|
| 50 | * @throws \Google\Service\Exception
|
---|
| 51 | */
|
---|
| 52 | public function create($parent, GoogleCloudDiscoveryengineV1Control $postBody, $optParams = [])
|
---|
| 53 | {
|
---|
| 54 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 55 | $params = array_merge($params, $optParams);
|
---|
| 56 | return $this->call('create', [$params], GoogleCloudDiscoveryengineV1Control::class);
|
---|
| 57 | }
|
---|
| 58 | /**
|
---|
| 59 | * Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error
|
---|
| 60 | * is returned. (controls.delete)
|
---|
| 61 | *
|
---|
| 62 | * @param string $name Required. The resource name of the Control to delete.
|
---|
| 63 | * Format: `projects/{project}/locations/{location}/collections/{collection_id}/
|
---|
| 64 | * dataStores/{data_store_id}/controls/{control_id}`
|
---|
| 65 | * @param array $optParams Optional parameters.
|
---|
| 66 | * @return GoogleProtobufEmpty
|
---|
| 67 | * @throws \Google\Service\Exception
|
---|
| 68 | */
|
---|
| 69 | public function delete($name, $optParams = [])
|
---|
| 70 | {
|
---|
| 71 | $params = ['name' => $name];
|
---|
| 72 | $params = array_merge($params, $optParams);
|
---|
| 73 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
| 74 | }
|
---|
| 75 | /**
|
---|
| 76 | * Gets a Control. (controls.get)
|
---|
| 77 | *
|
---|
| 78 | * @param string $name Required. The resource name of the Control to get.
|
---|
| 79 | * Format: `projects/{project}/locations/{location}/collections/{collection_id}/
|
---|
| 80 | * dataStores/{data_store_id}/controls/{control_id}`
|
---|
| 81 | * @param array $optParams Optional parameters.
|
---|
| 82 | * @return GoogleCloudDiscoveryengineV1Control
|
---|
| 83 | * @throws \Google\Service\Exception
|
---|
| 84 | */
|
---|
| 85 | public function get($name, $optParams = [])
|
---|
| 86 | {
|
---|
| 87 | $params = ['name' => $name];
|
---|
| 88 | $params = array_merge($params, $optParams);
|
---|
| 89 | return $this->call('get', [$params], GoogleCloudDiscoveryengineV1Control::class);
|
---|
| 90 | }
|
---|
| 91 | /**
|
---|
| 92 | * Lists all Controls by their parent DataStore.
|
---|
| 93 | * (controls.listProjectsLocationsCollectionsEnginesControls)
|
---|
| 94 | *
|
---|
| 95 | * @param string $parent Required. The data store resource name. Format: `projec
|
---|
| 96 | * ts/{project}/locations/{location}/collections/{collection_id}/dataStores/{dat
|
---|
| 97 | * a_store_id}` or `projects/{project}/locations/{location}/collections/{collect
|
---|
| 98 | * ion_id}/engines/{engine_id}`.
|
---|
| 99 | * @param array $optParams Optional parameters.
|
---|
| 100 | *
|
---|
| 101 | * @opt_param string filter Optional. A filter to apply on the list results.
|
---|
| 102 | * Supported features: * List all the products under the parent branch if filter
|
---|
| 103 | * is unset. Currently this field is unsupported.
|
---|
| 104 | * @opt_param int pageSize Optional. Maximum number of results to return. If
|
---|
| 105 | * unspecified, defaults to 50. Max allowed value is 1000.
|
---|
| 106 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
| 107 | * `ListControls` call. Provide this to retrieve the subsequent page.
|
---|
| 108 | * @return GoogleCloudDiscoveryengineV1ListControlsResponse
|
---|
| 109 | * @throws \Google\Service\Exception
|
---|
| 110 | */
|
---|
| 111 | public function listProjectsLocationsCollectionsEnginesControls($parent, $optParams = [])
|
---|
| 112 | {
|
---|
| 113 | $params = ['parent' => $parent];
|
---|
| 114 | $params = array_merge($params, $optParams);
|
---|
| 115 | return $this->call('list', [$params], GoogleCloudDiscoveryengineV1ListControlsResponse::class);
|
---|
| 116 | }
|
---|
| 117 | /**
|
---|
| 118 | * Updates a Control. Control action type cannot be changed. If the Control to
|
---|
| 119 | * update does not exist, a NOT_FOUND error is returned. (controls.patch)
|
---|
| 120 | *
|
---|
| 121 | * @param string $name Immutable. Fully qualified name
|
---|
| 122 | * `projects/locations/global/dataStore/controls`
|
---|
| 123 | * @param GoogleCloudDiscoveryengineV1Control $postBody
|
---|
| 124 | * @param array $optParams Optional parameters.
|
---|
| 125 | *
|
---|
| 126 | * @opt_param string updateMask Optional. Indicates which fields in the provided
|
---|
| 127 | * Control to update. The following are NOT supported: * Control.name *
|
---|
| 128 | * Control.solution_type If not set or empty, all supported fields are updated.
|
---|
| 129 | * @return GoogleCloudDiscoveryengineV1Control
|
---|
| 130 | * @throws \Google\Service\Exception
|
---|
| 131 | */
|
---|
| 132 | public function patch($name, GoogleCloudDiscoveryengineV1Control $postBody, $optParams = [])
|
---|
| 133 | {
|
---|
| 134 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 135 | $params = array_merge($params, $optParams);
|
---|
| 136 | return $this->call('patch', [$params], GoogleCloudDiscoveryengineV1Control::class);
|
---|
| 137 | }
|
---|
| 138 | }
|
---|
| 139 |
|
---|
| 140 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 141 | class_alias(ProjectsLocationsCollectionsEnginesControls::class, 'Google_Service_DiscoveryEngine_Resource_ProjectsLocationsCollectionsEnginesControls');
|
---|