Skip to content

Commit b45cbcc

Browse files
Excavator: Upgrade API Version (#24)
1 parent 507de3c commit b45cbcc

File tree

10 files changed

+7914
-7787
lines changed

10 files changed

+7914
-7787
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,8 @@ Namespace | Resource | Operation | HTTP request |
710710
- [GtQueryV2Dict](docs/v2/models/GtQueryV2Dict.md)
711711
- [Icon](docs/v2/models/Icon.md)
712712
- [IconDict](docs/v2/models/IconDict.md)
713+
- [InQuery](docs/v2/models/InQuery.md)
714+
- [InQueryDict](docs/v2/models/InQueryDict.md)
713715
- [InterfaceLinkType](docs/v2/models/InterfaceLinkType.md)
714716
- [InterfaceLinkTypeApiName](docs/v2/models/InterfaceLinkTypeApiName.md)
715717
- [InterfaceLinkTypeCardinality](docs/v2/models/InterfaceLinkTypeCardinality.md)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# InQuery
2+
3+
Returns objects where the specified field equals any of the provided values.
4+
5+
## Properties
6+
| Name | Type | Required | Description |
7+
| ------------ | ------------- | ------------- | ------------- |
8+
**field** | PropertyApiName | Yes | |
9+
**value** | List[PropertyValue] | Yes | |
10+
**type** | Literal["in"] | Yes | None |
11+
12+
13+
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# InQueryDict
2+
3+
Returns objects where the specified field equals any of the provided values.
4+
5+
## Properties
6+
| Name | Type | Required | Description |
7+
| ------------ | ------------- | ------------- | ------------- |
8+
**field** | PropertyApiName | Yes | |
9+
**value** | List[PropertyValue] | Yes | |
10+
**type** | Literal["in"] | Yes | None |
11+
12+
13+
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)

docs/v2/ontologies/models/SearchJsonQueryV2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This discriminator class uses the `type` field to differentiate between classes.
1010
| Class | Value
1111
| ------------ | -------------
1212
OrQueryV2 | or
13+
InQuery | in
1314
DoesNotIntersectPolygonQuery | doesNotIntersectPolygon
1415
LtQueryV2 | lt
1516
DoesNotIntersectBoundingBoxQuery | doesNotIntersectBoundingBox

docs/v2/ontologies/models/SearchJsonQueryV2Dict.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This discriminator class uses the `type` field to differentiate between classes.
1010
| Class | Value
1111
| ------------ | -------------
1212
OrQueryV2Dict | or
13+
InQueryDict | in
1314
DoesNotIntersectPolygonQueryDict | doesNotIntersectPolygon
1415
LtQueryV2Dict | lt
1516
DoesNotIntersectBoundingBoxQueryDict | doesNotIntersectBoundingBox
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright 2024 Palantir Technologies, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
from __future__ import annotations
17+
18+
from typing import List
19+
from typing import Literal
20+
from typing import cast
21+
22+
from pydantic import BaseModel
23+
24+
from foundry.v2.ontologies.models._in_query_dict import InQueryDict
25+
from foundry.v2.ontologies.models._property_api_name import PropertyApiName
26+
from foundry.v2.ontologies.models._property_value import PropertyValue
27+
28+
29+
class InQuery(BaseModel):
30+
"""Returns objects where the specified field equals any of the provided values."""
31+
32+
field: PropertyApiName
33+
34+
value: List[PropertyValue]
35+
36+
type: Literal["in"]
37+
38+
model_config = {"extra": "allow"}
39+
40+
def to_dict(self) -> InQueryDict:
41+
"""Return the dictionary representation of the model using the field aliases."""
42+
return cast(InQueryDict, self.model_dump(by_alias=True, exclude_unset=True))
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2024 Palantir Technologies, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
from __future__ import annotations
17+
18+
from typing import List
19+
from typing import Literal
20+
21+
from typing_extensions import TypedDict
22+
23+
from foundry.v2.ontologies.models._property_api_name import PropertyApiName
24+
from foundry.v2.ontologies.models._property_value import PropertyValue
25+
26+
27+
class InQueryDict(TypedDict):
28+
"""Returns objects where the specified field equals any of the provided values."""
29+
30+
__pydantic_config__ = {"extra": "allow"} # type: ignore
31+
32+
field: PropertyApiName
33+
34+
value: List[PropertyValue]
35+
36+
type: Literal["in"]

foundry/v2/ontologies/models/_search_json_query_v2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
from foundry.v2.ontologies.models._equals_query_v2 import EqualsQueryV2
4444
from foundry.v2.ontologies.models._gt_query_v2 import GtQueryV2
4545
from foundry.v2.ontologies.models._gte_query_v2 import GteQueryV2
46+
from foundry.v2.ontologies.models._in_query import InQuery
4647
from foundry.v2.ontologies.models._intersects_bounding_box_query import (
4748
IntersectsBoundingBoxQuery,
4849
) # NOQA
@@ -103,6 +104,7 @@ def to_dict(self) -> AndQueryV2Dict:
103104
SearchJsonQueryV2 = Annotated[
104105
Union[
105106
OrQueryV2,
107+
InQuery,
106108
DoesNotIntersectPolygonQuery,
107109
LtQueryV2,
108110
DoesNotIntersectBoundingBoxQuery,

foundry/v2/ontologies/models/_search_json_query_v2_dict.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
from foundry.v2.ontologies.models._equals_query_v2_dict import EqualsQueryV2Dict
4646
from foundry.v2.ontologies.models._gt_query_v2_dict import GtQueryV2Dict
4747
from foundry.v2.ontologies.models._gte_query_v2_dict import GteQueryV2Dict
48+
from foundry.v2.ontologies.models._in_query_dict import InQueryDict
4849
from foundry.v2.ontologies.models._intersects_bounding_box_query_dict import (
4950
IntersectsBoundingBoxQueryDict,
5051
) # NOQA
@@ -97,6 +98,7 @@ class AndQueryV2Dict(TypedDict):
9798
SearchJsonQueryV2Dict = Annotated[
9899
Union[
99100
OrQueryV2Dict,
101+
InQueryDict,
100102
DoesNotIntersectPolygonQueryDict,
101103
LtQueryV2Dict,
102104
DoesNotIntersectBoundingBoxQueryDict,

0 commit comments

Comments
 (0)