1   /*
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2026, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v2.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  
15  package ch.qos.logback.classic.model;
16  
17  import java.util.Objects;
18  
19  import ch.qos.logback.core.model.Model;
20  import ch.qos.logback.core.util.Duration;
21  
22  public class ConfigurationModel extends Model {
23  
24      private static final long serialVersionUID = 1286156598561818515L;
25  
26      String debugStr;
27      String scanStr;
28      String scanPeriodStr;
29      String packagingDataStr;
30      
31      @Override
32      protected ConfigurationModel makeNewInstance() {
33          return new ConfigurationModel();
34      }
35      
36      @Override protected void mirror(Model that) {
37          ConfigurationModel actual = (ConfigurationModel) that;
38          super.mirror(that);
39          this.debugStr = actual.debugStr;
40          this.scanStr = actual.scanStr;
41          this.scanPeriodStr = actual.scanPeriodStr;
42          this.packagingDataStr = actual.packagingDataStr;
43      }
44      
45      public String getDebugStr() {
46          return debugStr;
47      }
48  
49      public void setDebugStr(String debugStr) {
50          this.debugStr = debugStr;
51      }
52  
53      public String getScanStr() {
54          return scanStr;
55      }
56  
57      public void setScanStr(String scanStr) {
58          this.scanStr = scanStr;
59      }
60  
61      public String getScanPeriodStr() {
62          return scanPeriodStr;
63      }
64  
65      public void setScanPeriodStr(String scanPeriodStr) {
66          this.scanPeriodStr = scanPeriodStr;
67      }
68  
69      public String getPackagingDataStr() {
70          return packagingDataStr;
71      }
72  
73      public void setPackagingDataStr(String packagingDataStr) {
74          this.packagingDataStr = packagingDataStr;
75      }
76      
77      @Override
78      public int hashCode() {
79          final int prime = 31;
80          int result = super.hashCode();
81          result = prime * result + Objects.hash(debugStr, packagingDataStr, scanPeriodStr, scanStr);
82          return result;
83      }
84  
85      @Override
86      public boolean equals(Object obj) {
87          if (this == obj)
88              return true;
89          if (!super.equals(obj))
90              return false;
91          if (getClass() != obj.getClass())
92              return false;
93          ConfigurationModel other = (ConfigurationModel) obj;
94          return Objects.equals(debugStr, other.debugStr) && Objects.equals(packagingDataStr, other.packagingDataStr)
95                  && Objects.equals(scanPeriodStr, other.scanPeriodStr) && Objects.equals(scanStr, other.scanStr);
96      }
97  
98  }