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.jptlegalagreement.model.CsaInitialMargin2016 Maven / Gradle / Ivy
package com.rosetta.jptlegalagreement.model;
import com.rosetta.jptlegalagreement.model.AdditionalRepresentation;
import com.rosetta.jptlegalagreement.model.CalculationDateLocation;
import com.rosetta.jptlegalagreement.model.ConditionsPrecedent;
import com.rosetta.jptlegalagreement.model.ContactElection;
import com.rosetta.jptlegalagreement.model.CreditSupportObligationsInitialMargin;
import com.rosetta.jptlegalagreement.model.Csa2016;
import com.rosetta.jptlegalagreement.model.Csa2016.Csa2016Builder;
import com.rosetta.jptlegalagreement.model.Csa2016.Csa2016BuilderImpl;
import com.rosetta.jptlegalagreement.model.Csa2016.Csa2016Impl;
import com.rosetta.jptlegalagreement.model.CsaInitialMargin2016;
import com.rosetta.jptlegalagreement.model.CsaInitialMargin2016.CsaInitialMargin2016Builder;
import com.rosetta.jptlegalagreement.model.CsaInitialMargin2016.CsaInitialMargin2016BuilderImpl;
import com.rosetta.jptlegalagreement.model.CsaInitialMargin2016.CsaInitialMargin2016Impl;
import com.rosetta.jptlegalagreement.model.DisputeResolution;
import com.rosetta.jptlegalagreement.model.FxHaircutCurrency;
import com.rosetta.jptlegalagreement.model.Method;
import com.rosetta.jptlegalagreement.model.NotificationTime;
import com.rosetta.jptlegalagreement.model.OneWayProvisions;
import com.rosetta.jptlegalagreement.model.Regime;
import com.rosetta.jptlegalagreement.model.SensitivityMethodology;
import com.rosetta.jptlegalagreement.model.Substitution;
import com.rosetta.jptlegalagreement.model.TerminationCurrencyAmendment;
import com.rosetta.jptlegalagreement.model.meta.CsaInitialMargin2016Meta;
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.model.metafields.FieldWithMetaString;
import com.rosetta.model.metafields.FieldWithMetaString.FieldWithMetaStringBuilder;
import java.util.Objects;
import static java.util.Optional.ofNullable;
/**
* @version test
*/
@RosettaDataType(value="CsaInitialMargin2016", builder=CsaInitialMargin2016.CsaInitialMargin2016BuilderImpl.class, version="test")
public interface CsaInitialMargin2016 extends Csa2016 {
CsaInitialMargin2016Meta metaData = new CsaInitialMargin2016Meta();
/*********************** Getter Methods ***********************/
Regime getRegime();
OneWayProvisions getOneWayProvisions();
Method getMethod();
Boolean getIdentifiedCrossCurrencySwap();
SensitivityMethodology getSensitivityToEquity();
SensitivityMethodology getSensitivityToCommodity();
FxHaircutCurrency getFxHaircutCurrency();
CreditSupportObligationsInitialMargin getCreditSupportObligations();
CalculationDateLocation getCalculationDateLocation();
NotificationTime getNotificationTime();
TerminationCurrencyAmendment getTerminationCurrency();
/*********************** Build Methods ***********************/
CsaInitialMargin2016 build();
CsaInitialMargin2016.CsaInitialMargin2016Builder toBuilder();
static CsaInitialMargin2016.CsaInitialMargin2016Builder builder() {
return new CsaInitialMargin2016.CsaInitialMargin2016BuilderImpl();
}
/*********************** Utility Methods ***********************/
@Override
default RosettaMetaData extends CsaInitialMargin2016> metaData() {
return metaData;
}
@Override
default Class extends CsaInitialMargin2016> getType() {
return CsaInitialMargin2016.class;
}
@Override
default void process(RosettaPath path, Processor processor) {
processRosetta(path.newSubPath("baseCurrency"), processor, FieldWithMetaString.class, getBaseCurrency());
processor.processBasic(path.newSubPath("additionalObligations"), String.class, getAdditionalObligations(), this);
processRosetta(path.newSubPath("conditionsPrecedent"), processor, ConditionsPrecedent.class, getConditionsPrecedent());
processRosetta(path.newSubPath("substitution"), processor, Substitution.class, getSubstitution());
processRosetta(path.newSubPath("disputeResolution"), processor, DisputeResolution.class, getDisputeResolution());
processRosetta(path.newSubPath("additionalRepresentation"), processor, AdditionalRepresentation.class, getAdditionalRepresentation());
processRosetta(path.newSubPath("demandsAndNotices"), processor, ContactElection.class, getDemandsAndNotices());
processRosetta(path.newSubPath("addressesForTransfer"), processor, ContactElection.class, getAddressesForTransfer());
processor.processBasic(path.newSubPath("bespokeProvision"), String.class, getBespokeProvision(), this);
processRosetta(path.newSubPath("regime"), processor, Regime.class, getRegime());
processRosetta(path.newSubPath("oneWayProvisions"), processor, OneWayProvisions.class, getOneWayProvisions());
processRosetta(path.newSubPath("method"), processor, Method.class, getMethod());
processor.processBasic(path.newSubPath("identifiedCrossCurrencySwap"), Boolean.class, getIdentifiedCrossCurrencySwap(), this);
processRosetta(path.newSubPath("sensitivityToEquity"), processor, SensitivityMethodology.class, getSensitivityToEquity());
processRosetta(path.newSubPath("sensitivityToCommodity"), processor, SensitivityMethodology.class, getSensitivityToCommodity());
processRosetta(path.newSubPath("fxHaircutCurrency"), processor, FxHaircutCurrency.class, getFxHaircutCurrency());
processRosetta(path.newSubPath("creditSupportObligations"), processor, CreditSupportObligationsInitialMargin.class, getCreditSupportObligations());
processRosetta(path.newSubPath("calculationDateLocation"), processor, CalculationDateLocation.class, getCalculationDateLocation());
processRosetta(path.newSubPath("notificationTime"), processor, NotificationTime.class, getNotificationTime());
processRosetta(path.newSubPath("terminationCurrency"), processor, TerminationCurrencyAmendment.class, getTerminationCurrency());
}
/*********************** Builder Interface ***********************/
interface CsaInitialMargin2016Builder extends CsaInitialMargin2016, Csa2016.Csa2016Builder {
Regime.RegimeBuilder getOrCreateRegime();
Regime.RegimeBuilder getRegime();
OneWayProvisions.OneWayProvisionsBuilder getOrCreateOneWayProvisions();
OneWayProvisions.OneWayProvisionsBuilder getOneWayProvisions();
Method.MethodBuilder getOrCreateMethod();
Method.MethodBuilder getMethod();
SensitivityMethodology.SensitivityMethodologyBuilder getOrCreateSensitivityToEquity();
SensitivityMethodology.SensitivityMethodologyBuilder getSensitivityToEquity();
SensitivityMethodology.SensitivityMethodologyBuilder getOrCreateSensitivityToCommodity();
SensitivityMethodology.SensitivityMethodologyBuilder getSensitivityToCommodity();
FxHaircutCurrency.FxHaircutCurrencyBuilder getOrCreateFxHaircutCurrency();
FxHaircutCurrency.FxHaircutCurrencyBuilder getFxHaircutCurrency();
CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder getOrCreateCreditSupportObligations();
CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder getCreditSupportObligations();
CalculationDateLocation.CalculationDateLocationBuilder getOrCreateCalculationDateLocation();
CalculationDateLocation.CalculationDateLocationBuilder getCalculationDateLocation();
NotificationTime.NotificationTimeBuilder getOrCreateNotificationTime();
NotificationTime.NotificationTimeBuilder getNotificationTime();
TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder getOrCreateTerminationCurrency();
TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder getTerminationCurrency();
CsaInitialMargin2016.CsaInitialMargin2016Builder setBaseCurrency(FieldWithMetaString baseCurrency0);
CsaInitialMargin2016.CsaInitialMargin2016Builder setBaseCurrencyValue(String baseCurrency1);
CsaInitialMargin2016.CsaInitialMargin2016Builder setAdditionalObligations(String additionalObligations);
CsaInitialMargin2016.CsaInitialMargin2016Builder setConditionsPrecedent(ConditionsPrecedent conditionsPrecedent);
CsaInitialMargin2016.CsaInitialMargin2016Builder setSubstitution(Substitution substitution);
CsaInitialMargin2016.CsaInitialMargin2016Builder setDisputeResolution(DisputeResolution disputeResolution);
CsaInitialMargin2016.CsaInitialMargin2016Builder setAdditionalRepresentation(AdditionalRepresentation additionalRepresentation);
CsaInitialMargin2016.CsaInitialMargin2016Builder setDemandsAndNotices(ContactElection demandsAndNotices);
CsaInitialMargin2016.CsaInitialMargin2016Builder setAddressesForTransfer(ContactElection addressesForTransfer);
CsaInitialMargin2016.CsaInitialMargin2016Builder setBespokeProvision(String bespokeProvision);
CsaInitialMargin2016.CsaInitialMargin2016Builder setRegime(Regime regime);
CsaInitialMargin2016.CsaInitialMargin2016Builder setOneWayProvisions(OneWayProvisions oneWayProvisions);
CsaInitialMargin2016.CsaInitialMargin2016Builder setMethod(Method method);
CsaInitialMargin2016.CsaInitialMargin2016Builder setIdentifiedCrossCurrencySwap(Boolean identifiedCrossCurrencySwap);
CsaInitialMargin2016.CsaInitialMargin2016Builder setSensitivityToEquity(SensitivityMethodology sensitivityToEquity);
CsaInitialMargin2016.CsaInitialMargin2016Builder setSensitivityToCommodity(SensitivityMethodology sensitivityToCommodity);
CsaInitialMargin2016.CsaInitialMargin2016Builder setFxHaircutCurrency(FxHaircutCurrency fxHaircutCurrency);
CsaInitialMargin2016.CsaInitialMargin2016Builder setCreditSupportObligations(CreditSupportObligationsInitialMargin creditSupportObligations);
CsaInitialMargin2016.CsaInitialMargin2016Builder setCalculationDateLocation(CalculationDateLocation calculationDateLocation);
CsaInitialMargin2016.CsaInitialMargin2016Builder setNotificationTime(NotificationTime notificationTime);
CsaInitialMargin2016.CsaInitialMargin2016Builder setTerminationCurrency(TerminationCurrencyAmendment terminationCurrency);
@Override
default void process(RosettaPath path, BuilderProcessor processor) {
processRosetta(path.newSubPath("baseCurrency"), processor, FieldWithMetaString.FieldWithMetaStringBuilder.class, getBaseCurrency());
processor.processBasic(path.newSubPath("additionalObligations"), String.class, getAdditionalObligations(), this);
processRosetta(path.newSubPath("conditionsPrecedent"), processor, ConditionsPrecedent.ConditionsPrecedentBuilder.class, getConditionsPrecedent());
processRosetta(path.newSubPath("substitution"), processor, Substitution.SubstitutionBuilder.class, getSubstitution());
processRosetta(path.newSubPath("disputeResolution"), processor, DisputeResolution.DisputeResolutionBuilder.class, getDisputeResolution());
processRosetta(path.newSubPath("additionalRepresentation"), processor, AdditionalRepresentation.AdditionalRepresentationBuilder.class, getAdditionalRepresentation());
processRosetta(path.newSubPath("demandsAndNotices"), processor, ContactElection.ContactElectionBuilder.class, getDemandsAndNotices());
processRosetta(path.newSubPath("addressesForTransfer"), processor, ContactElection.ContactElectionBuilder.class, getAddressesForTransfer());
processor.processBasic(path.newSubPath("bespokeProvision"), String.class, getBespokeProvision(), this);
processRosetta(path.newSubPath("regime"), processor, Regime.RegimeBuilder.class, getRegime());
processRosetta(path.newSubPath("oneWayProvisions"), processor, OneWayProvisions.OneWayProvisionsBuilder.class, getOneWayProvisions());
processRosetta(path.newSubPath("method"), processor, Method.MethodBuilder.class, getMethod());
processor.processBasic(path.newSubPath("identifiedCrossCurrencySwap"), Boolean.class, getIdentifiedCrossCurrencySwap(), this);
processRosetta(path.newSubPath("sensitivityToEquity"), processor, SensitivityMethodology.SensitivityMethodologyBuilder.class, getSensitivityToEquity());
processRosetta(path.newSubPath("sensitivityToCommodity"), processor, SensitivityMethodology.SensitivityMethodologyBuilder.class, getSensitivityToCommodity());
processRosetta(path.newSubPath("fxHaircutCurrency"), processor, FxHaircutCurrency.FxHaircutCurrencyBuilder.class, getFxHaircutCurrency());
processRosetta(path.newSubPath("creditSupportObligations"), processor, CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder.class, getCreditSupportObligations());
processRosetta(path.newSubPath("calculationDateLocation"), processor, CalculationDateLocation.CalculationDateLocationBuilder.class, getCalculationDateLocation());
processRosetta(path.newSubPath("notificationTime"), processor, NotificationTime.NotificationTimeBuilder.class, getNotificationTime());
processRosetta(path.newSubPath("terminationCurrency"), processor, TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder.class, getTerminationCurrency());
}
CsaInitialMargin2016.CsaInitialMargin2016Builder prune();
}
/*********************** Immutable Implementation of CsaInitialMargin2016 ***********************/
class CsaInitialMargin2016Impl extends Csa2016.Csa2016Impl implements CsaInitialMargin2016 {
private final Regime regime;
private final OneWayProvisions oneWayProvisions;
private final Method method;
private final Boolean identifiedCrossCurrencySwap;
private final SensitivityMethodology sensitivityToEquity;
private final SensitivityMethodology sensitivityToCommodity;
private final FxHaircutCurrency fxHaircutCurrency;
private final CreditSupportObligationsInitialMargin creditSupportObligations;
private final CalculationDateLocation calculationDateLocation;
private final NotificationTime notificationTime;
private final TerminationCurrencyAmendment terminationCurrency;
protected CsaInitialMargin2016Impl(CsaInitialMargin2016.CsaInitialMargin2016Builder builder) {
super(builder);
this.regime = ofNullable(builder.getRegime()).map(f->f.build()).orElse(null);
this.oneWayProvisions = ofNullable(builder.getOneWayProvisions()).map(f->f.build()).orElse(null);
this.method = ofNullable(builder.getMethod()).map(f->f.build()).orElse(null);
this.identifiedCrossCurrencySwap = builder.getIdentifiedCrossCurrencySwap();
this.sensitivityToEquity = ofNullable(builder.getSensitivityToEquity()).map(f->f.build()).orElse(null);
this.sensitivityToCommodity = ofNullable(builder.getSensitivityToCommodity()).map(f->f.build()).orElse(null);
this.fxHaircutCurrency = ofNullable(builder.getFxHaircutCurrency()).map(f->f.build()).orElse(null);
this.creditSupportObligations = ofNullable(builder.getCreditSupportObligations()).map(f->f.build()).orElse(null);
this.calculationDateLocation = ofNullable(builder.getCalculationDateLocation()).map(f->f.build()).orElse(null);
this.notificationTime = ofNullable(builder.getNotificationTime()).map(f->f.build()).orElse(null);
this.terminationCurrency = ofNullable(builder.getTerminationCurrency()).map(f->f.build()).orElse(null);
}
@Override
@RosettaAttribute("regime")
public Regime getRegime() {
return regime;
}
@Override
@RosettaAttribute("oneWayProvisions")
public OneWayProvisions getOneWayProvisions() {
return oneWayProvisions;
}
@Override
@RosettaAttribute("method")
public Method getMethod() {
return method;
}
@Override
@RosettaAttribute("identifiedCrossCurrencySwap")
public Boolean getIdentifiedCrossCurrencySwap() {
return identifiedCrossCurrencySwap;
}
@Override
@RosettaAttribute("sensitivityToEquity")
public SensitivityMethodology getSensitivityToEquity() {
return sensitivityToEquity;
}
@Override
@RosettaAttribute("sensitivityToCommodity")
public SensitivityMethodology getSensitivityToCommodity() {
return sensitivityToCommodity;
}
@Override
@RosettaAttribute("fxHaircutCurrency")
public FxHaircutCurrency getFxHaircutCurrency() {
return fxHaircutCurrency;
}
@Override
@RosettaAttribute("creditSupportObligations")
public CreditSupportObligationsInitialMargin getCreditSupportObligations() {
return creditSupportObligations;
}
@Override
@RosettaAttribute("calculationDateLocation")
public CalculationDateLocation getCalculationDateLocation() {
return calculationDateLocation;
}
@Override
@RosettaAttribute("notificationTime")
public NotificationTime getNotificationTime() {
return notificationTime;
}
@Override
@RosettaAttribute("terminationCurrency")
public TerminationCurrencyAmendment getTerminationCurrency() {
return terminationCurrency;
}
@Override
public CsaInitialMargin2016 build() {
return this;
}
@Override
public CsaInitialMargin2016.CsaInitialMargin2016Builder toBuilder() {
CsaInitialMargin2016.CsaInitialMargin2016Builder builder = builder();
setBuilderFields(builder);
return builder;
}
protected void setBuilderFields(CsaInitialMargin2016.CsaInitialMargin2016Builder builder) {
super.setBuilderFields(builder);
ofNullable(getRegime()).ifPresent(builder::setRegime);
ofNullable(getOneWayProvisions()).ifPresent(builder::setOneWayProvisions);
ofNullable(getMethod()).ifPresent(builder::setMethod);
ofNullable(getIdentifiedCrossCurrencySwap()).ifPresent(builder::setIdentifiedCrossCurrencySwap);
ofNullable(getSensitivityToEquity()).ifPresent(builder::setSensitivityToEquity);
ofNullable(getSensitivityToCommodity()).ifPresent(builder::setSensitivityToCommodity);
ofNullable(getFxHaircutCurrency()).ifPresent(builder::setFxHaircutCurrency);
ofNullable(getCreditSupportObligations()).ifPresent(builder::setCreditSupportObligations);
ofNullable(getCalculationDateLocation()).ifPresent(builder::setCalculationDateLocation);
ofNullable(getNotificationTime()).ifPresent(builder::setNotificationTime);
ofNullable(getTerminationCurrency()).ifPresent(builder::setTerminationCurrency);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof RosettaModelObject) || !getType().equals(((RosettaModelObject)o).getType())) return false;
if (!super.equals(o)) return false;
CsaInitialMargin2016 _that = getType().cast(o);
if (!Objects.equals(regime, _that.getRegime())) return false;
if (!Objects.equals(oneWayProvisions, _that.getOneWayProvisions())) return false;
if (!Objects.equals(method, _that.getMethod())) return false;
if (!Objects.equals(identifiedCrossCurrencySwap, _that.getIdentifiedCrossCurrencySwap())) return false;
if (!Objects.equals(sensitivityToEquity, _that.getSensitivityToEquity())) return false;
if (!Objects.equals(sensitivityToCommodity, _that.getSensitivityToCommodity())) return false;
if (!Objects.equals(fxHaircutCurrency, _that.getFxHaircutCurrency())) return false;
if (!Objects.equals(creditSupportObligations, _that.getCreditSupportObligations())) return false;
if (!Objects.equals(calculationDateLocation, _that.getCalculationDateLocation())) return false;
if (!Objects.equals(notificationTime, _that.getNotificationTime())) return false;
if (!Objects.equals(terminationCurrency, _that.getTerminationCurrency())) return false;
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (regime != null ? regime.hashCode() : 0);
_result = 31 * _result + (oneWayProvisions != null ? oneWayProvisions.hashCode() : 0);
_result = 31 * _result + (method != null ? method.hashCode() : 0);
_result = 31 * _result + (identifiedCrossCurrencySwap != null ? identifiedCrossCurrencySwap.hashCode() : 0);
_result = 31 * _result + (sensitivityToEquity != null ? sensitivityToEquity.hashCode() : 0);
_result = 31 * _result + (sensitivityToCommodity != null ? sensitivityToCommodity.hashCode() : 0);
_result = 31 * _result + (fxHaircutCurrency != null ? fxHaircutCurrency.hashCode() : 0);
_result = 31 * _result + (creditSupportObligations != null ? creditSupportObligations.hashCode() : 0);
_result = 31 * _result + (calculationDateLocation != null ? calculationDateLocation.hashCode() : 0);
_result = 31 * _result + (notificationTime != null ? notificationTime.hashCode() : 0);
_result = 31 * _result + (terminationCurrency != null ? terminationCurrency.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "CsaInitialMargin2016 {" +
"regime=" + this.regime + ", " +
"oneWayProvisions=" + this.oneWayProvisions + ", " +
"method=" + this.method + ", " +
"identifiedCrossCurrencySwap=" + this.identifiedCrossCurrencySwap + ", " +
"sensitivityToEquity=" + this.sensitivityToEquity + ", " +
"sensitivityToCommodity=" + this.sensitivityToCommodity + ", " +
"fxHaircutCurrency=" + this.fxHaircutCurrency + ", " +
"creditSupportObligations=" + this.creditSupportObligations + ", " +
"calculationDateLocation=" + this.calculationDateLocation + ", " +
"notificationTime=" + this.notificationTime + ", " +
"terminationCurrency=" + this.terminationCurrency +
'}' + " " + super.toString();
}
}
/*********************** Builder Implementation of CsaInitialMargin2016 ***********************/
class CsaInitialMargin2016BuilderImpl extends Csa2016.Csa2016BuilderImpl implements CsaInitialMargin2016.CsaInitialMargin2016Builder {
protected Regime.RegimeBuilder regime;
protected OneWayProvisions.OneWayProvisionsBuilder oneWayProvisions;
protected Method.MethodBuilder method;
protected Boolean identifiedCrossCurrencySwap;
protected SensitivityMethodology.SensitivityMethodologyBuilder sensitivityToEquity;
protected SensitivityMethodology.SensitivityMethodologyBuilder sensitivityToCommodity;
protected FxHaircutCurrency.FxHaircutCurrencyBuilder fxHaircutCurrency;
protected CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder creditSupportObligations;
protected CalculationDateLocation.CalculationDateLocationBuilder calculationDateLocation;
protected NotificationTime.NotificationTimeBuilder notificationTime;
protected TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder terminationCurrency;
public CsaInitialMargin2016BuilderImpl() {
}
@Override
@RosettaAttribute("regime")
public Regime.RegimeBuilder getRegime() {
return regime;
}
@Override
public Regime.RegimeBuilder getOrCreateRegime() {
Regime.RegimeBuilder result;
if (regime!=null) {
result = regime;
}
else {
result = regime = Regime.builder();
}
return result;
}
@Override
@RosettaAttribute("oneWayProvisions")
public OneWayProvisions.OneWayProvisionsBuilder getOneWayProvisions() {
return oneWayProvisions;
}
@Override
public OneWayProvisions.OneWayProvisionsBuilder getOrCreateOneWayProvisions() {
OneWayProvisions.OneWayProvisionsBuilder result;
if (oneWayProvisions!=null) {
result = oneWayProvisions;
}
else {
result = oneWayProvisions = OneWayProvisions.builder();
}
return result;
}
@Override
@RosettaAttribute("method")
public Method.MethodBuilder getMethod() {
return method;
}
@Override
public Method.MethodBuilder getOrCreateMethod() {
Method.MethodBuilder result;
if (method!=null) {
result = method;
}
else {
result = method = Method.builder();
}
return result;
}
@Override
@RosettaAttribute("identifiedCrossCurrencySwap")
public Boolean getIdentifiedCrossCurrencySwap() {
return identifiedCrossCurrencySwap;
}
@Override
@RosettaAttribute("sensitivityToEquity")
public SensitivityMethodology.SensitivityMethodologyBuilder getSensitivityToEquity() {
return sensitivityToEquity;
}
@Override
public SensitivityMethodology.SensitivityMethodologyBuilder getOrCreateSensitivityToEquity() {
SensitivityMethodology.SensitivityMethodologyBuilder result;
if (sensitivityToEquity!=null) {
result = sensitivityToEquity;
}
else {
result = sensitivityToEquity = SensitivityMethodology.builder();
}
return result;
}
@Override
@RosettaAttribute("sensitivityToCommodity")
public SensitivityMethodology.SensitivityMethodologyBuilder getSensitivityToCommodity() {
return sensitivityToCommodity;
}
@Override
public SensitivityMethodology.SensitivityMethodologyBuilder getOrCreateSensitivityToCommodity() {
SensitivityMethodology.SensitivityMethodologyBuilder result;
if (sensitivityToCommodity!=null) {
result = sensitivityToCommodity;
}
else {
result = sensitivityToCommodity = SensitivityMethodology.builder();
}
return result;
}
@Override
@RosettaAttribute("fxHaircutCurrency")
public FxHaircutCurrency.FxHaircutCurrencyBuilder getFxHaircutCurrency() {
return fxHaircutCurrency;
}
@Override
public FxHaircutCurrency.FxHaircutCurrencyBuilder getOrCreateFxHaircutCurrency() {
FxHaircutCurrency.FxHaircutCurrencyBuilder result;
if (fxHaircutCurrency!=null) {
result = fxHaircutCurrency;
}
else {
result = fxHaircutCurrency = FxHaircutCurrency.builder();
}
return result;
}
@Override
@RosettaAttribute("creditSupportObligations")
public CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder getCreditSupportObligations() {
return creditSupportObligations;
}
@Override
public CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder getOrCreateCreditSupportObligations() {
CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder result;
if (creditSupportObligations!=null) {
result = creditSupportObligations;
}
else {
result = creditSupportObligations = CreditSupportObligationsInitialMargin.builder();
}
return result;
}
@Override
@RosettaAttribute("calculationDateLocation")
public CalculationDateLocation.CalculationDateLocationBuilder getCalculationDateLocation() {
return calculationDateLocation;
}
@Override
public CalculationDateLocation.CalculationDateLocationBuilder getOrCreateCalculationDateLocation() {
CalculationDateLocation.CalculationDateLocationBuilder result;
if (calculationDateLocation!=null) {
result = calculationDateLocation;
}
else {
result = calculationDateLocation = CalculationDateLocation.builder();
}
return result;
}
@Override
@RosettaAttribute("notificationTime")
public NotificationTime.NotificationTimeBuilder getNotificationTime() {
return notificationTime;
}
@Override
public NotificationTime.NotificationTimeBuilder getOrCreateNotificationTime() {
NotificationTime.NotificationTimeBuilder result;
if (notificationTime!=null) {
result = notificationTime;
}
else {
result = notificationTime = NotificationTime.builder();
}
return result;
}
@Override
@RosettaAttribute("terminationCurrency")
public TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder getTerminationCurrency() {
return terminationCurrency;
}
@Override
public TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder getOrCreateTerminationCurrency() {
TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder result;
if (terminationCurrency!=null) {
result = terminationCurrency;
}
else {
result = terminationCurrency = TerminationCurrencyAmendment.builder();
}
return result;
}
@Override
@RosettaAttribute("baseCurrency")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setBaseCurrency(FieldWithMetaString baseCurrency) {
this.baseCurrency = baseCurrency==null?null:baseCurrency.toBuilder();
return this;
}
@Override
public CsaInitialMargin2016.CsaInitialMargin2016Builder setBaseCurrencyValue(String baseCurrency) {
this.getOrCreateBaseCurrency().setValue(baseCurrency);
return this;
}
@Override
@RosettaAttribute("additionalObligations")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setAdditionalObligations(String additionalObligations) {
this.additionalObligations = additionalObligations==null?null:additionalObligations;
return this;
}
@Override
@RosettaAttribute("conditionsPrecedent")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setConditionsPrecedent(ConditionsPrecedent conditionsPrecedent) {
this.conditionsPrecedent = conditionsPrecedent==null?null:conditionsPrecedent.toBuilder();
return this;
}
@Override
@RosettaAttribute("substitution")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setSubstitution(Substitution substitution) {
this.substitution = substitution==null?null:substitution.toBuilder();
return this;
}
@Override
@RosettaAttribute("disputeResolution")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setDisputeResolution(DisputeResolution disputeResolution) {
this.disputeResolution = disputeResolution==null?null:disputeResolution.toBuilder();
return this;
}
@Override
@RosettaAttribute("additionalRepresentation")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setAdditionalRepresentation(AdditionalRepresentation additionalRepresentation) {
this.additionalRepresentation = additionalRepresentation==null?null:additionalRepresentation.toBuilder();
return this;
}
@Override
@RosettaAttribute("demandsAndNotices")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setDemandsAndNotices(ContactElection demandsAndNotices) {
this.demandsAndNotices = demandsAndNotices==null?null:demandsAndNotices.toBuilder();
return this;
}
@Override
@RosettaAttribute("addressesForTransfer")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setAddressesForTransfer(ContactElection addressesForTransfer) {
this.addressesForTransfer = addressesForTransfer==null?null:addressesForTransfer.toBuilder();
return this;
}
@Override
@RosettaAttribute("bespokeProvision")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setBespokeProvision(String bespokeProvision) {
this.bespokeProvision = bespokeProvision==null?null:bespokeProvision;
return this;
}
@Override
@RosettaAttribute("regime")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setRegime(Regime regime) {
this.regime = regime==null?null:regime.toBuilder();
return this;
}
@Override
@RosettaAttribute("oneWayProvisions")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setOneWayProvisions(OneWayProvisions oneWayProvisions) {
this.oneWayProvisions = oneWayProvisions==null?null:oneWayProvisions.toBuilder();
return this;
}
@Override
@RosettaAttribute("method")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setMethod(Method method) {
this.method = method==null?null:method.toBuilder();
return this;
}
@Override
@RosettaAttribute("identifiedCrossCurrencySwap")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setIdentifiedCrossCurrencySwap(Boolean identifiedCrossCurrencySwap) {
this.identifiedCrossCurrencySwap = identifiedCrossCurrencySwap==null?null:identifiedCrossCurrencySwap;
return this;
}
@Override
@RosettaAttribute("sensitivityToEquity")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setSensitivityToEquity(SensitivityMethodology sensitivityToEquity) {
this.sensitivityToEquity = sensitivityToEquity==null?null:sensitivityToEquity.toBuilder();
return this;
}
@Override
@RosettaAttribute("sensitivityToCommodity")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setSensitivityToCommodity(SensitivityMethodology sensitivityToCommodity) {
this.sensitivityToCommodity = sensitivityToCommodity==null?null:sensitivityToCommodity.toBuilder();
return this;
}
@Override
@RosettaAttribute("fxHaircutCurrency")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setFxHaircutCurrency(FxHaircutCurrency fxHaircutCurrency) {
this.fxHaircutCurrency = fxHaircutCurrency==null?null:fxHaircutCurrency.toBuilder();
return this;
}
@Override
@RosettaAttribute("creditSupportObligations")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setCreditSupportObligations(CreditSupportObligationsInitialMargin creditSupportObligations) {
this.creditSupportObligations = creditSupportObligations==null?null:creditSupportObligations.toBuilder();
return this;
}
@Override
@RosettaAttribute("calculationDateLocation")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setCalculationDateLocation(CalculationDateLocation calculationDateLocation) {
this.calculationDateLocation = calculationDateLocation==null?null:calculationDateLocation.toBuilder();
return this;
}
@Override
@RosettaAttribute("notificationTime")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setNotificationTime(NotificationTime notificationTime) {
this.notificationTime = notificationTime==null?null:notificationTime.toBuilder();
return this;
}
@Override
@RosettaAttribute("terminationCurrency")
public CsaInitialMargin2016.CsaInitialMargin2016Builder setTerminationCurrency(TerminationCurrencyAmendment terminationCurrency) {
this.terminationCurrency = terminationCurrency==null?null:terminationCurrency.toBuilder();
return this;
}
@Override
public CsaInitialMargin2016 build() {
return new CsaInitialMargin2016.CsaInitialMargin2016Impl(this);
}
@Override
public CsaInitialMargin2016.CsaInitialMargin2016Builder toBuilder() {
return this;
}
@SuppressWarnings("unchecked")
@Override
public CsaInitialMargin2016.CsaInitialMargin2016Builder prune() {
super.prune();
if (regime!=null && !regime.prune().hasData()) regime = null;
if (oneWayProvisions!=null && !oneWayProvisions.prune().hasData()) oneWayProvisions = null;
if (method!=null && !method.prune().hasData()) method = null;
if (sensitivityToEquity!=null && !sensitivityToEquity.prune().hasData()) sensitivityToEquity = null;
if (sensitivityToCommodity!=null && !sensitivityToCommodity.prune().hasData()) sensitivityToCommodity = null;
if (fxHaircutCurrency!=null && !fxHaircutCurrency.prune().hasData()) fxHaircutCurrency = null;
if (creditSupportObligations!=null && !creditSupportObligations.prune().hasData()) creditSupportObligations = null;
if (calculationDateLocation!=null && !calculationDateLocation.prune().hasData()) calculationDateLocation = null;
if (notificationTime!=null && !notificationTime.prune().hasData()) notificationTime = null;
if (terminationCurrency!=null && !terminationCurrency.prune().hasData()) terminationCurrency = null;
return this;
}
@Override
public boolean hasData() {
if (super.hasData()) return true;
if (getRegime()!=null && getRegime().hasData()) return true;
if (getOneWayProvisions()!=null && getOneWayProvisions().hasData()) return true;
if (getMethod()!=null && getMethod().hasData()) return true;
if (getIdentifiedCrossCurrencySwap()!=null) return true;
if (getSensitivityToEquity()!=null && getSensitivityToEquity().hasData()) return true;
if (getSensitivityToCommodity()!=null && getSensitivityToCommodity().hasData()) return true;
if (getFxHaircutCurrency()!=null && getFxHaircutCurrency().hasData()) return true;
if (getCreditSupportObligations()!=null && getCreditSupportObligations().hasData()) return true;
if (getCalculationDateLocation()!=null && getCalculationDateLocation().hasData()) return true;
if (getNotificationTime()!=null && getNotificationTime().hasData()) return true;
if (getTerminationCurrency()!=null && getTerminationCurrency().hasData()) return true;
return false;
}
@SuppressWarnings("unchecked")
@Override
public CsaInitialMargin2016.CsaInitialMargin2016Builder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
super.merge(other, merger);
CsaInitialMargin2016.CsaInitialMargin2016Builder o = (CsaInitialMargin2016.CsaInitialMargin2016Builder) other;
merger.mergeRosetta(getRegime(), o.getRegime(), this::setRegime);
merger.mergeRosetta(getOneWayProvisions(), o.getOneWayProvisions(), this::setOneWayProvisions);
merger.mergeRosetta(getMethod(), o.getMethod(), this::setMethod);
merger.mergeRosetta(getSensitivityToEquity(), o.getSensitivityToEquity(), this::setSensitivityToEquity);
merger.mergeRosetta(getSensitivityToCommodity(), o.getSensitivityToCommodity(), this::setSensitivityToCommodity);
merger.mergeRosetta(getFxHaircutCurrency(), o.getFxHaircutCurrency(), this::setFxHaircutCurrency);
merger.mergeRosetta(getCreditSupportObligations(), o.getCreditSupportObligations(), this::setCreditSupportObligations);
merger.mergeRosetta(getCalculationDateLocation(), o.getCalculationDateLocation(), this::setCalculationDateLocation);
merger.mergeRosetta(getNotificationTime(), o.getNotificationTime(), this::setNotificationTime);
merger.mergeRosetta(getTerminationCurrency(), o.getTerminationCurrency(), this::setTerminationCurrency);
merger.mergeBasic(getIdentifiedCrossCurrencySwap(), o.getIdentifiedCrossCurrencySwap(), this::setIdentifiedCrossCurrencySwap);
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;
if (!super.equals(o)) return false;
CsaInitialMargin2016 _that = getType().cast(o);
if (!Objects.equals(regime, _that.getRegime())) return false;
if (!Objects.equals(oneWayProvisions, _that.getOneWayProvisions())) return false;
if (!Objects.equals(method, _that.getMethod())) return false;
if (!Objects.equals(identifiedCrossCurrencySwap, _that.getIdentifiedCrossCurrencySwap())) return false;
if (!Objects.equals(sensitivityToEquity, _that.getSensitivityToEquity())) return false;
if (!Objects.equals(sensitivityToCommodity, _that.getSensitivityToCommodity())) return false;
if (!Objects.equals(fxHaircutCurrency, _that.getFxHaircutCurrency())) return false;
if (!Objects.equals(creditSupportObligations, _that.getCreditSupportObligations())) return false;
if (!Objects.equals(calculationDateLocation, _that.getCalculationDateLocation())) return false;
if (!Objects.equals(notificationTime, _that.getNotificationTime())) return false;
if (!Objects.equals(terminationCurrency, _that.getTerminationCurrency())) return false;
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (regime != null ? regime.hashCode() : 0);
_result = 31 * _result + (oneWayProvisions != null ? oneWayProvisions.hashCode() : 0);
_result = 31 * _result + (method != null ? method.hashCode() : 0);
_result = 31 * _result + (identifiedCrossCurrencySwap != null ? identifiedCrossCurrencySwap.hashCode() : 0);
_result = 31 * _result + (sensitivityToEquity != null ? sensitivityToEquity.hashCode() : 0);
_result = 31 * _result + (sensitivityToCommodity != null ? sensitivityToCommodity.hashCode() : 0);
_result = 31 * _result + (fxHaircutCurrency != null ? fxHaircutCurrency.hashCode() : 0);
_result = 31 * _result + (creditSupportObligations != null ? creditSupportObligations.hashCode() : 0);
_result = 31 * _result + (calculationDateLocation != null ? calculationDateLocation.hashCode() : 0);
_result = 31 * _result + (notificationTime != null ? notificationTime.hashCode() : 0);
_result = 31 * _result + (terminationCurrency != null ? terminationCurrency.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "CsaInitialMargin2016Builder {" +
"regime=" + this.regime + ", " +
"oneWayProvisions=" + this.oneWayProvisions + ", " +
"method=" + this.method + ", " +
"identifiedCrossCurrencySwap=" + this.identifiedCrossCurrencySwap + ", " +
"sensitivityToEquity=" + this.sensitivityToEquity + ", " +
"sensitivityToCommodity=" + this.sensitivityToCommodity + ", " +
"fxHaircutCurrency=" + this.fxHaircutCurrency + ", " +
"creditSupportObligations=" + this.creditSupportObligations + ", " +
"calculationDateLocation=" + this.calculationDateLocation + ", " +
"notificationTime=" + this.notificationTime + ", " +
"terminationCurrency=" + this.terminationCurrency +
'}' + " " + super.toString();
}
}
}