# @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

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

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


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: int = Field()
    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()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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]


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: int = Field()
    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()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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.
    """

    pass


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()


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")]


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: int = Field()
    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()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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 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()


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 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()
    name: str = Field()
    description: OptionalStr = Field(alias="text", default=None)
    path: str = Field(alias="uri")
    decommission_path: OptionalStr = Field(alias="decomUri", default=None)
    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)


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()]
    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")]
    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()]
    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")]
    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 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: int = Field()
    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[NestedId[int]] = Field(alias="module")
    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()


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: Annotated[NotRequired[int], Field()]
    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()]
    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()]


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: Annotated[NotRequired[int], Field()]
    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()]
    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()]


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]
    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 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: int = Field()
    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)


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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 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()


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 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()


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")]


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)


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.
    """

    pass


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()
    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")


class ModuleCreate(ResourceDict, TypedDict):
    """
    Auto-generated model for creating resource :class:`Module`.
    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: Annotated[int, Field()]
    type: Annotated[types.ModuleType, Field()]
    name: Annotated[str, Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    service_class: Annotated[str, Field()]
    install_service_id: Annotated[Optional[int], Field(alias="install_service")]
    last_service_instance_id: Annotated[Optional[int], Field(alias="last_service_instance")]


class ModuleUpdate(ResourceDict, TypedDict):
    """
    Auto-generated model for updating resource :class:`Module`.
    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: Annotated[NotRequired[int], Field()]
    type: Annotated[NotRequired[types.ModuleType], Field()]
    name: Annotated[NotRequired[str], Field()]
    description: Annotated[NotRequired[OptionalStr], Field()]
    service_class: Annotated[NotRequired[str], Field()]
    install_service_id: Annotated[NotRequired[Optional[int]], Field(alias="install_service")]
    last_service_instance_id: Annotated[NotRequired[Optional[int]], Field(alias="last_service_instance")]


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 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()


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 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: int = Field()
    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: int = Field(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()


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: Annotated[NotRequired[int], Field()]
    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[
        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: Annotated[NotRequired[int], Field()]
    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[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 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: int = Field()
    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()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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 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()


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 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: int = Field()
    name: str = Field()
    description: OptionalStr = Field(default=None)
    color: types.TagColor = Field()
    order: int = Field()
    service_instance_count: int = Field()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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 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()


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 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: int = Field()
    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()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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: NotRequired[int]
    tree_slug: NotRequired[str]
    tree_ancestor: NotRequired[int]


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()


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 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: int = Field()
    name: str = Field()
    description: OptionalStr = Field(default=None)


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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.
    """

    search: NotRequired[str]


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()


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 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)


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 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()


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.
    """

    pass


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()


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 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: int = Field()
    name: str = Field()
    type: types.ExtApiAuthType = Field()
    auth_username: str = Field()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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 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()
    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()


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()]
    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()]
    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 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()


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 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)


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 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.
    """

    name: str = Field()


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.
    """

    pass


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: int = Field()
    service_id: int = Field(alias="service")
    name: str = Field()
    path: list[str] = Field()
    value: Any = Field()


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: Annotated[NotRequired[int], Field()]
    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: Annotated[NotRequired[int], Field()]
    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]
    service_id: Annotated[NotRequired[int], Field(alias="service")]
    path: NotRequired[str]


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()
    type: types.ModuleType = Field()
    name: str = 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()


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)
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)
ModuleCreateModel = TypeAdapter(ModuleCreate)
ModuleUpdateModel = TypeAdapter(ModuleUpdate)
ModuleFilterModel = TypeAdapter(ModuleFilter)
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)
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)
ServiceInstanceLogCreateModel = TypeAdapter(ServiceInstanceLogCreate)
ServiceInstanceLogUpdateModel = TypeAdapter(ServiceInstanceLogUpdate)
ServiceInstanceLogFilterModel = TypeAdapter(ServiceInstanceLogFilter)
DeviceModelFilterModel = TypeAdapter(DeviceModelFilter)
SharedDataBucketCreateModel = TypeAdapter(SharedDataBucketCreate)
SharedDataBucketUpdateModel = TypeAdapter(SharedDataBucketUpdate)
SharedDataBucketFilterModel = TypeAdapter(SharedDataBucketFilter)
AwxModuleUpdateModel = TypeAdapter(AwxModuleUpdate)
AwxModuleFilterModel = TypeAdapter(AwxModuleFilter)
