# @generated
# This file was automatically generated by the ncae-sdk code generator.
# DO NOT EDIT MANUALLY, ANY CHANGES WILL BE OVERWRITTEN.
from datetime import date, datetime
from typing import Annotated, Any, Optional, Type

from pydantic import AliasPath, ConfigDict, Field, TypeAdapter
from typing_extensions import NotRequired, TypedDict

from ncae_sdk import types
from ncae_sdk._resource import NestedId, OptionalStr, ReadOnlyNestedId, Resource, ResourceDict, Schema


class _GrafanaDashboardSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``GrafanaDashboard``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["module", "uid"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    uid: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    module_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False},
    )
    template: dict[str, Any] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    system_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    system_name: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    grafana_uid: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    grafana_view_url: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _GrafanaDashboardFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``GrafanaDashboard``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    uid: Optional[str] = Field()
    name: Optional[str] = Field()
    module: Optional[int] = Field()


class GrafanaDashboard(Resource):
    """
    Auto-generated model for resource ``GrafanaDashboard``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    uid: str = Field()
    name: str = Field()
    module_id: Optional[int] = Field(alias="module", default=None)
    template: dict[str, Any] = Field()
    system_id: int = Field(alias="system")
    system_name: str = Field()
    grafana_uid: str = Field()
    grafana_view_url: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _GrafanaDashboardSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _GrafanaDashboardFilterSchema


class GrafanaDashboardCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`GrafanaDashboard`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    uid: Annotated[str, Field()]
    name: Annotated[str, Field()]
    module_id: Annotated[Optional[int], Field(alias="module")]
    template: Annotated[dict[str, Any], Field()]
    system_id: Annotated[int, Field(alias="system")]


class GrafanaDashboardUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`GrafanaDashboard`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    uid: Annotated[NotRequired[str], Field()]
    name: Annotated[NotRequired[str], Field()]
    module_id: Annotated[NotRequired[Optional[int]], Field(alias="module")]
    template: Annotated[NotRequired[dict[str, Any]], Field()]
    system_id: Annotated[NotRequired[int], Field(alias="system")]


class GrafanaDashboardFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`GrafanaDashboard`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    uid: NotRequired[str]
    name: NotRequired[str]
    module: NotRequired[int]


class _InfluxRepositorySchema(Schema):
    """
    Auto-generated SDK schema model for resource ``InfluxRepository``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["module", "uid"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    uid: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    system_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    module_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False},
    )
    retention: types.InfluxRetention = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    bucket_name: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _InfluxRepositoryFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``InfluxRepository``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    uid: Optional[str] = Field()
    name: Optional[str] = Field()
    module: Optional[int] = Field()


class InfluxRepository(Resource):
    """
    Auto-generated model for resource ``InfluxRepository``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    uid: str = Field()
    name: str = Field()
    system_id: int = Field(alias="system")
    module_id: Optional[int] = Field(alias="module", default=None)
    retention: types.InfluxRetention = Field()
    bucket_name: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _InfluxRepositorySchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _InfluxRepositoryFilterSchema


class InfluxRepositoryCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`InfluxRepository`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    uid: Annotated[str, Field()]
    name: Annotated[str, Field()]
    system_id: Annotated[int, Field(alias="system")]
    module_id: Annotated[Optional[int], Field(alias="module")]
    retention: Annotated[NotRequired[types.InfluxRetention], Field()]


class InfluxRepositoryUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`InfluxRepository`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    uid: Annotated[NotRequired[str], Field()]
    name: Annotated[NotRequired[str], Field()]
    system_id: Annotated[NotRequired[int], Field(alias="system")]
    module_id: Annotated[NotRequired[Optional[int]], Field(alias="module")]
    retention: Annotated[NotRequired[types.InfluxRetention], Field()]


class InfluxRepositoryFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`InfluxRepository`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    uid: NotRequired[str]
    name: NotRequired[str]
    module: NotRequired[int]


class _PhaseInstanceSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``PhaseInstance``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["phase_id", "service_instance_id"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    status: types.PhaseStatus = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    phase_id: NestedId[str] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    service_instance_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    can_run_manually: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    is_running: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    action: types.PhaseInstanceAction = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    was_deployed: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _PhaseInstanceFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``PhaseInstance``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    service_instance_id: Optional[int] = Field()
    phase_id: Optional[str] = Field()


class PhaseInstance(Resource):
    """
    Auto-generated model for resource ``PhaseInstance``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    status: types.PhaseStatus = Field()
    phase_id: NestedId[str] = Field(alias="phase")
    service_instance_id: int = Field(alias="service_instance")
    can_run_manually: bool = Field()
    is_running: bool = Field()
    action: types.PhaseInstanceAction = Field()
    was_deployed: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _PhaseInstanceSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _PhaseInstanceFilterSchema


class PhaseInstanceCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`PhaseInstance`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    status: Annotated[NotRequired[types.PhaseStatus], Field()]
    phase_id: Annotated[NestedId[str], Field(alias="phase")]
    service_instance_id: Annotated[int, Field(alias="service_instance")]


class PhaseInstanceUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`PhaseInstance`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    status: Annotated[NotRequired[types.PhaseStatus], Field()]
    phase_id: Annotated[NotRequired[NestedId[str]], Field(alias="phase")]
    service_instance_id: Annotated[NotRequired[int], Field(alias="service_instance")]


class PhaseInstanceFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`PhaseInstance`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    service_instance_id: Annotated[NotRequired[int], Field(alias="service_instance")]
    phase_id: Annotated[NotRequired[str], Field(alias="phase")]


class _ServiceInstanceSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ServiceInstance``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    cmdb_entry_id: NestedId[int] = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    tag_ids: list[ReadOnlyNestedId[int]] = Field(
        json_schema_extra={"x-actions": ["create", "read"], "x-required": False, "x-sensitive": False}
    )
    data: Any = Field(json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False})
    can_deploy: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    can_decommission: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    last_log_entry: Optional[datetime] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    has_changed_shared_data: bool = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )


class _ServiceInstanceFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ServiceInstance``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    service_id: Optional[int] = Field()
    service_category: Optional[types.ServiceCategory] = Field()
    service_fire_and_forget: Optional[bool] = Field()
    service_device_ids: Optional[list[int]] = Field()
    tag_ids: Optional[list[int]] = Field()
    tag_all_of_ids: Optional[list[int]] = Field()
    has_changed_shared_data: Optional[bool] = Field()
    cmdb_entry_data_contains: Optional[str] = Field()


class ServiceInstance(Resource):
    """
    Auto-generated model for resource ``ServiceInstance``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    service_id: int = Field()
    cmdb_entry_id: NestedId[int] = Field(alias="cmdb_entry")
    tag_ids: list[ReadOnlyNestedId[int]] = Field(alias="tags")
    can_deploy: bool = Field()
    can_decommission: bool = Field()
    last_log_entry: Optional[datetime] = Field(default=None)
    has_changed_shared_data: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ServiceInstanceSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ServiceInstanceFilterSchema


class ServiceInstanceCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ServiceInstance`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    service_id: Annotated[int, Field()]
    tag_ids: Annotated[NotRequired[list[ReadOnlyNestedId[int]]], Field(alias="tags")]
    data: Annotated[Any, Field()]


class ServiceInstanceUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ServiceInstance`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    service_id: Annotated[NotRequired[int], Field()]
    data: Annotated[NotRequired[Any], Field()]


class ServiceInstanceFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ServiceInstance`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    service_category: Annotated[NotRequired[types.ServiceCategory], Field(alias="service__category")]
    service_fire_and_forget: Annotated[NotRequired[bool], Field(alias="service__fire_and_forget")]
    service_device_ids: Annotated[NotRequired[list[int]], Field(alias="service__devices")]
    tag_ids: Annotated[NotRequired[list[int]], Field(alias="tags")]
    tag_all_of_ids: Annotated[NotRequired[list[int]], Field(alias="tags_and")]
    has_changed_shared_data: NotRequired[bool]
    cmdb_entry_data_contains: Annotated[NotRequired[str], Field(alias="cmdb_entry__data")]


class _BasePhaseSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``BasePhase``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    order: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    slug: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    name: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    description: Optional[str] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auto_deploy: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    idempotency: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    timeout: Optional[int] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    phase_type: types.PhaseType = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    detail_url: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _BasePhaseFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``BasePhase``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()
    order: Optional[int] = Field()
    service_id: Optional[int] = Field()


class BasePhase(Resource):
    """
    Auto-generated model for resource ``BasePhase``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: str = Field()
    order: int = Field()
    slug: OptionalStr = Field(default=None)
    name: str = Field()
    description: OptionalStr = Field(alias="text", default=None)
    service_id: int = Field(alias="service")
    auto_deploy: bool = Field()
    idempotency: bool = Field()
    timeout: Optional[int] = Field(default=None)
    phase_type: types.PhaseType = Field()
    detail_url: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _BasePhaseSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _BasePhaseFilterSchema


class BasePhaseFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`BasePhase`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]
    order: NotRequired[int]
    service_id: Annotated[NotRequired[int], Field(alias="service")]


class _ExtApiServiceSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ExtApiService``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    base_url: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    ncae_backend_url_override: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    auth_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    verify_tls: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    is_awx: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _ExtApiServiceFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ExtApiService``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()


class ExtApiService(Resource):
    """
    Auto-generated model for resource ``ExtApiService``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    name: str = Field()
    description: OptionalStr = Field(default=None)
    base_url: str = Field()
    ncae_backend_url_override: OptionalStr = Field(default=None)
    auth_id: int = Field()
    verify_tls: bool = Field()
    is_awx: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ExtApiServiceSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ExtApiServiceFilterSchema


class ExtApiServiceCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ExtApiService`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    base_url: Annotated[str, Field()]
    ncae_backend_url_override: Annotated[NotRequired[OptionalStr], Field()]
    auth_id: Annotated[int, Field()]
    verify_tls: Annotated[NotRequired[bool], Field()]
    is_awx: Annotated[NotRequired[bool], Field()]


class ExtApiServiceUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ExtApiService`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    base_url: Annotated[NotRequired[str], Field()]
    ncae_backend_url_override: Annotated[NotRequired[OptionalStr], Field()]
    auth_id: Annotated[NotRequired[int], Field()]
    verify_tls: Annotated[NotRequired[bool], Field()]
    is_awx: Annotated[NotRequired[bool], Field()]


class ExtApiServiceFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ExtApiService`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]


class _PhaseSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Phase``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    order: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    slug: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    path: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    decommission_path: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    uri_is_reverse_capable: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    ext_api_service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auto_deploy: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    idempotency: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    send_credentials: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    undeployable: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    timeout: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )


class _PhaseFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Phase``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    order: Optional[int] = Field()
    name: Optional[str] = Field()
    service_id: Optional[int] = Field()


class Phase(Resource):
    """
    Auto-generated model for resource ``Phase``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: str = Field()
    order: int = Field()
    slug: OptionalStr = Field(default=None)
    name: str = Field()
    description: OptionalStr = Field(alias="text", default=None)
    path: str = Field(alias="uri")
    decommission_path: OptionalStr = Field(alias="decomUri", default=None)
    uri_is_reverse_capable: bool = Field(alias="uriIsReverseCapable")
    service_id: int = Field()
    ext_api_service_id: int = Field()
    auto_deploy: bool = Field()
    idempotency: bool = Field()
    send_credentials: bool = Field()
    undeployable: bool = Field()
    timeout: Optional[int] = Field(default=None)

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _PhaseSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _PhaseFilterSchema


class PhaseCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Phase`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    order: Annotated[int, Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    path: Annotated[str, Field(alias="uri")]
    decommission_path: Annotated[NotRequired[OptionalStr], Field(alias="decomUri")]
    uri_is_reverse_capable: Annotated[NotRequired[bool], Field(alias="uriIsReverseCapable")]
    service_id: Annotated[int, Field()]
    ext_api_service_id: Annotated[int, Field()]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]


class PhaseUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Phase`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    order: Annotated[NotRequired[int], Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    path: Annotated[NotRequired[str], Field(alias="uri")]
    decommission_path: Annotated[NotRequired[OptionalStr], Field(alias="decomUri")]
    uri_is_reverse_capable: Annotated[NotRequired[bool], Field(alias="uriIsReverseCapable")]
    service_id: Annotated[NotRequired[int], Field()]
    ext_api_service_id: Annotated[NotRequired[int], Field()]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]


class PhaseFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Phase`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    order: NotRequired[int]
    name: NotRequired[str]
    service_id: NotRequired[int]


class _ReportSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Report``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["slug"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    slug: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    is_async: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    send_credentials: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    cache_time: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    module_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    device_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    use_collector: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    last_response: Optional[dict[str, Any]] = Field(
        default=None, json_schema_extra={"x-actions": ["create", "update"], "x-required": False, "x-sensitive": False}
    )
    base_url: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    verify_tls: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    path: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    ext_api_service_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    category: types.ReportCategory = Field(
        default=types.ReportCategory.DEFAULT,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    template: Optional[dict[str, Any]] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )


class _ReportFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Report``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    slug: Optional[str] = Field()
    name: Optional[str] = Field()
    device_id: Optional[int] = Field()
    device_name: Optional[str] = Field()
    module_name: Optional[str] = Field()
    category: Optional[types.ReportCategory] = Field()


class Report(Resource):
    """
    Auto-generated model for resource ``Report``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    slug: str = Field()
    description: OptionalStr = Field(default=None)
    is_async: bool = Field()
    send_credentials: bool = Field()
    cache_time: int = Field()
    module_id: Optional[int] = Field(
        default=None, serialization_alias="module_id", validation_alias=AliasPath("module", "id")
    )
    device_id: Optional[int] = Field(
        default=None, serialization_alias="device_id", validation_alias=AliasPath("device", "id")
    )
    use_collector: bool = Field()
    base_url: OptionalStr = Field(alias="url", default=None)
    verify_tls: bool = Field()
    path: OptionalStr = Field(alias="uri", default=None)
    ext_api_service_id: Optional[int] = Field(alias="ext_api_service", default=None)
    category: types.ReportCategory = Field(default=types.ReportCategory.DEFAULT)
    template: Optional[dict[str, Any]] = Field(default=None)

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ReportSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ReportFilterSchema


class ReportCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Report`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    slug: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    is_async: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    cache_time: Annotated[NotRequired[int], Field()]
    module_id: Annotated[
        NotRequired[Optional[int]], Field(serialization_alias="module_id", validation_alias=AliasPath("module", "id"))
    ]
    device_id: Annotated[
        NotRequired[Optional[int]], Field(serialization_alias="device_id", validation_alias=AliasPath("device", "id"))
    ]
    use_collector: Annotated[NotRequired[bool], Field()]
    last_response: Annotated[NotRequired[Optional[dict[str, Any]]], Field()]
    base_url: Annotated[NotRequired[OptionalStr], Field(alias="url")]
    verify_tls: Annotated[NotRequired[bool], Field()]
    path: Annotated[NotRequired[OptionalStr], Field(alias="uri")]
    ext_api_service_id: Annotated[NotRequired[Optional[int]], Field(alias="ext_api_service")]
    category: Annotated[NotRequired[types.ReportCategory], Field(default=types.ReportCategory.DEFAULT)]
    template: Annotated[NotRequired[Optional[dict[str, Any]]], Field()]


class ReportUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Report`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    slug: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    is_async: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    cache_time: Annotated[NotRequired[int], Field()]
    module_id: Annotated[
        NotRequired[Optional[int]], Field(serialization_alias="module_id", validation_alias=AliasPath("module", "id"))
    ]
    device_id: Annotated[
        NotRequired[Optional[int]], Field(serialization_alias="device_id", validation_alias=AliasPath("device", "id"))
    ]
    use_collector: Annotated[NotRequired[bool], Field()]
    last_response: Annotated[NotRequired[Optional[dict[str, Any]]], Field()]
    base_url: Annotated[NotRequired[OptionalStr], Field(alias="url")]
    verify_tls: Annotated[NotRequired[bool], Field()]
    path: Annotated[NotRequired[OptionalStr], Field(alias="uri")]
    ext_api_service_id: Annotated[NotRequired[Optional[int]], Field(alias="ext_api_service")]
    category: Annotated[NotRequired[types.ReportCategory], Field(default=types.ReportCategory.DEFAULT)]
    template: Annotated[NotRequired[Optional[dict[str, Any]]], Field()]


class ReportFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Report`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    slug: NotRequired[str]
    name: NotRequired[str]
    device_id: NotRequired[int]
    device_name: Annotated[NotRequired[str], Field(alias="device__name")]
    module_name: Annotated[NotRequired[str], Field(alias="module__name")]
    category: NotRequired[types.ReportCategory]


class _ChangeScheduleSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ChangeSchedule``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    action: types.ChangeScheduleAction = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    status: types.ChangeScheduleStatus = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    service_instance_ids: list[NestedId[int]] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    next_execution: Optional[datetime] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    execution_style: types.ChangeScheduleExecutionStyle = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    interval_name: Optional[types.ChangeScheduleInterval] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    interval_number: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    stop_on_error: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    retry_attempts: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    retry_wait: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    last_run: Optional[datetime] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    is_running: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    timeout: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )


class _ChangeScheduleFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ChangeSchedule``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()
    action: Optional[list[str]] = Field()
    status: Optional[list[types.ChangeScheduleStatus]] = Field()
    service_instance_ids: Optional[list[int]] = Field()


class ChangeSchedule(Resource):
    """
    Auto-generated model for resource ``ChangeSchedule``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    action: types.ChangeScheduleAction = Field()
    status: types.ChangeScheduleStatus = Field()
    service_instance_ids: list[NestedId[int]] = Field(alias="service_instances")
    next_execution: Optional[datetime] = Field(default=None)
    execution_style: types.ChangeScheduleExecutionStyle = Field()
    interval_name: Optional[types.ChangeScheduleInterval] = Field(default=None)
    interval_number: Optional[int] = Field(default=None)
    stop_on_error: bool = Field()
    retry_attempts: Optional[int] = Field(default=None)
    retry_wait: Optional[int] = Field(default=None)
    last_run: Optional[datetime] = Field(default=None)
    is_running: bool = Field()
    timeout: Optional[int] = Field(default=None)

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ChangeScheduleSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ChangeScheduleFilterSchema


class ChangeScheduleCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ChangeSchedule`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    action: Annotated[types.ChangeScheduleAction, Field()]
    service_instance_ids: Annotated[list[NestedId[int]], Field(alias="service_instances")]
    next_execution: Annotated[NotRequired[Optional[datetime]], Field()]
    execution_style: Annotated[NotRequired[types.ChangeScheduleExecutionStyle], Field()]
    interval_name: Annotated[NotRequired[Optional[types.ChangeScheduleInterval]], Field()]
    interval_number: Annotated[NotRequired[Optional[int]], Field()]
    stop_on_error: Annotated[NotRequired[bool], Field()]
    retry_attempts: Annotated[NotRequired[Optional[int]], Field()]
    retry_wait: Annotated[NotRequired[Optional[int]], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]


class ChangeScheduleUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ChangeSchedule`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    action: Annotated[NotRequired[types.ChangeScheduleAction], Field()]
    service_instance_ids: Annotated[NotRequired[list[NestedId[int]]], Field(alias="service_instances")]
    next_execution: Annotated[NotRequired[Optional[datetime]], Field()]
    execution_style: Annotated[NotRequired[types.ChangeScheduleExecutionStyle], Field()]
    interval_name: Annotated[NotRequired[Optional[types.ChangeScheduleInterval]], Field()]
    interval_number: Annotated[NotRequired[Optional[int]], Field()]
    stop_on_error: Annotated[NotRequired[bool], Field()]
    retry_attempts: Annotated[NotRequired[Optional[int]], Field()]
    retry_wait: Annotated[NotRequired[Optional[int]], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]


class ChangeScheduleFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ChangeSchedule`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]
    action: NotRequired[list[str]]
    status: NotRequired[list[types.ChangeScheduleStatus]]
    service_instance_ids: Annotated[NotRequired[list[int]], Field(alias="service_instances")]


class _TenantSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Tenant``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )


class _TenantFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Tenant``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class Tenant(Resource):
    """
    Auto-generated model for resource ``Tenant``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    name: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _TenantSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _TenantFilterSchema


class TenantFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Tenant`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _SharedDataSubscriberSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``SharedDataSubscriber``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["data_path", "service_instance_id"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    service_instance_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    bucket_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    bucket_path: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    data_path: list[str] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )


class _SharedDataSubscriberFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``SharedDataSubscriber``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    service_instance_id: Optional[int] = Field()
    data_path: Optional[str] = Field()


class SharedDataSubscriber(Resource):
    """
    Auto-generated model for resource ``SharedDataSubscriber``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    service_instance_id: int = Field(alias="service_instance")
    bucket_id: int = Field(alias="bucket")
    bucket_path: str = Field()
    data_path: list[str] = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _SharedDataSubscriberSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _SharedDataSubscriberFilterSchema


class SharedDataSubscriberCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`SharedDataSubscriber`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    service_instance_id: Annotated[int, Field(alias="service_instance")]
    bucket_id: Annotated[int, Field(alias="bucket")]
    data_path: Annotated[list[str], Field()]


class SharedDataSubscriberUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`SharedDataSubscriber`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    service_instance_id: Annotated[NotRequired[int], Field(alias="service_instance")]
    bucket_id: Annotated[NotRequired[int], Field(alias="bucket")]
    data_path: Annotated[NotRequired[list[str]], Field()]


class SharedDataSubscriberFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`SharedDataSubscriber`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    service_instance_id: Annotated[NotRequired[int], Field(alias="service_instance")]
    data_path: NotRequired[str]


class _GrafanaSystemSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``GrafanaSystem``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["uid"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    uid: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    public_base_url: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    api_base_url: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    api_username: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )
    api_password: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )
    api_verify_ssl: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    org_name_prefix: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    use_default_org: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    influx_source_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    sso_enabled: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    sso_ncae_external_url: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    sso_ncae_internal_url: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )


class _GrafanaSystemFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``GrafanaSystem``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    uid: Optional[str] = Field()
    name: Optional[str] = Field()


class GrafanaSystem(Resource):
    """
    Auto-generated model for resource ``GrafanaSystem``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    uid: str = Field()
    name: str = Field()
    public_base_url: OptionalStr = Field(default=None)
    api_base_url: str = Field()
    api_verify_ssl: bool = Field()
    org_name_prefix: str = Field()
    use_default_org: bool = Field()
    influx_source_id: Optional[int] = Field(alias="influx_source", default=None)
    sso_enabled: bool = Field()
    sso_ncae_external_url: OptionalStr = Field(default=None)
    sso_ncae_internal_url: OptionalStr = Field(default=None)

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _GrafanaSystemSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _GrafanaSystemFilterSchema


class GrafanaSystemCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`GrafanaSystem`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    uid: Annotated[str, Field()]
    name: Annotated[str, Field()]
    public_base_url: Annotated[NotRequired[OptionalStr], Field()]
    api_base_url: Annotated[str, Field()]
    api_username: Annotated[str, Field()]
    api_password: Annotated[str, Field()]
    api_verify_ssl: Annotated[NotRequired[bool], Field()]
    org_name_prefix: Annotated[NotRequired[str], Field()]
    use_default_org: Annotated[NotRequired[bool], Field()]
    influx_source_id: Annotated[NotRequired[Optional[int]], Field(alias="influx_source")]
    sso_enabled: Annotated[NotRequired[bool], Field()]
    sso_ncae_external_url: Annotated[NotRequired[OptionalStr], Field()]
    sso_ncae_internal_url: Annotated[NotRequired[OptionalStr], Field()]


class GrafanaSystemUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`GrafanaSystem`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    uid: Annotated[NotRequired[str], Field()]
    name: Annotated[NotRequired[str], Field()]
    public_base_url: Annotated[NotRequired[OptionalStr], Field()]
    api_base_url: Annotated[NotRequired[str], Field()]
    api_username: Annotated[NotRequired[str], Field()]
    api_password: Annotated[NotRequired[str], Field()]
    api_verify_ssl: Annotated[NotRequired[bool], Field()]
    org_name_prefix: Annotated[NotRequired[str], Field()]
    use_default_org: Annotated[NotRequired[bool], Field()]
    influx_source_id: Annotated[NotRequired[Optional[int]], Field(alias="influx_source")]
    sso_enabled: Annotated[NotRequired[bool], Field()]
    sso_ncae_external_url: Annotated[NotRequired[OptionalStr], Field()]
    sso_ncae_internal_url: Annotated[NotRequired[OptionalStr], Field()]


class GrafanaSystemFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`GrafanaSystem`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    uid: NotRequired[str]
    name: NotRequired[str]


class _ModuleSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Module``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    type: types.ModuleType = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    service_class: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    install_service_id: Optional[int] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    last_service_instance_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    is_installed: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _ModuleFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Module``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()


class Module(Resource):
    """
    Auto-generated model for resource ``Module``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    type: types.ModuleType = Field()
    name: str = Field()
    description: OptionalStr = Field(default=None)
    service_class: str = Field()
    install_service_id: Optional[int] = Field(alias="install_service", default=None)
    last_service_instance_id: Optional[int] = Field(alias="last_service_instance", default=None)
    is_installed: bool = Field(alias="installed")

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ModuleSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ModuleFilterSchema


class ModuleFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Module`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]


class _PythonScriptPhaseSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``PythonScriptPhase``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    order: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    slug: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auto_deploy: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    idempotency: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    script_code: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    dependency_bundle: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    phase_type: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _PythonScriptPhaseFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``PythonScriptPhase``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class PythonScriptPhase(Resource):
    """
    Auto-generated model for resource ``PythonScriptPhase``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: str = Field()
    order: int = Field()
    slug: OptionalStr = Field(default=None)
    name: str = Field()
    description: OptionalStr = Field(alias="text", default=None)
    service_id: int = Field(alias="service")
    auto_deploy: bool = Field()
    idempotency: bool = Field()
    script_code: str = Field()
    dependency_bundle: Optional[int] = Field(default=None)
    phase_type: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _PythonScriptPhaseSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _PythonScriptPhaseFilterSchema


class PythonScriptPhaseCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`PythonScriptPhase`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    order: Annotated[int, Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    service_id: Annotated[int, Field(alias="service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    script_code: Annotated[NotRequired[str], Field()]
    dependency_bundle: Annotated[NotRequired[Optional[int]], Field()]


class PythonScriptPhaseUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`PythonScriptPhase`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    order: Annotated[NotRequired[int], Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    script_code: Annotated[NotRequired[str], Field()]
    dependency_bundle: Annotated[NotRequired[Optional[int]], Field()]


class PythonScriptPhaseFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`PythonScriptPhase`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _AuditLogSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``AuditLog``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    timestamp: datetime = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    action: types.AuditLogAction = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    related_app: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    related_model: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    related_label: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    object_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False},
    )
    object_label: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    actor_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False},
    )
    actor_name: Optional[str] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    changes_info: Optional[str] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    changes_structured: list[types.AuditLogChange] = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )


class _AuditLogFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``AuditLog``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    actor_id: Optional[int] = Field()
    action: Optional[types.AuditLogAction] = Field()
    object_label: Optional[str] = Field()


class AuditLog(Resource):
    """
    Auto-generated model for resource ``AuditLog``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    timestamp: datetime = Field()
    action: types.AuditLogAction = Field()
    related_app: str = Field()
    related_model: str = Field()
    related_label: str = Field(alias="content_label")
    object_id: Optional[int] = Field(default=None)
    object_label: str = Field(alias="object_repr")
    actor_id: Optional[int] = Field(default=None)
    actor_name: OptionalStr = Field(default=None)
    changes_info: OptionalStr = Field(default=None)
    changes_structured: list[types.AuditLogChange] = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _AuditLogSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _AuditLogFilterSchema


class AuditLogFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`AuditLog`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    actor_id: Annotated[NotRequired[int], Field(alias="actor")]
    action: NotRequired[types.AuditLogAction]
    object_label: Annotated[NotRequired[str], Field(alias="object_repr")]


class _DeviceSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Device``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    host: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    device_model_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    credential_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False},
    )
    group_ids: list[int] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    verify_tls: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    extra_vars: dict[str, Any] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _DeviceFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Device``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()
    host: Optional[str] = Field()


class Device(Resource):
    """
    Auto-generated model for resource ``Device``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    description: OptionalStr = Field(default=None)
    host: str = Field(alias="ip")
    device_model_id: int = Field(serialization_alias="device_model", validation_alias=AliasPath("device_model", "id"))
    credential_id: Optional[int] = Field(
        default=None, serialization_alias="credential", validation_alias=AliasPath("credential", "id")
    )
    group_ids: list[int] = Field(alias="groups")
    verify_tls: bool = Field()
    extra_vars: dict[str, Any] = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _DeviceSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _DeviceFilterSchema


class DeviceCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Device`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    host: Annotated[str, Field(alias="ip")]
    device_model_id: Annotated[
        int, Field(serialization_alias="device_model", validation_alias=AliasPath("device_model", "id"))
    ]
    credential_id: Annotated[
        Optional[int], Field(serialization_alias="credential", validation_alias=AliasPath("credential", "id"))
    ]
    group_ids: Annotated[NotRequired[list[int]], Field(alias="groups")]
    verify_tls: Annotated[NotRequired[bool], Field()]
    extra_vars: Annotated[NotRequired[dict[str, Any]], Field()]


class DeviceUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Device`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    host: Annotated[NotRequired[str], Field(alias="ip")]
    device_model_id: Annotated[
        NotRequired[int], Field(serialization_alias="device_model", validation_alias=AliasPath("device_model", "id"))
    ]
    credential_id: Annotated[
        NotRequired[Optional[int]],
        Field(serialization_alias="credential", validation_alias=AliasPath("credential", "id")),
    ]
    group_ids: Annotated[NotRequired[list[int]], Field(alias="groups")]
    verify_tls: Annotated[NotRequired[bool], Field()]
    extra_vars: Annotated[NotRequired[dict[str, Any]], Field()]


class DeviceFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Device`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]
    host: Annotated[NotRequired[str], Field(alias="ip")]


class _ServiceSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Service``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    module_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    fire_and_forget: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    category: types.ServiceCategory = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    device_ids: list[NestedId[int]] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    template: dict[str, Any] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    is_decommissionable: str = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    custom_settings: Any = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _ServiceFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Service``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()
    device_ids: Optional[list[int]] = Field()
    fire_and_forget: Optional[bool] = Field()
    module_id: Optional[int] = Field()
    category: Optional[types.ServiceCategory] = Field()


class Service(Resource):
    """
    Auto-generated model for resource ``Service``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    description: OptionalStr = Field(default=None)
    module_id: Optional[int] = Field(default=None, validation_alias=AliasPath("module", "id"))
    fire_and_forget: bool = Field()
    category: types.ServiceCategory = Field()
    device_ids: list[NestedId[int]] = Field(alias="devices")
    template: dict[str, Any] = Field()
    is_decommissionable: str = Field(alias="isDecommissionable")
    custom_settings: Any = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ServiceSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ServiceFilterSchema


class ServiceCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Service`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    module_id: Annotated[NotRequired[Optional[int]], Field(validation_alias=AliasPath("module", "id"))]
    fire_and_forget: Annotated[NotRequired[bool], Field()]
    category: Annotated[NotRequired[types.ServiceCategory], Field()]
    device_ids: Annotated[NotRequired[list[NestedId[int]]], Field(alias="devices")]
    template: Annotated[dict[str, Any], Field()]


class ServiceUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Service`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    module_id: Annotated[NotRequired[Optional[int]], Field(validation_alias=AliasPath("module", "id"))]
    fire_and_forget: Annotated[NotRequired[bool], Field()]
    category: Annotated[NotRequired[types.ServiceCategory], Field()]
    device_ids: Annotated[NotRequired[list[NestedId[int]]], Field(alias="devices")]
    template: Annotated[NotRequired[dict[str, Any]], Field()]


class ServiceFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Service`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]
    device_ids: Annotated[NotRequired[list[int]], Field(alias="devices")]
    fire_and_forget: NotRequired[bool]
    module_id: Annotated[NotRequired[int], Field(alias="module")]
    category: NotRequired[types.ServiceCategory]


class _TagRelationSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``TagRelation``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    object_type: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    object_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    tag_ids: list[int] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )


class _TagRelationFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``TagRelation``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    object_type: Optional[str] = Field()
    object_ids: Optional[list[int]] = Field()


class TagRelation(Resource):
    """
    Auto-generated model for resource ``TagRelation``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    object_type: str = Field(alias="model_name")
    object_id: int = Field()
    tag_ids: list[int] = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _TagRelationSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _TagRelationFilterSchema


class TagRelationCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`TagRelation`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    object_type: Annotated[str, Field(alias="model_name")]
    object_id: Annotated[int, Field()]
    tag_ids: Annotated[list[int], Field()]


class TagRelationUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`TagRelation`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    object_type: Annotated[NotRequired[str], Field(alias="model_name")]
    object_id: Annotated[NotRequired[int], Field()]
    tag_ids: Annotated[NotRequired[list[int]], Field()]


class TagRelationFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`TagRelation`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    object_type: Annotated[NotRequired[str], Field(alias="model_name")]
    object_ids: Annotated[NotRequired[list[int]], Field(alias="object_ids[]")]


class _PollingPhaseSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``PollingPhase``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    order: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    slug: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    path: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    decommission_path: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    ext_api_service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auto_deploy: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    idempotency: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    send_credentials: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    timeout: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    interval_number: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    interval_name: Optional[types.ChangeScheduleInterval] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    retry_attempts: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    retry_wait: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    crypto_type: Optional[types.CryptoType] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    phase_type: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    uri_is_reverse_capable: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _PollingPhaseFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``PollingPhase``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class PollingPhase(Resource):
    """
    Auto-generated model for resource ``PollingPhase``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: str = Field()
    order: int = Field()
    slug: OptionalStr = Field(default=None)
    name: str = Field()
    description: OptionalStr = Field(alias="text", default=None)
    path: str = Field(alias="uri")
    decommission_path: OptionalStr = Field(alias="decom_uri", default=None)
    service_id: int = Field(alias="service")
    ext_api_service_id: int = Field(alias="ext_api_service")
    auto_deploy: bool = Field()
    idempotency: bool = Field()
    send_credentials: bool = Field()
    timeout: int = Field()
    interval_number: Optional[int] = Field(default=None)
    interval_name: Optional[types.ChangeScheduleInterval] = Field(default=None)
    retry_attempts: Optional[int] = Field(default=None)
    retry_wait: Optional[int] = Field(default=None)
    crypto_type: Optional[types.CryptoType] = Field(default=None)
    phase_type: str = Field()
    uri_is_reverse_capable: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _PollingPhaseSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _PollingPhaseFilterSchema


class PollingPhaseCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`PollingPhase`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    order: Annotated[int, Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    path: Annotated[str, Field(alias="uri")]
    decommission_path: Annotated[NotRequired[OptionalStr], Field(alias="decom_uri")]
    service_id: Annotated[int, Field(alias="service")]
    ext_api_service_id: Annotated[int, Field(alias="ext_api_service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[int, Field()]
    interval_number: Annotated[NotRequired[Optional[int]], Field()]
    interval_name: Annotated[NotRequired[Optional[types.ChangeScheduleInterval]], Field()]
    retry_attempts: Annotated[NotRequired[Optional[int]], Field()]
    retry_wait: Annotated[NotRequired[Optional[int]], Field()]
    crypto_type: Annotated[NotRequired[Optional[types.CryptoType]], Field()]
    uri_is_reverse_capable: Annotated[NotRequired[bool], Field()]


class PollingPhaseUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`PollingPhase`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    order: Annotated[NotRequired[int], Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    path: Annotated[NotRequired[str], Field(alias="uri")]
    decommission_path: Annotated[NotRequired[OptionalStr], Field(alias="decom_uri")]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    ext_api_service_id: Annotated[NotRequired[int], Field(alias="ext_api_service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[NotRequired[int], Field()]
    interval_number: Annotated[NotRequired[Optional[int]], Field()]
    interval_name: Annotated[NotRequired[Optional[types.ChangeScheduleInterval]], Field()]
    retry_attempts: Annotated[NotRequired[Optional[int]], Field()]
    retry_wait: Annotated[NotRequired[Optional[int]], Field()]
    crypto_type: Annotated[NotRequired[Optional[types.CryptoType]], Field()]
    uri_is_reverse_capable: Annotated[NotRequired[bool], Field()]


class PollingPhaseFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`PollingPhase`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _TagSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Tag``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    color: types.TagColor = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    order: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    service_instance_count: int = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )


class _TagFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Tag``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()


class Tag(Resource):
    """
    Auto-generated model for resource ``Tag``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    description: OptionalStr = Field(default=None)
    color: types.TagColor = Field()
    order: int = Field()
    service_instance_count: int = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _TagSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _TagFilterSchema


class TagCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Tag`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    color: Annotated[types.TagColor, Field()]
    order: Annotated[NotRequired[int], Field()]


class TagUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Tag`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    color: Annotated[NotRequired[types.TagColor], Field()]
    order: Annotated[NotRequired[int], Field()]


class TagFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Tag`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]


class _UsageLogSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``UsageLog``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    counter: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    last_access: datetime = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    last_meta: Any = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _UsageLogFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``UsageLog``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class UsageLog(Resource):
    """
    Auto-generated model for resource ``UsageLog``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    name: str = Field()
    counter: int = Field()
    last_access: datetime = Field()
    last_meta: Any = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _UsageLogSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _UsageLogFilterSchema


class UsageLogFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`UsageLog`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _DeviceGroupSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``DeviceGroup``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["tree_slug"], ["parent_id", "slug"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    slug: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    parent_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    device_ids: list[int] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    is_protected: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    tree_name: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tree_slug: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tree_path: list[int] = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tree_depth: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _DeviceGroupFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``DeviceGroup``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()
    slug: Optional[str] = Field()
    parent_id: Optional[int] = Field()
    tree_slug: Optional[str] = Field()
    tree_ancestor: Optional[int] = Field()


class DeviceGroup(Resource):
    """
    Auto-generated model for resource ``DeviceGroup``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    slug: str = Field()
    parent_id: Optional[int] = Field(alias="parent", default=None)
    device_ids: list[int] = Field(alias="device_set")
    is_protected: bool = Field()
    tree_name: str = Field()
    tree_slug: str = Field()
    tree_path: list[int] = Field()
    tree_depth: int = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _DeviceGroupSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _DeviceGroupFilterSchema


class DeviceGroupCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`DeviceGroup`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    slug: Annotated[NotRequired[str], Field()]
    parent_id: Annotated[NotRequired[Optional[int]], Field(alias="parent")]
    device_ids: Annotated[NotRequired[list[int]], Field(alias="device_set")]
    is_protected: Annotated[NotRequired[bool], Field()]


class DeviceGroupUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`DeviceGroup`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    slug: Annotated[NotRequired[str], Field()]
    parent_id: Annotated[NotRequired[Optional[int]], Field(alias="parent")]
    device_ids: Annotated[NotRequired[list[int]], Field(alias="device_set")]
    is_protected: Annotated[NotRequired[bool], Field()]


class DeviceGroupFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`DeviceGroup`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]
    slug: NotRequired[str]
    parent_id: Annotated[NotRequired[Optional[int]], Field(alias="parent")]
    tree_slug: NotRequired[str]
    tree_ancestor: NotRequired[int]


class _FavouriteSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Favourite``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    object_type: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    object_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    name: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    slug: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _FavouriteFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Favourite``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class Favourite(Resource):
    """
    Auto-generated model for resource ``Favourite``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    object_type: str = Field(alias="content_type")
    object_id: int = Field()
    name: str = Field()
    slug: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _FavouriteSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _FavouriteFilterSchema


class FavouriteCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Favourite`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    object_type: Annotated[str, Field(alias="content_type")]
    object_id: Annotated[int, Field()]


class FavouriteUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Favourite`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    object_type: Annotated[NotRequired[str], Field(alias="content_type")]
    object_id: Annotated[NotRequired[int], Field()]


class FavouriteFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Favourite`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _CredentialSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Credential``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    username: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )
    password: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": True}
    )
    become_password: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": False, "x-sensitive": True}
    )


class _CredentialFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Credential``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    name: Optional[str] = Field()
    search: Optional[str] = Field()


class Credential(Resource):
    """
    Auto-generated model for resource ``Credential``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    description: OptionalStr = Field(default=None)

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _CredentialSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _CredentialFilterSchema


class CredentialCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Credential`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    username: Annotated[str, Field()]
    password: Annotated[str, Field()]
    become_password: Annotated[NotRequired[str], Field()]


class CredentialUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Credential`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    username: Annotated[NotRequired[str], Field()]
    password: Annotated[NotRequired[str], Field()]
    become_password: Annotated[NotRequired[str], Field()]


class CredentialFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Credential`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    name: NotRequired[str]
    search: NotRequired[str]


class _UserSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``User``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["username"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    username: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    first_name: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    last_name: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    email: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    is_active: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    is_staff: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    is_superuser: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    is_service_account: bool = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    has_local_password: bool = Field(
        json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )


class _UserFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``User``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    username: Optional[str] = Field()
    email: Optional[str] = Field()
    is_service_account: Optional[bool] = Field()


class User(Resource):
    """
    Auto-generated model for resource ``User``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    username: str = Field()
    first_name: OptionalStr = Field(default=None)
    last_name: OptionalStr = Field(default=None)
    email: OptionalStr = Field(default=None)
    is_active: bool = Field()
    is_staff: bool = Field()
    is_superuser: bool = Field()
    is_service_account: bool = Field()
    has_local_password: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _UserSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _UserFilterSchema


class UserCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`User`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    username: Annotated[str, Field()]
    first_name: Annotated[NotRequired[OptionalStr], Field()]
    last_name: Annotated[NotRequired[OptionalStr], Field()]
    email: Annotated[NotRequired[OptionalStr], Field()]
    is_active: Annotated[NotRequired[bool], Field()]
    is_staff: Annotated[NotRequired[bool], Field()]
    is_superuser: Annotated[NotRequired[bool], Field()]


class UserUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`User`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    username: Annotated[NotRequired[str], Field()]
    first_name: Annotated[NotRequired[OptionalStr], Field()]
    last_name: Annotated[NotRequired[OptionalStr], Field()]
    email: Annotated[NotRequired[OptionalStr], Field()]
    is_active: Annotated[NotRequired[bool], Field()]
    is_staff: Annotated[NotRequired[bool], Field()]
    is_superuser: Annotated[NotRequired[bool], Field()]


class UserFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`User`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    username: NotRequired[str]
    email: NotRequired[str]
    is_service_account: NotRequired[bool]


class _CmdbEntrySchema(Schema):
    """
    Auto-generated SDK schema model for resource ``CmdbEntry``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    created_at: datetime = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    modified_at: datetime = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    data: dict[str, Any] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    callback_data: Optional[Any] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )


class _CmdbEntryFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``CmdbEntry``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class CmdbEntry(Resource):
    """
    Auto-generated model for resource ``CmdbEntry``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    created_at: datetime = Field(alias="created")
    modified_at: datetime = Field(alias="modified")
    data: dict[str, Any] = Field()
    callback_data: Optional[Any] = Field(default=None)

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _CmdbEntrySchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _CmdbEntryFilterSchema


class CmdbEntryCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`CmdbEntry`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    data: Annotated[dict[str, Any], Field()]
    callback_data: Annotated[NotRequired[Optional[Any]], Field()]


class CmdbEntryUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`CmdbEntry`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    data: Annotated[NotRequired[dict[str, Any]], Field()]
    callback_data: Annotated[NotRequired[Optional[Any]], Field()]


class CmdbEntryFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`CmdbEntry`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _InfluxSystemSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``InfluxSystem``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["uid"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    uid: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    api_base_url: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    api_username: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )
    api_password: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )
    api_verify_ssl: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    org_name_prefix: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    bucket_prefix: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _InfluxSystemFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``InfluxSystem``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    uid: Optional[str] = Field()
    name: Optional[str] = Field()


class InfluxSystem(Resource):
    """
    Auto-generated model for resource ``InfluxSystem``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    uid: str = Field()
    name: str = Field()
    api_base_url: str = Field()
    api_verify_ssl: bool = Field()
    org_name_prefix: str = Field()
    bucket_prefix: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _InfluxSystemSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _InfluxSystemFilterSchema


class InfluxSystemCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`InfluxSystem`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    uid: Annotated[str, Field()]
    name: Annotated[str, Field()]
    api_base_url: Annotated[str, Field()]
    api_username: Annotated[str, Field()]
    api_password: Annotated[str, Field()]
    api_verify_ssl: Annotated[NotRequired[bool], Field()]
    org_name_prefix: Annotated[NotRequired[str], Field()]
    bucket_prefix: Annotated[NotRequired[str], Field()]


class InfluxSystemUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`InfluxSystem`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    uid: Annotated[NotRequired[str], Field()]
    name: Annotated[NotRequired[str], Field()]
    api_base_url: Annotated[NotRequired[str], Field()]
    api_username: Annotated[NotRequired[str], Field()]
    api_password: Annotated[NotRequired[str], Field()]
    api_verify_ssl: Annotated[NotRequired[bool], Field()]
    org_name_prefix: Annotated[NotRequired[str], Field()]
    bucket_prefix: Annotated[NotRequired[str], Field()]


class InfluxSystemFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`InfluxSystem`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    uid: NotRequired[str]
    name: NotRequired[str]


class _ChangeScheduleRunSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ChangeScheduleRun``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    change_schedule_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    transaction_ids: list[str] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    created: Optional[datetime] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    ended_at: Optional[datetime] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    log: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _ChangeScheduleRunFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ChangeScheduleRun``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    change_schedule_id: Optional[int] = Field()


class ChangeScheduleRun(Resource):
    """
    Auto-generated model for resource ``ChangeScheduleRun``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    change_schedule_id: int = Field(alias="change_schedule")
    transaction_ids: list[str] = Field(alias="transactions")
    created: Optional[datetime] = Field(default=None)
    ended_at: Optional[datetime] = Field(default=None)
    log: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ChangeScheduleRunSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ChangeScheduleRunFilterSchema


class ChangeScheduleRunCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ChangeScheduleRun`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    change_schedule_id: Annotated[int, Field(alias="change_schedule")]
    transaction_ids: Annotated[list[str], Field(alias="transactions")]
    created: Annotated[NotRequired[Optional[datetime]], Field()]
    ended_at: Annotated[NotRequired[Optional[datetime]], Field()]


class ChangeScheduleRunUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ChangeScheduleRun`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    change_schedule_id: Annotated[NotRequired[int], Field(alias="change_schedule")]
    transaction_ids: Annotated[NotRequired[list[str]], Field(alias="transactions")]
    created: Annotated[NotRequired[Optional[datetime]], Field()]
    ended_at: Annotated[NotRequired[Optional[datetime]], Field()]


class ChangeScheduleRunFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ChangeScheduleRun`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    change_schedule_id: Annotated[NotRequired[int], Field(alias="change_schedule")]


class _ExtApiAuthSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ExtApiAuth``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    type: types.ExtApiAuthType = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auth_username: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auth_value: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )


class _ExtApiAuthFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ExtApiAuth``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    name: Optional[str] = Field()


class ExtApiAuth(Resource):
    """
    Auto-generated model for resource ``ExtApiAuth``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    type: types.ExtApiAuthType = Field()
    auth_username: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ExtApiAuthSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ExtApiAuthFilterSchema


class ExtApiAuthCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ExtApiAuth`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    type: Annotated[types.ExtApiAuthType, Field()]
    auth_username: Annotated[str, Field()]
    auth_value: Annotated[str, Field()]


class ExtApiAuthUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ExtApiAuth`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    type: Annotated[NotRequired[types.ExtApiAuthType], Field()]
    auth_username: Annotated[NotRequired[str], Field()]
    auth_value: Annotated[NotRequired[str], Field()]


class ExtApiAuthFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ExtApiAuth`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    name: NotRequired[str]


class _UploadFileSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``UploadFile``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    created_at: datetime = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    delete_on: Optional[date] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    category: types.UploadFileCategory = Field(
        default=types.UploadFileCategory.REGULAR,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    mime_type: Optional[str] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    size: Optional[int] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    device_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    service_instance_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    allow_anonymous_download: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _UploadFileFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``UploadFile``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    device_id: Optional[int] = Field()
    service_instance_id: Optional[int] = Field()
    allow_anonymous_download: Optional[bool] = Field()


class UploadFile(Resource):
    """
    Auto-generated model for resource ``UploadFile``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    name: str = Field()
    created_at: datetime = Field(alias="created")
    delete_on: Optional[date] = Field(default=None)
    category: types.UploadFileCategory = Field(default=types.UploadFileCategory.REGULAR)
    mime_type: OptionalStr = Field(alias="mimetype", default=None)
    size: Optional[int] = Field(default=None)
    device_id: Optional[int] = Field(alias="device", default=None)
    service_instance_id: Optional[int] = Field(alias="service_instance", default=None)
    allow_anonymous_download: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _UploadFileSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _UploadFileFilterSchema


class UploadFileCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`UploadFile`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[str, Field()]
    delete_on: Annotated[NotRequired[Optional[date]], Field()]
    category: Annotated[NotRequired[types.UploadFileCategory], Field(default=types.UploadFileCategory.REGULAR)]
    device_id: Annotated[NotRequired[Optional[int]], Field(alias="device")]
    service_instance_id: Annotated[NotRequired[Optional[int]], Field(alias="service_instance")]
    allow_anonymous_download: Annotated[NotRequired[bool], Field()]


class UploadFileUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`UploadFile`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    name: Annotated[NotRequired[str], Field()]
    delete_on: Annotated[NotRequired[Optional[date]], Field()]
    category: Annotated[NotRequired[types.UploadFileCategory], Field(default=types.UploadFileCategory.REGULAR)]
    device_id: Annotated[NotRequired[Optional[int]], Field(alias="device")]
    service_instance_id: Annotated[NotRequired[Optional[int]], Field(alias="service_instance")]
    allow_anonymous_download: Annotated[NotRequired[bool], Field()]


class UploadFileFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`UploadFile`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    device_id: Annotated[NotRequired[int], Field(alias="device")]
    service_instance_id: Annotated[NotRequired[int], Field(alias="service_instance")]
    allow_anonymous_download: NotRequired[bool]


class _TransactionSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``Transaction``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    created_at: datetime = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    modified_at: datetime = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    is_success: Optional[bool] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    responsible_id: Optional[NestedId[int]] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False},
    )
    has_awx_info: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    can_relaunch: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _TransactionFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``Transaction``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    service_instance_id: Optional[int] = Field()


class Transaction(Resource):
    """
    Auto-generated model for resource ``Transaction``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: str = Field()
    created_at: datetime = Field(alias="created")
    modified_at: datetime = Field(alias="modified")
    is_success: Optional[bool] = Field(default=None)
    responsible_id: Optional[NestedId[int]] = Field(alias="responsible", default=None)
    has_awx_info: bool = Field()
    can_relaunch: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _TransactionSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _TransactionFilterSchema


class TransactionCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Transaction`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    created_at: Annotated[NotRequired[datetime], Field(alias="created")]
    modified_at: Annotated[NotRequired[datetime], Field(alias="modified")]
    is_success: Annotated[NotRequired[Optional[bool]], Field()]
    responsible_id: Annotated[Optional[NestedId[int]], Field(alias="responsible")]


class TransactionUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Transaction`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    created_at: Annotated[NotRequired[datetime], Field(alias="created")]
    modified_at: Annotated[NotRequired[datetime], Field(alias="modified")]
    is_success: Annotated[NotRequired[Optional[bool]], Field()]
    responsible_id: Annotated[NotRequired[Optional[NestedId[int]]], Field(alias="responsible")]


class TransactionFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`Transaction`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    service_instance_id: Annotated[NotRequired[int], Field(alias="phase_instance__service_instance_id")]


class _ServiceManagementPhaseSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ServiceManagementPhase``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    order: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    slug: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auto_deploy: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    idempotency: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    timeout: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    retry_attempts: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    retry_wait: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    create_service: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    jinja_template: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    phase_type: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})


class _ServiceManagementPhaseFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ServiceManagementPhase``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class ServiceManagementPhase(Resource):
    """
    Auto-generated model for resource ``ServiceManagementPhase``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: str = Field()
    order: int = Field()
    slug: OptionalStr = Field(default=None)
    name: str = Field()
    description: OptionalStr = Field(alias="text", default=None)
    service_id: int = Field(alias="service")
    auto_deploy: bool = Field()
    idempotency: bool = Field()
    timeout: Optional[int] = Field(default=None)
    retry_attempts: Optional[int] = Field(default=None)
    retry_wait: Optional[int] = Field(default=None)
    create_service: int = Field()
    jinja_template: str = Field()
    phase_type: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ServiceManagementPhaseSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ServiceManagementPhaseFilterSchema


class ServiceManagementPhaseCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ServiceManagementPhase`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    order: Annotated[int, Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    service_id: Annotated[int, Field(alias="service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]
    retry_attempts: Annotated[NotRequired[Optional[int]], Field()]
    retry_wait: Annotated[NotRequired[Optional[int]], Field()]
    create_service: Annotated[int, Field()]
    jinja_template: Annotated[NotRequired[str], Field()]


class ServiceManagementPhaseUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ServiceManagementPhase`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    order: Annotated[NotRequired[int], Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]
    retry_attempts: Annotated[NotRequired[Optional[int]], Field()]
    retry_wait: Annotated[NotRequired[Optional[int]], Field()]
    create_service: Annotated[NotRequired[int], Field()]
    jinja_template: Annotated[NotRequired[str], Field()]


class ServiceManagementPhaseFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ServiceManagementPhase`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _ServiceInstanceLogSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ServiceInstanceLog``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    timestamp: datetime = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    status: types.LogLevel = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    title: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    hostname: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    text: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    service_instance_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    service_id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    phase_instance_id: Optional[int] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )
    transaction_id: Optional[NestedId[str]] = Field(
        default=None, json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False}
    )


class _ServiceInstanceLogFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ServiceInstanceLog``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    hostname: Optional[str] = Field()
    service_id: Optional[int] = Field()
    service_instance_id: Optional[int] = Field()
    last_minutes: Optional[int] = Field()
    transaction_id: Optional[list[int]] = Field()
    status: Optional[list[types.LogLevel]] = Field()


class ServiceInstanceLog(Resource):
    """
    Auto-generated model for resource ``ServiceInstanceLog``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    timestamp: datetime = Field()
    status: types.LogLevel = Field()
    title: str = Field(alias="log_title")
    hostname: str = Field(alias="log_hostname")
    text: str = Field(alias="log_text")
    service_instance_id: int = Field()
    service_id: int = Field()
    phase_instance_id: Optional[int] = Field(default=None)
    transaction_id: Optional[NestedId[str]] = Field(alias="transaction", default=None)

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ServiceInstanceLogSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ServiceInstanceLogFilterSchema


class ServiceInstanceLogCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ServiceInstanceLog`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    status: Annotated[NotRequired[types.LogLevel], Field()]
    title: Annotated[str, Field(alias="log_title")]
    hostname: Annotated[str, Field(alias="log_hostname")]
    text: Annotated[str, Field(alias="log_text")]
    service_instance_id: Annotated[int, Field()]


class ServiceInstanceLogUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ServiceInstanceLog`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    status: Annotated[NotRequired[types.LogLevel], Field()]
    title: Annotated[NotRequired[str], Field(alias="log_title")]
    hostname: Annotated[NotRequired[str], Field(alias="log_hostname")]
    text: Annotated[NotRequired[str], Field(alias="log_text")]
    service_instance_id: Annotated[NotRequired[int], Field()]


class ServiceInstanceLogFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ServiceInstanceLog`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    hostname: NotRequired[str]
    service_id: NotRequired[int]
    service_instance_id: NotRequired[int]
    last_minutes: NotRequired[int]
    transaction_id: Annotated[NotRequired[list[int]], Field(alias="transaction")]
    status: NotRequired[list[types.LogLevel]]


class _DeviceModelSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``DeviceModel``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["slug"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )


class _DeviceModelFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``DeviceModel``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    name: Optional[str] = Field()
    slug: Optional[str] = Field()


class DeviceModel(Resource):
    """
    Auto-generated model for resource ``DeviceModel``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    name: str = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _DeviceModelSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _DeviceModelFilterSchema


class DeviceModelFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`DeviceModel`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    name: NotRequired[str]
    slug: NotRequired[str]


class _ExtApiPhaseSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``ExtApiPhase``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": []})
    id: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    order: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    slug: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    description: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    path: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    decommission_path: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    ext_api_service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    auto_deploy: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    idempotency: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    send_credentials: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    undeployable: bool = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    timeout: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    crypto_type: Optional[types.CryptoType] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    phase_type: str = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    uri_is_reverse_capable: bool = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _ExtApiPhaseFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``ExtApiPhase``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    pass


class ExtApiPhase(Resource):
    """
    Auto-generated model for resource ``ExtApiPhase``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: str = Field()
    order: int = Field()
    slug: OptionalStr = Field(default=None)
    name: str = Field()
    description: OptionalStr = Field(alias="text", default=None)
    path: str = Field(alias="uri")
    decommission_path: OptionalStr = Field(alias="decom_uri", default=None)
    service_id: int = Field(alias="service")
    ext_api_service_id: int = Field(alias="ext_api_service")
    auto_deploy: bool = Field()
    idempotency: bool = Field()
    send_credentials: bool = Field()
    undeployable: bool = Field()
    timeout: Optional[int] = Field(default=None)
    crypto_type: Optional[types.CryptoType] = Field(default=None)
    phase_type: str = Field()
    uri_is_reverse_capable: bool = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _ExtApiPhaseSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _ExtApiPhaseFilterSchema


class ExtApiPhaseCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`ExtApiPhase`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    order: Annotated[int, Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    path: Annotated[str, Field(alias="uri")]
    decommission_path: Annotated[NotRequired[OptionalStr], Field(alias="decom_uri")]
    service_id: Annotated[int, Field(alias="service")]
    ext_api_service_id: Annotated[int, Field(alias="ext_api_service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]
    crypto_type: Annotated[NotRequired[Optional[types.CryptoType]], Field()]
    uri_is_reverse_capable: Annotated[NotRequired[bool], Field()]


class ExtApiPhaseUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`ExtApiPhase`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    order: Annotated[NotRequired[int], Field()]
    slug: Annotated[NotRequired[OptionalStr], Field()]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field(alias="text")]
    path: Annotated[NotRequired[str], Field(alias="uri")]
    decommission_path: Annotated[NotRequired[OptionalStr], Field(alias="decom_uri")]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    ext_api_service_id: Annotated[NotRequired[int], Field(alias="ext_api_service")]
    auto_deploy: Annotated[NotRequired[bool], Field()]
    idempotency: Annotated[NotRequired[bool], Field()]
    send_credentials: Annotated[NotRequired[bool], Field()]
    timeout: Annotated[NotRequired[Optional[int]], Field()]
    crypto_type: Annotated[NotRequired[Optional[types.CryptoType]], Field()]
    uri_is_reverse_capable: Annotated[NotRequired[bool], Field()]


class ExtApiPhaseFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`ExtApiPhase`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    pass


class _SharedDataBucketSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``SharedDataBucket``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name", "path", "service_id"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    service_id: int = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    name: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    path: list[str] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    value: Any = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )


class _SharedDataBucketFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``SharedDataBucket``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()
    service_id: Optional[int] = Field()
    path: Optional[str] = Field()


class SharedDataBucket(Resource):
    """
    Auto-generated model for resource ``SharedDataBucket``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    tenant_id: int = Field(alias="tenant")
    service_id: int = Field(alias="service")
    name: str = Field()
    path: list[str] = Field()
    value: Any = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _SharedDataBucketSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _SharedDataBucketFilterSchema


class SharedDataBucketCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`SharedDataBucket`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    service_id: Annotated[int, Field(alias="service")]
    name: Annotated[str, Field()]
    path: Annotated[list[str], Field()]
    value: Annotated[Any, Field()]


class SharedDataBucketUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`SharedDataBucket`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    name: Annotated[NotRequired[str], Field()]
    path: Annotated[NotRequired[list[str]], Field()]
    value: Annotated[NotRequired[Any], Field()]


class SharedDataBucketFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`SharedDataBucket`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    path: NotRequired[str]


class _AwxModuleSchema(Schema):
    """
    Auto-generated SDK schema model for resource ``AwxModule``.
    This model defines the structure of the data within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    model_config = ConfigDict(json_schema_extra={"x-unique-keys": [["name"]]})
    id: int = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    name: str = Field(json_schema_extra={"x-actions": ["create", "read"], "x-required": True, "x-sensitive": False})
    tenant_id: int = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )
    type: types.ModuleType = Field(json_schema_extra={"x-actions": ["read"], "x-required": True, "x-sensitive": False})
    git_url: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    git_username: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": True, "x-sensitive": False}
    )
    git_token: str = Field(
        json_schema_extra={"x-actions": ["create", "update"], "x-required": True, "x-sensitive": False}
    )
    git_branch: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    playbook: str = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )
    awx_org_name: Optional[str] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    awx_ext_api_service_id: Optional[int] = Field(
        default=None,
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False},
    )
    module_extra_vars: dict[str, Any] = Field(
        json_schema_extra={"x-actions": ["create", "read", "update"], "x-required": False, "x-sensitive": False}
    )


class _AwxModuleFilterSchema(Schema):
    """
    Auto-generated SDK filter schema model for resource ``AwxModule``.
    This model defines the structure of the filters within the SDK when interacting with this resource.
    It should not be used to interact with resources, but inspected by other tools for code generation.
    """

    search: Optional[str] = Field()
    name: Optional[str] = Field()


class AwxModule(Resource):
    """
    Auto-generated model for resource ``AwxModule``.
    Whenever the SDK returns one or more instances of this resource, it will be of this type.
    """

    id: int = Field()
    name: str = Field()
    type: types.ModuleType = Field()
    git_url: str = Field()
    git_username: str = Field()
    git_branch: str = Field()
    playbook: str = Field()
    awx_org_name: OptionalStr = Field(default=None)
    awx_ext_api_service_id: Optional[int] = Field(alias="awx_ext_api_service", default=None)
    module_extra_vars: dict[str, Any] = Field()

    @staticmethod
    def get_schema() -> Type[Schema]:
        return _AwxModuleSchema

    @staticmethod
    def get_filter_schema() -> Type[Schema]:
        return _AwxModuleFilterSchema


class AwxModuleCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`AwxModule`.
    When creating this resource, you must provide all of these fields to create a new instance.
    Fields marked as optional can be omitted, but if provided, they must match the specified type.
    """

    name: Annotated[str, Field()]
    tenant_id: Annotated[int, Field(alias="tenant")]
    git_url: Annotated[str, Field()]
    git_username: Annotated[str, Field()]
    git_token: Annotated[str, Field()]
    git_branch: Annotated[NotRequired[str], Field()]
    playbook: Annotated[NotRequired[str], Field()]
    awx_org_name: Annotated[NotRequired[OptionalStr], Field()]
    awx_ext_api_service_id: Annotated[NotRequired[Optional[int]], Field(alias="awx_ext_api_service")]
    module_extra_vars: Annotated[NotRequired[dict[str, Any]], Field()]


class AwxModuleUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`AwxModule`.
    When updating this resource, you can use any of these fields to modify the existing data.
    As the update operation is always partial, you can omit any field that you do not wish to change.
    """

    tenant_id: Annotated[NotRequired[int], Field(alias="tenant")]
    git_url: Annotated[NotRequired[str], Field()]
    git_username: Annotated[NotRequired[str], Field()]
    git_token: Annotated[NotRequired[str], Field()]
    git_branch: Annotated[NotRequired[str], Field()]
    playbook: Annotated[NotRequired[str], Field()]
    awx_org_name: Annotated[NotRequired[OptionalStr], Field()]
    awx_ext_api_service_id: Annotated[NotRequired[Optional[int]], Field(alias="awx_ext_api_service")]
    module_extra_vars: Annotated[NotRequired[dict[str, Any]], Field()]


class AwxModuleFilter(ResourceDict, TypedDict):
    """
    Auto-generated model of available filters for resource :class:`AwxModule`.
    When listing this resource, you can use any of these filters to narrow down the results.
    """

    search: NotRequired[str]
    name: NotRequired[str]


GrafanaDashboardCreateModel = TypeAdapter(GrafanaDashboardCreate)
GrafanaDashboardUpdateModel = TypeAdapter(GrafanaDashboardUpdate)
GrafanaDashboardFilterModel = TypeAdapter(GrafanaDashboardFilter)
InfluxRepositoryCreateModel = TypeAdapter(InfluxRepositoryCreate)
InfluxRepositoryUpdateModel = TypeAdapter(InfluxRepositoryUpdate)
InfluxRepositoryFilterModel = TypeAdapter(InfluxRepositoryFilter)
PhaseInstanceCreateModel = TypeAdapter(PhaseInstanceCreate)
PhaseInstanceUpdateModel = TypeAdapter(PhaseInstanceUpdate)
PhaseInstanceFilterModel = TypeAdapter(PhaseInstanceFilter)
ServiceInstanceCreateModel = TypeAdapter(ServiceInstanceCreate)
ServiceInstanceUpdateModel = TypeAdapter(ServiceInstanceUpdate)
ServiceInstanceFilterModel = TypeAdapter(ServiceInstanceFilter)
BasePhaseFilterModel = TypeAdapter(BasePhaseFilter)
ExtApiServiceCreateModel = TypeAdapter(ExtApiServiceCreate)
ExtApiServiceUpdateModel = TypeAdapter(ExtApiServiceUpdate)
ExtApiServiceFilterModel = TypeAdapter(ExtApiServiceFilter)
PhaseCreateModel = TypeAdapter(PhaseCreate)
PhaseUpdateModel = TypeAdapter(PhaseUpdate)
PhaseFilterModel = TypeAdapter(PhaseFilter)
ReportCreateModel = TypeAdapter(ReportCreate)
ReportUpdateModel = TypeAdapter(ReportUpdate)
ReportFilterModel = TypeAdapter(ReportFilter)
ChangeScheduleCreateModel = TypeAdapter(ChangeScheduleCreate)
ChangeScheduleUpdateModel = TypeAdapter(ChangeScheduleUpdate)
ChangeScheduleFilterModel = TypeAdapter(ChangeScheduleFilter)
TenantFilterModel = TypeAdapter(TenantFilter)
SharedDataSubscriberCreateModel = TypeAdapter(SharedDataSubscriberCreate)
SharedDataSubscriberUpdateModel = TypeAdapter(SharedDataSubscriberUpdate)
SharedDataSubscriberFilterModel = TypeAdapter(SharedDataSubscriberFilter)
GrafanaSystemCreateModel = TypeAdapter(GrafanaSystemCreate)
GrafanaSystemUpdateModel = TypeAdapter(GrafanaSystemUpdate)
GrafanaSystemFilterModel = TypeAdapter(GrafanaSystemFilter)
ModuleFilterModel = TypeAdapter(ModuleFilter)
PythonScriptPhaseCreateModel = TypeAdapter(PythonScriptPhaseCreate)
PythonScriptPhaseUpdateModel = TypeAdapter(PythonScriptPhaseUpdate)
PythonScriptPhaseFilterModel = TypeAdapter(PythonScriptPhaseFilter)
AuditLogFilterModel = TypeAdapter(AuditLogFilter)
DeviceCreateModel = TypeAdapter(DeviceCreate)
DeviceUpdateModel = TypeAdapter(DeviceUpdate)
DeviceFilterModel = TypeAdapter(DeviceFilter)
ServiceCreateModel = TypeAdapter(ServiceCreate)
ServiceUpdateModel = TypeAdapter(ServiceUpdate)
ServiceFilterModel = TypeAdapter(ServiceFilter)
TagRelationCreateModel = TypeAdapter(TagRelationCreate)
TagRelationUpdateModel = TypeAdapter(TagRelationUpdate)
TagRelationFilterModel = TypeAdapter(TagRelationFilter)
PollingPhaseCreateModel = TypeAdapter(PollingPhaseCreate)
PollingPhaseUpdateModel = TypeAdapter(PollingPhaseUpdate)
PollingPhaseFilterModel = TypeAdapter(PollingPhaseFilter)
TagCreateModel = TypeAdapter(TagCreate)
TagUpdateModel = TypeAdapter(TagUpdate)
TagFilterModel = TypeAdapter(TagFilter)
UsageLogFilterModel = TypeAdapter(UsageLogFilter)
DeviceGroupCreateModel = TypeAdapter(DeviceGroupCreate)
DeviceGroupUpdateModel = TypeAdapter(DeviceGroupUpdate)
DeviceGroupFilterModel = TypeAdapter(DeviceGroupFilter)
FavouriteCreateModel = TypeAdapter(FavouriteCreate)
FavouriteUpdateModel = TypeAdapter(FavouriteUpdate)
FavouriteFilterModel = TypeAdapter(FavouriteFilter)
CredentialCreateModel = TypeAdapter(CredentialCreate)
CredentialUpdateModel = TypeAdapter(CredentialUpdate)
CredentialFilterModel = TypeAdapter(CredentialFilter)
UserCreateModel = TypeAdapter(UserCreate)
UserUpdateModel = TypeAdapter(UserUpdate)
UserFilterModel = TypeAdapter(UserFilter)
CmdbEntryCreateModel = TypeAdapter(CmdbEntryCreate)
CmdbEntryUpdateModel = TypeAdapter(CmdbEntryUpdate)
CmdbEntryFilterModel = TypeAdapter(CmdbEntryFilter)
InfluxSystemCreateModel = TypeAdapter(InfluxSystemCreate)
InfluxSystemUpdateModel = TypeAdapter(InfluxSystemUpdate)
InfluxSystemFilterModel = TypeAdapter(InfluxSystemFilter)
ChangeScheduleRunCreateModel = TypeAdapter(ChangeScheduleRunCreate)
ChangeScheduleRunUpdateModel = TypeAdapter(ChangeScheduleRunUpdate)
ChangeScheduleRunFilterModel = TypeAdapter(ChangeScheduleRunFilter)
ExtApiAuthCreateModel = TypeAdapter(ExtApiAuthCreate)
ExtApiAuthUpdateModel = TypeAdapter(ExtApiAuthUpdate)
ExtApiAuthFilterModel = TypeAdapter(ExtApiAuthFilter)
UploadFileCreateModel = TypeAdapter(UploadFileCreate)
UploadFileUpdateModel = TypeAdapter(UploadFileUpdate)
UploadFileFilterModel = TypeAdapter(UploadFileFilter)
TransactionCreateModel = TypeAdapter(TransactionCreate)
TransactionUpdateModel = TypeAdapter(TransactionUpdate)
TransactionFilterModel = TypeAdapter(TransactionFilter)
ServiceManagementPhaseCreateModel = TypeAdapter(ServiceManagementPhaseCreate)
ServiceManagementPhaseUpdateModel = TypeAdapter(ServiceManagementPhaseUpdate)
ServiceManagementPhaseFilterModel = TypeAdapter(ServiceManagementPhaseFilter)
ServiceInstanceLogCreateModel = TypeAdapter(ServiceInstanceLogCreate)
ServiceInstanceLogUpdateModel = TypeAdapter(ServiceInstanceLogUpdate)
ServiceInstanceLogFilterModel = TypeAdapter(ServiceInstanceLogFilter)
DeviceModelFilterModel = TypeAdapter(DeviceModelFilter)
ExtApiPhaseCreateModel = TypeAdapter(ExtApiPhaseCreate)
ExtApiPhaseUpdateModel = TypeAdapter(ExtApiPhaseUpdate)
ExtApiPhaseFilterModel = TypeAdapter(ExtApiPhaseFilter)
SharedDataBucketCreateModel = TypeAdapter(SharedDataBucketCreate)
SharedDataBucketUpdateModel = TypeAdapter(SharedDataBucketUpdate)
SharedDataBucketFilterModel = TypeAdapter(SharedDataBucketFilter)
AwxModuleCreateModel = TypeAdapter(AwxModuleCreate)
AwxModuleUpdateModel = TypeAdapter(AwxModuleUpdate)
AwxModuleFilterModel = TypeAdapter(AwxModuleFilter)
