Skip to content

Commit aa3fdbc

Browse files
1 parent ca6c642 commit aa3fdbc

10 files changed

+570
-0
lines changed

src/Firestore/GoogleFirestoreAdminV1Index.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ class GoogleFirestoreAdminV1Index extends \Google\Collection
161161
* @var string
162162
*/
163163
public $queryScope;
164+
protected $searchIndexOptionsType = GoogleFirestoreAdminV1SearchIndexOptions::class;
165+
protected $searchIndexOptionsDataType = '';
164166
/**
165167
* Optional. The number of shards for the index.
166168
*
@@ -306,6 +308,24 @@ public function getQueryScope()
306308
{
307309
return $this->queryScope;
308310
}
311+
/**
312+
* Optional. Options for search indexes that are at the index definition
313+
* level. This field is only currently supported for indexes with
314+
* MONGODB_COMPATIBLE_API ApiScope.
315+
*
316+
* @param GoogleFirestoreAdminV1SearchIndexOptions $searchIndexOptions
317+
*/
318+
public function setSearchIndexOptions(GoogleFirestoreAdminV1SearchIndexOptions $searchIndexOptions)
319+
{
320+
$this->searchIndexOptions = $searchIndexOptions;
321+
}
322+
/**
323+
* @return GoogleFirestoreAdminV1SearchIndexOptions
324+
*/
325+
public function getSearchIndexOptions()
326+
{
327+
return $this->searchIndexOptions;
328+
}
309329
/**
310330
* Optional. The number of shards for the index.
311331
*

src/Firestore/GoogleFirestoreAdminV1IndexField.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class GoogleFirestoreAdminV1IndexField extends \Google\Model
5959
* @var string
6060
*/
6161
public $order;
62+
protected $searchConfigType = GoogleFirestoreAdminV1SearchConfig::class;
63+
protected $searchConfigDataType = '';
6264
protected $vectorConfigType = GoogleFirestoreAdminV1VectorConfig::class;
6365
protected $vectorConfigDataType = '';
6466

@@ -116,6 +118,23 @@ public function getOrder()
116118
{
117119
return $this->order;
118120
}
121+
/**
122+
* Indicates that this field supports search operations. This field is only
123+
* currently supported for indexes with MONGODB_COMPATIBLE_API ApiScope.
124+
*
125+
* @param GoogleFirestoreAdminV1SearchConfig $searchConfig
126+
*/
127+
public function setSearchConfig(GoogleFirestoreAdminV1SearchConfig $searchConfig)
128+
{
129+
$this->searchConfig = $searchConfig;
130+
}
131+
/**
132+
* @return GoogleFirestoreAdminV1SearchConfig
133+
*/
134+
public function getSearchConfig()
135+
{
136+
return $this->searchConfig;
137+
}
119138
/**
120139
* Indicates that this field supports nearest neighbor and distance operations
121140
* on vector.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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 GoogleFirestoreAdminV1SearchConfig extends \Google\Model
21+
{
22+
protected $geoSpecType = GoogleFirestoreAdminV1SearchGeoSpec::class;
23+
protected $geoSpecDataType = '';
24+
protected $numberSpecType = GoogleFirestoreAdminV1SearchNumberSpec::class;
25+
protected $numberSpecDataType = '';
26+
protected $textSpecType = GoogleFirestoreAdminV1SearchTextSpec::class;
27+
protected $textSpecDataType = '';
28+
29+
/**
30+
* Optional. The specification for building a geo search index for a field.
31+
*
32+
* @param GoogleFirestoreAdminV1SearchGeoSpec $geoSpec
33+
*/
34+
public function setGeoSpec(GoogleFirestoreAdminV1SearchGeoSpec $geoSpec)
35+
{
36+
$this->geoSpec = $geoSpec;
37+
}
38+
/**
39+
* @return GoogleFirestoreAdminV1SearchGeoSpec
40+
*/
41+
public function getGeoSpec()
42+
{
43+
return $this->geoSpec;
44+
}
45+
/**
46+
* Optional. The specification for building a number search index for a field.
47+
*
48+
* @param GoogleFirestoreAdminV1SearchNumberSpec $numberSpec
49+
*/
50+
public function setNumberSpec(GoogleFirestoreAdminV1SearchNumberSpec $numberSpec)
51+
{
52+
$this->numberSpec = $numberSpec;
53+
}
54+
/**
55+
* @return GoogleFirestoreAdminV1SearchNumberSpec
56+
*/
57+
public function getNumberSpec()
58+
{
59+
return $this->numberSpec;
60+
}
61+
/**
62+
* Optional. The specification for building a text search index for a field.
63+
*
64+
* @param GoogleFirestoreAdminV1SearchTextSpec $textSpec
65+
*/
66+
public function setTextSpec(GoogleFirestoreAdminV1SearchTextSpec $textSpec)
67+
{
68+
$this->textSpec = $textSpec;
69+
}
70+
/**
71+
* @return GoogleFirestoreAdminV1SearchTextSpec
72+
*/
73+
public function getTextSpec()
74+
{
75+
return $this->textSpec;
76+
}
77+
}
78+
79+
// Adding a class alias for backwards compatibility with the previous class name.
80+
class_alias(GoogleFirestoreAdminV1SearchConfig::class, 'Google_Service_Firestore_GoogleFirestoreAdminV1SearchConfig');
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 GoogleFirestoreAdminV1SearchGeoSpec extends \Google\Model
21+
{
22+
/**
23+
* Optional. Disables geoJSON indexing for the field. By default, geoJSON
24+
* points are indexed.
25+
*
26+
* @var bool
27+
*/
28+
public $geoJsonIndexingDisabled;
29+
30+
/**
31+
* Optional. Disables geoJSON indexing for the field. By default, geoJSON
32+
* points are indexed.
33+
*
34+
* @param bool $geoJsonIndexingDisabled
35+
*/
36+
public function setGeoJsonIndexingDisabled($geoJsonIndexingDisabled)
37+
{
38+
$this->geoJsonIndexingDisabled = $geoJsonIndexingDisabled;
39+
}
40+
/**
41+
* @return bool
42+
*/
43+
public function getGeoJsonIndexingDisabled()
44+
{
45+
return $this->geoJsonIndexingDisabled;
46+
}
47+
}
48+
49+
// Adding a class alias for backwards compatibility with the previous class name.
50+
class_alias(GoogleFirestoreAdminV1SearchGeoSpec::class, 'Google_Service_Firestore_GoogleFirestoreAdminV1SearchGeoSpec');
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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');
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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 GoogleFirestoreAdminV1SearchNumberSpec extends \Google\Model
21+
{
22+
/**
23+
* The index type is unspecified. Not a valid option.
24+
*/
25+
public const INDEX_TYPE_NUMBER_INDEX_TYPE_UNSPECIFIED = 'NUMBER_INDEX_TYPE_UNSPECIFIED';
26+
/**
27+
* A floating point index.
28+
*/
29+
public const INDEX_TYPE_FLOAT64 = 'FLOAT64';
30+
/**
31+
* A log tree index for int32 values.
32+
*/
33+
public const INDEX_TYPE_INT32_LOG_TREE = 'INT32_LOG_TREE';
34+
/**
35+
* A log tree index for int64 values.
36+
*/
37+
public const INDEX_TYPE_INT64_LOG_TREE = 'INT64_LOG_TREE';
38+
/**
39+
* A prefix tree index for int32 values.
40+
*/
41+
public const INDEX_TYPE_INT32_PREFIX_TREE = 'INT32_PREFIX_TREE';
42+
/**
43+
* A prefix tree index for int64 values.
44+
*/
45+
public const INDEX_TYPE_INT64_PREFIX_TREE = 'INT64_PREFIX_TREE';
46+
/**
47+
* Required. How to index the number field value.
48+
*
49+
* @var string
50+
*/
51+
public $indexType;
52+
53+
/**
54+
* Required. How to index the number field value.
55+
*
56+
* Accepted values: NUMBER_INDEX_TYPE_UNSPECIFIED, FLOAT64, INT32_LOG_TREE,
57+
* INT64_LOG_TREE, INT32_PREFIX_TREE, INT64_PREFIX_TREE
58+
*
59+
* @param self::INDEX_TYPE_* $indexType
60+
*/
61+
public function setIndexType($indexType)
62+
{
63+
$this->indexType = $indexType;
64+
}
65+
/**
66+
* @return self::INDEX_TYPE_*
67+
*/
68+
public function getIndexType()
69+
{
70+
return $this->indexType;
71+
}
72+
}
73+
74+
// Adding a class alias for backwards compatibility with the previous class name.
75+
class_alias(GoogleFirestoreAdminV1SearchNumberSpec::class, 'Google_Service_Firestore_GoogleFirestoreAdminV1SearchNumberSpec');

0 commit comments

Comments
 (0)