yangys
2024-03-31 2969df3e404db3cd116f27db1495e523ce05bf86
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package com.qianwen.core.tool.metadata;
 
import java.util.ArrayList;
import java.util.List;
import com.qianwen.core.tool.utils.StringPool;
 
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/metadata/DefaultConfigMetadata.class */
public class DefaultConfigMetadata implements ConfigMetadata {
    private static final long serialVersionUID = 0;
    private String name;
    private String description;
    private List<ConfigPropertyMetadata> properties = new ArrayList();
 
    public void setName(final String name) {
        this.name = name;
    }
 
    public void setDescription(final String description) {
        this.description = description;
    }
 
    public void setProperties(final List<ConfigPropertyMetadata> properties) {
        this.properties = properties;
    }
 
    @Override // org.springblade.core.tool.metadata.ConfigMetadata
    public String getName() {
        return this.name;
    }
 
    @Override // org.springblade.core.tool.metadata.ConfigMetadata
    public String getDescription() {
        return this.description;
    }
 
    public DefaultConfigMetadata() {
    }
 
    public DefaultConfigMetadata(String name, String description) {
        this.name = name;
        this.description = description;
    }
 
    @Override // org.springblade.core.tool.metadata.ConfigMetadata
    public List<ConfigPropertyMetadata> getProperties() {
        return this.properties;
    }
 
    public DefaultConfigMetadata add(ConfigPropertyMetadata metadata) {
        this.properties.add(metadata);
        return this;
    }
 
    public DefaultConfigMetadata add(String property, String name, String description, DataType type) {
        return add(Property.of(property, name, description, type));
    }
 
    public DefaultConfigMetadata add(String property, String name, DataType type) {
        return add(property, name, null, type);
    }
 
    /* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/metadata/DefaultConfigMetadata$Property.class */
    public static class Property implements ConfigPropertyMetadata {
        private static final long serialVersionUID = 0;
        private String property;
        private String name;
        private String description;
        private DataType type;
 
        /* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/metadata/DefaultConfigMetadata$Property$PropertyBuilder.class */
        public static class PropertyBuilder {
            private String property;
            private String name;
            private String description;
            private DataType type;
 
            PropertyBuilder() {
            }
 
            public PropertyBuilder property(final String property) {
                this.property = property;
                return this;
            }
 
            public PropertyBuilder name(final String name) {
                this.name = name;
                return this;
            }
 
            public PropertyBuilder description(final String description) {
                this.description = description;
                return this;
            }
 
            public PropertyBuilder type(final DataType type) {
                this.type = type;
                return this;
            }
 
            public Property build() {
                return new Property(this.property, this.name, this.description, this.type);
            }
 
            public String toString() {
                return "DefaultConfigMetadata.Property.PropertyBuilder(property=" + this.property + ", name=" + this.name + ", description=" + this.description + ", type=" + this.type + StringPool.RIGHT_BRACKET;
            }
        }
 
        public void setProperty(final String property) {
            this.property = property;
        }
 
        public void setName(final String name) {
            this.name = name;
        }
 
        public void setDescription(final String description) {
            this.description = description;
        }
 
        public void setType(final DataType type) {
            this.type = type;
        }
 
        public static PropertyBuilder builder() {
            return new PropertyBuilder();
        }
 
        public Property() {
        }
 
        private Property(final String property, final String name, final String description, final DataType type) {
            this.property = property;
            this.name = name;
            this.description = description;
            this.type = type;
        }
 
        public static Property of(final String property, final String name, final String description, final DataType type) {
            return new Property(property, name, description, type);
        }
 
        @Override // org.springblade.core.tool.metadata.ConfigPropertyMetadata
        public String getProperty() {
            return this.property;
        }
 
        @Override // org.springblade.core.tool.metadata.ConfigPropertyMetadata
        public String getName() {
            return this.name;
        }
 
        @Override // org.springblade.core.tool.metadata.ConfigPropertyMetadata
        public String getDescription() {
            return this.description;
        }
 
        @Override // org.springblade.core.tool.metadata.ConfigPropertyMetadata
        public DataType getType() {
            return this.type;
        }
    }
}