/*
 * Arrebol Consultancy copyright.
 *
 * This code belongs to Arrebol Consultancy
 * its use, redistribution or modification are prohibited
 * without written authorization from Arrebol Consultancy.
 */
package com.arrebol.apc.model.ws.parsed;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Carlos Janitzio Zavala Lopez <janitzio.zavala@arrebol.com.mx>
 */
@XmlRootElement(name = "loanRequested")
public class LoanRequestedJaxb {

   private String loanTypeId;
   private String officeId;
   private String userId;
   private String routeId;
   private PersonJaxb customer;
   private PersonJaxb endorsement;
   private String strDate;
   private String routeIdNewClient;
   private String fachadaCasa;
   private String descripcion;
   private String latitud;
   private String longitud;
   private String loanDescription;

   public LoanRequestedJaxb(PersonJaxb customer, PersonJaxb endorsement, String strDate, String fachadaCasa, String descripcion, String latitud, String longitud, String loanDescription) {
      this.customer = customer;
      this.endorsement = endorsement;
      this.strDate = strDate;
      this.fachadaCasa = fachadaCasa;
      this.descripcion = descripcion;
      this.latitud = latitud;
      this.longitud = longitud;
      this.loanDescription = loanDescription;
   }

   public LoanRequestedJaxb() {
   }

   @XmlElement(name = "loanTypeId")
   public String getLoanTypeId() {
      return loanTypeId;
   }

   public void setLoanTypeId(String loanTypeId) {
      this.loanTypeId = loanTypeId;
   }

   @XmlElement(name = "officeId")
   public String getOfficeId() {
      return officeId;
   }

   public void setOfficeId(String officeId) {
      this.officeId = officeId;
   }

   @XmlElement(name = "userId")
   public String getUserId() {
      return userId;
   }

   public void setUserId(String userId) {
      this.userId = userId;
   }

   @XmlElement(name = "routeId")
   public String getRouteId() {
      return routeId;
   }

   public void setRouteId(String routeId) {
      this.routeId = routeId;
   }

   @XmlElement(name = "customer")
   public PersonJaxb getCustomer() {
      return customer;
   }

   public void setCustomer(PersonJaxb customer) {
      this.customer = customer;
   }

   @XmlElement(name = "endorsement")
   public PersonJaxb getEndorsement() {
      return endorsement;
   }

   public void setEndorsement(PersonJaxb endorsement) {
      this.endorsement = endorsement;
   }

   @XmlElement(name = "strDate")
   public String getStrDate() {
      return strDate;
   }

   public void setStrDate(String strDate) {
      this.strDate = strDate;
   }

   @XmlElement(name = "routeIdNewClient")
   public String getRouteIdNewClient() {
      return routeIdNewClient;
   }

   public String chooseRouteId() {
      try {
         return null == getRouteIdNewClient() || "".equals(getRouteIdNewClient()) ? getRouteId() : getRouteIdNewClient();
      } catch (Exception e) {
         return getRouteId();
      }
   }

   public void setRouteIdNewClient(String routeIdNewClient) {
      this.routeIdNewClient = routeIdNewClient;
   }

   @XmlElement(name = "fachadaCasa")
   public String getFachadaCasa() {
      return fachadaCasa;
   }

   public void setFachadaCasa(String fachadaCasa) {
      this.fachadaCasa = fachadaCasa;
   }

   @XmlElement(name = "descripcion")
   public String getDescripcion() {
      return descripcion;
   }

   public void setDescripcion(String descripcion) {
      this.descripcion = descripcion;
   }

   @XmlElement(name = "latitud")
   public String getLatitud() {
      return latitud;
   }

   public void setLatitud(String latitud) {
      this.latitud = latitud;
   }

   @XmlElement(name = "longitud")
   public String getLongitud() {
      return longitud;
   }

   public void setLongitud(String longitud) {
      this.longitud = longitud;
   }

   @XmlElement(name = "loanDescription")
   public String getLoanDescription() {
      return loanDescription;
   }

   public void setLoanDescription(String loanDescription) {
      this.loanDescription = loanDescription;
   }

}
