All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.rosetta.testconditional.model.V23b Maven / Gradle / Ivy
package com.rosetta.testconditional.model;
import com.rosetta.model.lib.RosettaModelObject;
import com.rosetta.model.lib.RosettaModelObjectBuilder;
import com.rosetta.model.lib.annotations.RosettaAttribute;
import com.rosetta.model.lib.annotations.RosettaDataType;
import com.rosetta.model.lib.meta.RosettaMetaData;
import com.rosetta.model.lib.path.RosettaPath;
import com.rosetta.model.lib.process.BuilderMerger;
import com.rosetta.model.lib.process.BuilderProcessor;
import com.rosetta.model.lib.process.Processor;
import com.rosetta.testconditional.model.V23b;
import com.rosetta.testconditional.model.V23b.V23bBuilder;
import com.rosetta.testconditional.model.V23b.V23bBuilderImpl;
import com.rosetta.testconditional.model.V23b.V23bImpl;
import com.rosetta.testconditional.model.meta.V23bMeta;
import java.util.Objects;
import static java.util.Optional.ofNullable;
/**
* @version test
*/
@RosettaDataType(value="V23b", builder=V23b.V23bBuilderImpl.class, version="test")
public interface V23b extends RosettaModelObject {
V23bMeta metaData = new V23bMeta();
/*********************** Getter Methods ***********************/
String getWField1();
String getWField2();
String getWField3();
/*********************** Build Methods ***********************/
V23b build();
V23b.V23bBuilder toBuilder();
static V23b.V23bBuilder builder() {
return new V23b.V23bBuilderImpl();
}
/*********************** Utility Methods ***********************/
@Override
default RosettaMetaData extends V23b> metaData() {
return metaData;
}
@Override
default Class extends V23b> getType() {
return V23b.class;
}
@Override
default void process(RosettaPath path, Processor processor) {
processor.processBasic(path.newSubPath("wField1"), String.class, getWField1(), this);
processor.processBasic(path.newSubPath("wField2"), String.class, getWField2(), this);
processor.processBasic(path.newSubPath("wField3"), String.class, getWField3(), this);
}
/*********************** Builder Interface ***********************/
interface V23bBuilder extends V23b, RosettaModelObjectBuilder {
V23b.V23bBuilder setWField1(String wField1);
V23b.V23bBuilder setWField2(String wField2);
V23b.V23bBuilder setWField3(String wField3);
@Override
default void process(RosettaPath path, BuilderProcessor processor) {
processor.processBasic(path.newSubPath("wField1"), String.class, getWField1(), this);
processor.processBasic(path.newSubPath("wField2"), String.class, getWField2(), this);
processor.processBasic(path.newSubPath("wField3"), String.class, getWField3(), this);
}
V23b.V23bBuilder prune();
}
/*********************** Immutable Implementation of V23b ***********************/
class V23bImpl implements V23b {
private final String wField1;
private final String wField2;
private final String wField3;
protected V23bImpl(V23b.V23bBuilder builder) {
this.wField1 = builder.getWField1();
this.wField2 = builder.getWField2();
this.wField3 = builder.getWField3();
}
@Override
@RosettaAttribute("wField1")
public String getWField1() {
return wField1;
}
@Override
@RosettaAttribute("wField2")
public String getWField2() {
return wField2;
}
@Override
@RosettaAttribute("wField3")
public String getWField3() {
return wField3;
}
@Override
public V23b build() {
return this;
}
@Override
public V23b.V23bBuilder toBuilder() {
V23b.V23bBuilder builder = builder();
setBuilderFields(builder);
return builder;
}
protected void setBuilderFields(V23b.V23bBuilder builder) {
ofNullable(getWField1()).ifPresent(builder::setWField1);
ofNullable(getWField2()).ifPresent(builder::setWField2);
ofNullable(getWField3()).ifPresent(builder::setWField3);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof RosettaModelObject) || !getType().equals(((RosettaModelObject)o).getType())) return false;
V23b _that = getType().cast(o);
if (!Objects.equals(wField1, _that.getWField1())) return false;
if (!Objects.equals(wField2, _that.getWField2())) return false;
if (!Objects.equals(wField3, _that.getWField3())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (wField1 != null ? wField1.hashCode() : 0);
_result = 31 * _result + (wField2 != null ? wField2.hashCode() : 0);
_result = 31 * _result + (wField3 != null ? wField3.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "V23b {" +
"wField1=" + this.wField1 + ", " +
"wField2=" + this.wField2 + ", " +
"wField3=" + this.wField3 +
'}';
}
}
/*********************** Builder Implementation of V23b ***********************/
class V23bBuilderImpl implements V23b.V23bBuilder {
protected String wField1;
protected String wField2;
protected String wField3;
public V23bBuilderImpl() {
}
@Override
@RosettaAttribute("wField1")
public String getWField1() {
return wField1;
}
@Override
@RosettaAttribute("wField2")
public String getWField2() {
return wField2;
}
@Override
@RosettaAttribute("wField3")
public String getWField3() {
return wField3;
}
@Override
@RosettaAttribute("wField1")
public V23b.V23bBuilder setWField1(String wField1) {
this.wField1 = wField1==null?null:wField1;
return this;
}
@Override
@RosettaAttribute("wField2")
public V23b.V23bBuilder setWField2(String wField2) {
this.wField2 = wField2==null?null:wField2;
return this;
}
@Override
@RosettaAttribute("wField3")
public V23b.V23bBuilder setWField3(String wField3) {
this.wField3 = wField3==null?null:wField3;
return this;
}
@Override
public V23b build() {
return new V23b.V23bImpl(this);
}
@Override
public V23b.V23bBuilder toBuilder() {
return this;
}
@SuppressWarnings("unchecked")
@Override
public V23b.V23bBuilder prune() {
return this;
}
@Override
public boolean hasData() {
if (getWField1()!=null) return true;
if (getWField2()!=null) return true;
if (getWField3()!=null) return true;
return false;
}
@SuppressWarnings("unchecked")
@Override
public V23b.V23bBuilder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
V23b.V23bBuilder o = (V23b.V23bBuilder) other;
merger.mergeBasic(getWField1(), o.getWField1(), this::setWField1);
merger.mergeBasic(getWField2(), o.getWField2(), this::setWField2);
merger.mergeBasic(getWField3(), o.getWField3(), this::setWField3);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof RosettaModelObject) || !getType().equals(((RosettaModelObject)o).getType())) return false;
V23b _that = getType().cast(o);
if (!Objects.equals(wField1, _that.getWField1())) return false;
if (!Objects.equals(wField2, _that.getWField2())) return false;
if (!Objects.equals(wField3, _that.getWField3())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (wField1 != null ? wField1.hashCode() : 0);
_result = 31 * _result + (wField2 != null ? wField2.hashCode() : 0);
_result = 31 * _result + (wField3 != null ? wField3.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "V23bBuilder {" +
"wField1=" + this.wField1 + ", " +
"wField2=" + this.wField2 + ", " +
"wField3=" + this.wField3 +
'}';
}
}
}