/*
 * Copyright 2017 the original author or authors.
 *
 * 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.
 */

//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2008.08.13 at 04:13:48 PM PDT 
//


package org.openhealthtools.ihe.atna.auditor.models.rfc3881;

import org.apache.commons.lang3.StringEscapeUtils;

import java.io.Serializable;
import java.util.Objects;


/**
 * <p>Java class for AuditSourceTypeContent complex type.
 */
public class AuditSourceType implements Serializable {

    //@XmlAttribute(required = true)
    protected String code;
    //@XmlAttribute
    protected String originalText;
    //@XmlAttribute
    protected String codeSystem;
    //@XmlAttribute
    protected String codeSystemName;

    
    public String toString()
    {
    	StringBuilder sb = new StringBuilder();
    	sb.append("<AuditSourceTypeCode");
    	//code
    	sb.append(" code=\"");
    	sb.append(code);
    	sb.append("\"");

    	//originalText
    	if (originalText != null) {
	    	sb.append(" originalText=\"");
	    	sb.append(StringEscapeUtils.escapeXml10(originalText));
	    	sb.append("\"");
    	}

    	//codeSystem
    	if (codeSystem != null) {
	    	sb.append(" codeSystem=\"");
	    	sb.append(StringEscapeUtils.escapeXml10(codeSystem));
	    	sb.append("\"");
    	}
    	//codeSystemName
    	if (codeSystemName != null) {
	    	sb.append(" codeSystemName=\"");
	    	sb.append(StringEscapeUtils.escapeXml10(codeSystemName));
	    	sb.append("\"");
    	}
    	
    	sb.append("/>");
    	return sb.toString();
    }
    
    /**
     * Gets the value of the code property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getCode() {
        return code;
    }

    /**
     * Sets the value of the code property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCode(String value) {
        this.code = value;
    }

    /**
     * Gets the value of the originalText property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getOriginalText() {
        return originalText;
    }

    /**
     * Sets the value of the originalText property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setOriginalText(String value) {
        this.originalText = value;
    }

    /**
     * Gets the value of the codeSystem property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getCodeSystem() {
        return codeSystem;
    }

    /**
     * Sets the value of the codeSystem property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCodeSystem(String value) {
        this.codeSystem = value;
    }

    /**
     * Gets the value of the codeSystemName property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getCodeSystemName() {
        return codeSystemName;
    }

    /**
     * Sets the value of the codeSystemName property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCodeSystemName(String value) {
        this.codeSystemName = value;
    }


    /**
     * Gets the value of the displayName property.
     *
     * @return possible object is {@link String}
     * @deprecated use getOriginalText instead
     */
    @Deprecated
    public String getDisplayName() {
        return originalText;
    }

    /**
     * Sets the value of the displayName property.
     *
     * @param value allowed object is {@link String}
     * @deprecated use setOriginalText instead
     */
    @Deprecated
    public void setDisplayName(String value) {
        this.originalText = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AuditSourceType)) return false;
        AuditSourceType that = (AuditSourceType) o;
        return Objects.equals(code, that.code) &&
                Objects.equals(originalText, that.originalText) &&
                Objects.equals(codeSystem, that.codeSystem) &&
                Objects.equals(codeSystemName, that.codeSystemName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(code, originalText, codeSystem, codeSystemName);
    }
}

@@ -1636,24 +1636,28 @@
 sb.append(%22 
+csd-
 code=%5C%22%22);%0A 

change attribute name @code to @csd-code; closes #10