All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rosetta.jptlegalagreement.model.CsdInitialMargin2016EnglishLaw Maven / Gradle / Ivy

There is a newer version: 11.25.1
Show newest version
package com.rosetta.jptlegalagreement.model;

import com.rosetta.jptlegalagreement.model.AdditionalRepresentation;
import com.rosetta.jptlegalagreement.model.CalculationDateLocation;
import com.rosetta.jptlegalagreement.model.ChargorPostingObligations;
import com.rosetta.jptlegalagreement.model.ConditionsPrecedent;
import com.rosetta.jptlegalagreement.model.ContactElection;
import com.rosetta.jptlegalagreement.model.CreditSupportObligationsInitialMargin;
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.CsdInitialMargin2016EnglishLaw;
import com.rosetta.jptlegalagreement.model.CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder;
import com.rosetta.jptlegalagreement.model.CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilderImpl;
import com.rosetta.jptlegalagreement.model.CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawImpl;
import com.rosetta.jptlegalagreement.model.CustodyArrangements;
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.CsdInitialMargin2016EnglishLawMeta;
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="CsdInitialMargin2016EnglishLaw", builder=CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilderImpl.class, version="test")
public interface CsdInitialMargin2016EnglishLaw extends CsaInitialMargin2016 {

	CsdInitialMargin2016EnglishLawMeta metaData = new CsdInitialMargin2016EnglishLawMeta();

	/*********************** Getter Methods  ***********************/
	ChargorPostingObligations getChargorPostingObligations();
	String getTransferTiming();
	Boolean getDeliveryInLieuRight();
	CustodyArrangements getCustodyArrangements();

	/*********************** Build Methods  ***********************/
	CsdInitialMargin2016EnglishLaw build();
	
	CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder toBuilder();
	
	static CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder builder() {
		return new CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilderImpl();
	}

	/*********************** Utility Methods  ***********************/
	@Override
	default RosettaMetaData metaData() {
		return metaData;
	}
	
	@Override
	default Class getType() {
		return CsdInitialMargin2016EnglishLaw.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());
		processRosetta(path.newSubPath("chargorPostingObligations"), processor, ChargorPostingObligations.class, getChargorPostingObligations());
		processor.processBasic(path.newSubPath("transferTiming"), String.class, getTransferTiming(), this);
		processor.processBasic(path.newSubPath("deliveryInLieuRight"), Boolean.class, getDeliveryInLieuRight(), this);
		processRosetta(path.newSubPath("custodyArrangements"), processor, CustodyArrangements.class, getCustodyArrangements());
	}
	

	/*********************** Builder Interface  ***********************/
	interface CsdInitialMargin2016EnglishLawBuilder extends CsdInitialMargin2016EnglishLaw, CsaInitialMargin2016.CsaInitialMargin2016Builder {
		ChargorPostingObligations.ChargorPostingObligationsBuilder getOrCreateChargorPostingObligations();
		ChargorPostingObligations.ChargorPostingObligationsBuilder getChargorPostingObligations();
		CustodyArrangements.CustodyArrangementsBuilder getOrCreateCustodyArrangements();
		CustodyArrangements.CustodyArrangementsBuilder getCustodyArrangements();
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setBaseCurrency(FieldWithMetaString baseCurrency0);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setBaseCurrencyValue(String baseCurrency1);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setAdditionalObligations(String additionalObligations);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setConditionsPrecedent(ConditionsPrecedent conditionsPrecedent);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setSubstitution(Substitution substitution);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setDisputeResolution(DisputeResolution disputeResolution);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setAdditionalRepresentation(AdditionalRepresentation additionalRepresentation);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setDemandsAndNotices(ContactElection demandsAndNotices);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setAddressesForTransfer(ContactElection addressesForTransfer);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setBespokeProvision(String bespokeProvision);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setRegime(Regime regime);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setOneWayProvisions(OneWayProvisions oneWayProvisions);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setMethod(Method method);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setIdentifiedCrossCurrencySwap(Boolean identifiedCrossCurrencySwap);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setSensitivityToEquity(SensitivityMethodology sensitivityToEquity);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setSensitivityToCommodity(SensitivityMethodology sensitivityToCommodity);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setFxHaircutCurrency(FxHaircutCurrency fxHaircutCurrency);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setCreditSupportObligations(CreditSupportObligationsInitialMargin creditSupportObligations);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setCalculationDateLocation(CalculationDateLocation calculationDateLocation);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setNotificationTime(NotificationTime notificationTime);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setTerminationCurrency(TerminationCurrencyAmendment terminationCurrency);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setChargorPostingObligations(ChargorPostingObligations chargorPostingObligations);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setTransferTiming(String transferTiming);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setDeliveryInLieuRight(Boolean deliveryInLieuRight);
		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setCustodyArrangements(CustodyArrangements custodyArrangements);

		@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());
			processRosetta(path.newSubPath("chargorPostingObligations"), processor, ChargorPostingObligations.ChargorPostingObligationsBuilder.class, getChargorPostingObligations());
			processor.processBasic(path.newSubPath("transferTiming"), String.class, getTransferTiming(), this);
			processor.processBasic(path.newSubPath("deliveryInLieuRight"), Boolean.class, getDeliveryInLieuRight(), this);
			processRosetta(path.newSubPath("custodyArrangements"), processor, CustodyArrangements.CustodyArrangementsBuilder.class, getCustodyArrangements());
		}
		

		CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder prune();
	}

	/*********************** Immutable Implementation of CsdInitialMargin2016EnglishLaw  ***********************/
	class CsdInitialMargin2016EnglishLawImpl extends CsaInitialMargin2016.CsaInitialMargin2016Impl implements CsdInitialMargin2016EnglishLaw {
		private final ChargorPostingObligations chargorPostingObligations;
		private final String transferTiming;
		private final Boolean deliveryInLieuRight;
		private final CustodyArrangements custodyArrangements;
		
		protected CsdInitialMargin2016EnglishLawImpl(CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder builder) {
			super(builder);
			this.chargorPostingObligations = ofNullable(builder.getChargorPostingObligations()).map(f->f.build()).orElse(null);
			this.transferTiming = builder.getTransferTiming();
			this.deliveryInLieuRight = builder.getDeliveryInLieuRight();
			this.custodyArrangements = ofNullable(builder.getCustodyArrangements()).map(f->f.build()).orElse(null);
		}
		
		@Override
		@RosettaAttribute("chargorPostingObligations")
		public ChargorPostingObligations getChargorPostingObligations() {
			return chargorPostingObligations;
		}
		
		@Override
		@RosettaAttribute("transferTiming")
		public String getTransferTiming() {
			return transferTiming;
		}
		
		@Override
		@RosettaAttribute("deliveryInLieuRight")
		public Boolean getDeliveryInLieuRight() {
			return deliveryInLieuRight;
		}
		
		@Override
		@RosettaAttribute("custodyArrangements")
		public CustodyArrangements getCustodyArrangements() {
			return custodyArrangements;
		}
		
		@Override
		public CsdInitialMargin2016EnglishLaw build() {
			return this;
		}
		
		@Override
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder toBuilder() {
			CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder builder = builder();
			setBuilderFields(builder);
			return builder;
		}
		
		protected void setBuilderFields(CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder builder) {
			super.setBuilderFields(builder);
			ofNullable(getChargorPostingObligations()).ifPresent(builder::setChargorPostingObligations);
			ofNullable(getTransferTiming()).ifPresent(builder::setTransferTiming);
			ofNullable(getDeliveryInLieuRight()).ifPresent(builder::setDeliveryInLieuRight);
			ofNullable(getCustodyArrangements()).ifPresent(builder::setCustodyArrangements);
		}

		@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;
		
			CsdInitialMargin2016EnglishLaw _that = getType().cast(o);
		
			if (!Objects.equals(chargorPostingObligations, _that.getChargorPostingObligations())) return false;
			if (!Objects.equals(transferTiming, _that.getTransferTiming())) return false;
			if (!Objects.equals(deliveryInLieuRight, _that.getDeliveryInLieuRight())) return false;
			if (!Objects.equals(custodyArrangements, _that.getCustodyArrangements())) return false;
			return true;
		}
		
		@Override
		public int hashCode() {
			int _result = super.hashCode();
			_result = 31 * _result + (chargorPostingObligations != null ? chargorPostingObligations.hashCode() : 0);
			_result = 31 * _result + (transferTiming != null ? transferTiming.hashCode() : 0);
			_result = 31 * _result + (deliveryInLieuRight != null ? deliveryInLieuRight.hashCode() : 0);
			_result = 31 * _result + (custodyArrangements != null ? custodyArrangements.hashCode() : 0);
			return _result;
		}
		
		@Override
		public String toString() {
			return "CsdInitialMargin2016EnglishLaw {" +
				"chargorPostingObligations=" + this.chargorPostingObligations + ", " +
				"transferTiming=" + this.transferTiming + ", " +
				"deliveryInLieuRight=" + this.deliveryInLieuRight + ", " +
				"custodyArrangements=" + this.custodyArrangements +
			'}' + " " + super.toString();
		}
	}

	/*********************** Builder Implementation of CsdInitialMargin2016EnglishLaw  ***********************/
	class CsdInitialMargin2016EnglishLawBuilderImpl extends CsaInitialMargin2016.CsaInitialMargin2016BuilderImpl  implements CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder {
	
		protected ChargorPostingObligations.ChargorPostingObligationsBuilder chargorPostingObligations;
		protected String transferTiming;
		protected Boolean deliveryInLieuRight;
		protected CustodyArrangements.CustodyArrangementsBuilder custodyArrangements;
	
		public CsdInitialMargin2016EnglishLawBuilderImpl() {
		}
	
		@Override
		@RosettaAttribute("chargorPostingObligations")
		public ChargorPostingObligations.ChargorPostingObligationsBuilder getChargorPostingObligations() {
			return chargorPostingObligations;
		}
		
		@Override
		public ChargorPostingObligations.ChargorPostingObligationsBuilder getOrCreateChargorPostingObligations() {
			ChargorPostingObligations.ChargorPostingObligationsBuilder result;
			if (chargorPostingObligations!=null) {
				result = chargorPostingObligations;
			}
			else {
				result = chargorPostingObligations = ChargorPostingObligations.builder();
			}
			
			return result;
		}
		
		@Override
		@RosettaAttribute("transferTiming")
		public String getTransferTiming() {
			return transferTiming;
		}
		
		@Override
		@RosettaAttribute("deliveryInLieuRight")
		public Boolean getDeliveryInLieuRight() {
			return deliveryInLieuRight;
		}
		
		@Override
		@RosettaAttribute("custodyArrangements")
		public CustodyArrangements.CustodyArrangementsBuilder getCustodyArrangements() {
			return custodyArrangements;
		}
		
		@Override
		public CustodyArrangements.CustodyArrangementsBuilder getOrCreateCustodyArrangements() {
			CustodyArrangements.CustodyArrangementsBuilder result;
			if (custodyArrangements!=null) {
				result = custodyArrangements;
			}
			else {
				result = custodyArrangements = CustodyArrangements.builder();
			}
			
			return result;
		}
		
		@Override
		@RosettaAttribute("baseCurrency")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setBaseCurrency(FieldWithMetaString baseCurrency) {
			this.baseCurrency = baseCurrency==null?null:baseCurrency.toBuilder();
			return this;
		}
		@Override
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setBaseCurrencyValue(String baseCurrency) {
			this.getOrCreateBaseCurrency().setValue(baseCurrency);
			return this;
		}
		@Override
		@RosettaAttribute("additionalObligations")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setAdditionalObligations(String additionalObligations) {
			this.additionalObligations = additionalObligations==null?null:additionalObligations;
			return this;
		}
		@Override
		@RosettaAttribute("conditionsPrecedent")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setConditionsPrecedent(ConditionsPrecedent conditionsPrecedent) {
			this.conditionsPrecedent = conditionsPrecedent==null?null:conditionsPrecedent.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("substitution")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setSubstitution(Substitution substitution) {
			this.substitution = substitution==null?null:substitution.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("disputeResolution")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setDisputeResolution(DisputeResolution disputeResolution) {
			this.disputeResolution = disputeResolution==null?null:disputeResolution.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("additionalRepresentation")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setAdditionalRepresentation(AdditionalRepresentation additionalRepresentation) {
			this.additionalRepresentation = additionalRepresentation==null?null:additionalRepresentation.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("demandsAndNotices")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setDemandsAndNotices(ContactElection demandsAndNotices) {
			this.demandsAndNotices = demandsAndNotices==null?null:demandsAndNotices.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("addressesForTransfer")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setAddressesForTransfer(ContactElection addressesForTransfer) {
			this.addressesForTransfer = addressesForTransfer==null?null:addressesForTransfer.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("bespokeProvision")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setBespokeProvision(String bespokeProvision) {
			this.bespokeProvision = bespokeProvision==null?null:bespokeProvision;
			return this;
		}
		@Override
		@RosettaAttribute("regime")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setRegime(Regime regime) {
			this.regime = regime==null?null:regime.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("oneWayProvisions")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setOneWayProvisions(OneWayProvisions oneWayProvisions) {
			this.oneWayProvisions = oneWayProvisions==null?null:oneWayProvisions.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("method")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setMethod(Method method) {
			this.method = method==null?null:method.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("identifiedCrossCurrencySwap")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setIdentifiedCrossCurrencySwap(Boolean identifiedCrossCurrencySwap) {
			this.identifiedCrossCurrencySwap = identifiedCrossCurrencySwap==null?null:identifiedCrossCurrencySwap;
			return this;
		}
		@Override
		@RosettaAttribute("sensitivityToEquity")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setSensitivityToEquity(SensitivityMethodology sensitivityToEquity) {
			this.sensitivityToEquity = sensitivityToEquity==null?null:sensitivityToEquity.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("sensitivityToCommodity")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setSensitivityToCommodity(SensitivityMethodology sensitivityToCommodity) {
			this.sensitivityToCommodity = sensitivityToCommodity==null?null:sensitivityToCommodity.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("fxHaircutCurrency")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setFxHaircutCurrency(FxHaircutCurrency fxHaircutCurrency) {
			this.fxHaircutCurrency = fxHaircutCurrency==null?null:fxHaircutCurrency.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("creditSupportObligations")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setCreditSupportObligations(CreditSupportObligationsInitialMargin creditSupportObligations) {
			this.creditSupportObligations = creditSupportObligations==null?null:creditSupportObligations.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("calculationDateLocation")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setCalculationDateLocation(CalculationDateLocation calculationDateLocation) {
			this.calculationDateLocation = calculationDateLocation==null?null:calculationDateLocation.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("notificationTime")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setNotificationTime(NotificationTime notificationTime) {
			this.notificationTime = notificationTime==null?null:notificationTime.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("terminationCurrency")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setTerminationCurrency(TerminationCurrencyAmendment terminationCurrency) {
			this.terminationCurrency = terminationCurrency==null?null:terminationCurrency.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("chargorPostingObligations")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setChargorPostingObligations(ChargorPostingObligations chargorPostingObligations) {
			this.chargorPostingObligations = chargorPostingObligations==null?null:chargorPostingObligations.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("transferTiming")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setTransferTiming(String transferTiming) {
			this.transferTiming = transferTiming==null?null:transferTiming;
			return this;
		}
		@Override
		@RosettaAttribute("deliveryInLieuRight")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setDeliveryInLieuRight(Boolean deliveryInLieuRight) {
			this.deliveryInLieuRight = deliveryInLieuRight==null?null:deliveryInLieuRight;
			return this;
		}
		@Override
		@RosettaAttribute("custodyArrangements")
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder setCustodyArrangements(CustodyArrangements custodyArrangements) {
			this.custodyArrangements = custodyArrangements==null?null:custodyArrangements.toBuilder();
			return this;
		}
		
		@Override
		public CsdInitialMargin2016EnglishLaw build() {
			return new CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawImpl(this);
		}
		
		@Override
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder toBuilder() {
			return this;
		}
	
		@SuppressWarnings("unchecked")
		@Override
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder prune() {
			super.prune();
			if (chargorPostingObligations!=null && !chargorPostingObligations.prune().hasData()) chargorPostingObligations = null;
			if (custodyArrangements!=null && !custodyArrangements.prune().hasData()) custodyArrangements = null;
			return this;
		}
		
		@Override
		public boolean hasData() {
			if (super.hasData()) return true;
			if (getChargorPostingObligations()!=null && getChargorPostingObligations().hasData()) return true;
			if (getTransferTiming()!=null) return true;
			if (getDeliveryInLieuRight()!=null) return true;
			if (getCustodyArrangements()!=null && getCustodyArrangements().hasData()) return true;
			return false;
		}
	
		@SuppressWarnings("unchecked")
		@Override
		public CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
			super.merge(other, merger);
			
			CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder o = (CsdInitialMargin2016EnglishLaw.CsdInitialMargin2016EnglishLawBuilder) other;
			
			merger.mergeRosetta(getChargorPostingObligations(), o.getChargorPostingObligations(), this::setChargorPostingObligations);
			merger.mergeRosetta(getCustodyArrangements(), o.getCustodyArrangements(), this::setCustodyArrangements);
			
			merger.mergeBasic(getTransferTiming(), o.getTransferTiming(), this::setTransferTiming);
			merger.mergeBasic(getDeliveryInLieuRight(), o.getDeliveryInLieuRight(), this::setDeliveryInLieuRight);
			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;
		
			CsdInitialMargin2016EnglishLaw _that = getType().cast(o);
		
			if (!Objects.equals(chargorPostingObligations, _that.getChargorPostingObligations())) return false;
			if (!Objects.equals(transferTiming, _that.getTransferTiming())) return false;
			if (!Objects.equals(deliveryInLieuRight, _that.getDeliveryInLieuRight())) return false;
			if (!Objects.equals(custodyArrangements, _that.getCustodyArrangements())) return false;
			return true;
		}
		
		@Override
		public int hashCode() {
			int _result = super.hashCode();
			_result = 31 * _result + (chargorPostingObligations != null ? chargorPostingObligations.hashCode() : 0);
			_result = 31 * _result + (transferTiming != null ? transferTiming.hashCode() : 0);
			_result = 31 * _result + (deliveryInLieuRight != null ? deliveryInLieuRight.hashCode() : 0);
			_result = 31 * _result + (custodyArrangements != null ? custodyArrangements.hashCode() : 0);
			return _result;
		}
		
		@Override
		public String toString() {
			return "CsdInitialMargin2016EnglishLawBuilder {" +
				"chargorPostingObligations=" + this.chargorPostingObligations + ", " +
				"transferTiming=" + this.transferTiming + ", " +
				"deliveryInLieuRight=" + this.deliveryInLieuRight + ", " +
				"custodyArrangements=" + this.custodyArrangements +
			'}' + " " + super.toString();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy