# coding: utf-8

"""
    Marqeta Core API

    Simplified management of your payment programs  # noqa: E501

    The version of the OpenAPI document: 3.0.0
    Contact: dev@swadesh.co
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


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


from typing import Optional
from pydantic import BaseModel, constr

class PrimaryContactInfoModel(BaseModel):
    """
    PrimaryContactInfoModel
    """
    full_name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    title: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    department: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    phone: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    extension: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    fax: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    mobile: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    email: Optional[constr(strict=True, max_length=255, min_length=0)] = None
    __properties = ["full_name", "title", "department", "phone", "extension", "fax", "mobile", "email"]

    class Config:
        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) -> PrimaryContactInfoModel:
        """Create an instance of PrimaryContactInfoModel 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) -> PrimaryContactInfoModel:
        """Create an instance of PrimaryContactInfoModel from a dict"""
        if obj is None:
            return None

        if type(obj) is not dict:
            return PrimaryContactInfoModel.parse_obj(obj)

        _obj = PrimaryContactInfoModel.parse_obj({
            "full_name": obj.get("full_name"),
            "title": obj.get("title"),
            "department": obj.get("department"),
            "phone": obj.get("phone"),
            "extension": obj.get("extension"),
            "fax": obj.get("fax"),
            "mobile": obj.get("mobile"),
            "email": obj.get("email")
        })
        return _obj

