/**
 * Freshteam Public APIs
 * Freshteam public APIs
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@freshteam.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from "../ApiClient";
import Branch from "./Branch";
import CustomField from "./CustomField";
import Department from "./Department";
import EmployeeAward from "./EmployeeAward";
import EmployeeBackGroundVerificationDetail from "./EmployeeBackGroundVerificationDetail";
import EmployeeBankAccount from "./EmployeeBankAccount";
import EmployeeBonus from "./EmployeeBonus";
import EmployeeCertificate from "./EmployeeCertificate";
import EmployeeCompensationDetail from "./EmployeeCompensationDetail";
import EmployeeDependent from "./EmployeeDependent";
import EmployeeGovernmentDocument from "./EmployeeGovernmentDocument";
import EmployeeHonor from "./EmployeeHonor";
import EmployeeLicense from "./EmployeeLicense";
import EmployeeLiteModel from "./EmployeeLiteModel";
import EmployeePhoneNumber from "./EmployeePhoneNumber";
import EmployeePosition from "./EmployeePosition";
import EmployeeQualification from "./EmployeeQualification";
import EmployeeStock from "./EmployeeStock";
import EmployeeTimeoff from "./EmployeeTimeoff";
import EmployeeWorkPhoneNumber from "./EmployeeWorkPhoneNumber";
import Team from "./Team";

/**
 * The NewHire model module.
 * @module model/NewHire
 * @version 1.0.0
 */
class NewHire {
  /**
   * Constructs a new <code>NewHire</code>.
   * @alias module:model/NewHire
   */
  constructor() {
    NewHire.initialize(this);
  }

  /**
   * Initializes the fields of this object.
   * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
   * Only for internal use.
   */
  static initialize(obj) {}

  /**
   * Constructs a <code>NewHire</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {module:model/NewHire} obj Optional instance to populate.
   * @return {module:model/NewHire} The populated <code>NewHire</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new NewHire();

      if (data.hasOwnProperty("id")) {
        obj["id"] = ApiClient.convertToType(data["id"], "Number");
      }
      if (data.hasOwnProperty("created_at")) {
        obj["created_at"] = ApiClient.convertToType(data["created_at"], "Date");
      }
      if (data.hasOwnProperty("updated_at")) {
        obj["updated_at"] = ApiClient.convertToType(data["updated_at"], "Date");
      }
      if (data.hasOwnProperty("deleted")) {
        obj["deleted"] = ApiClient.convertToType(data["deleted"], "Boolean");
      }
      if (data.hasOwnProperty("work_numbers")) {
        obj["work_numbers"] = ApiClient.convertToType(data["work_numbers"], [EmployeeWorkPhoneNumber]);
      }
      if (data.hasOwnProperty("nick_name")) {
        obj["nick_name"] = ApiClient.convertToType(data["nick_name"], "String");
      }
      if (data.hasOwnProperty("date_of_birth")) {
        obj["date_of_birth"] = ApiClient.convertToType(data["date_of_birth"], "Date");
      }
      if (data.hasOwnProperty("gender")) {
        obj["gender"] = ApiClient.convertToType(data["gender"], "String");
      }
      if (data.hasOwnProperty("designation")) {
        obj["designation"] = ApiClient.convertToType(data["designation"], "String");
      }
      if (data.hasOwnProperty("phone_numbers")) {
        obj["phone_numbers"] = ApiClient.convertToType(data["phone_numbers"], [EmployeePhoneNumber]);
      }
      if (data.hasOwnProperty("joining_date")) {
        obj["joining_date"] = ApiClient.convertToType(data["joining_date"], "Date");
      }
      if (data.hasOwnProperty("termination_date")) {
        obj["termination_date"] = ApiClient.convertToType(data["termination_date"], "Date");
      }
      if (data.hasOwnProperty("first_name")) {
        obj["first_name"] = ApiClient.convertToType(data["first_name"], "String");
      }
      if (data.hasOwnProperty("middle_name")) {
        obj["middle_name"] = ApiClient.convertToType(data["middle_name"], "String");
      }
      if (data.hasOwnProperty("last_name")) {
        obj["last_name"] = ApiClient.convertToType(data["last_name"], "String");
      }
      if (data.hasOwnProperty("employee_id")) {
        obj["employee_id"] = ApiClient.convertToType(data["employee_id"], "String");
      }
      if (data.hasOwnProperty("employee_type")) {
        obj["employee_type"] = ApiClient.convertToType(data["employee_type"], "String");
      }
      if (data.hasOwnProperty("status")) {
        obj["status"] = ApiClient.convertToType(data["status"], "String");
      }
      if (data.hasOwnProperty("official_email")) {
        obj["official_email"] = ApiClient.convertToType(data["official_email"], "String");
      }
      if (data.hasOwnProperty("personal_email")) {
        obj["personal_email"] = ApiClient.convertToType(data["personal_email"], "String");
      }
      if (data.hasOwnProperty("hired_on")) {
        obj["hired_on"] = ApiClient.convertToType(data["hired_on"], "Date");
      }
      if (data.hasOwnProperty("no_show")) {
        obj["no_show"] = ApiClient.convertToType(data["no_show"], "Boolean");
      }
      if (data.hasOwnProperty("no_show_reason")) {
        obj["no_show_reason"] = ApiClient.convertToType(data["no_show_reason"], "String");
      }
      if (data.hasOwnProperty("branch")) {
        obj["branch"] = Branch.constructFromObject(data["branch"]);
      }
      if (data.hasOwnProperty("reporting_to")) {
        obj["reporting_to"] = EmployeeLiteModel.constructFromObject(data["reporting_to"]);
      }
      if (data.hasOwnProperty("hr_incharge")) {
        obj["hr_incharge"] = EmployeeLiteModel.constructFromObject(data["hr_incharge"]);
      }
      if (data.hasOwnProperty("team")) {
        obj["team"] = Team.constructFromObject(data["team"]);
      }
      if (data.hasOwnProperty("department")) {
        obj["department"] = Department.constructFromObject(data["department"]);
      }
      if (data.hasOwnProperty("awards")) {
        obj["awards"] = EmployeeAward.constructFromObject(data["awards"]);
      }
      if (data.hasOwnProperty("honors")) {
        obj["honors"] = EmployeeHonor.constructFromObject(data["honors"]);
      }
      if (data.hasOwnProperty("certificates")) {
        obj["certificates"] = EmployeeCertificate.constructFromObject(data["certificates"]);
      }
      if (data.hasOwnProperty("licenses")) {
        obj["licenses"] = EmployeeLicense.constructFromObject(data["licenses"]);
      }
      if (data.hasOwnProperty("background_verification_details")) {
        obj["background_verification_details"] = EmployeeBackGroundVerificationDetail.constructFromObject(
          data["background_verification_details"]
        );
      }
      if (data.hasOwnProperty("government_documents")) {
        obj["government_documents"] = EmployeeGovernmentDocument.constructFromObject(data["government_documents"]);
      }
      if (data.hasOwnProperty("dependents")) {
        obj["dependents"] = EmployeeDependent.constructFromObject(data["dependents"]);
      }
      if (data.hasOwnProperty("bank_accounts")) {
        obj["bank_accounts"] = EmployeeBankAccount.constructFromObject(data["bank_accounts"]);
      }
      if (data.hasOwnProperty("prev_employments")) {
        obj["prev_employments"] = EmployeePosition.constructFromObject(data["prev_employments"]);
      }
      if (data.hasOwnProperty("qualifications")) {
        obj["qualifications"] = EmployeeQualification.constructFromObject(data["qualifications"]);
      }
      if (data.hasOwnProperty("compensation_details")) {
        obj["compensation_details"] = EmployeeCompensationDetail.constructFromObject(data["compensation_details"]);
      }
      if (data.hasOwnProperty("bonuses")) {
        obj["bonuses"] = EmployeeBonus.constructFromObject(data["bonuses"]);
      }
      if (data.hasOwnProperty("stocks")) {
        obj["stocks"] = EmployeeStock.constructFromObject(data["stocks"]);
      }
      if (data.hasOwnProperty("custom_field_values")) {
        obj["custom_field_values"] = CustomField.constructFromObject(data["custom_field_values"]);
      }
      if (data.hasOwnProperty("time_off")) {
        obj["time_off"] = EmployeeTimeoff.constructFromObject(data["time_off"]);
      }
    }
    return obj;
  }
}

/**
 * @member {Number} id
 */
NewHire.prototype["id"] = undefined;

/**
 * @member {Date} created_at
 */
NewHire.prototype["created_at"] = undefined;

/**
 * @member {Date} updated_at
 */
NewHire.prototype["updated_at"] = undefined;

/**
 * @member {Boolean} deleted
 */
NewHire.prototype["deleted"] = undefined;

/**
 * @member {Array.<module:model/EmployeeWorkPhoneNumber>} work_numbers
 */
NewHire.prototype["work_numbers"] = undefined;

/**
 * @member {String} nick_name
 */
NewHire.prototype["nick_name"] = undefined;

/**
 * @member {Date} date_of_birth
 */
NewHire.prototype["date_of_birth"] = undefined;

/**
 * @member {module:model/NewHire.GenderEnum} gender
 */
NewHire.prototype["gender"] = undefined;

/**
 * @member {String} designation
 */
NewHire.prototype["designation"] = undefined;

/**
 * @member {Array.<module:model/EmployeePhoneNumber>} phone_numbers
 */
NewHire.prototype["phone_numbers"] = undefined;

/**
 * @member {Date} joining_date
 */
NewHire.prototype["joining_date"] = undefined;

/**
 * @member {Date} termination_date
 */
NewHire.prototype["termination_date"] = undefined;

/**
 * @member {String} first_name
 */
NewHire.prototype["first_name"] = undefined;

/**
 * @member {String} middle_name
 */
NewHire.prototype["middle_name"] = undefined;

/**
 * @member {String} last_name
 */
NewHire.prototype["last_name"] = undefined;

/**
 * @member {String} employee_id
 */
NewHire.prototype["employee_id"] = undefined;

/**
 * @member {String} employee_type
 */
NewHire.prototype["employee_type"] = undefined;

/**
 * @member {module:model/NewHire.StatusEnum} status
 */
NewHire.prototype["status"] = undefined;

/**
 * @member {String} official_email
 */
NewHire.prototype["official_email"] = undefined;

/**
 * @member {String} personal_email
 */
NewHire.prototype["personal_email"] = undefined;

/**
 * @member {Date} hired_on
 */
NewHire.prototype["hired_on"] = undefined;

/**
 * @member {Boolean} no_show
 */
NewHire.prototype["no_show"] = undefined;

/**
 * @member {String} no_show_reason
 */
NewHire.prototype["no_show_reason"] = undefined;

/**
 * @member {module:model/Branch} branch
 */
NewHire.prototype["branch"] = undefined;

/**
 * @member {module:model/EmployeeLiteModel} reporting_to
 */
NewHire.prototype["reporting_to"] = undefined;

/**
 * @member {module:model/EmployeeLiteModel} hr_incharge
 */
NewHire.prototype["hr_incharge"] = undefined;

/**
 * @member {module:model/Team} team
 */
NewHire.prototype["team"] = undefined;

/**
 * @member {module:model/Department} department
 */
NewHire.prototype["department"] = undefined;

/**
 * @member {module:model/EmployeeAward} awards
 */
NewHire.prototype["awards"] = undefined;

/**
 * @member {module:model/EmployeeHonor} honors
 */
NewHire.prototype["honors"] = undefined;

/**
 * @member {module:model/EmployeeCertificate} certificates
 */
NewHire.prototype["certificates"] = undefined;

/**
 * @member {module:model/EmployeeLicense} licenses
 */
NewHire.prototype["licenses"] = undefined;

/**
 * @member {module:model/EmployeeBackGroundVerificationDetail} background_verification_details
 */
NewHire.prototype["background_verification_details"] = undefined;

/**
 * @member {module:model/EmployeeGovernmentDocument} government_documents
 */
NewHire.prototype["government_documents"] = undefined;

/**
 * @member {module:model/EmployeeDependent} dependents
 */
NewHire.prototype["dependents"] = undefined;

/**
 * @member {module:model/EmployeeBankAccount} bank_accounts
 */
NewHire.prototype["bank_accounts"] = undefined;

/**
 * @member {module:model/EmployeePosition} prev_employments
 */
NewHire.prototype["prev_employments"] = undefined;

/**
 * @member {module:model/EmployeeQualification} qualifications
 */
NewHire.prototype["qualifications"] = undefined;

/**
 * @member {module:model/EmployeeCompensationDetail} compensation_details
 */
NewHire.prototype["compensation_details"] = undefined;

/**
 * @member {module:model/EmployeeBonus} bonuses
 */
NewHire.prototype["bonuses"] = undefined;

/**
 * @member {module:model/EmployeeStock} stocks
 */
NewHire.prototype["stocks"] = undefined;

/**
 * @member {module:model/CustomField} custom_field_values
 */
NewHire.prototype["custom_field_values"] = undefined;

/**
 * @member {module:model/EmployeeTimeoff} time_off
 */
NewHire.prototype["time_off"] = undefined;

/**
 * Allowed values for the <code>gender</code> property.
 * @enum {String}
 * @readonly
 */
NewHire["GenderEnum"] = {
  /**
   * value: "male"
   * @const
   */
  male: "male",

  /**
   * value: "female"
   * @const
   */
  female: "female"
};

/**
 * Allowed values for the <code>status</code> property.
 * @enum {String}
 * @readonly
 */
NewHire["StatusEnum"] = {
  /**
   * value: "hired"
   * @const
   */
  hired: "hired",

  /**
   * value: "initiated"
   * @const
   */
  initiated: "initiated",

  /**
   * value: "submitted"
   * @const
   */
  submitted: "submitted"
};

export default NewHire;
