# coding: utf-8

"""
    CampaignManagementService

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

    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 datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union, Set
from typing_extensions import Self

class BrandKitFont(BaseModel):
    """
    BrandKitFont
    """ # noqa: E501
    typeface: Optional[StrictStr] = Field(default=None, alias="Typeface")
    weight: Optional[StrictStr] = Field(default=None, alias="Weight")
    text_asset_type: Optional[StrictStr] = Field(default=None, alias="TextAssetType")
    __properties: ClassVar[List[str]] = ["Typeface", "Weight", "TextAssetType"]

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

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

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

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

        return _dict

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

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

        _obj = cls.model_validate({
            "Typeface": obj.get("Typeface") if obj.get("Typeface") is not None else None,
                        "Weight": obj.get("Weight") if obj.get("Weight") is not None else None,
                        "TextAssetType": obj.get("TextAssetType") if obj.get("TextAssetType") is not None else None
        })
        return _obj
