001/*-
002 * #%L
003 * Smile CDR - CDR
004 * %%
005 * Copyright (C) 2016 - 2024 Smile CDR, Inc.
006 * %%
007 * All rights reserved.
008 * #L%
009 */
010package ca.cdr.api.model.json;
011
012import com.fasterxml.jackson.annotation.JsonProperty;
013import org.apache.commons.lang3.builder.EqualsBuilder;
014import org.apache.commons.lang3.builder.HashCodeBuilder;
015
016public class LoggerConfigJson implements IModelJson {
017
018        @JsonProperty("loggerName")
019        private String myLoggerName;
020
021        @JsonProperty("loggerLevel")
022        private String myLoggerLevel;
023
024        public LoggerConfigJson(String myLoggerName, String myLoggerLevel) {
025                this.myLoggerName = myLoggerName;
026                this.myLoggerLevel = myLoggerLevel;
027        }
028
029        public LoggerConfigJson() {}
030
031        public String getLoggerName() {
032                return myLoggerName;
033        }
034
035        public void setLoggerName(String theLoggerName) {
036                myLoggerName = theLoggerName;
037        }
038
039        public String getLoggerLevel() {
040                return myLoggerLevel;
041        }
042
043        public void setLoggerLevel(String theLoggerLevel) {
044                myLoggerLevel = theLoggerLevel;
045        }
046
047        @Override
048        public boolean equals(Object o) {
049                if (this == o) return true;
050
051                if (o == null || getClass() != o.getClass()) return false;
052
053                LoggerConfigJson that = (LoggerConfigJson) o;
054
055                return new EqualsBuilder()
056                                .append(myLoggerName, that.myLoggerName)
057                                .append(myLoggerLevel, that.myLoggerLevel)
058                                .isEquals();
059        }
060
061        @Override
062        public int hashCode() {
063                return new HashCodeBuilder(17, 37)
064                                .append(myLoggerName)
065                                .append(myLoggerLevel)
066                                .toHashCode();
067        }
068
069        @Override
070        public String toString() {
071                return "LoggerConfigJson{" + "myLoggerName='"
072                                + myLoggerName + '\'' + ", myLoggerLevel='"
073                                + myLoggerLevel + '\'' + '}';
074        }
075}