-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excavator: Upgrade API Version (#24)
- Loading branch information
1 parent
507de3c
commit b45cbcc
Showing
10 changed files
with
7,914 additions
and
7,787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# InQuery | ||
|
||
Returns objects where the specified field equals any of the provided values. | ||
|
||
## Properties | ||
| Name | Type | Required | Description | | ||
| ------------ | ------------- | ------------- | ------------- | | ||
**field** | PropertyApiName | Yes | | | ||
**value** | List[PropertyValue] | Yes | | | ||
**type** | Literal["in"] | Yes | None | | ||
|
||
|
||
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# InQueryDict | ||
|
||
Returns objects where the specified field equals any of the provided values. | ||
|
||
## Properties | ||
| Name | Type | Required | Description | | ||
| ------------ | ------------- | ------------- | ------------- | | ||
**field** | PropertyApiName | Yes | | | ||
**value** | List[PropertyValue] | Yes | | | ||
**type** | Literal["in"] | Yes | None | | ||
|
||
|
||
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 2024 Palantir Technologies, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
from __future__ import annotations | ||
|
||
from typing import List | ||
from typing import Literal | ||
from typing import cast | ||
|
||
from pydantic import BaseModel | ||
|
||
from foundry.v2.ontologies.models._in_query_dict import InQueryDict | ||
from foundry.v2.ontologies.models._property_api_name import PropertyApiName | ||
from foundry.v2.ontologies.models._property_value import PropertyValue | ||
|
||
|
||
class InQuery(BaseModel): | ||
"""Returns objects where the specified field equals any of the provided values.""" | ||
|
||
field: PropertyApiName | ||
|
||
value: List[PropertyValue] | ||
|
||
type: Literal["in"] | ||
|
||
model_config = {"extra": "allow"} | ||
|
||
def to_dict(self) -> InQueryDict: | ||
"""Return the dictionary representation of the model using the field aliases.""" | ||
return cast(InQueryDict, self.model_dump(by_alias=True, exclude_unset=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2024 Palantir Technologies, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
from __future__ import annotations | ||
|
||
from typing import List | ||
from typing import Literal | ||
|
||
from typing_extensions import TypedDict | ||
|
||
from foundry.v2.ontologies.models._property_api_name import PropertyApiName | ||
from foundry.v2.ontologies.models._property_value import PropertyValue | ||
|
||
|
||
class InQueryDict(TypedDict): | ||
"""Returns objects where the specified field equals any of the provided values.""" | ||
|
||
__pydantic_config__ = {"extra": "allow"} # type: ignore | ||
|
||
field: PropertyApiName | ||
|
||
value: List[PropertyValue] | ||
|
||
type: Literal["in"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.