"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2024 The ChromiumOS Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
"""

import builtins
import google.protobuf.descriptor
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import typing

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _CrasNodeType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _CrasNodeTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CrasNodeType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    CRAS_NODE_TYPE_UNKNOWN: _CrasNodeType.ValueType  # 0
    CRAS_NODE_TYPE_INTERNAL_SPEAKER: _CrasNodeType.ValueType  # 1
    CRAS_NODE_TYPE_HEADPHONE: _CrasNodeType.ValueType  # 2
    CRAS_NODE_TYPE_HDMI: _CrasNodeType.ValueType  # 3
    CRAS_NODE_TYPE_HAPTIC: _CrasNodeType.ValueType  # 4
    CRAS_NODE_TYPE_INTERNAL_MIC: _CrasNodeType.ValueType  # 5
    CRAS_NODE_TYPE_FRONT_MIC: _CrasNodeType.ValueType  # 6
    CRAS_NODE_TYPE_REAR_MIC: _CrasNodeType.ValueType  # 7
    CRAS_NODE_TYPE_KEYBOARD_MIC: _CrasNodeType.ValueType  # 8
    CRAS_NODE_TYPE_MIC: _CrasNodeType.ValueType  # 9
    CRAS_NODE_TYPE_HOTWORD: _CrasNodeType.ValueType  # 10
    CRAS_NODE_TYPE_LINEOUT: _CrasNodeType.ValueType  # 11
    CRAS_NODE_TYPE_POST_MIX_LOOPBACK: _CrasNodeType.ValueType  # 12
    CRAS_NODE_TYPE_POST_DSP_LOOPBACK: _CrasNodeType.ValueType  # 13
    CRAS_NODE_TYPE_POST_DSP_DELAYED_LOOPBACK: _CrasNodeType.ValueType  # 14
    CRAS_NODE_TYPE_USB: _CrasNodeType.ValueType  # 15
    CRAS_NODE_TYPE_BLUETOOTH: _CrasNodeType.ValueType  # 16
    CRAS_NODE_TYPE_BLUETOOTH_NB_MIC: _CrasNodeType.ValueType  # 17
    CRAS_NODE_TYPE_FALLBACK_NORMAL: _CrasNodeType.ValueType  # 18
    CRAS_NODE_TYPE_FALLBACK_ABNORMAL: _CrasNodeType.ValueType  # 19
    CRAS_NODE_TYPE_ECHO_REFERENCE: _CrasNodeType.ValueType  # 20
    CRAS_NODE_TYPE_ALSA_LOOPBACK: _CrasNodeType.ValueType  # 21
    CRAS_NODE_TYPE_FLEXIBLE_LOOPBACK: _CrasNodeType.ValueType  # 22
    CRAS_NODE_TYPE_FLEXIBLE_LOOPBACK_INTERNAL: _CrasNodeType.ValueType  # 23

class CrasNodeType(_CrasNodeType, metaclass=_CrasNodeTypeEnumTypeWrapper):
    """CrasNodeType refers to different cras node types printed by
    cras_test_service. Source:
    adhd::cras/include/cras_types.h::cras_node_type_to_str
    """

CRAS_NODE_TYPE_UNKNOWN: CrasNodeType.ValueType  # 0
CRAS_NODE_TYPE_INTERNAL_SPEAKER: CrasNodeType.ValueType  # 1
CRAS_NODE_TYPE_HEADPHONE: CrasNodeType.ValueType  # 2
CRAS_NODE_TYPE_HDMI: CrasNodeType.ValueType  # 3
CRAS_NODE_TYPE_HAPTIC: CrasNodeType.ValueType  # 4
CRAS_NODE_TYPE_INTERNAL_MIC: CrasNodeType.ValueType  # 5
CRAS_NODE_TYPE_FRONT_MIC: CrasNodeType.ValueType  # 6
CRAS_NODE_TYPE_REAR_MIC: CrasNodeType.ValueType  # 7
CRAS_NODE_TYPE_KEYBOARD_MIC: CrasNodeType.ValueType  # 8
CRAS_NODE_TYPE_MIC: CrasNodeType.ValueType  # 9
CRAS_NODE_TYPE_HOTWORD: CrasNodeType.ValueType  # 10
CRAS_NODE_TYPE_LINEOUT: CrasNodeType.ValueType  # 11
CRAS_NODE_TYPE_POST_MIX_LOOPBACK: CrasNodeType.ValueType  # 12
CRAS_NODE_TYPE_POST_DSP_LOOPBACK: CrasNodeType.ValueType  # 13
CRAS_NODE_TYPE_POST_DSP_DELAYED_LOOPBACK: CrasNodeType.ValueType  # 14
CRAS_NODE_TYPE_USB: CrasNodeType.ValueType  # 15
CRAS_NODE_TYPE_BLUETOOTH: CrasNodeType.ValueType  # 16
CRAS_NODE_TYPE_BLUETOOTH_NB_MIC: CrasNodeType.ValueType  # 17
CRAS_NODE_TYPE_FALLBACK_NORMAL: CrasNodeType.ValueType  # 18
CRAS_NODE_TYPE_FALLBACK_ABNORMAL: CrasNodeType.ValueType  # 19
CRAS_NODE_TYPE_ECHO_REFERENCE: CrasNodeType.ValueType  # 20
CRAS_NODE_TYPE_ALSA_LOOPBACK: CrasNodeType.ValueType  # 21
CRAS_NODE_TYPE_FLEXIBLE_LOOPBACK: CrasNodeType.ValueType  # 22
CRAS_NODE_TYPE_FLEXIBLE_LOOPBACK_INTERNAL: CrasNodeType.ValueType  # 23
global___CrasNodeType = CrasNodeType

class _CrasIODevType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _CrasIODevTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CrasIODevType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    CRAS_IO_DEV_TYPE_HOTWORD: _CrasIODevType.ValueType  # 0

class CrasIODevType(_CrasIODevType, metaclass=_CrasIODevTypeEnumTypeWrapper):
    """CrasIODevType refers to different test IO dev types supported by
    cras_test_service. Source: adhd::cras/include/cras_types.h::TEST_IODEV_TYPE
    """

CRAS_IO_DEV_TYPE_HOTWORD: CrasIODevType.ValueType  # 0
global___CrasIODevType = CrasIODevType

class _CrasStreamType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _CrasStreamTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CrasStreamType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    CRAS_STREAM_TYPE_DEFAULT: _CrasStreamType.ValueType  # 0
    CRAS_STREAM_TYPE_MULTIMEDIA: _CrasStreamType.ValueType  # 1
    CRAS_STREAM_TYPE_VOICE_COMMUNICATION: _CrasStreamType.ValueType  # 2
    CRAS_STREAM_TYPE_SPEECH_RECOGNITION: _CrasStreamType.ValueType  # 3
    CRAS_STREAM_TYPE_PRO_AUDIO: _CrasStreamType.ValueType  # 4
    CRAS_STREAM_TYPE_ACCESSIBILITY: _CrasStreamType.ValueType  # 5

class CrasStreamType(_CrasStreamType, metaclass=_CrasStreamTypeEnumTypeWrapper):
    """CrasStreamType refers to types of audio streams.
    Source1: adhd::cras/client/cras-sys/src/lib.rs::CRAS_STREAM_TYPE
    Source2: adhd::cras/include/cras_types.h::CRAS_STREAM_TYPE
    """

CRAS_STREAM_TYPE_DEFAULT: CrasStreamType.ValueType  # 0
CRAS_STREAM_TYPE_MULTIMEDIA: CrasStreamType.ValueType  # 1
CRAS_STREAM_TYPE_VOICE_COMMUNICATION: CrasStreamType.ValueType  # 2
CRAS_STREAM_TYPE_SPEECH_RECOGNITION: CrasStreamType.ValueType  # 3
CRAS_STREAM_TYPE_PRO_AUDIO: CrasStreamType.ValueType  # 4
CRAS_STREAM_TYPE_ACCESSIBILITY: CrasStreamType.ValueType  # 5
global___CrasStreamType = CrasStreamType

class _CrasClientType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _CrasClientTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CrasClientType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    CRAS_CLIENT_TYPE_UNKNOWN: _CrasClientType.ValueType  # 0
    CRAS_CLIENT_TYPE_LEGACY: _CrasClientType.ValueType  # 1
    CRAS_CLIENT_TYPE_TEST: _CrasClientType.ValueType  # 2
    CRAS_CLIENT_TYPE_PCM: _CrasClientType.ValueType  # 3
    CRAS_CLIENT_TYPE_CHROME: _CrasClientType.ValueType  # 4
    CRAS_CLIENT_TYPE_ARC: _CrasClientType.ValueType  # 5
    CRAS_CLIENT_TYPE_CROSVM: _CrasClientType.ValueType  # 6
    CRAS_CLIENT_TYPE_SERVER_STREAM: _CrasClientType.ValueType  # 7
    CRAS_CLIENT_TYPE_LACROS: _CrasClientType.ValueType  # 8

class CrasClientType(_CrasClientType, metaclass=_CrasClientTypeEnumTypeWrapper):
    """CrasClientType refers to different types of audio clients.
    Source1: adhd::cras/client/cras-sys/src/lib.rs::CRAS_CLIENT_TYPE
    Source2: adhd::cras/include/cras_types.h::CRAS_CLIENT_TYPE
    """

CRAS_CLIENT_TYPE_UNKNOWN: CrasClientType.ValueType  # 0
CRAS_CLIENT_TYPE_LEGACY: CrasClientType.ValueType  # 1
CRAS_CLIENT_TYPE_TEST: CrasClientType.ValueType  # 2
CRAS_CLIENT_TYPE_PCM: CrasClientType.ValueType  # 3
CRAS_CLIENT_TYPE_CHROME: CrasClientType.ValueType  # 4
CRAS_CLIENT_TYPE_ARC: CrasClientType.ValueType  # 5
CRAS_CLIENT_TYPE_CROSVM: CrasClientType.ValueType  # 6
CRAS_CLIENT_TYPE_SERVER_STREAM: CrasClientType.ValueType  # 7
CRAS_CLIENT_TYPE_LACROS: CrasClientType.ValueType  # 8
global___CrasClientType = CrasClientType

class _CrasConnectionType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _CrasConnectionTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CrasConnectionType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    CRAS_CONNECTION_TYPE_CONTROL: _CrasConnectionType.ValueType  # 0
    CRAS_CONNECTION_TYPE_PLAYBACK: _CrasConnectionType.ValueType  # 1
    CRAS_CONNECTION_TYPE_CAPTURE: _CrasConnectionType.ValueType  # 2
    CRAS_CONNECTION_TYPE_VMS_LEGACY: _CrasConnectionType.ValueType  # 3
    CRAS_CONNECTION_TYPE_VMS_UNIFIED: _CrasConnectionType.ValueType  # 4
    CRAS_CONNECTION_TYPE_PLUGIN_PLAYBACK: _CrasConnectionType.ValueType  # 5
    CRAS_CONNECTION_TYPE_PLUGIN_UNIFIED: _CrasConnectionType.ValueType  # 6

class CrasConnectionType(_CrasConnectionType, metaclass=_CrasConnectionTypeEnumTypeWrapper):
    """ConnectionType enumerates cras_client connection types.
    Source: adhd::cras/include/cras_types.h::CRAS_CONNECTION_TYPE
    """

CRAS_CONNECTION_TYPE_CONTROL: CrasConnectionType.ValueType  # 0
CRAS_CONNECTION_TYPE_PLAYBACK: CrasConnectionType.ValueType  # 1
CRAS_CONNECTION_TYPE_CAPTURE: CrasConnectionType.ValueType  # 2
CRAS_CONNECTION_TYPE_VMS_LEGACY: CrasConnectionType.ValueType  # 3
CRAS_CONNECTION_TYPE_VMS_UNIFIED: CrasConnectionType.ValueType  # 4
CRAS_CONNECTION_TYPE_PLUGIN_PLAYBACK: CrasConnectionType.ValueType  # 5
CRAS_CONNECTION_TYPE_PLUGIN_UNIFIED: CrasConnectionType.ValueType  # 6
global___CrasConnectionType = CrasConnectionType

class _SampleFormat:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _SampleFormatEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SampleFormat.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    SAMPLE_FORMAT_U8: _SampleFormat.ValueType  # 0
    SAMPLE_FORMAT_S16_LE: _SampleFormat.ValueType  # 1
    SAMPLE_FORMAT_S24_LE: _SampleFormat.ValueType  # 2
    SAMPLE_FORMAT_S32_LE: _SampleFormat.ValueType  # 3

class SampleFormat(_SampleFormat, metaclass=_SampleFormatEnumTypeWrapper):
    """SampleFormat refers to audio sample formats supported by CRAS.
    Source: adhd::cras/client/cras_tests/src/arguments.rs::SampleFormatArg
    """

SAMPLE_FORMAT_U8: SampleFormat.ValueType  # 0
SAMPLE_FORMAT_S16_LE: SampleFormat.ValueType  # 1
SAMPLE_FORMAT_S24_LE: SampleFormat.ValueType  # 2
SAMPLE_FORMAT_S32_LE: SampleFormat.ValueType  # 3
global___SampleFormat = SampleFormat

class _CaptureEffect:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _CaptureEffectEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CaptureEffect.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    CAPTURE_EFFECT_AEC: _CaptureEffect.ValueType  # 0
    """Specifies the AEC effect ("0x01" bitmask)."""
    CAPTURE_EFFECT_NS: _CaptureEffect.ValueType  # 1
    """Specifies the NS effect ("0x02" bitmask)."""
    CAPTURE_EFFECT_AGC: _CaptureEffect.ValueType  # 2
    """Specifies the AGC effect ("0x04" bitmask)."""
    CAPTURE_EFFECT_VAD: _CaptureEffect.ValueType  # 3
    """Specifies the VAD effect ("0x08 bitmask)."""
    CAPTURE_EFFECT_AEC_ON_DSP_ALLOWED: _CaptureEffect.ValueType  # 4
    """Specifies the AEC on DSP allowed effect ("0x10" bitmask)."""
    CAPTURE_EFFECT_NS_ON_DSP_ALLOWED: _CaptureEffect.ValueType  # 5
    """Specifies the NS on DSP allowed effect ("0x20" bitmask)."""
    CAPTURE_EFFECT_AGC_ON_DSP_ALLOWED: _CaptureEffect.ValueType  # 6
    """Specifies the AGC on DSP allowed effect ("0x40" bitmask)."""

class CaptureEffect(_CaptureEffect, metaclass=_CaptureEffectEnumTypeWrapper):
    """CaptureEffect enumerates different capture effects."""

CAPTURE_EFFECT_AEC: CaptureEffect.ValueType  # 0
"""Specifies the AEC effect ("0x01" bitmask)."""
CAPTURE_EFFECT_NS: CaptureEffect.ValueType  # 1
"""Specifies the NS effect ("0x02" bitmask)."""
CAPTURE_EFFECT_AGC: CaptureEffect.ValueType  # 2
"""Specifies the AGC effect ("0x04" bitmask)."""
CAPTURE_EFFECT_VAD: CaptureEffect.ValueType  # 3
"""Specifies the VAD effect ("0x08 bitmask)."""
CAPTURE_EFFECT_AEC_ON_DSP_ALLOWED: CaptureEffect.ValueType  # 4
"""Specifies the AEC on DSP allowed effect ("0x10" bitmask)."""
CAPTURE_EFFECT_NS_ON_DSP_ALLOWED: CaptureEffect.ValueType  # 5
"""Specifies the NS on DSP allowed effect ("0x20" bitmask)."""
CAPTURE_EFFECT_AGC_ON_DSP_ALLOWED: CaptureEffect.ValueType  # 6
"""Specifies the AGC on DSP allowed effect ("0x40" bitmask)."""
global___CaptureEffect = CaptureEffect

class _CrasIODevLastOpenResult:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _CrasIODevLastOpenResultEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CrasIODevLastOpenResult.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    IO_DEV_LAST_OPEN_RESULT_UNKNOWN: _CrasIODevLastOpenResult.ValueType  # 0
    IO_DEV_LAST_OPEN_RESULT_SUCCESS: _CrasIODevLastOpenResult.ValueType  # 1
    IO_DEV_LAST_OPEN_RESULT_FAILURE: _CrasIODevLastOpenResult.ValueType  # 2

class CrasIODevLastOpenResult(_CrasIODevLastOpenResult, metaclass=_CrasIODevLastOpenResultEnumTypeWrapper):
    """
    Source: adhd::cras/include/cras_iodev_info.h::CRAS_IODEV_LAST_OPEN_RESULT
    """

IO_DEV_LAST_OPEN_RESULT_UNKNOWN: CrasIODevLastOpenResult.ValueType  # 0
IO_DEV_LAST_OPEN_RESULT_SUCCESS: CrasIODevLastOpenResult.ValueType  # 1
IO_DEV_LAST_OPEN_RESULT_FAILURE: CrasIODevLastOpenResult.ValueType  # 2
global___CrasIODevLastOpenResult = CrasIODevLastOpenResult

@typing.final
class CrasNodeID(google.protobuf.message.Message):
    """CrasNodeID is the ID of the cras ionode.
    Source: adhd::cras/src/include/cras_types.h::cras_node_id_t
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    DEVICEINDEX_FIELD_NUMBER: builtins.int
    NODEINDEX_FIELD_NUMBER: builtins.int
    deviceIndex: builtins.int
    nodeIndex: builtins.int
    def __init__(
        self,
        *,
        deviceIndex: builtins.int = ...,
        nodeIndex: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["deviceIndex", b"deviceIndex", "nodeIndex", b"nodeIndex"]) -> None: ...

global___CrasNodeID = CrasNodeID

@typing.final
class CrasNode(google.protobuf.message.Message):
    """Represents a CrasNode, with data limited what is relevant for testing."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    IS_INPUT_FIELD_NUMBER: builtins.int
    ID_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    DEVICE_NAME_FIELD_NUMBER: builtins.int
    ACTIVE_FIELD_NUMBER: builtins.int
    NODE_VOLUME_FIELD_NUMBER: builtins.int
    is_input: builtins.bool
    """False for output nodes, true for input nodes."""
    id: builtins.int
    """The id of this node. It is unique among all nodes including both output and
    input nodes.
    """
    type: global___CrasNodeType.ValueType
    """The type of this node."""
    device_name: builtins.str
    """The name of the device that this node belongs to. For example,
    "HDA Intel PCH: CA0132 Analog:0,0" or "Creative SB Arena Headset".
    """
    active: builtins.bool
    """Whether this node is currently used for output/input. There is one active
    node for output and one active node for input.
    """
    node_volume: builtins.int
    """The node volume indexed from 0 to 100."""
    def __init__(
        self,
        *,
        is_input: builtins.bool = ...,
        id: builtins.int = ...,
        type: global___CrasNodeType.ValueType = ...,
        device_name: builtins.str = ...,
        active: builtins.bool = ...,
        node_volume: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["active", b"active", "device_name", b"device_name", "id", b"id", "is_input", b"is_input", "node_volume", b"node_volume", "type", b"type"]) -> None: ...

global___CrasNode = CrasNode
