1package soy.iko.opencode.shared;
4public final class ToolView {
5 public final String name;
6 public final String status;
7 public final java.util.Optional<String> title;
9 public ToolView(String name, String status, java.util.Optional<String> title) {
10 java.util.Objects.requireNonNull(name, "name must not be null");
11 java.util.Objects.requireNonNull(status, "status must not be null");
12 java.util.Objects.requireNonNull(title, "title must not be null");
18 public void serialize(com.novi.serde.Serializer serializer) throws com.novi.serde.SerializationError {
19 serializer.increase_container_depth();
20 serializer.serialize_str(name);
21 serializer.serialize_str(status);
22 TraitHelpers.serialize_option_str(title, serializer);
23 serializer.decrease_container_depth();
26 public byte[] bincodeSerialize() throws com.novi.serde.SerializationError {
27 com.novi.serde.Serializer serializer = new com.novi.bincode.BincodeSerializer();
28 serialize(serializer);
29 return serializer.get_bytes();
32 public static ToolView deserialize(com.novi.serde.Deserializer deserializer) throws com.novi.serde.DeserializationError {
33 deserializer.increase_container_depth();
34 Builder builder = new Builder();
35 builder.name = deserializer.deserialize_str();
36 builder.status = deserializer.deserialize_str();
37 builder.title = TraitHelpers.deserialize_option_str(deserializer);
38 deserializer.decrease_container_depth();
39 return builder.build();
42 public static ToolView bincodeDeserialize(byte[] input) throws com.novi.serde.DeserializationError {
44 throw new com.novi.serde.DeserializationError("Cannot deserialize null array");
46 com.novi.serde.Deserializer deserializer = new com.novi.bincode.BincodeDeserializer(input);
47 ToolView value = deserialize(deserializer);
48 if (deserializer.get_buffer_offset() < input.length) {
49 throw new com.novi.serde.DeserializationError("Some input bytes were not read");
54 public boolean equals(Object obj) {
55 if (this == obj) return true;
56 if (obj == null) return false;
57 if (getClass() != obj.getClass()) return false;
58 ToolView other = (ToolView) obj;
59 if (!java.util.Objects.equals(this.name, other.name)) { return false; }
60 if (!java.util.Objects.equals(this.status, other.status)) { return false; }
61 if (!java.util.Objects.equals(this.title, other.title)) { return false; }
65 public int hashCode() {
67 value = 31 * value + (this.name != null ? this.name.hashCode() : 0);
68 value = 31 * value + (this.status != null ? this.status.hashCode() : 0);
69 value = 31 * value + (this.title != null ? this.title.hashCode() : 0);
73 public static final class Builder {
76 public java.util.Optional<String> title;
78 public ToolView build() {
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list