# coding: utf-8

"""
    Neurograph Core

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 1.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import pprint
import re  # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class ClientSystemHealthcheckV2Snapshot(BaseModel):
    """
    ClientSystemHealthcheckV2Snapshot
    """ # noqa: E501
    client_id: Optional[StrictStr] = None
    client_name: Optional[StrictStr] = None
    client_uid: Optional[StrictStr] = None
    error_json: Optional[List[StrictInt]] = None
    error_message: Optional[StrictStr] = None
    graph_json: Optional[List[StrictInt]] = None
    graph_version: Optional[StrictInt] = None
    id: Optional[StrictStr] = None
    integration_mode: Optional[StrictStr] = None
    metrics_json: Optional[List[StrictInt]] = None
    org_id: Optional[StrictStr] = None
    org_name: Optional[StrictStr] = None
    org_uid: Optional[StrictStr] = None
    result_success: Optional[StrictBool] = None
    run_date: Optional[StrictStr] = None
    status: Optional[StrictStr] = None
    summary_json: Optional[List[StrictInt]] = None
    ts_finished: Optional[StrictStr] = None
    ts_started: Optional[StrictStr] = None
    __properties: ClassVar[List[str]] = ["client_id", "client_name", "client_uid", "error_json", "error_message", "graph_json", "graph_version", "id", "integration_mode", "metrics_json", "org_id", "org_name", "org_uid", "result_success", "run_date", "status", "summary_json", "ts_finished", "ts_started"]

    model_config = ConfigDict(
        populate_by_name=True,
        validate_assignment=True,
        protected_namespaces=(),
    )


    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.model_dump(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> Optional[Self]:
        """Create an instance of ClientSystemHealthcheckV2Snapshot from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self) -> Dict[str, Any]:
        """Return the dictionary representation of the model using alias.

        This has the following differences from calling pydantic's
        `self.model_dump(by_alias=True)`:

        * `None` is only added to the output dict for nullable fields that
          were set at model initialization. Other fields with value `None`
          are ignored.
        """
        excluded_fields: Set[str] = set([
        ])

        _dict = self.model_dump(
            by_alias=True,
            exclude=excluded_fields,
            exclude_none=True,
        )
        return _dict

    @classmethod
    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
        """Create an instance of ClientSystemHealthcheckV2Snapshot from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return cls.model_validate(obj)

        _obj = cls.model_validate({
            "client_id": obj.get("client_id"),
            "client_name": obj.get("client_name"),
            "client_uid": obj.get("client_uid"),
            "error_json": obj.get("error_json"),
            "error_message": obj.get("error_message"),
            "graph_json": obj.get("graph_json"),
            "graph_version": obj.get("graph_version"),
            "id": obj.get("id"),
            "integration_mode": obj.get("integration_mode"),
            "metrics_json": obj.get("metrics_json"),
            "org_id": obj.get("org_id"),
            "org_name": obj.get("org_name"),
            "org_uid": obj.get("org_uid"),
            "result_success": obj.get("result_success"),
            "run_date": obj.get("run_date"),
            "status": obj.get("status"),
            "summary_json": obj.get("summary_json"),
            "ts_finished": obj.get("ts_finished"),
            "ts_started": obj.get("ts_started")
        })
        return _obj


