# coding: utf-8

"""
    Synthetic Users

     **Description**: Synthetic Users provides AI-powered, human-like participants for user and market research, streamlining data collection and insight generation. With multi-agent architecture, it simulates realistic, scalable interactions, enabling efficient research through synthetic interviews and surveys.  **Features**: - **In-depth Interviews**: Interactive, AI-driven interviews with customizable follow-up options. - **Global Surveys**: Fast, quantitative data collection at scale. - **Customizable Synthetic Users**: Integrate proprietary data for tailored research. - **Multi-agent Framework**: Mimics real human interactions for accurate insights.  **Use Cases**: - **Product Testing**: Identify needs and refine concepts. - **Market Analysis**: Expand reach and enhance user satisfaction.    For more information, visit [Synthetic Users](https://www.syntheticusers.com).

    The version of the OpenAPI document: 1.0.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, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class SuggestionCreate(BaseModel):
    """
    SuggestionCreate
    """ # noqa: E501
    subplan_id: StrictStr = Field(alias="subplanId")
    status: Optional[StrictStr] = None
    data: Optional[Dict[str, Any]] = None
    quantity: StrictInt
    files: Optional[List[StrictStr]] = None
    __properties: ClassVar[List[str]] = ["subplanId", "status", "data", "quantity", "files"]

    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 SuggestionCreate 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,
        )
        # set to None if status (nullable) is None
        # and model_fields_set contains the field
        if self.status is None and "status" in self.model_fields_set:
            _dict['status'] = None

        # set to None if data (nullable) is None
        # and model_fields_set contains the field
        if self.data is None and "data" in self.model_fields_set:
            _dict['data'] = None

        # set to None if files (nullable) is None
        # and model_fields_set contains the field
        if self.files is None and "files" in self.model_fields_set:
            _dict['files'] = None

        return _dict

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

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

        _obj = cls.model_validate({
            "subplanId": obj.get("subplanId"),
            "status": obj.get("status"),
            "data": obj.get("data"),
            "quantity": obj.get("quantity"),
            "files": obj.get("files")
        })
        return _obj


