# Path: pygls/lsp/types/basic_structures.py
# class Command(Model):
#     title: str
#     command: str
#     arguments: Optional[List[Any]]
# 
# class MarkupContent(Model):
#     kind: MarkupKind
#     value: str
# 
# class MarkupKind(str, enum.Enum):
#     PlainText = 'plaintext'
#     Markdown = 'markdown'
# 
# class Model(BaseModel):
#     class Config:
#         alias_generator = snake_to_camel
#         allow_population_by_field_name = True
#         fields = {
#             'from_': 'from'
#         }
# 
# class PartialResultParams(Model):
#     partial_result_token: Optional[ProgressToken]
# 
# class Range(Model):
#     start: Position
#     end: Position
# 
#     def __eq__(self, other):
#         return (
#             isinstance(other, Range)
#             and self.start == other.start
#             and self.end == other.end)
# 
#     def __hash__(self):
#         return hash((self.start, self.end))
# 
#     def __iter__(self):
#         return iter((self.start, self.end))
# 
#     def __repr__(self):
#         return f'{self.start!r}-{self.end!r}'
# 
# class ResolveSupportClientCapabilities(Model):
#     properties: List[str]
# 
# class TextDocumentPositionParams(Model):
#     text_document: TextDocumentIdentifier
#     position: Position
# 
# class TextEdit(Model):
#     range: Range
#     new_text: str
# 
# class WorkDoneProgressOptions(Model):
#     work_done_progress: Optional[ProgressToken]
# 
# class WorkDoneProgressParams(Model):
#     work_done_token: Optional[ProgressToken]


import enum
from typing import Any, List, Optional, Union
from pygls.lsp.types.basic_structures import (Command, MarkupContent, MarkupKind, Model,
                                              PartialResultParams, Range,
                                              ResolveSupportClientCapabilities,
                                              TextDocumentPositionParams, TextEdit,
                                              WorkDoneProgressOptions, WorkDoneProgressParams)
    AsIs = 1
    AdjustIndentation = 2


class InsertTextModeSupportClientCapabilities(Model):
    value_set: List[InsertTextMode]


class CompletionItemClientCapabilities(Model):
    snippet_support: Optional[bool]
    commit_characters_support: Optional[bool]
    documentation_format: Optional[List[MarkupKind]]
    deprecated_support: Optional[bool]
    preselect_support: Optional[bool]
    tag_support: Optional[CompletionTagSupportClientCapabilities]
    insert_replace_support: Optional[bool]
    resolve_support: Optional[ResolveSupportClientCapabilities]
    insert_text_mode_support: Optional[InsertTextModeSupportClientCapabilities]


class CompletionClientCapabilities(Model):
    dynamic_registration: Optional[bool]
    completion_item: Optional[CompletionItemClientCapabilities]
    completion_item_kind: Optional[CompletionItemKindClientCapabilities]
    context_support: Optional[bool]


class InsertReplaceEdit(Model):
    new_text: str
    insert: Range

# Path: pygls/lsp/types/basic_structures.py
# class Command(Model):
#     title: str
#     command: str
#     arguments: Optional[List[Any]]
# 
# class MarkupContent(Model):
#     kind: MarkupKind
#     value: str
# 
# class MarkupKind(str, enum.Enum):
#     PlainText = 'plaintext'
#     Markdown = 'markdown'
# 
# class Model(BaseModel):
#     class Config:
#         alias_generator = snake_to_camel
#         allow_population_by_field_name = True
#         fields = {
#             'from_': 'from'
#         }
# 
# class PartialResultParams(Model):
#     partial_result_token: Optional[ProgressToken]
# 
# class Range(Model):
#     start: Position
#     end: Position
# 
#     def __eq__(self, other):
#         return (
#             isinstance(other, Range)
#             and self.start == other.start
#             and self.end == other.end)
# 
#     def __hash__(self):
#         return hash((self.start, self.end))
# 
#     def __iter__(self):
#         return iter((self.start, self.end))
# 
#     def __repr__(self):
#         return f'{self.start!r}-{self.end!r}'
# 
# class ResolveSupportClientCapabilities(Model):
#     properties: List[str]
# 
# class TextDocumentPositionParams(Model):
#     text_document: TextDocumentIdentifier
#     position: Position
# 
# class TextEdit(Model):
#     range: Range
#     new_text: str
# 
# class WorkDoneProgressOptions(Model):
#     work_done_progress: Optional[ProgressToken]
# 
# class WorkDoneProgressParams(Model):
#     work_done_token: Optional[ProgressToken]


# Path: pygls/lsp/types/language_features/completion.py
import enum
from typing import Any, List, Optional, Union
from pygls.lsp.types.basic_structures import (Command, MarkupContent, MarkupKind, Model,
                                              PartialResultParams, Range,
                                              ResolveSupportClientCapabilities,
                                              TextDocumentPositionParams, TextEdit,
                                              WorkDoneProgressOptions, WorkDoneProgressParams)

    AsIs = 1
    AdjustIndentation = 2


class InsertTextModeSupportClientCapabilities(Model):
    value_set: List[InsertTextMode]


class CompletionItemClientCapabilities(Model):
    snippet_support: Optional[bool]
    commit_characters_support: Optional[bool]
    documentation_format: Optional[List[MarkupKind]]
    deprecated_support: Optional[bool]
    preselect_support: Optional[bool]
    tag_support: Optional[CompletionTagSupportClientCapabilities]
    insert_replace_support: Optional[bool]
    resolve_support: Optional[ResolveSupportClientCapabilities]
    insert_text_mode_support: Optional[InsertTextModeSupportClientCapabilities]


class CompletionClientCapabilities(Model):
    dynamic_registration: Optional[bool]
    completion_item: Optional[CompletionItemClientCapabilities]
    completion_item_kind: Optional[CompletionItemKindClientCapabilities]
    context_support: Optional[bool]


class InsertReplaceEdit(Model):
    new_text: str
    insert: Range

    replace: Range