[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\CloudSearch\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudSearch\Operation;
|
---|
| 21 | use Google\Service\CloudSearch\Schema;
|
---|
| 22 | use Google\Service\CloudSearch\UpdateSchemaRequest;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "datasources" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $cloudsearchService = new Google\Service\CloudSearch(...);
|
---|
| 29 | * $datasources = $cloudsearchService->indexing_datasources;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class IndexingDatasources extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Deletes the schema of a data source. **Note:** This API requires an admin or
|
---|
| 36 | * service account to execute. (datasources.deleteSchema)
|
---|
| 37 | *
|
---|
| 38 | * @param string $name The name of the data source to delete Schema. Format:
|
---|
| 39 | * datasources/{source_id}
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | *
|
---|
| 42 | * @opt_param bool debugOptions.enableDebugging If you are asked by Google to
|
---|
| 43 | * help with debugging, set this field. Otherwise, ignore this field.
|
---|
| 44 | * @return Operation
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function deleteSchema($name, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['name' => $name];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('deleteSchema', [$params], Operation::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Gets the schema of a data source. **Note:** This API requires an admin or
|
---|
| 55 | * service account to execute. (datasources.getSchema)
|
---|
| 56 | *
|
---|
| 57 | * @param string $name The name of the data source to get Schema. Format:
|
---|
| 58 | * datasources/{source_id}
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | *
|
---|
| 61 | * @opt_param bool debugOptions.enableDebugging If you are asked by Google to
|
---|
| 62 | * help with debugging, set this field. Otherwise, ignore this field.
|
---|
| 63 | * @return Schema
|
---|
| 64 | * @throws \Google\Service\Exception
|
---|
| 65 | */
|
---|
| 66 | public function getSchema($name, $optParams = [])
|
---|
| 67 | {
|
---|
| 68 | $params = ['name' => $name];
|
---|
| 69 | $params = array_merge($params, $optParams);
|
---|
| 70 | return $this->call('getSchema', [$params], Schema::class);
|
---|
| 71 | }
|
---|
| 72 | /**
|
---|
| 73 | * Updates the schema of a data source. This method does not perform incremental
|
---|
| 74 | * updates to the schema. Instead, this method updates the schema by overwriting
|
---|
| 75 | * the entire schema. **Note:** This API requires an admin or service account to
|
---|
| 76 | * execute. (datasources.updateSchema)
|
---|
| 77 | *
|
---|
| 78 | * @param string $name The name of the data source to update Schema. Format:
|
---|
| 79 | * datasources/{source_id}
|
---|
| 80 | * @param UpdateSchemaRequest $postBody
|
---|
| 81 | * @param array $optParams Optional parameters.
|
---|
| 82 | * @return Operation
|
---|
| 83 | * @throws \Google\Service\Exception
|
---|
| 84 | */
|
---|
| 85 | public function updateSchema($name, UpdateSchemaRequest $postBody, $optParams = [])
|
---|
| 86 | {
|
---|
| 87 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 88 | $params = array_merge($params, $optParams);
|
---|
| 89 | return $this->call('updateSchema', [$params], Operation::class);
|
---|
| 90 | }
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 94 | class_alias(IndexingDatasources::class, 'Google_Service_CloudSearch_Resource_IndexingDatasources');
|
---|