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

from __future__ import annotations
import dataclasses
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class Certificate:
    r"""New Certificate object"""
    cert: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('cert') }})
    r"""Drag/drop or upload host certificate, in PEM/Base64 format. Or paste its contents here."""
    id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
    r"""Name of the certificate."""
    priv_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('privKey') }})
    r"""Certificate private key."""
    ca: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ca'), 'exclude': lambda f: f is None }})
    r"""Optionally, drag/drop or upload all CA certificate(s) in PEM/Base64 format. Or paste certs' contents here. Certs can be used for client and/or server auth."""
    description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
    r"""Brief description of this certificate. Optional."""
    in_use: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('inUse'), 'exclude': lambda f: f is None }})
    r"""List of configurations referencing this certificate."""
    passphrase: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('passphrase'), 'exclude': lambda f: f is None }})
    r"""Passphrase. Optional."""
    

