/*******************************************************************************
 *  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_AuditEventTypeCode;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AuditEventTypeCode;


/**
 * This class represents AuditEventTypeCode - CID401
 */
public class AuditEventTypeCode_CID401 
{
	/**
	 * 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 AuditEventTypeCode_CID2 Template 
	 */
	public AuditEventTypeCode_CID401()
	{

	}

	/**
	 * 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 enumAuditEventTypeCode Object of EnumCM_AuditEventTypeCode represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_AuditEventTypeCode enumAuditEventTypeCode)
	{
		switch(enumAuditEventTypeCode)
		{
		case APPLICATION_START: this.strCodeValue =EnumCV_AuditEventTypeCode.APPLICATION_START_110120.getValue(); break;
		case APPLICATION_STOP: this.strCodeValue =EnumCV_AuditEventTypeCode.APPLICATION_STOP_110121.getValue(); break;
		case LOGIN: this.strCodeValue =EnumCV_AuditEventTypeCode.LOGIN_110122.getValue(); break;
		case LOGOUT: this.strCodeValue =EnumCV_AuditEventTypeCode.LOGOUT_110123.getValue(); break;
		case ATTACH: this.strCodeValue =EnumCV_AuditEventTypeCode.ATTACH_110124.getValue(); break;
		case DETACH: this.strCodeValue =EnumCV_AuditEventTypeCode.DETACH_110125.getValue(); break;
		case NODE_AUTHENTICATION: this.strCodeValue =EnumCV_AuditEventTypeCode.NODE_AUTHENTICATION_110126.getValue(); break;
		case EMERGENCY_OVERRIDE_STARTED: this.strCodeValue =EnumCV_AuditEventTypeCode.EMERGENCY_OVERRIDE_STARTED_110127.getValue(); break;
		case NETWORK_CONFIGURATION: this.strCodeValue =EnumCV_AuditEventTypeCode.NETWORK_CONFIGURATION_110128.getValue(); break;
		case SECURITY_CONFIGURATION: this.strCodeValue =EnumCV_AuditEventTypeCode.SECURITY_CONFIGURATION_110129.getValue(); break;
		case HARDWARE_CONFIGURATION: this.strCodeValue =EnumCV_AuditEventTypeCode.HARDWARE_CONFIGURATION_110130.getValue(); break;
		case SOFTWARE_CONFIGURATION: this.strCodeValue =EnumCV_AuditEventTypeCode.SOFTWARE_CONFIGURATION_110131.getValue(); break;
		case USE_OF_RESTRICTED_FUNCTION: this.strCodeValue =EnumCV_AuditEventTypeCode.USE_OF_RESTRICTED_FUNCTION_110132.getValue(); break;
		case AUDIT_RECORDING_STOPPED: this.strCodeValue =EnumCV_AuditEventTypeCode.AUDIT_RECORDING_STOPPED_110133.getValue(); break;
		case AUDIT_RECORDING_STARTED: this.strCodeValue =EnumCV_AuditEventTypeCode.AUDIT_RECORDING_STARTED_110134.getValue(); break;
		case OBJECT_SECURITY_ATTRIBUTES_CHANGED: this.strCodeValue =EnumCV_AuditEventTypeCode.OBJECT_SECURITY_ATTRIBUTES_CHANGED_110135.getValue(); break;
		case SECURITY_ROLES_CHANGED: this.strCodeValue =EnumCV_AuditEventTypeCode.SECURITY_ROLES_CHANGED_110136.getValue(); break;
		case USER_SECURITY_ATTRIBUTES_CHANGED: this.strCodeValue =EnumCV_AuditEventTypeCode.USER_SECURITY_ATTRIBUTES_CHANGED_110137.getValue(); break;

		}
	}

	/**
	 * Sets the value for AuditEventTypeCode
	 * @param enumAuditEventTypeCode Object of EnumCM_AuditEventTypeCode.
	 */
	public void setAuditEventTypeCode(EnumCM_AuditEventTypeCode enumAuditEventTypeCode)
	{
		this.strCodeMeaning = enumAuditEventTypeCode.getValue();
		this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		setCodeValue(enumAuditEventTypeCode);
	}
}
