package com.ejie.ad74a.model;

import com.ejie.ad74a.constantes.Constantes;
import com.ejie.x38.serialization.JsonDateDeserializer;
import com.ejie.x38.serialization.JsonDateSerializer;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.context.i18n.LocaleContextHolder;

/**
 * MaestroTipoLlamada generated by UDA, 10-jul-2023 9:33:38.
 * 
 * @author UDA
 */

public class MaestroTipoLlamada implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Long idTipoLlamada55;
	private String descEs55;
	private String descEu55;
	private Date fAlta55;
	private String usuAlta55;
	private Date fModif55;
	private String usuModif55;
	private String desc;
	private List<MaestroSubtpoLlamada> maestroSubtpoLlamadas = new ArrayList<MaestroSubtpoLlamada>();
	private List<Llamadas> llamadases = new ArrayList<Llamadas>();

	/**
	 * Method 'MaestroTipoLlamada'.
	 */
	public MaestroTipoLlamada() {
	}

	/**
	 * Method 'MaestroTipoLlamada'.
	 * 
	 * @param idTipoLlamada55 Long
	 */
	public MaestroTipoLlamada(Long idTipoLlamada55) {
		this.idTipoLlamada55 = idTipoLlamada55;
	}

	/**
	 * Method 'MaestroTipoLlamada'.
	 * 
	 * @param idTipoLlamada55 Long
	 * @param descEs55        String
	 * @param descEu55        String
	 * @param fAlta55         Date
	 * @param usuAlta55       String
	 * @param fModif55        Date
	 * @param usuModif55      String
	 */
	public MaestroTipoLlamada(Long idTipoLlamada55, String descEs55, String descEu55, Date fAlta55, String usuAlta55,
			Date fModif55, String usuModif55) {
		this.idTipoLlamada55 = idTipoLlamada55;
		this.descEs55 = descEs55;
		this.descEu55 = descEu55;
		this.fAlta55 = fAlta55;
		this.usuAlta55 = usuAlta55;
		this.fModif55 = fModif55;
		this.usuModif55 = usuModif55;
	}

	/**
	 * Method 'MaestroTipoLlamada'.
	 * 
	 * @param idTipoLlamada55       Long
	 * @param descEs55              String
	 * @param descEu55              String
	 * @param fAlta55               Date
	 * @param usuAlta55             String
	 * @param fModif55              Date
	 * @param usuModif55            String
	 * @param maestroSubtpoLlamadas List<MaestroSubtpoLlamada>
	 * @param llamadases            List<Llamadas>
	 */
	public MaestroTipoLlamada(Long idTipoLlamada55, String descEs55, String descEu55, Date fAlta55, String usuAlta55,
			Date fModif55, String usuModif55, List<MaestroSubtpoLlamada> maestroSubtpoLlamadas,
			List<Llamadas> llamadases) {

		this.idTipoLlamada55 = idTipoLlamada55;
		this.descEs55 = descEs55;
		this.descEu55 = descEu55;
		this.fAlta55 = fAlta55;
		this.usuAlta55 = usuAlta55;
		this.fModif55 = fModif55;
		this.usuModif55 = usuModif55;
		this.maestroSubtpoLlamadas = maestroSubtpoLlamadas;
		this.llamadases = llamadases;
	}

	/**
	 * Method 'getIdTipoLlamada55'.
	 *
	 * @return Long
	 */

	public Long getIdTipoLlamada55() {
		return this.idTipoLlamada55;
	}

	/**
	 * Method 'setIdTipoLlamada55'.
	 *
	 * @param idTipoLlamada55 Long
	 * @return
	 */

	public void setIdTipoLlamada55(Long idTipoLlamada55) {
		this.idTipoLlamada55 = idTipoLlamada55;
	}

	/**
	 * Method 'getDescEs55'.
	 *
	 * @return String
	 */

	public String getDescEs55() {
		return this.descEs55;
	}

	/**
	 * Method 'setDescEs55'.
	 *
	 * @param descEs55 String
	 * @return
	 */

	public void setDescEs55(String descEs55) {
		this.descEs55 = descEs55;
	}

	/**
	 * Method 'getDescEu55'.
	 *
	 * @return String
	 */

	public String getDescEu55() {
		return this.descEu55;
	}

	/**
	 * Method 'setDescEu55'.
	 *
	 * @param descEu55 String
	 * @return
	 */

	public void setDescEu55(String descEu55) {
		this.descEu55 = descEu55;
	}

	/**
	 * Method 'getfAlta55'.
	 *
	 * @return java.util.Date
	 */

	@JsonSerialize(using = JsonDateSerializer.class)
	public Date getfAlta55() {
		return this.fAlta55;
	}

	/**
	 * Method 'setfAlta55'.
	 *
	 * @param fAlta55 java.util.Date
	 * @return
	 */
	@JsonDeserialize(using = JsonDateDeserializer.class)
	public void setfAlta55(Date fAlta55) {
		this.fAlta55 = fAlta55;
	}

	/**
	 * Method 'getUsuAlta55'.
	 *
	 * @return String
	 */

	public String getUsuAlta55() {
		return this.usuAlta55;
	}

	/**
	 * Method 'setUsuAlta55'.
	 *
	 * @param usuAlta55 String
	 * @return
	 */

	public void setUsuAlta55(String usuAlta55) {
		this.usuAlta55 = usuAlta55;
	}

	/**
	 * Method 'getfModif55'.
	 *
	 * @return java.util.Date
	 */

	@JsonSerialize(using = JsonDateSerializer.class)
	public Date getfModif55() {
		return this.fModif55;
	}

	/**
	 * Method 'setfModif55'.
	 *
	 * @param fModif55 java.util.Date
	 * @return
	 */
	@JsonDeserialize(using = JsonDateDeserializer.class)
	public void setfModif55(Date fModif55) {
		this.fModif55 = fModif55;
	}

	/**
	 * Method 'getUsuModif55'.
	 *
	 * @return String
	 */

	public String getUsuModif55() {
		return this.usuModif55;
	}

	/**
	 * Method 'setUsuModif55'.
	 *
	 * @param usuModif55 String
	 * @return
	 */

	public void setUsuModif55(String usuModif55) {
		this.usuModif55 = usuModif55;
	}

	/**
	 * Method 'getMaestroSubtpoLlamadas'.
	 *
	 * @return List
	 */
	@JsonIgnore
	public List<MaestroSubtpoLlamada> getMaestroSubtpoLlamadas() {
		return this.maestroSubtpoLlamadas;
	}

	/**
	 * Method 'setMaestroSubtpoLlamadas'.
	 *
	 * @param maestroSubtpoLlamadas List
	 * @return
	 */
	public void setMaestroSubtpoLlamadas(List<MaestroSubtpoLlamada> maestroSubtpoLlamadas) {
		this.maestroSubtpoLlamadas = maestroSubtpoLlamadas;
	}

	/**
	 * Method 'getLlamadases'.
	 *
	 * @return List
	 */
	@JsonIgnore
	public List<Llamadas> getLlamadases() {
		return this.llamadases;
	}

	/**
	 * Method 'setLlamadases'.
	 *
	 * @param llamadases List
	 * @return
	 */
	public void setLlamadases(List<Llamadas> llamadases) {
		this.llamadases = llamadases;
	}

	/**
	 * Intended only for logging and debugging.
	 * 
	 * Here, the contents of every main field are placed into the result.
	 * 
	 * @return String
	 */
	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		result.append(this.getClass().getName()).append(" Object { ");
		result.append(" [ idTipoLlamada55: ").append(this.idTipoLlamada55).append(" ]");
		result.append(", [ descEs55: ").append(this.descEs55).append(" ]");
		result.append(", [ descEu55: ").append(this.descEu55).append(" ]");
		result.append(", [ FAlta55: ").append(this.fAlta55).append(" ]");
		result.append(", [ usuAlta55: ").append(this.usuAlta55).append(" ]");
		result.append(", [ FModif55: ").append(this.fModif55).append(" ]");
		result.append(", [ usuModif55: ").append(this.usuModif55).append(" ]");
		result.append("}");
		return result.toString();
	}

	/**
	 * Method 'getDesc'.
	 *
	 * @return String
	 */
	public String getDesc() {
		if (LocaleContextHolder.getLocale().getLanguage().equalsIgnoreCase(Constantes.LOCALE_ES.getLanguage())) {
			return this.getDescEs55();
		} else if (LocaleContextHolder.getLocale().getLanguage().equalsIgnoreCase(Constantes.LOCALE_EU.getLanguage())) {
			return this.getDescEu55();
		}
		return "";
	}

	/**
	 * Method 'setDesc'.
	 *
	 * @param desc String
	 * @return
	 */
	public void setDesc(String desc) {
		this.desc = desc;
	}
}
