# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .identifier_value import IdentifierValue, IdentifierValueGuard


@JsonMap({"id_": "id"})
class Msa(BaseModel):
    """Msa

    :param id_: id_
    :type id_: str
    :param title: title
    :type title: str
    """

    def __init__(self, id_: str, title: str):
        self.id_ = id_
        self.title = title


@JsonMap({"id_": "id"})
class AgreementClientLegalEntity(BaseModel):
    """AgreementClientLegalEntity

    :param id_: id_
    :type id_: IdentifierValue
    :param name: name
    :type name: str
    """

    def __init__(self, id_: IdentifierValue, name: str):
        self.id_ = IdentifierValueGuard.return_one_of(id_)
        self.name = name


@JsonMap({"id_": "id"})
class ProviderLegalEntity(BaseModel):
    """ProviderLegalEntity

    :param id_: id_
    :type id_: IdentifierValue
    :param name: name
    :type name: str
    """

    def __init__(self, id_: IdentifierValue, name: str):
        self.id_ = IdentifierValueGuard.return_one_of(id_)
        self.name = name


@JsonMap({"id_": "id"})
class Agreement(BaseModel):
    """Agreement

    :param id_: Unique identifier of this resource.
    :type id_: str
    :param agreement_title: agreement_title
    :type agreement_title: str
    :param agreement_type: agreement_type
    :type agreement_type: str
    :param msa: msa
    :type msa: Msa
    :param client_legal_entity: client_legal_entity
    :type client_legal_entity: AgreementClientLegalEntity
    :param provider_legal_entity: provider_legal_entity
    :type provider_legal_entity: ProviderLegalEntity
    """

    def __init__(
        self,
        id_: str,
        agreement_title: str,
        agreement_type: str,
        msa: Msa,
        client_legal_entity: AgreementClientLegalEntity,
        provider_legal_entity: ProviderLegalEntity,
    ):
        self.id_ = id_
        self.agreement_title = agreement_title
        self.agreement_type = agreement_type
        self.msa = self._define_object(msa, Msa)
        self.client_legal_entity = self._define_object(
            client_legal_entity, AgreementClientLegalEntity
        )
        self.provider_legal_entity = self._define_object(
            provider_legal_entity, ProviderLegalEntity
        )
