1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.primefaces.extensions.model.monacoeditor;
25
26 import org.primefaces.shaded.json.*;
27 import java.io.ObjectStreamException;
28 import java.io.Serializable;
29
30
31
32
33
34
35
36
37 @SuppressWarnings("serial")
38 public class EditorQuickSuggestionsOptions extends JSONObject implements Serializable {
39 private Object writeReplace() throws ObjectStreamException {
40 return new SerializedEditorQuickSuggestionsOptions(this);
41 }
42
43 private static class SerializedEditorQuickSuggestionsOptions implements Serializable {
44 private String json;
45
46 public SerializedEditorQuickSuggestionsOptions(EditorQuickSuggestionsOptions editorQuickSuggestionsOptions) {
47 this.json = editorQuickSuggestionsOptions.toString();
48 }
49
50 private Object readResolve() throws ObjectStreamException {
51 final EditorQuickSuggestionsOptions editorQuickSuggestionsOptions = new EditorQuickSuggestionsOptions();
52 final JSONObject data = new JSONObject(json);
53 for (final String key : data.keySet()) {
54 final Object value = data.get(key);
55 editorQuickSuggestionsOptions.put(key, value);
56 }
57 return editorQuickSuggestionsOptions;
58 }
59 }
60
61 public Boolean isComments() {
62 final Object tmp = (has("comments") ? get("comments") : null);
63 return (Boolean) (tmp instanceof Boolean ? tmp : null);
64 }
65
66 public EQuickSuggestionsValue getComments() {
67 final Object tmp = (has("comments") ? get("comments") : null);
68 return (EQuickSuggestionsValue) (tmp instanceof EQuickSuggestionsValue ? tmp : null);
69 }
70
71 public EditorQuickSuggestionsOptions setComments(final Boolean comments) {
72 put("comments", comments);
73 return this;
74 }
75
76 public EditorQuickSuggestionsOptions setComments(final EQuickSuggestionsValue comments) {
77 put("comments", comments);
78 return this;
79 }
80
81 public Boolean isOther() {
82 final Object tmp = (has("other") ? get("other") : null);
83 return (Boolean) (tmp instanceof Boolean ? tmp : null);
84 }
85
86 public EQuickSuggestionsValue getOther() {
87 final Object tmp = (has("other") ? get("other") : null);
88 return (EQuickSuggestionsValue) (tmp instanceof EQuickSuggestionsValue ? tmp : null);
89 }
90
91 public EditorQuickSuggestionsOptions setOther(final Boolean other) {
92 put("other", other);
93 return this;
94 }
95
96 public EditorQuickSuggestionsOptions setOther(final EQuickSuggestionsValue other) {
97 put("other", other);
98 return this;
99 }
100
101 public Boolean isStrings() {
102 final Object tmp = (has("strings") ? get("strings") : null);
103 return (Boolean) (tmp instanceof Boolean ? tmp : null);
104 }
105
106 public EQuickSuggestionsValue getStrings() {
107 final Object tmp = (has("strings") ? get("strings") : null);
108 return (EQuickSuggestionsValue) (tmp instanceof EQuickSuggestionsValue ? tmp : null);
109 }
110
111 public EditorQuickSuggestionsOptions setStrings(final Boolean strings) {
112 put("strings", strings);
113 return this;
114 }
115
116 public EditorQuickSuggestionsOptions setStrings(final EQuickSuggestionsValue strings) {
117 put("strings", strings);
118 return this;
119 }
120
121
122
123
124 JSONObject getJSONObject() {
125 return this;
126 }
127 }