"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from ..shared import licensetype as shared_licensetype
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from enum import Enum
from typing import Any, Optional

class LicenseInfoType(str, Enum):
    PROD = 'prod'
    TRIAL = 'trial'
    FREE = 'free'


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class LicenseInfo:
    effective_class: shared_licensetype.LicenseType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveClass') }})
    expiration: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expiration') }})
    guid: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid') }})
    is_running_in_saa_s: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRunningInSaaS') }})
    license_enforce_reason: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('licenseEnforceReason') }})
    limits: dict[str, Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('limits') }})
    phone_home: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('phoneHome') }})
    phone_home_grace: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('phoneHomeGrace') }})
    quota: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quota') }})
    type: LicenseInfoType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
    email: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('email'), 'exclude': lambda f: f is None }})
    is_splunk_app: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isSplunkApp'), 'exclude': lambda f: f is None }})
    

