from typing import Any, Optional

from googleapiclient import errors as errors

EPOCH: Any
CHANNEL_PARAMS: Any
X_GOOG_CHANNEL_ID: str
X_GOOG_MESSAGE_NUMBER: str
X_GOOG_RESOURCE_STATE: str
X_GOOG_RESOURCE_URI: str
X_GOOG_RESOURCE_ID: str

class Notification:
    message_number: Any = ...
    state: Any = ...
    resource_uri: Any = ...
    resource_id: Any = ...
    def __init__(
        self, message_number: Any, state: Any, resource_uri: Any, resource_id: Any
    ) -> None: ...

class Channel:
    type: Any = ...
    id: Any = ...
    token: Any = ...
    address: Any = ...
    expiration: Any = ...
    params: Any = ...
    resource_id: Any = ...
    resource_uri: Any = ...
    def __init__(
        self,
        type: Any,
        id: Any,
        token: Any,
        address: Any,
        expiration: Optional[Any] = ...,
        params: Optional[Any] = ...,
        resource_id: str = ...,
        resource_uri: str = ...,
    ) -> None: ...
    def body(self): ...
    def update(self, resp: Any) -> None: ...

def notification_from_headers(channel: Any, headers: Any): ...
def new_webhook_channel(
    url: Any,
    token: Optional[Any] = ...,
    expiration: Optional[Any] = ...,
    params: Optional[Any] = ...,
): ...
