# Copyright (C) 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# generated by datamodel-codegen

from __future__ import annotations

from typing import Any

from pydantic import BaseModel

from . import metadata as metadata_1, ops, permissions as permissions_1


class BinaryInfo(BaseModel):
    name: str | None = None
    platform: str | None = None
    type: str | None = None


class BuildInfo(BaseModel):
    architecture: str | None = None
    branch: str | None = None
    go_version: str | None = None
    mode: str | None = None
    operating_system: str | None = None
    revision: str | None = None
    short_revision: str | None = None
    timestamp: str | None = None
    version: str | None = None
    version_hash: str | None = None


class CheckPermissionsResponse(BaseModel):
    allowed: bool | None = None


class CopyMetadataRequest(BaseModel):
    recursive: bool | None = None
    src_dst: list[metadata_1.SrcDst]


class Features(BaseModel):
    auth_types: list[str] | None = None
    compression_plugins: list[str] | None = None
    metadata_plugins: list[str] | None = None
    operation_plugins: list[str] | None = None
    permissions_plugins: list[str] | None = None
    storage_plugins: list[str] | None = None


class FileDownloadTokenResponse(BaseModel):
    token: str | None = None


class GetMetadataRequest(BaseModel):
    paths: list[str] | None = None


class MoveMetadataRequest(BaseModel):
    recursive: bool | None = None
    src_dst: list[metadata_1.SrcDst]


class OpIdResponse(BaseModel):
    id: str | None = "2diK2kCkpgeHAQSNthIZ1JYyPte"
    location: str | None = "/api/v1/operations/2diK2kCkpgeHAQSNthIZ1JYyPte"


class OpsRequest(BaseModel):
    ids: list[str]


class RemoveMetadataRequest(BaseModel):
    paths: list[str]
    recursive: bool | None = None


class SetMetadataRequest(BaseModel):
    metadata: metadata_1.DataAssignments


class Status(BaseModel):
    build_info: BuildInfo | None = None
    features: Features | None = None
    ready: bool | None = None
    time: str | None = None


class StorageConfigResponse(BaseModel):
    storage: list[dict[str, Any]] | None = None


class StoragePath(BaseModel):
    path: str
    remote: str | None = "any"


class WorkerConfigResponse(BaseModel):
    auth: dict[str, Any] | None = None
    compression: dict[str, Any] | None = None
    metadata: dict[str, Any] | None = None
    permissions: dict[str, Any] | None = None
    storage: list[dict[str, Any]] | None = None
    user_id: str | None = None


class Binaries(BaseModel):
    available: list[BinaryInfo] | None = None


class PathOperations(BaseModel):
    operations: list[StoragePath]


class SrcDst(BaseModel):
    dst: StoragePath
    src: StoragePath


class SrcDstOperations(BaseModel):
    operations: list[SrcDst]


class OpsResponse(BaseModel):
    operations: list[ops.Operation] | None = None


class CheckPermissionsRequest(BaseModel):
    permissions: list[permissions_1.RoleAssignment] | None = None


class GetPermissionsRequest(BaseModel):
    permissions: list[permissions_1.RoleQuery] | None = None


class GetPermissionsResponse(BaseModel):
    permissions: list[permissions_1.RoleAssignment] | None = None


class RemovePermissionsRequest(BaseModel):
    permissions: list[permissions_1.RoleAssignment] | None = None


class SetPermissionsRequest(BaseModel):
    permissions: list[permissions_1.RoleAssignment] | None = None
