package im.actor.core.api.updates; /* * Generated by the Actor API Scheme generator. DO NOT EDIT! */ import im.actor.runtime.bser.*; import im.actor.runtime.collections.*; import static im.actor.runtime.bser.Utils.*; import im.actor.core.network.parser.*; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.NotNull; import com.google.j2objc.annotations.ObjectiveCName; import java.io.IOException; import java.util.List; import java.util.ArrayList; import im.actor.core.api.*; public class UpdateSynedSetUpdated extends Update { public static final int HEADER = 0x48; public static UpdateSynedSetUpdated fromBytes(byte[] data) throws IOException { return Bser.parse(new UpdateSynedSetUpdated(), data); } private String setName; private List<ApiSyncedValue> syncedValues; private Boolean isStrong; public UpdateSynedSetUpdated(@NotNull String setName, @NotNull List<ApiSyncedValue> syncedValues, @Nullable Boolean isStrong) { this.setName = setName; this.syncedValues = syncedValues; this.isStrong = isStrong; } public UpdateSynedSetUpdated() { } @NotNull public String getSetName() { return this.setName; } @NotNull public List<ApiSyncedValue> getSyncedValues() { return this.syncedValues; } @Nullable public Boolean isStrong() { return this.isStrong; } @Override public void parse(BserValues values) throws IOException { this.setName = values.getString(1); List<ApiSyncedValue> _syncedValues = new ArrayList<ApiSyncedValue>(); for (int i = 0; i < values.getRepeatedCount(2); i ++) { _syncedValues.add(new ApiSyncedValue()); } this.syncedValues = values.getRepeatedObj(2, _syncedValues); this.isStrong = values.optBool(3); } @Override public void serialize(BserWriter writer) throws IOException { if (this.setName == null) { throw new IOException(); } writer.writeString(1, this.setName); writer.writeRepeatedObj(2, this.syncedValues); if (this.isStrong != null) { writer.writeBool(3, this.isStrong); } } @Override public String toString() { String res = "update SynedSetUpdated{"; res += "setName=" + this.setName; res += ", syncedValues=" + this.syncedValues; res += ", isStrong=" + this.isStrong; res += "}"; return res; } @Override public int getHeaderKey() { return HEADER; } }