"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from enum import Enum
from gusto_app_integration.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class Status(str, Enum):
    r"""The status of the webhook subscription."""

    PENDING = "pending"
    VERIFIED = "verified"
    REMOVED = "removed"
    UNREACHABLE = "unreachable"


class SubscriptionTypes(str, Enum):
    BANK_ACCOUNT = "BankAccount"
    COMPANY = "Company"
    COMPANY_BENEFIT = "CompanyBenefit"
    CONTRACTOR = "Contractor"
    CONTRACTOR_PAYMENT = "ContractorPayment"
    EMPLOYEE = "Employee"
    EMPLOYEE_BENEFIT = "EmployeeBenefit"
    EMPLOYEE_JOB_COMPENSATION = "EmployeeJobCompensation"
    EXTERNAL_PAYROLL = "ExternalPayroll"
    FORM = "Form"
    LOCATION = "Location"
    NOTIFICATION = "Notification"
    PAYROLL = "Payroll"
    PAY_SCHEDULE = "PaySchedule"
    SIGNATORY = "Signatory"


class WebhookSubscriptionTypedDict(TypedDict):
    r"""The representation of webhook subscription."""

    uuid: str
    r"""The UUID of the webhook subscription."""
    url: NotRequired[str]
    r"""The webhook subscriber URL. Updates will be POSTed to this URL."""
    status: NotRequired[Status]
    r"""The status of the webhook subscription."""
    subscription_types: NotRequired[List[SubscriptionTypes]]
    r"""Receive updates for these types."""


class WebhookSubscription(BaseModel):
    r"""The representation of webhook subscription."""

    uuid: str
    r"""The UUID of the webhook subscription."""

    url: Optional[str] = None
    r"""The webhook subscriber URL. Updates will be POSTed to this URL."""

    status: Optional[Status] = None
    r"""The status of the webhook subscription."""

    subscription_types: Optional[List[SubscriptionTypes]] = None
    r"""Receive updates for these types."""
