avrotize 2.18.2__py3-none-any.whl → 2.20.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- avrotize/_version.py +2 -2
- avrotize/avrotocsharp/project.csproj.jinja +7 -7
- avrotize/avrotocsharp/testproject.csproj.jinja +3 -3
- avrotize/avrotocsharp.py +21 -2
- avrotize/avrotojava/testproject.pom.jinja +4 -3
- avrotize/avrotojava.py +16 -6
- avrotize/avrotots/class_core.ts.jinja +12 -0
- avrotize/avrotots/class_test.ts.jinja +77 -0
- avrotize/avrotots.py +96 -0
- avrotize/cddltostructure.py +1841 -0
- avrotize/commands.json +226 -0
- avrotize/constants.py +71 -4
- avrotize/dependencies/cpp/vcpkg/vcpkg.json +19 -0
- avrotize/dependencies/cs/net90/dependencies.csproj +27 -0
- avrotize/dependencies/go/go121/go.mod +6 -0
- avrotize/dependencies/java/jdk21/pom.xml +91 -0
- avrotize/dependencies/python/py312/requirements.txt +13 -0
- avrotize/dependencies/rust/stable/Cargo.toml +17 -0
- avrotize/dependencies/typescript/node22/package.json +16 -0
- avrotize/dependency_version.py +432 -0
- avrotize/structuretocddl.py +597 -0
- avrotize/structuretocsharp/dataclass_core.jinja +6 -1
- avrotize/structuretocsharp/json_structure_converters.cs.jinja +399 -0
- avrotize/structuretocsharp/program.cs.jinja +11 -6
- avrotize/structuretocsharp/project.csproj.jinja +4 -3
- avrotize/structuretocsharp/testproject.csproj.jinja +4 -3
- avrotize/structuretocsharp.py +311 -21
- avrotize/structuretojava/choice_core.jinja +34 -0
- avrotize/structuretojava/class_core.jinja +23 -0
- avrotize/structuretojava/enum_core.jinja +18 -0
- avrotize/structuretojava/equals_hashcode.jinja +30 -0
- avrotize/structuretojava/pom.xml.jinja +26 -0
- avrotize/structuretojava/tuple_core.jinja +49 -0
- avrotize/structuretojava.py +853 -0
- {avrotize-2.18.2.dist-info → avrotize-2.20.0.dist-info}/METADATA +29 -2
- {avrotize-2.18.2.dist-info → avrotize-2.20.0.dist-info}/RECORD +39 -20
- {avrotize-2.18.2.dist-info → avrotize-2.20.0.dist-info}/WHEEL +0 -0
- {avrotize-2.18.2.dist-info → avrotize-2.20.0.dist-info}/entry_points.txt +0 -0
- {avrotize-2.18.2.dist-info → avrotize-2.20.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** {{ docstring }} */
|
|
2
|
+
/** JSON Structure tuple type - serializes as JSON array */
|
|
3
|
+
{%- if deprecated %}
|
|
4
|
+
@Deprecated
|
|
5
|
+
{%- endif %}
|
|
6
|
+
{%- if jackson_annotation %}
|
|
7
|
+
@JsonFormat(shape = JsonFormat.Shape.ARRAY)
|
|
8
|
+
{%- endif %}
|
|
9
|
+
public class {{ class_name }} {
|
|
10
|
+
{%- for element in elements %}
|
|
11
|
+
|
|
12
|
+
/** {{ element.docstring }} */
|
|
13
|
+
private {{ element.type }} {{ element.name }};
|
|
14
|
+
{%- endfor %}
|
|
15
|
+
|
|
16
|
+
public {{ class_name }}() {}
|
|
17
|
+
|
|
18
|
+
public {{ class_name }}({% for element in elements %}{{ element.type }} {{ element.name }}{% if not loop.last %}, {% endif %}{% endfor %}) {
|
|
19
|
+
{%- for element in elements %}
|
|
20
|
+
this.{{ element.name }} = {{ element.name }};
|
|
21
|
+
{%- endfor %}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
{%- for element in elements %}
|
|
25
|
+
|
|
26
|
+
public {{ element.type }} get{{ element.name|pascal }}() { return {{ element.name }}; }
|
|
27
|
+
public void set{{ element.name|pascal }}({{ element.type }} {{ element.name }}) { this.{{ element.name }} = {{ element.name }}; }
|
|
28
|
+
{%- endfor %}
|
|
29
|
+
|
|
30
|
+
{%- if jackson_annotation %}
|
|
31
|
+
|
|
32
|
+
@JsonCreator
|
|
33
|
+
public static {{ class_name }} fromArray(Object[] array) {
|
|
34
|
+
if (array == null || array.length != {{ elements|length }}) {
|
|
35
|
+
throw new IllegalArgumentException("Array must have exactly {{ elements|length }} elements");
|
|
36
|
+
}
|
|
37
|
+
{{ class_name }} tuple = new {{ class_name }}();
|
|
38
|
+
{%- for element in elements %}
|
|
39
|
+
tuple.{{ element.name }} = ({{ element.type }}) array[{{ loop.index0 }}];
|
|
40
|
+
{%- endfor %}
|
|
41
|
+
return tuple;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@JsonValue
|
|
45
|
+
public Object[] toArray() {
|
|
46
|
+
return new Object[] { {% for element in elements %}{{ element.name }}{% if not loop.last %}, {% endif %}{% endfor %} };
|
|
47
|
+
}
|
|
48
|
+
{%- endif %}
|
|
49
|
+
}
|