[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\GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest;
|
---|
| 21 | use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1ListTargetSitesResponse;
|
---|
| 22 | use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1TargetSite;
|
---|
| 23 | use Google\Service\DiscoveryEngine\GoogleLongrunningOperation;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "targetSites" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $discoveryengineService = new Google\Service\DiscoveryEngine(...);
|
---|
| 30 | * $targetSites = $discoveryengineService->projects_locations_collections_dataStores_siteSearchEngine_targetSites;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSites extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Creates TargetSite in a batch. (targetSites.batchCreate)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The parent resource shared by all TargetSites
|
---|
| 39 | * being created. `projects/{project}/locations/{location}/collections/{collecti
|
---|
| 40 | * on}/dataStores/{data_store}/siteSearchEngine`. The parent field in the
|
---|
| 41 | * CreateBookRequest messages must either be empty or match this field.
|
---|
| 42 | * @param GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest $postBody
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | * @return GoogleLongrunningOperation
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function batchCreate($parent, GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest $postBody, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('batchCreate', [$params], GoogleLongrunningOperation::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Creates a TargetSite. (targetSites.create)
|
---|
| 55 | *
|
---|
| 56 | * @param string $parent Required. Parent resource name of TargetSite, such as `
|
---|
| 57 | * projects/{project}/locations/{location}/collections/{collection}/dataStores/{
|
---|
| 58 | * data_store}/siteSearchEngine`.
|
---|
| 59 | * @param GoogleCloudDiscoveryengineV1TargetSite $postBody
|
---|
| 60 | * @param array $optParams Optional parameters.
|
---|
| 61 | * @return GoogleLongrunningOperation
|
---|
| 62 | * @throws \Google\Service\Exception
|
---|
| 63 | */
|
---|
| 64 | public function create($parent, GoogleCloudDiscoveryengineV1TargetSite $postBody, $optParams = [])
|
---|
| 65 | {
|
---|
| 66 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 67 | $params = array_merge($params, $optParams);
|
---|
| 68 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 69 | }
|
---|
| 70 | /**
|
---|
| 71 | * Deletes a TargetSite. (targetSites.delete)
|
---|
| 72 | *
|
---|
| 73 | * @param string $name Required. Full resource name of TargetSite, such as `proj
|
---|
| 74 | * ects/{project}/locations/{location}/collections/{collection}/dataStores/{data
|
---|
| 75 | * _store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not
|
---|
| 76 | * have permission to access the TargetSite, regardless of whether or not it
|
---|
| 77 | * exists, a PERMISSION_DENIED error is returned. If the requested TargetSite
|
---|
| 78 | * does not exist, a NOT_FOUND error is returned.
|
---|
| 79 | * @param array $optParams Optional parameters.
|
---|
| 80 | * @return GoogleLongrunningOperation
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function delete($name, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['name' => $name];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 88 | }
|
---|
| 89 | /**
|
---|
| 90 | * Gets a TargetSite. (targetSites.get)
|
---|
| 91 | *
|
---|
| 92 | * @param string $name Required. Full resource name of TargetSite, such as `proj
|
---|
| 93 | * ects/{project}/locations/{location}/collections/{collection}/dataStores/{data
|
---|
| 94 | * _store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not
|
---|
| 95 | * have permission to access the TargetSite, regardless of whether or not it
|
---|
| 96 | * exists, a PERMISSION_DENIED error is returned. If the requested TargetSite
|
---|
| 97 | * does not exist, a NOT_FOUND error is returned.
|
---|
| 98 | * @param array $optParams Optional parameters.
|
---|
| 99 | * @return GoogleCloudDiscoveryengineV1TargetSite
|
---|
| 100 | * @throws \Google\Service\Exception
|
---|
| 101 | */
|
---|
| 102 | public function get($name, $optParams = [])
|
---|
| 103 | {
|
---|
| 104 | $params = ['name' => $name];
|
---|
| 105 | $params = array_merge($params, $optParams);
|
---|
| 106 | return $this->call('get', [$params], GoogleCloudDiscoveryengineV1TargetSite::class);
|
---|
| 107 | }
|
---|
| 108 | /**
|
---|
| 109 | * Gets a list of TargetSites. (targetSites.listProjectsLocationsCollectionsData
|
---|
| 110 | * StoresSiteSearchEngineTargetSites)
|
---|
| 111 | *
|
---|
| 112 | * @param string $parent Required. The parent site search engine resource name,
|
---|
| 113 | * such as `projects/{project}/locations/{location}/collections/{collection}/dat
|
---|
| 114 | * aStores/{data_store}/siteSearchEngine`. If the caller does not have
|
---|
| 115 | * permission to list TargetSites under this site search engine, regardless of
|
---|
| 116 | * whether or not this branch exists, a PERMISSION_DENIED error is returned.
|
---|
| 117 | * @param array $optParams Optional parameters.
|
---|
| 118 | *
|
---|
| 119 | * @opt_param int pageSize Requested page size. Server may return fewer items
|
---|
| 120 | * than requested. If unspecified, server will pick an appropriate default. The
|
---|
| 121 | * maximum value is 1000; values above 1000 will be coerced to 1000. If this
|
---|
| 122 | * field is negative, an INVALID_ARGUMENT error is returned.
|
---|
| 123 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 124 | * `ListTargetSites` call. Provide this to retrieve the subsequent page. When
|
---|
| 125 | * paginating, all other parameters provided to `ListTargetSites` must match the
|
---|
| 126 | * call that provided the page token.
|
---|
| 127 | * @return GoogleCloudDiscoveryengineV1ListTargetSitesResponse
|
---|
| 128 | * @throws \Google\Service\Exception
|
---|
| 129 | */
|
---|
| 130 | public function listProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSites($parent, $optParams = [])
|
---|
| 131 | {
|
---|
| 132 | $params = ['parent' => $parent];
|
---|
| 133 | $params = array_merge($params, $optParams);
|
---|
| 134 | return $this->call('list', [$params], GoogleCloudDiscoveryengineV1ListTargetSitesResponse::class);
|
---|
| 135 | }
|
---|
| 136 | /**
|
---|
| 137 | * Updates a TargetSite. (targetSites.patch)
|
---|
| 138 | *
|
---|
| 139 | * @param string $name Output only. The fully qualified resource name of the
|
---|
| 140 | * target site. `projects/{project}/locations/{location}/collections/{collection
|
---|
| 141 | * }/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The
|
---|
| 142 | * `target_site_id` is system-generated.
|
---|
| 143 | * @param GoogleCloudDiscoveryengineV1TargetSite $postBody
|
---|
| 144 | * @param array $optParams Optional parameters.
|
---|
| 145 | * @return GoogleLongrunningOperation
|
---|
| 146 | * @throws \Google\Service\Exception
|
---|
| 147 | */
|
---|
| 148 | public function patch($name, GoogleCloudDiscoveryengineV1TargetSite $postBody, $optParams = [])
|
---|
| 149 | {
|
---|
| 150 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 151 | $params = array_merge($params, $optParams);
|
---|
| 152 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
| 153 | }
|
---|
| 154 | }
|
---|
| 155 |
|
---|
| 156 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 157 | class_alias(ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSites::class, 'Google_Service_DiscoveryEngine_Resource_ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSites');
|
---|