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

from .utils.json_map import JsonMap
from .base import BaseModel


@JsonMap({"id_": "id"})
class MilestoneReviewedBy(BaseModel):
    """Reviewer's information.

    :param id_: Unique identifier of this resource.
    :type id_: str
    :param full_name: Reviewer's full name.
    :type full_name: str
    """

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


@JsonMap({"id_": "id"})
class MilestoneReportedBy(BaseModel):
    """Milestone creator.

    :param id_: Unique identifier of this resource.
    :type id_: str
    :param full_name: Reporter's full name.
    :type full_name: str
    """

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


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

    :param id_: Unique identifier of this resource.
    :type id_: str
    :param amount: Amount to be paid for the milestone.
    :type amount: str
    :param approval_requested: Indicates if the contractor has requested the approval for the milestone.
    :type approval_requested: bool
    :param reviewed_by: Reviewer's information.
    :type reviewed_by: MilestoneReviewedBy
    :param reported_by: Milestone creator.
    :type reported_by: MilestoneReportedBy
    :param title: Title of milestone.
    :type title: str
    :param description: Description of milestone.
    :type description: str
    :param status: Current status of milestone.
    :type status: str
    :param created_at: Long date-time format following ISO-8601
    :type created_at: str
    """

    def __init__(
        self,
        id_: str,
        amount: str,
        approval_requested: bool,
        reviewed_by: MilestoneReviewedBy,
        reported_by: MilestoneReportedBy,
        title: str,
        description: str,
        status: str,
        created_at: str,
    ):
        self.id_ = id_
        self.amount = amount
        self.approval_requested = approval_requested
        self.reviewed_by = self._define_object(reviewed_by, MilestoneReviewedBy)
        self.reported_by = self._define_object(reported_by, MilestoneReportedBy)
        self.title = title
        self.description = description
        self.status = status
        self.created_at = created_at
