/*******************************************************************************
 *  Copyright 2018 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.dcm30_04.templates.cid;


import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AuditEventID;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AuditEventID;


/**
 * This class represents AuditEventID - CID400
 */
public class AuditEventID_CID400 
{
	/**
	 * The Code Value for template.
	 */
	private String strCodeValue = null;

	/**
	 * The Code Meaning for template.
	 */
	private String strCodeMeaning = null;

	/**
	 * The Coding Scheme Designator for template.
	 */
	private String strCodingSchemeDesignator;

	/**
	 * Instantiates a new AuditEventID_CID2 Template 
	 */
	public AuditEventID_CID400()
	{

	}

	/**
	 * Retrieves the value for Code Meaning.
	 * @return String value for Code Meaning.
	 */
	public String getCodeMeaning()
	{
		return strCodeMeaning;
	}

	/**
	 * Retrieves the value for Code Value.
	 * @return String value for Code Value.
	 */
	public String getCodeValue() 
	{
		return strCodeValue;
	}

	/**
	 * Retrieves the value for Coding Scheme Designator.
	 * @return String value for Coding Scheme Designator.
	 */
	public String getCodingSchemeDesignator() 
	{
		return strCodingSchemeDesignator;
	}

	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumAuditEventID Object of EnumCM_AuditEventID represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_AuditEventID enumAuditEventID)
	{
		switch(enumAuditEventID)
		{
		case APPLICATION_ACTIVITY: this.strCodeValue =EnumCV_AuditEventID.APPLICATION_ACTIVITY_110100.getValue(); break;
		case AUDIT_LOG_USED: this.strCodeValue =EnumCV_AuditEventID.AUDIT_LOG_USED_110101.getValue(); break;
		case BEGIN_TRANSFERRING_DICOM_INSTANCES: this.strCodeValue =EnumCV_AuditEventID.BEGIN_TRANSFERRING_DICOM_INSTANCES_110102.getValue(); break;
		case DICOM_INSTANCES_ACCESSED: this.strCodeValue =EnumCV_AuditEventID.DICOM_INSTANCES_ACCESSED_110103.getValue(); break;
		case DICOM_INSTANCES_TRANSFERRED: this.strCodeValue =EnumCV_AuditEventID.DICOM_INSTANCES_TRANSFERRED_110104.getValue(); break;
		case DICOM_STUDY_DELETED: this.strCodeValue =EnumCV_AuditEventID.DICOM_STUDY_DELETED_110105.getValue(); break;
		case EXPORT: this.strCodeValue =EnumCV_AuditEventID.EXPORT_110106.getValue(); break;
		case IMPORT: this.strCodeValue =EnumCV_AuditEventID.IMPORT_110107.getValue(); break;
		case NETWORK_ENTRY: this.strCodeValue =EnumCV_AuditEventID.NETWORK_ENTRY_110108.getValue(); break;
		case QUERY: this.strCodeValue =EnumCV_AuditEventID.QUERY_110112.getValue(); break;
		case SECURITY_ALERT: this.strCodeValue =EnumCV_AuditEventID.SECURITY_ALERT_110113.getValue(); break;
		case USER_AUTHENTICATION: this.strCodeValue =EnumCV_AuditEventID.USER_AUTHENTICATION_110114.getValue(); break;

		}
	}

	/**
	 * Sets the value for AuditEventID
	 * @param enumAuditEventID Object of EnumCM_AuditEventID.
	 */
	public void setAuditEventID(EnumCM_AuditEventID enumAuditEventID)
	{
		this.strCodeMeaning = enumAuditEventID.getValue();
		this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		setCodeValue(enumAuditEventID);
	}
}
