# coding: utf-8

"""
    BeeKeeperAI EscrowAI Enclave API

    Described below is the EscrowAI Enclave API that provides functionality inside a BeeKeeperAI environment. Included are data engineering endpoints and reporting endpoints.

    The version of the OpenAPI document: 1.5.0
    Contact: engineering@beekeeperai.com
    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, Field, StrictStr, validator

class ReportPostRequest(BaseModel):
    """
    ReportPostRequest
    """
    name: StrictStr = Field(..., description="A unique identifier for the report")
    status: StrictStr = Field(..., description="The status of the report")
    json_data: StrictStr = Field(..., description="A Base64 encoded string of the report's JSON data")
    upload_location: StrictStr = Field(..., description="Deprecated field, unused")
    project: StrictStr = Field(..., description="The project ID related to this report")
    run_configuration: StrictStr = Field(..., description="The run configuration ID for this report")
    run: StrictStr = Field(..., description="The run ID for this report")
    __properties = ["name", "status", "json_data", "upload_location", "project", "run_configuration", "run"]

    @validator('status')
    def status_validate_enum(cls, value):
        """Validates the enum"""
        if value not in ('In Progress', 'Completed', 'Paused', 'Failed'):
            raise ValueError("must be one of enum values ('In Progress', 'Completed', 'Paused', 'Failed')")
        return value

    class Config:
        """Pydantic configuration"""
        allow_population_by_field_name = True
        validate_assignment = True

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

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

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

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        _dict = self.dict(by_alias=True,
                          exclude={
                          },
                          exclude_none=True)
        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> ReportPostRequest:
        """Create an instance of ReportPostRequest from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return ReportPostRequest.parse_obj(obj)

        _obj = ReportPostRequest.parse_obj({
            "name": obj.get("name"),
            "status": obj.get("status"),
            "json_data": obj.get("json_data"),
            "upload_location": obj.get("upload_location"),
            "project": obj.get("project"),
            "run_configuration": obj.get("run_configuration"),
            "run": obj.get("run")
        })
        return _obj


