com.daml.ledger.test.java.package_management.packagemanagementtest.TestChoice Maven / Gradle / Ivy
The newest version!
package com.daml.ledger.test.java.package_management.packagemanagementtest;
import static com.daml.ledger.javaapi.data.codegen.json.JsonLfEncoders.apply;
import com.daml.ledger.javaapi.data.Value;
import com.daml.ledger.javaapi.data.codegen.DamlRecord;
import com.daml.ledger.javaapi.data.codegen.PrimitiveValueDecoders;
import com.daml.ledger.javaapi.data.codegen.ValueDecoder;
import com.daml.ledger.javaapi.data.codegen.json.JsonLfDecoder;
import com.daml.ledger.javaapi.data.codegen.json.JsonLfDecoders;
import com.daml.ledger.javaapi.data.codegen.json.JsonLfEncoder;
import com.daml.ledger.javaapi.data.codegen.json.JsonLfEncoders;
import com.daml.ledger.javaapi.data.codegen.json.JsonLfReader;
import java.lang.Deprecated;
import java.lang.IllegalArgumentException;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
public class TestChoice extends DamlRecord {
public static final String _packageId = "5f87825d0f165e34afa118b148a07bf40a2ddf4778597c669869829553188c13";
public TestChoice() {
}
/**
* @deprecated since Daml 2.5.0; use {@code valueDecoder} instead
*/
@Deprecated
public static TestChoice fromValue(Value value$) throws IllegalArgumentException {
return valueDecoder().decode(value$);
}
public static ValueDecoder valueDecoder() throws IllegalArgumentException {
return value$ -> {
Value recordValue$ = value$;
List fields$ = PrimitiveValueDecoders.recordCheck(0,0,
recordValue$);
return new TestChoice();
} ;
}
public com.daml.ledger.javaapi.data.DamlRecord toValue() {
ArrayList fields = new ArrayList(0);
return new com.daml.ledger.javaapi.data.DamlRecord(fields);
}
public static JsonLfDecoder jsonDecoder() {
return JsonLfDecoders.record(Arrays.asList(), name -> {
switch (name) {
default: return null;
}
}
, (Object[] args) -> new TestChoice());
}
public static TestChoice fromJson(String json) throws JsonLfDecoder.Error {
return jsonDecoder().decode(new JsonLfReader(json));
}
public JsonLfEncoder jsonEncoder() {
return JsonLfEncoders.record();
}
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (object == null) {
return false;
}
if (!(object instanceof TestChoice)) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
return "com.daml.ledger.test.java.package_management.packagemanagementtest.TestChoice";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy