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;

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

public class MaestroSubtpoLlamada implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Long idSubtipoLlamada56;
	private MaestroTipoLlamada maestroTipoLlamada;
	private String descEs56;
	private String descEu56;
	private Date fAlta56;
	private String usuAlta56;
	private Date fModif56;
	private String usuModif56;
	private List<Llamadas> llamadases = new ArrayList<Llamadas>();

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

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

	/**
	 * Method 'MaestroSubtpoLlamada'.
	 * 
	 * @param idSubtipoLlamada56 Long
	 * @param descEs56           String
	 * @param descEu56           String
	 * @param fAlta56            Date
	 * @param usuAlta56          String
	 * @param fModif56           Date
	 * @param usuModif56         String
	 * @param maestroTipoLlamada MaestroTipoLlamada
	 */
	public MaestroSubtpoLlamada(Long idSubtipoLlamada56, String descEs56, String descEu56, Date fAlta56,
			String usuAlta56, Date fModif56, String usuModif56, MaestroTipoLlamada maestroTipoLlamada) {
		this.idSubtipoLlamada56 = idSubtipoLlamada56;
		this.maestroTipoLlamada = maestroTipoLlamada;
		this.descEs56 = descEs56;
		this.descEu56 = descEu56;
		this.fAlta56 = fAlta56;
		this.usuAlta56 = usuAlta56;
		this.fModif56 = fModif56;
		this.usuModif56 = usuModif56;
	}

	/**
	 * Method 'MaestroSubtpoLlamada'.
	 * 
	 * @param idSubtipoLlamada56 Long
	 * @param descEs56           String
	 * @param descEu56           String
	 * @param fAlta56            Date
	 * @param usuAlta56          String
	 * @param fModif56           Date
	 * @param usuModif56         String
	 * @param maestroTipoLlamada MaestroTipoLlamada
	 * @param llamadases         List<Llamadas>
	 */
	public MaestroSubtpoLlamada(Long idSubtipoLlamada56, String descEs56, String descEu56, Date fAlta56,
			String usuAlta56, Date fModif56, String usuModif56, MaestroTipoLlamada maestroTipoLlamada,
			List<Llamadas> llamadases) {

		this.idSubtipoLlamada56 = idSubtipoLlamada56;
		this.maestroTipoLlamada = maestroTipoLlamada;
		this.descEs56 = descEs56;
		this.descEu56 = descEu56;
		this.fAlta56 = fAlta56;
		this.usuAlta56 = usuAlta56;
		this.fModif56 = fModif56;
		this.usuModif56 = usuModif56;
		this.llamadases = llamadases;
	}

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

	public Long getIdSubtipoLlamada56() {
		return this.idSubtipoLlamada56;
	}

	/**
	 * Method 'setIdSubtipoLlamada56'.
	 *
	 * @param idSubtipoLlamada56 Long
	 * @return
	 */

	public void setIdSubtipoLlamada56(Long idSubtipoLlamada56) {
		this.idSubtipoLlamada56 = idSubtipoLlamada56;
	}

	/**
	 * Method 'getMaestroTipoLlamada'.
	 *
	 * @return MaestroTipoLlamada
	 */

	public MaestroTipoLlamada getMaestroTipoLlamada() {
		return this.maestroTipoLlamada;
	}

	/**
	 * Method 'setMaestroTipoLlamada'.
	 *
	 * @param maestroTipoLlamada MaestroTipoLlamada
	 * @return
	 */

	public void setMaestroTipoLlamada(MaestroTipoLlamada maestroTipoLlamada) {
		this.maestroTipoLlamada = maestroTipoLlamada;
	}

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

	public String getDescEs56() {
		return this.descEs56;
	}

	/**
	 * Method 'setDescEs56'.
	 *
	 * @param descEs56 String
	 * @return
	 */

	public void setDescEs56(String descEs56) {
		this.descEs56 = descEs56;
	}

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

	public String getDescEu56() {
		return this.descEu56;
	}

	/**
	 * Method 'setDescEu56'.
	 *
	 * @param descEu56 String
	 * @return
	 */

	public void setDescEu56(String descEu56) {
		this.descEu56 = descEu56;
	}

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

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

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

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

	public String getUsuAlta56() {
		return this.usuAlta56;
	}

	/**
	 * Method 'setUsuAlta56'.
	 *
	 * @param usuAlta56 String
	 * @return
	 */

	public void setUsuAlta56(String usuAlta56) {
		this.usuAlta56 = usuAlta56;
	}

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

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

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

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

	public String getUsuModif56() {
		return this.usuModif56;
	}

	/**
	 * Method 'setUsuModif56'.
	 *
	 * @param usuModif56 String
	 * @return
	 */

	public void setUsuModif56(String usuModif56) {
		this.usuModif56 = usuModif56;
	}

	/**
	 * 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(" [ idSubtipoLlamada56: ").append(this.idSubtipoLlamada56).append(" ]");
		result.append(", [ descEs56: ").append(this.descEs56).append(" ]");
		result.append(", [ descEu56: ").append(this.descEu56).append(" ]");
		result.append(", [ FAlta56: ").append(this.fAlta56).append(" ]");
		result.append(", [ usuAlta56: ").append(this.usuAlta56).append(" ]");
		result.append(", [ FModif56: ").append(this.fModif56).append(" ]");
		result.append(", [ usuModif56: ").append(this.usuModif56).append(" ]");
		result.append("}");
		return result.toString();
	}

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

}
