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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .work_statement_scale_enum import WorkStatementScaleEnum
from .work_statement_cycle_scale_enum import WorkStatementCycleScaleEnum
from .work_statement_cycle_end_type_enum import WorkStatementCycleEndTypeEnum
from .work_statement_payment_due_type_enum import WorkStatementPaymentDueTypeEnum
from .identifier_value import IdentifierValue, IdentifierValueGuard


@JsonMap({})
class ContractDetailsToAmend(BaseModel):
    """You can specify any combination of data points that need changing.

    :param amount: amount, defaults to None
    :type amount: float, optional
    :param currency_code: currency_code, defaults to None
    :type currency_code: str, optional
    :param scale: Defines the scale at which the amount is paid. For example, enter 'hourly' to define the amount per hour. This field can be excluded when creating a Pay-as-you-go task-based or Milestone contracts., defaults to None
    :type scale: WorkStatementScaleEnum, optional
    :param effective_date: Short date in format ISO-8601 (YYYY-MM-DD). For example: 2022-12-31., defaults to None
    :type effective_date: str, optional
    :param first_payment_date: Short date in format ISO-8601 (YYYY-MM-DD). For example: 2022-12-31., defaults to None
    :type first_payment_date: str, optional
    :param first_payment: first_payment, defaults to None
    :type first_payment: float, optional
    :param frequency: Scale of the invoice cycle., defaults to None
    :type frequency: WorkStatementCycleScaleEnum, optional
    :param cycle_end: cycle_end, defaults to None
    :type cycle_end: float, optional
    :param cycle_end_type: Cycle end can be weekly 1-7 (Monday = 1) or monthly 1-31., defaults to None
    :type cycle_end_type: WorkStatementCycleEndTypeEnum, optional
    :param payment_due_type: Type of payment due. If the payment is due on the last day of month, enter 'WITHIN_MONTH'., defaults to None
    :type payment_due_type: WorkStatementPaymentDueTypeEnum, optional
    :param payment_due_days: payment_due_days, defaults to None
    :type payment_due_days: float, optional
    :param pay_before_weekends: If the payment due is on a weekend, pay on Friday., defaults to None
    :type pay_before_weekends: bool, optional
    :param job_title_name: You can enter new job title., defaults to None
    :type job_title_name: str, optional
    :param job_title_id: job_title_id, defaults to None
    :type job_title_id: IdentifierValue, optional
    :param seniority_id: seniority_id, defaults to None
    :type seniority_id: IdentifierValue, optional
    :param special_clause: Text to describe any special clause in contract., defaults to None
    :type special_clause: str, optional
    :param scope_of_work: Text to describe the scope of work of the contract., defaults to None
    :type scope_of_work: str, optional
    """

    def __init__(
        self,
        amount: float = None,
        currency_code: str = None,
        scale: WorkStatementScaleEnum = None,
        effective_date: str = None,
        first_payment_date: str = None,
        first_payment: float = None,
        frequency: WorkStatementCycleScaleEnum = None,
        cycle_end: float = None,
        cycle_end_type: WorkStatementCycleEndTypeEnum = None,
        payment_due_type: WorkStatementPaymentDueTypeEnum = None,
        payment_due_days: float = None,
        pay_before_weekends: bool = None,
        job_title_name: str = None,
        job_title_id: IdentifierValue = None,
        seniority_id: IdentifierValue = None,
        special_clause: str = None,
        scope_of_work: str = None,
    ):
        if amount is not None:
            self.amount = amount
        if currency_code is not None:
            self.currency_code = self._pattern_matching(
                currency_code, "^[A-Z]{3}$", "currency_code"
            )
        if scale is not None:
            self.scale = self._enum_matching(
                scale, WorkStatementScaleEnum.list(), "scale"
            )
        if effective_date is not None:
            self.effective_date = effective_date
        if first_payment_date is not None:
            self.first_payment_date = first_payment_date
        if first_payment is not None:
            self.first_payment = first_payment
        if frequency is not None:
            self.frequency = self._enum_matching(
                frequency, WorkStatementCycleScaleEnum.list(), "frequency"
            )
        if cycle_end is not None:
            self.cycle_end = cycle_end
        if cycle_end_type is not None:
            self.cycle_end_type = self._enum_matching(
                cycle_end_type, WorkStatementCycleEndTypeEnum.list(), "cycle_end_type"
            )
        if payment_due_type is not None:
            self.payment_due_type = self._enum_matching(
                payment_due_type,
                WorkStatementPaymentDueTypeEnum.list(),
                "payment_due_type",
            )
        if payment_due_days is not None:
            self.payment_due_days = payment_due_days
        if pay_before_weekends is not None:
            self.pay_before_weekends = pay_before_weekends
        if job_title_name is not None:
            self.job_title_name = job_title_name
        if job_title_id is not None:
            self.job_title_id = IdentifierValueGuard.return_one_of(job_title_id)
        if seniority_id is not None:
            self.seniority_id = IdentifierValueGuard.return_one_of(seniority_id)
        if special_clause is not None:
            self.special_clause = special_clause
        if scope_of_work is not None:
            self.scope_of_work = scope_of_work
