"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2025 Phonexia s.r.o.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Phonexia Deepfake Detection gRPC API.
"""

import builtins
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.message
import phonexia.grpc.common.core_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class DetectRequest(google.protobuf.message.Message):
    """The top level message sent by the client for the <code>Detect</code> method."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    AUDIO_FIELD_NUMBER: builtins.int
    CONFIG_FIELD_NUMBER: builtins.int
    @property
    def audio(self) -> phonexia.grpc.common.core_pb2.Audio:
        """Audio data for deepfake detection.
        The audio should contain at least 3 seconds of continuous speech.
        If there is not enough speech, the <code>result</code> will not be present
        in the output.
        """

    @property
    def config(self) -> Global___DetectConfig:
        """Configuration for the deepfake detection"""

    def __init__(
        self,
        *,
        audio: phonexia.grpc.common.core_pb2.Audio | None = ...,
        config: Global___DetectConfig | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["audio", b"audio", "config", b"config"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["audio", b"audio", "config", b"config"]) -> None: ...

Global___DetectRequest: typing_extensions.TypeAlias = DetectRequest

@typing.final
class DetectConfig(google.protobuf.message.Message):
    """Configuration for the deepfake detection."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SPEECH_LENGTH_FIELD_NUMBER: builtins.int
    @property
    def speech_length(self) -> google.protobuf.duration_pb2.Duration:
        """Maximum speech length to process from the audio."""

    def __init__(
        self,
        *,
        speech_length: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["speech_length", b"speech_length"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["speech_length", b"speech_length"]) -> None: ...

Global___DetectConfig: typing_extensions.TypeAlias = DetectConfig

@typing.final
class DetectResponse(google.protobuf.message.Message):
    """The top level message returned to the client by the <code>Detect</code> method."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    RESULT_FIELD_NUMBER: builtins.int
    PROCESSED_AUDIO_LENGTH_FIELD_NUMBER: builtins.int
    @property
    def result(self) -> Global___DetectResult:
        """Result of deepfake detection. Will not be present if the audio contains
        less than 3 seconds of continuous speech.
        """

    @property
    def processed_audio_length(self) -> google.protobuf.duration_pb2.Duration:
        """Total length of the processed audio."""

    def __init__(
        self,
        *,
        result: Global___DetectResult | None = ...,
        processed_audio_length: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_result", b"_result", "processed_audio_length", b"processed_audio_length", "result", b"result"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_result", b"_result", "processed_audio_length", b"processed_audio_length", "result", b"result"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_result", b"_result"]) -> typing.Literal["result"] | None: ...

Global___DetectResponse: typing_extensions.TypeAlias = DetectResponse

@typing.final
class DetectResult(google.protobuf.message.Message):
    """Message representing the result of deepfake detection."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SCORE_FIELD_NUMBER: builtins.int
    SPEECH_LENGTH_FIELD_NUMBER: builtins.int
    score: builtins.float
    """Log-likelihood ratio (LLR) of the deepfake detection. The score is a
    floating-point value. A value greater than 0 indicates the audio is likely
    a deepfake, while a value less than 0 indicates the audio is likely not a
    deepfake.
    """
    @property
    def speech_length(self) -> google.protobuf.duration_pb2.Duration:
        """Total speech length the deepfake detector used for evaluation."""

    def __init__(
        self,
        *,
        score: builtins.float = ...,
        speech_length: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["speech_length", b"speech_length"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["score", b"score", "speech_length", b"speech_length"]) -> None: ...

Global___DetectResult: typing_extensions.TypeAlias = DetectResult
