|
| 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\Firestore; |
| 19 | + |
| 20 | +class GoogleFirestoreAdminV1SearchIndexOptions extends \Google\Collection |
| 21 | +{ |
| 22 | + protected $collection_key = 'customPartitionFieldPaths'; |
| 23 | + /** |
| 24 | + * Optional. Custom partition fields to use for the search index. If |
| 25 | + * unspecified, all indexed fields will be in the same default partition. If a |
| 26 | + * search index is created specifying custom partition fields, all search |
| 27 | + * queries using that index will be required to filter on the partition. For |
| 28 | + * indexes with MONGODB_COMPATIBLE_API ApiScope: This must refer to a top |
| 29 | + * level field name. |
| 30 | + * |
| 31 | + * @var string[] |
| 32 | + */ |
| 33 | + public $customPartitionFieldPaths; |
| 34 | + /** |
| 35 | + * Optional. The language to use for text search indexes. Used as the default |
| 36 | + * language if not overridden at the document level by specifying the |
| 37 | + * `text_language_override_field`. The language is specified as a BCP 47 |
| 38 | + * language code. For indexes with MONGODB_COMPATIBLE_API ApiScope: If |
| 39 | + * unspecified, the default language is English. For indexes with `ANY_API` |
| 40 | + * ApiScope: If unspecified, the default behavior is autodetect. |
| 41 | + * |
| 42 | + * @var string |
| 43 | + */ |
| 44 | + public $textLanguage; |
| 45 | + /** |
| 46 | + * Optional. The field in the document that specifies which language to use |
| 47 | + * for that specific document. For indexes with MONGODB_COMPATIBLE_API |
| 48 | + * ApiScope: if unspecified, the language is taken from the "language" field |
| 49 | + * if it exists or from `text_language` if it does not. |
| 50 | + * |
| 51 | + * @var string |
| 52 | + */ |
| 53 | + public $textLanguageOverrideFieldPath; |
| 54 | + |
| 55 | + /** |
| 56 | + * Optional. Custom partition fields to use for the search index. If |
| 57 | + * unspecified, all indexed fields will be in the same default partition. If a |
| 58 | + * search index is created specifying custom partition fields, all search |
| 59 | + * queries using that index will be required to filter on the partition. For |
| 60 | + * indexes with MONGODB_COMPATIBLE_API ApiScope: This must refer to a top |
| 61 | + * level field name. |
| 62 | + * |
| 63 | + * @param string[] $customPartitionFieldPaths |
| 64 | + */ |
| 65 | + public function setCustomPartitionFieldPaths($customPartitionFieldPaths) |
| 66 | + { |
| 67 | + $this->customPartitionFieldPaths = $customPartitionFieldPaths; |
| 68 | + } |
| 69 | + /** |
| 70 | + * @return string[] |
| 71 | + */ |
| 72 | + public function getCustomPartitionFieldPaths() |
| 73 | + { |
| 74 | + return $this->customPartitionFieldPaths; |
| 75 | + } |
| 76 | + /** |
| 77 | + * Optional. The language to use for text search indexes. Used as the default |
| 78 | + * language if not overridden at the document level by specifying the |
| 79 | + * `text_language_override_field`. The language is specified as a BCP 47 |
| 80 | + * language code. For indexes with MONGODB_COMPATIBLE_API ApiScope: If |
| 81 | + * unspecified, the default language is English. For indexes with `ANY_API` |
| 82 | + * ApiScope: If unspecified, the default behavior is autodetect. |
| 83 | + * |
| 84 | + * @param string $textLanguage |
| 85 | + */ |
| 86 | + public function setTextLanguage($textLanguage) |
| 87 | + { |
| 88 | + $this->textLanguage = $textLanguage; |
| 89 | + } |
| 90 | + /** |
| 91 | + * @return string |
| 92 | + */ |
| 93 | + public function getTextLanguage() |
| 94 | + { |
| 95 | + return $this->textLanguage; |
| 96 | + } |
| 97 | + /** |
| 98 | + * Optional. The field in the document that specifies which language to use |
| 99 | + * for that specific document. For indexes with MONGODB_COMPATIBLE_API |
| 100 | + * ApiScope: if unspecified, the language is taken from the "language" field |
| 101 | + * if it exists or from `text_language` if it does not. |
| 102 | + * |
| 103 | + * @param string $textLanguageOverrideFieldPath |
| 104 | + */ |
| 105 | + public function setTextLanguageOverrideFieldPath($textLanguageOverrideFieldPath) |
| 106 | + { |
| 107 | + $this->textLanguageOverrideFieldPath = $textLanguageOverrideFieldPath; |
| 108 | + } |
| 109 | + /** |
| 110 | + * @return string |
| 111 | + */ |
| 112 | + public function getTextLanguageOverrideFieldPath() |
| 113 | + { |
| 114 | + return $this->textLanguageOverrideFieldPath; |
| 115 | + } |
| 116 | +} |
| 117 | + |
| 118 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 119 | +class_alias(GoogleFirestoreAdminV1SearchIndexOptions::class, 'Google_Service_Firestore_GoogleFirestoreAdminV1SearchIndexOptions'); |
0 commit comments