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

from __future__ import annotations
import dataclasses
from enum import Enum
from typing import List, Optional, Union


@dataclasses.dataclass
class GetLinksCountGlobals:
    workspace_id: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'workspaceId', 'style': 'form', 'explode': True }})
    r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
    project_slug: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'projectSlug', 'style': 'form', 'explode': True }})
    r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
    



class Two(str, Enum):
    TAG_ID = 'tagId'


class One(str, Enum):
    DOMAIN = 'domain'


@dataclasses.dataclass
class GetLinksCountRequest:
    domain: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'domain', 'style': 'form', 'explode': True }})
    r"""The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned."""
    tag_id: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'tagId', 'style': 'form', 'explode': True }})
    r"""The tag ID to filter the links by. This field is deprecated – use `tagIds` instead."""
    tag_ids: Optional[GetLinksCountQueryParamTagIds] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'tagIds', 'style': 'form', 'explode': True }})
    r"""The tag IDs to filter the links by."""
    tag_names: Optional[GetLinksCountQueryParamTagNames] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'tagNames', 'style': 'form', 'explode': True }})
    r"""The unique name of the tags assigned to the short link (case insensitive)."""
    search: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'search', 'style': 'form', 'explode': True }})
    r"""The search term to filter the links by. The search term will be matched against the short link slug and the destination url."""
    user_id: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'userId', 'style': 'form', 'explode': True }})
    r"""The user ID to filter the links by."""
    show_archived: Optional[bool] = dataclasses.field(default=True, metadata={'query_param': { 'field_name': 'showArchived', 'style': 'form', 'explode': True }})
    r"""Whether to include archived links in the response. Defaults to `false` if not provided."""
    with_tags: Optional[bool] = dataclasses.field(default=True, metadata={'query_param': { 'field_name': 'withTags', 'style': 'form', 'explode': True }})
    r"""Whether to include tags in the response. Defaults to `false` if not provided."""
    group_by: Optional[GroupBy] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'groupBy', 'style': 'form', 'explode': True }})
    r"""The field to group the links by."""
    


GetLinksCountQueryParamTagIds = Union[str, List[str]]

GetLinksCountQueryParamTagNames = Union[str, List[str]]

GroupBy = Union[One, Two]
