# coding: utf-8

"""
    CustomerManagementService

    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 openapi_client.models.customer.account_life_cycle_status import AccountLifeCycleStatus
from typing_extensions import Self

class AccountInfoWithCustomerData(BaseModel):
    """
    AccountInfoWithCustomerData
    """ # noqa: E501
    customer_id: Optional[StrictStr] = Field(default=None, alias="CustomerId")
    customer_name: Optional[StrictStr] = Field(default=None, alias="CustomerName")
    account_id: Optional[StrictStr] = Field(default=None, alias="AccountId")
    account_name: Optional[StrictStr] = Field(default=None, alias="AccountName")
    account_number: Optional[StrictStr] = Field(default=None, alias="AccountNumber")
    account_life_cycle_status: Optional[AccountLifeCycleStatus] = Field(default=None, alias="AccountLifeCycleStatus")
    pause_reason: Optional[StrictInt] = Field(default=None, alias="PauseReason")
    account_mode: Optional[StrictStr] = Field(default=None, alias="AccountMode")
    __properties: ClassVar[List[str]] = ["CustomerId", "CustomerName", "AccountId", "AccountName", "AccountNumber", "AccountLifeCycleStatus", "PauseReason", "AccountMode"]

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

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

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

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

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

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

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

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

        return _dict

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

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

        _obj = cls.model_validate({
            "CustomerId": obj.get("CustomerId") if obj.get("CustomerId") is not None else None,
                        "CustomerName": obj.get("CustomerName") if obj.get("CustomerName") is not None else None,
                        "AccountId": obj.get("AccountId") if obj.get("AccountId") is not None else None,
                        "AccountName": obj.get("AccountName") if obj.get("AccountName") is not None else None,
                        "AccountNumber": obj.get("AccountNumber") if obj.get("AccountNumber") is not None else None,
                        "AccountLifeCycleStatus": obj.get("AccountLifeCycleStatus") if obj.get("AccountLifeCycleStatus") is not None else None,
                        "PauseReason": obj.get("PauseReason") if obj.get("PauseReason") is not None else None,
                        "AccountMode": obj.get("AccountMode") if obj.get("AccountMode") is not None else None
        })
        return _obj
