"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_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

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

class _ProductTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ProductType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    PRODUCT_TYPE_UNSPECIFIED: _ProductType.ValueType  # 0
    """Unspecified product type."""
    PRODUCT_TYPE_STACKLAND: _ProductType.ValueType  # 1
    """Stackland product."""
    PRODUCT_TYPE_DATALENS: _ProductType.ValueType  # 2
    """DataLens product."""
    PRODUCT_TYPE_AI_STUDIO: _ProductType.ValueType  # 3
    """AI Studio product."""
    PRODUCT_TYPE_SPEECHSENSE: _ProductType.ValueType  # 4
    """SpeechSense product."""
    PRODUCT_TYPE_ROBOTICS_AI: _ProductType.ValueType  # 5
    """Robotics AI product."""

class ProductType(_ProductType, metaclass=_ProductTypeEnumTypeWrapper):
    """Product type enum"""

PRODUCT_TYPE_UNSPECIFIED: ProductType.ValueType  # 0
"""Unspecified product type."""
PRODUCT_TYPE_STACKLAND: ProductType.ValueType  # 1
"""Stackland product."""
PRODUCT_TYPE_DATALENS: ProductType.ValueType  # 2
"""DataLens product."""
PRODUCT_TYPE_AI_STUDIO: ProductType.ValueType  # 3
"""AI Studio product."""
PRODUCT_TYPE_SPEECHSENSE: ProductType.ValueType  # 4
"""SpeechSense product."""
PRODUCT_TYPE_ROBOTICS_AI: ProductType.ValueType  # 5
"""Robotics AI product."""
global___ProductType = ProductType

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

class _SyncStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SyncStatus.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    SYNC_STATUS_UNSPECIFIED: _SyncStatus.ValueType  # 0
    """Unspecified sync status."""
    OK: _SyncStatus.ValueType  # 1
    """Sync completed successfully."""
    WARNING: _SyncStatus.ValueType  # 2
    """Sync completed with warnings."""
    ERROR: _SyncStatus.ValueType  # 3
    """Sync failed with errors."""

class SyncStatus(_SyncStatus, metaclass=_SyncStatusEnumTypeWrapper):
    """Sync status enum"""

SYNC_STATUS_UNSPECIFIED: SyncStatus.ValueType  # 0
"""Unspecified sync status."""
OK: SyncStatus.ValueType  # 1
"""Sync completed successfully."""
WARNING: SyncStatus.ValueType  # 2
"""Sync completed with warnings."""
ERROR: SyncStatus.ValueType  # 3
"""Sync failed with errors."""
global___SyncStatus = SyncStatus

@typing.final
class UsageEntry(google.protobuf.message.Message):
    """Usage data entry for a single installation"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    INSTALLATION_ID_FIELD_NUMBER: builtins.int
    PRODUCT_TYPE_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    USAGE_FIELD_NUMBER: builtins.int
    TIMESTAMP_FIELD_NUMBER: builtins.int
    HARDWARE_FINGERPRINT_FIELD_NUMBER: builtins.int
    LICENSE_ID_FIELD_NUMBER: builtins.int
    REQUESTED_VALUE_FIELD_NUMBER: builtins.int
    SERVER_TIMESTAMP_FIELD_NUMBER: builtins.int
    PREV_RECORD_HASH_FIELD_NUMBER: builtins.int
    RECORD_HASH_FIELD_NUMBER: builtins.int
    SIGNATURE_FIELD_NUMBER: builtins.int
    installation_id: builtins.str
    """Installation ID"""
    product_type: global___ProductType.ValueType
    """Product type"""
    type: builtins.str
    """Usage metric type (e.g., "stackland.vcpu.cores")"""
    usage: builtins.int
    """Usage value"""
    hardware_fingerprint: builtins.str
    """Hardware fingerprint for the installation"""
    license_id: builtins.str
    """License ID this usage applies to"""
    requested_value: builtins.int
    """Requested license limit value (optional)"""
    prev_record_hash: builtins.str
    """Previous record's hash in the chain (64 hex characters)"""
    record_hash: builtins.str
    """SHA-256 hash of this record (64 hex characters)"""
    signature: builtins.str
    """RSA-PSS signature of the record hash (base64-encoded)"""
    @property
    def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp of the usage (client-side timestamp)"""

    @property
    def server_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Server-side timestamp set by license server"""

    def __init__(
        self,
        *,
        installation_id: builtins.str = ...,
        product_type: global___ProductType.ValueType = ...,
        type: builtins.str = ...,
        usage: builtins.int = ...,
        timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        hardware_fingerprint: builtins.str = ...,
        license_id: builtins.str = ...,
        requested_value: builtins.int = ...,
        server_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        prev_record_hash: builtins.str = ...,
        record_hash: builtins.str = ...,
        signature: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["server_timestamp", b"server_timestamp", "timestamp", b"timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["hardware_fingerprint", b"hardware_fingerprint", "installation_id", b"installation_id", "license_id", b"license_id", "prev_record_hash", b"prev_record_hash", "product_type", b"product_type", "record_hash", b"record_hash", "requested_value", b"requested_value", "server_timestamp", b"server_timestamp", "signature", b"signature", "timestamp", b"timestamp", "type", b"type", "usage", b"usage"]) -> None: ...

global___UsageEntry = UsageEntry

@typing.final
class LicenseLimit(google.protobuf.message.Message):
    """License limit for a specific metric type"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TYPE_FIELD_NUMBER: builtins.int
    LIMIT_FIELD_NUMBER: builtins.int
    type: builtins.str
    """Metric type (e.g., "stackland.vcpu.cores")"""
    limit: builtins.int
    """Limit value"""
    def __init__(
        self,
        *,
        type: builtins.str = ...,
        limit: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["limit", b"limit", "type", b"type"]) -> None: ...

global___LicenseLimit = LicenseLimit

@typing.final
class License(google.protobuf.message.Message):
    """License information returned by the sync API"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    LICENSE_ID_FIELD_NUMBER: builtins.int
    PRODUCT_TYPE_FIELD_NUMBER: builtins.int
    ORGANIZATION_ID_FIELD_NUMBER: builtins.int
    BILLING_ACCOUNT_ID_FIELD_NUMBER: builtins.int
    ISSUED_AT_FIELD_NUMBER: builtins.int
    VALID_UNTIL_FIELD_NUMBER: builtins.int
    LIMITS_FIELD_NUMBER: builtins.int
    SIGNATURE_FIELD_NUMBER: builtins.int
    license_id: builtins.str
    """Unique license ID"""
    product_type: global___ProductType.ValueType
    """Product type this license applies to"""
    organization_id: builtins.str
    """Organization ID"""
    billing_account_id: builtins.str
    """Billing account ID"""
    signature: builtins.str
    """Digital signature for this license"""
    @property
    def issued_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp when the license was issued"""

    @property
    def valid_until(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp when the license expires"""

    @property
    def limits(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___LicenseLimit]:
        """List of limits for this license"""

    def __init__(
        self,
        *,
        license_id: builtins.str = ...,
        product_type: global___ProductType.ValueType = ...,
        organization_id: builtins.str = ...,
        billing_account_id: builtins.str = ...,
        issued_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        valid_until: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        limits: collections.abc.Iterable[global___LicenseLimit] | None = ...,
        signature: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["issued_at", b"issued_at", "valid_until", b"valid_until"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["billing_account_id", b"billing_account_id", "issued_at", b"issued_at", "license_id", b"license_id", "limits", b"limits", "organization_id", b"organization_id", "product_type", b"product_type", "signature", b"signature", "valid_until", b"valid_until"]) -> None: ...

global___License = License

@typing.final
class SyncRequest(google.protobuf.message.Message):
    """Request to synchronize licenses and submit usage data"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ORGANIZATION_ID_FIELD_NUMBER: builtins.int
    BILLING_ACCOUNT_ID_FIELD_NUMBER: builtins.int
    LICENSE_SERVER_ID_FIELD_NUMBER: builtins.int
    USAGE_FIELD_NUMBER: builtins.int
    organization_id: builtins.str
    """Organization ID"""
    billing_account_id: builtins.str
    """Billing account ID"""
    license_server_id: builtins.str
    """License server ID"""
    @property
    def usage(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UsageEntry]:
        """Usage data for audit"""

    def __init__(
        self,
        *,
        organization_id: builtins.str = ...,
        billing_account_id: builtins.str = ...,
        license_server_id: builtins.str = ...,
        usage: collections.abc.Iterable[global___UsageEntry] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["billing_account_id", b"billing_account_id", "license_server_id", b"license_server_id", "organization_id", b"organization_id", "usage", b"usage"]) -> None: ...

global___SyncRequest = SyncRequest

@typing.final
class SyncUsageResult(google.protobuf.message.Message):
    """Result of the sync operation"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    LICENSES_FIELD_NUMBER: builtins.int
    SYNC_STATUS_FIELD_NUMBER: builtins.int
    MESSAGE_FIELD_NUMBER: builtins.int
    sync_status: global___SyncStatus.ValueType
    """Overall sync status"""
    message: builtins.str
    """Optional message (e.g., warnings or errors)"""
    @property
    def licenses(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___License]:
        """List of licenses for different product types"""

    def __init__(
        self,
        *,
        licenses: collections.abc.Iterable[global___License] | None = ...,
        sync_status: global___SyncStatus.ValueType = ...,
        message: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["licenses", b"licenses", "message", b"message", "sync_status", b"sync_status"]) -> None: ...

global___SyncUsageResult = SyncUsageResult

@typing.final
class SyncUsageMetadata(google.protobuf.message.Message):
    """Metadata for sync operation"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ORGANIZATION_ID_FIELD_NUMBER: builtins.int
    BILLING_ACCOUNT_ID_FIELD_NUMBER: builtins.int
    LICENSE_SERVER_ID_FIELD_NUMBER: builtins.int
    organization_id: builtins.str
    """Organization ID"""
    billing_account_id: builtins.str
    """Billing account ID"""
    license_server_id: builtins.str
    """License server ID"""
    def __init__(
        self,
        *,
        organization_id: builtins.str = ...,
        billing_account_id: builtins.str = ...,
        license_server_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["billing_account_id", b"billing_account_id", "license_server_id", b"license_server_id", "organization_id", b"organization_id"]) -> None: ...

global___SyncUsageMetadata = SyncUsageMetadata
