package com.enactor.training.paymentService.service.messages.gcash;


import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;

import javax.xml.bind.annotation.XmlElement;

import javax.xml.bind.annotation.XmlRootElement;

import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;

import com.enactor.core.entities.PropertyValidationException;
import com.enactor.core.entities.IEntityKey;
import com.enactor.training.paymentService.service.messages.gcash.MessageContent;

import java.util.Map;
import java.util.List;

import com.enactor.core.utilities.Logger;
import com.enactor.core.application.process.IApplicationProcessDataType;
import com.enactor.core.application.process.ApplicationProcessDataType;	

/**
 * Add comments for the RequestMessage entity implementation here
 *
 * Last Generated at: 14-05-2024 05:29:58
 * @author savvakontou
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RequestMessage", namespace=com.enactor.training.PackageInfo.NSURI_TRAINING, propOrder = {
	"request",
	"signature"
})

@XmlRootElement(name = RequestMessage.ENTITY_NAME, namespace=com.enactor.training.PackageInfo.NSURI_TRAINING)
public class RequestMessage implements IRequestMessage {

	/** My logger instance */
	@SuppressWarnings("unused")
	private static final Logger logger = Logger.getLogger(RequestMessage.class);
	
	/** serialVersionUID */
	private static final long serialVersionUID = 1L;
	
	/** Entity name. */
	public static final String ENTITY_NAME = "requestMessage";
	
	/** Entity QName */
	public static final QName ENTITY_QNAME = new QName(com.enactor.training.PackageInfo.NSURI_TRAINING, ENTITY_NAME, com.enactor.training.PackageInfo.PREFIX_TRAINING);

	/** Entity application data type name */
	public static final String ENTITY_DATA_TYPE_NAME = "enactor.training.paymentService.service.messages.gcash.RequestMessage";
	
	/** Entity application data type */
	public static final IApplicationProcessDataType ENTITY_DATA_TYPE = new ApplicationProcessDataType(ENTITY_DATA_TYPE_NAME, IRequestMessage.class.getName());	
		
	/** The Request field */
	@XmlElement(type=MessageContent.class)
	private MessageContent request = new MessageContent();
	
	/** The Signature field */
	private String signature = null;

	/**************************************************************************
	 * RequestMessage Interface
	 **************************************************************************/
	
	@Override
	public void setRequest(MessageContent request) {
		this.request = request;
	}
	
	@Override
	public MessageContent getRequest() {
		return request;
	}
	
	@Override
	public void setSignature(String signature) {
		this.signature = signature;
	}
	
	@Override
	public String getSignature() {
		return (signature == null) ? "" : signature;
	}
	
	@Override
	public QName getEntityQName() {
		return ENTITY_QNAME;
	}

}
