#  Copyright (c) 2023 EPAM Systems
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#  https://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License

from typing import Any, Dict, List, Optional, Tuple, Union

class Suite:
    attributes: Union[List[str], Dict[str, Any]] = ...
    doc: str = ...
    end_time: str = ...
    longname: str = ...
    message: str = ...
    metadata: Dict[str, str] = ...
    name: str = ...
    robot_id: str = ...
    rp_item_id: Optional[str] = ...
    rp_parent_item_id: Optional[str] = ...
    start_time: Optional[str] = ...
    statistics: str = ...
    status: str = ...
    suites: List[str] = ...
    tests: List[str] = ...
    total_tests: int = ...
    type: str = 'SUITE'
    def __init__(self, name: str, attributes: Dict[str, Any]) -> None: ...
    @property
    def source(self) -> str: ...
    def update(self, attributes: Dict[str, Any]) -> Union[Launch, Suite]: ...

class Launch(Suite):
    type: str = 'LAUNCH'
    def __init__(self, name: str, attributes: Dict[str, Any]) -> None: ...

class Test:
    _critical: str = ...
    _tags: List[str] = ...
    _attributes: Dict[str, Any] = ...
    attributes: List[Dict[str, str]] = ...
    doc: str = ...
    end_time: str = ...
    longname: str = ...
    message: str = ...
    name: str = ...
    robot_id: str = ...
    rp_item_id: Optional[str] = ...
    rp_parent_item_id: Optional[str] = ...
    start_time: str = ...
    status: str = ...
    template: str = ...
    type: str = 'TEST'
    def __init__(self, name: str, attributes: Dict[str, Any]) -> None: ...
    @property
    def critical(self) -> bool: ...
    @property
    def tags(self) -> List[str]: ...
    @property
    def source(self) -> str: ...
    @property
    def code_ref(self) -> str: ...
    @property
    def test_case_id(self) -> Optional[str]: ...
    def update(self, attributes: Dict[str, Any]) -> Test: ...

class Keyword:
    attributes: Dict[str, Any] = ...
    args: List[str] = ...
    assign: List[str] = ...
    doc: str = ...
    end_time: str = ...
    keyword_name: str = ...
    keyword_type: str = ...
    libname: str = ...
    name: str = ...
    rp_item_id: Optional[str] = ...
    rp_parent_item_id: Optional[str] = ...
    parent_type: str = ...
    start_time: str = ...
    status: str = ...
    tags: List[str] = ...
    type: str = 'KEYWORD'
    def __init__(self, name: str, attributes: Dict[str, Any], parent_type: Optional[str] = None) -> None: ...
    def get_name(self) -> str: ...
    def get_type(self) -> str: ...
    def update(self, attributes: Dict[str, Any]) -> Keyword: ...

class LogMessage(str):
    attachment: Optional[Dict[str, str]] = ...
    launch_log: bool = ...
    item_id: Optional[str] = ...
    level: str = ...
    message: str = ...
    def __init__(self, *args: Tuple, **kwargs: Dict) -> None: ...
