Skip to content

Commit

Permalink
Excavator: Upgrade API Version (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot authored Sep 18, 2024
1 parent 507de3c commit b45cbcc
Show file tree
Hide file tree
Showing 10 changed files with 7,914 additions and 7,787 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,8 @@ Namespace | Resource | Operation | HTTP request |
- [GtQueryV2Dict](docs/v2/models/GtQueryV2Dict.md)
- [Icon](docs/v2/models/Icon.md)
- [IconDict](docs/v2/models/IconDict.md)
- [InQuery](docs/v2/models/InQuery.md)
- [InQueryDict](docs/v2/models/InQueryDict.md)
- [InterfaceLinkType](docs/v2/models/InterfaceLinkType.md)
- [InterfaceLinkTypeApiName](docs/v2/models/InterfaceLinkTypeApiName.md)
- [InterfaceLinkTypeCardinality](docs/v2/models/InterfaceLinkTypeCardinality.md)
Expand Down
13 changes: 13 additions & 0 deletions docs/v2/ontologies/models/InQuery.md
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)
13 changes: 13 additions & 0 deletions docs/v2/ontologies/models/InQueryDict.md
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)
1 change: 1 addition & 0 deletions docs/v2/ontologies/models/SearchJsonQueryV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This discriminator class uses the `type` field to differentiate between classes.
| Class | Value
| ------------ | -------------
OrQueryV2 | or
InQuery | in
DoesNotIntersectPolygonQuery | doesNotIntersectPolygon
LtQueryV2 | lt
DoesNotIntersectBoundingBoxQuery | doesNotIntersectBoundingBox
Expand Down
1 change: 1 addition & 0 deletions docs/v2/ontologies/models/SearchJsonQueryV2Dict.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This discriminator class uses the `type` field to differentiate between classes.
| Class | Value
| ------------ | -------------
OrQueryV2Dict | or
InQueryDict | in
DoesNotIntersectPolygonQueryDict | doesNotIntersectPolygon
LtQueryV2Dict | lt
DoesNotIntersectBoundingBoxQueryDict | doesNotIntersectBoundingBox
Expand Down
42 changes: 42 additions & 0 deletions foundry/v2/ontologies/models/_in_query.py
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))
36 changes: 36 additions & 0 deletions foundry/v2/ontologies/models/_in_query_dict.py
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"]
2 changes: 2 additions & 0 deletions foundry/v2/ontologies/models/_search_json_query_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from foundry.v2.ontologies.models._equals_query_v2 import EqualsQueryV2
from foundry.v2.ontologies.models._gt_query_v2 import GtQueryV2
from foundry.v2.ontologies.models._gte_query_v2 import GteQueryV2
from foundry.v2.ontologies.models._in_query import InQuery
from foundry.v2.ontologies.models._intersects_bounding_box_query import (
IntersectsBoundingBoxQuery,
) # NOQA
Expand Down Expand Up @@ -103,6 +104,7 @@ def to_dict(self) -> AndQueryV2Dict:
SearchJsonQueryV2 = Annotated[
Union[
OrQueryV2,
InQuery,
DoesNotIntersectPolygonQuery,
LtQueryV2,
DoesNotIntersectBoundingBoxQuery,
Expand Down
2 changes: 2 additions & 0 deletions foundry/v2/ontologies/models/_search_json_query_v2_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from foundry.v2.ontologies.models._equals_query_v2_dict import EqualsQueryV2Dict
from foundry.v2.ontologies.models._gt_query_v2_dict import GtQueryV2Dict
from foundry.v2.ontologies.models._gte_query_v2_dict import GteQueryV2Dict
from foundry.v2.ontologies.models._in_query_dict import InQueryDict
from foundry.v2.ontologies.models._intersects_bounding_box_query_dict import (
IntersectsBoundingBoxQueryDict,
) # NOQA
Expand Down Expand Up @@ -97,6 +98,7 @@ class AndQueryV2Dict(TypedDict):
SearchJsonQueryV2Dict = Annotated[
Union[
OrQueryV2Dict,
InQueryDict,
DoesNotIntersectPolygonQueryDict,
LtQueryV2Dict,
DoesNotIntersectBoundingBoxQueryDict,
Expand Down
Loading

0 comments on commit b45cbcc

Please sign in to comment.