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

com.rosetta.jptlegalagreement.model.CsaInitialMargin2016NewYorkLaw 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.AdditionalRightsEvent;
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.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.CsaInitialMargin2016NewYorkLaw;
import com.rosetta.jptlegalagreement.model.CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder;
import com.rosetta.jptlegalagreement.model.CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilderImpl;
import com.rosetta.jptlegalagreement.model.CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawImpl;
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.RightsEvent;
import com.rosetta.jptlegalagreement.model.SensitivityMethodology;
import com.rosetta.jptlegalagreement.model.Substitution;
import com.rosetta.jptlegalagreement.model.TerminationCurrencyAmendment;
import com.rosetta.jptlegalagreement.model.meta.CsaInitialMargin2016NewYorkLawMeta;
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="CsaInitialMargin2016NewYorkLaw", builder=CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilderImpl.class, version="test")
public interface CsaInitialMargin2016NewYorkLaw extends CsaInitialMargin2016 {

	CsaInitialMargin2016NewYorkLawMeta metaData = new CsaInitialMargin2016NewYorkLawMeta();

	/*********************** Getter Methods  ***********************/
	String getOtherEligibleSupport();
	String getTransferTiming();
	RightsEvent getPledgorRightsEvent();
	AdditionalRightsEvent getPledgorAdditionalRightsEvent();
	Boolean getDeliveryInLieuRight();
	Boolean getJapaneseSecuritiesProvisions();

	/*********************** Build Methods  ***********************/
	CsaInitialMargin2016NewYorkLaw build();
	
	CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder toBuilder();
	
	static CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder builder() {
		return new CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilderImpl();
	}

	/*********************** Utility Methods  ***********************/
	@Override
	default RosettaMetaData metaData() {
		return metaData;
	}
	
	@Override
	default Class getType() {
		return CsaInitialMargin2016NewYorkLaw.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());
		processor.processBasic(path.newSubPath("otherEligibleSupport"), String.class, getOtherEligibleSupport(), this);
		processor.processBasic(path.newSubPath("transferTiming"), String.class, getTransferTiming(), this);
		processRosetta(path.newSubPath("pledgorRightsEvent"), processor, RightsEvent.class, getPledgorRightsEvent());
		processRosetta(path.newSubPath("pledgorAdditionalRightsEvent"), processor, AdditionalRightsEvent.class, getPledgorAdditionalRightsEvent());
		processor.processBasic(path.newSubPath("deliveryInLieuRight"), Boolean.class, getDeliveryInLieuRight(), this);
		processor.processBasic(path.newSubPath("japaneseSecuritiesProvisions"), Boolean.class, getJapaneseSecuritiesProvisions(), this);
	}
	

	/*********************** Builder Interface  ***********************/
	interface CsaInitialMargin2016NewYorkLawBuilder extends CsaInitialMargin2016NewYorkLaw, CsaInitialMargin2016.CsaInitialMargin2016Builder {
		RightsEvent.RightsEventBuilder getOrCreatePledgorRightsEvent();
		RightsEvent.RightsEventBuilder getPledgorRightsEvent();
		AdditionalRightsEvent.AdditionalRightsEventBuilder getOrCreatePledgorAdditionalRightsEvent();
		AdditionalRightsEvent.AdditionalRightsEventBuilder getPledgorAdditionalRightsEvent();
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBaseCurrency(FieldWithMetaString baseCurrency0);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBaseCurrencyValue(String baseCurrency1);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAdditionalObligations(String additionalObligations);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setConditionsPrecedent(ConditionsPrecedent conditionsPrecedent);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSubstitution(Substitution substitution);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDisputeResolution(DisputeResolution disputeResolution);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAdditionalRepresentation(AdditionalRepresentation additionalRepresentation);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDemandsAndNotices(ContactElection demandsAndNotices);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAddressesForTransfer(ContactElection addressesForTransfer);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBespokeProvision(String bespokeProvision);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setRegime(Regime regime);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setOneWayProvisions(OneWayProvisions oneWayProvisions);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setMethod(Method method);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setIdentifiedCrossCurrencySwap(Boolean identifiedCrossCurrencySwap);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSensitivityToEquity(SensitivityMethodology sensitivityToEquity);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSensitivityToCommodity(SensitivityMethodology sensitivityToCommodity);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setFxHaircutCurrency(FxHaircutCurrency fxHaircutCurrency);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setCreditSupportObligations(CreditSupportObligationsInitialMargin creditSupportObligations);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setCalculationDateLocation(CalculationDateLocation calculationDateLocation);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setNotificationTime(NotificationTime notificationTime);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setTerminationCurrency(TerminationCurrencyAmendment terminationCurrency);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setOtherEligibleSupport(String otherEligibleSupport);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setTransferTiming(String transferTiming);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setPledgorRightsEvent(RightsEvent pledgorRightsEvent);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setPledgorAdditionalRightsEvent(AdditionalRightsEvent pledgorAdditionalRightsEvent);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDeliveryInLieuRight(Boolean deliveryInLieuRight);
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setJapaneseSecuritiesProvisions(Boolean japaneseSecuritiesProvisions);

		@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());
			processor.processBasic(path.newSubPath("otherEligibleSupport"), String.class, getOtherEligibleSupport(), this);
			processor.processBasic(path.newSubPath("transferTiming"), String.class, getTransferTiming(), this);
			processRosetta(path.newSubPath("pledgorRightsEvent"), processor, RightsEvent.RightsEventBuilder.class, getPledgorRightsEvent());
			processRosetta(path.newSubPath("pledgorAdditionalRightsEvent"), processor, AdditionalRightsEvent.AdditionalRightsEventBuilder.class, getPledgorAdditionalRightsEvent());
			processor.processBasic(path.newSubPath("deliveryInLieuRight"), Boolean.class, getDeliveryInLieuRight(), this);
			processor.processBasic(path.newSubPath("japaneseSecuritiesProvisions"), Boolean.class, getJapaneseSecuritiesProvisions(), this);
		}
		

		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder prune();
	}

	/*********************** Immutable Implementation of CsaInitialMargin2016NewYorkLaw  ***********************/
	class CsaInitialMargin2016NewYorkLawImpl extends CsaInitialMargin2016.CsaInitialMargin2016Impl implements CsaInitialMargin2016NewYorkLaw {
		private final String otherEligibleSupport;
		private final String transferTiming;
		private final RightsEvent pledgorRightsEvent;
		private final AdditionalRightsEvent pledgorAdditionalRightsEvent;
		private final Boolean deliveryInLieuRight;
		private final Boolean japaneseSecuritiesProvisions;
		
		protected CsaInitialMargin2016NewYorkLawImpl(CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder builder) {
			super(builder);
			this.otherEligibleSupport = builder.getOtherEligibleSupport();
			this.transferTiming = builder.getTransferTiming();
			this.pledgorRightsEvent = ofNullable(builder.getPledgorRightsEvent()).map(f->f.build()).orElse(null);
			this.pledgorAdditionalRightsEvent = ofNullable(builder.getPledgorAdditionalRightsEvent()).map(f->f.build()).orElse(null);
			this.deliveryInLieuRight = builder.getDeliveryInLieuRight();
			this.japaneseSecuritiesProvisions = builder.getJapaneseSecuritiesProvisions();
		}
		
		@Override
		@RosettaAttribute("otherEligibleSupport")
		public String getOtherEligibleSupport() {
			return otherEligibleSupport;
		}
		
		@Override
		@RosettaAttribute("transferTiming")
		public String getTransferTiming() {
			return transferTiming;
		}
		
		@Override
		@RosettaAttribute("pledgorRightsEvent")
		public RightsEvent getPledgorRightsEvent() {
			return pledgorRightsEvent;
		}
		
		@Override
		@RosettaAttribute("pledgorAdditionalRightsEvent")
		public AdditionalRightsEvent getPledgorAdditionalRightsEvent() {
			return pledgorAdditionalRightsEvent;
		}
		
		@Override
		@RosettaAttribute("deliveryInLieuRight")
		public Boolean getDeliveryInLieuRight() {
			return deliveryInLieuRight;
		}
		
		@Override
		@RosettaAttribute("japaneseSecuritiesProvisions")
		public Boolean getJapaneseSecuritiesProvisions() {
			return japaneseSecuritiesProvisions;
		}
		
		@Override
		public CsaInitialMargin2016NewYorkLaw build() {
			return this;
		}
		
		@Override
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder toBuilder() {
			CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder builder = builder();
			setBuilderFields(builder);
			return builder;
		}
		
		protected void setBuilderFields(CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder builder) {
			super.setBuilderFields(builder);
			ofNullable(getOtherEligibleSupport()).ifPresent(builder::setOtherEligibleSupport);
			ofNullable(getTransferTiming()).ifPresent(builder::setTransferTiming);
			ofNullable(getPledgorRightsEvent()).ifPresent(builder::setPledgorRightsEvent);
			ofNullable(getPledgorAdditionalRightsEvent()).ifPresent(builder::setPledgorAdditionalRightsEvent);
			ofNullable(getDeliveryInLieuRight()).ifPresent(builder::setDeliveryInLieuRight);
			ofNullable(getJapaneseSecuritiesProvisions()).ifPresent(builder::setJapaneseSecuritiesProvisions);
		}

		@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;
		
			CsaInitialMargin2016NewYorkLaw _that = getType().cast(o);
		
			if (!Objects.equals(otherEligibleSupport, _that.getOtherEligibleSupport())) return false;
			if (!Objects.equals(transferTiming, _that.getTransferTiming())) return false;
			if (!Objects.equals(pledgorRightsEvent, _that.getPledgorRightsEvent())) return false;
			if (!Objects.equals(pledgorAdditionalRightsEvent, _that.getPledgorAdditionalRightsEvent())) return false;
			if (!Objects.equals(deliveryInLieuRight, _that.getDeliveryInLieuRight())) return false;
			if (!Objects.equals(japaneseSecuritiesProvisions, _that.getJapaneseSecuritiesProvisions())) return false;
			return true;
		}
		
		@Override
		public int hashCode() {
			int _result = super.hashCode();
			_result = 31 * _result + (otherEligibleSupport != null ? otherEligibleSupport.hashCode() : 0);
			_result = 31 * _result + (transferTiming != null ? transferTiming.hashCode() : 0);
			_result = 31 * _result + (pledgorRightsEvent != null ? pledgorRightsEvent.hashCode() : 0);
			_result = 31 * _result + (pledgorAdditionalRightsEvent != null ? pledgorAdditionalRightsEvent.hashCode() : 0);
			_result = 31 * _result + (deliveryInLieuRight != null ? deliveryInLieuRight.hashCode() : 0);
			_result = 31 * _result + (japaneseSecuritiesProvisions != null ? japaneseSecuritiesProvisions.hashCode() : 0);
			return _result;
		}
		
		@Override
		public String toString() {
			return "CsaInitialMargin2016NewYorkLaw {" +
				"otherEligibleSupport=" + this.otherEligibleSupport + ", " +
				"transferTiming=" + this.transferTiming + ", " +
				"pledgorRightsEvent=" + this.pledgorRightsEvent + ", " +
				"pledgorAdditionalRightsEvent=" + this.pledgorAdditionalRightsEvent + ", " +
				"deliveryInLieuRight=" + this.deliveryInLieuRight + ", " +
				"japaneseSecuritiesProvisions=" + this.japaneseSecuritiesProvisions +
			'}' + " " + super.toString();
		}
	}

	/*********************** Builder Implementation of CsaInitialMargin2016NewYorkLaw  ***********************/
	class CsaInitialMargin2016NewYorkLawBuilderImpl extends CsaInitialMargin2016.CsaInitialMargin2016BuilderImpl  implements CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder {
	
		protected String otherEligibleSupport;
		protected String transferTiming;
		protected RightsEvent.RightsEventBuilder pledgorRightsEvent;
		protected AdditionalRightsEvent.AdditionalRightsEventBuilder pledgorAdditionalRightsEvent;
		protected Boolean deliveryInLieuRight;
		protected Boolean japaneseSecuritiesProvisions;
	
		public CsaInitialMargin2016NewYorkLawBuilderImpl() {
		}
	
		@Override
		@RosettaAttribute("otherEligibleSupport")
		public String getOtherEligibleSupport() {
			return otherEligibleSupport;
		}
		
		@Override
		@RosettaAttribute("transferTiming")
		public String getTransferTiming() {
			return transferTiming;
		}
		
		@Override
		@RosettaAttribute("pledgorRightsEvent")
		public RightsEvent.RightsEventBuilder getPledgorRightsEvent() {
			return pledgorRightsEvent;
		}
		
		@Override
		public RightsEvent.RightsEventBuilder getOrCreatePledgorRightsEvent() {
			RightsEvent.RightsEventBuilder result;
			if (pledgorRightsEvent!=null) {
				result = pledgorRightsEvent;
			}
			else {
				result = pledgorRightsEvent = RightsEvent.builder();
			}
			
			return result;
		}
		
		@Override
		@RosettaAttribute("pledgorAdditionalRightsEvent")
		public AdditionalRightsEvent.AdditionalRightsEventBuilder getPledgorAdditionalRightsEvent() {
			return pledgorAdditionalRightsEvent;
		}
		
		@Override
		public AdditionalRightsEvent.AdditionalRightsEventBuilder getOrCreatePledgorAdditionalRightsEvent() {
			AdditionalRightsEvent.AdditionalRightsEventBuilder result;
			if (pledgorAdditionalRightsEvent!=null) {
				result = pledgorAdditionalRightsEvent;
			}
			else {
				result = pledgorAdditionalRightsEvent = AdditionalRightsEvent.builder();
			}
			
			return result;
		}
		
		@Override
		@RosettaAttribute("deliveryInLieuRight")
		public Boolean getDeliveryInLieuRight() {
			return deliveryInLieuRight;
		}
		
		@Override
		@RosettaAttribute("japaneseSecuritiesProvisions")
		public Boolean getJapaneseSecuritiesProvisions() {
			return japaneseSecuritiesProvisions;
		}
		
		@Override
		@RosettaAttribute("baseCurrency")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBaseCurrency(FieldWithMetaString baseCurrency) {
			this.baseCurrency = baseCurrency==null?null:baseCurrency.toBuilder();
			return this;
		}
		@Override
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBaseCurrencyValue(String baseCurrency) {
			this.getOrCreateBaseCurrency().setValue(baseCurrency);
			return this;
		}
		@Override
		@RosettaAttribute("additionalObligations")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAdditionalObligations(String additionalObligations) {
			this.additionalObligations = additionalObligations==null?null:additionalObligations;
			return this;
		}
		@Override
		@RosettaAttribute("conditionsPrecedent")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setConditionsPrecedent(ConditionsPrecedent conditionsPrecedent) {
			this.conditionsPrecedent = conditionsPrecedent==null?null:conditionsPrecedent.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("substitution")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSubstitution(Substitution substitution) {
			this.substitution = substitution==null?null:substitution.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("disputeResolution")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDisputeResolution(DisputeResolution disputeResolution) {
			this.disputeResolution = disputeResolution==null?null:disputeResolution.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("additionalRepresentation")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAdditionalRepresentation(AdditionalRepresentation additionalRepresentation) {
			this.additionalRepresentation = additionalRepresentation==null?null:additionalRepresentation.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("demandsAndNotices")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDemandsAndNotices(ContactElection demandsAndNotices) {
			this.demandsAndNotices = demandsAndNotices==null?null:demandsAndNotices.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("addressesForTransfer")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAddressesForTransfer(ContactElection addressesForTransfer) {
			this.addressesForTransfer = addressesForTransfer==null?null:addressesForTransfer.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("bespokeProvision")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBespokeProvision(String bespokeProvision) {
			this.bespokeProvision = bespokeProvision==null?null:bespokeProvision;
			return this;
		}
		@Override
		@RosettaAttribute("regime")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setRegime(Regime regime) {
			this.regime = regime==null?null:regime.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("oneWayProvisions")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setOneWayProvisions(OneWayProvisions oneWayProvisions) {
			this.oneWayProvisions = oneWayProvisions==null?null:oneWayProvisions.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("method")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setMethod(Method method) {
			this.method = method==null?null:method.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("identifiedCrossCurrencySwap")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setIdentifiedCrossCurrencySwap(Boolean identifiedCrossCurrencySwap) {
			this.identifiedCrossCurrencySwap = identifiedCrossCurrencySwap==null?null:identifiedCrossCurrencySwap;
			return this;
		}
		@Override
		@RosettaAttribute("sensitivityToEquity")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSensitivityToEquity(SensitivityMethodology sensitivityToEquity) {
			this.sensitivityToEquity = sensitivityToEquity==null?null:sensitivityToEquity.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("sensitivityToCommodity")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSensitivityToCommodity(SensitivityMethodology sensitivityToCommodity) {
			this.sensitivityToCommodity = sensitivityToCommodity==null?null:sensitivityToCommodity.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("fxHaircutCurrency")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setFxHaircutCurrency(FxHaircutCurrency fxHaircutCurrency) {
			this.fxHaircutCurrency = fxHaircutCurrency==null?null:fxHaircutCurrency.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("creditSupportObligations")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setCreditSupportObligations(CreditSupportObligationsInitialMargin creditSupportObligations) {
			this.creditSupportObligations = creditSupportObligations==null?null:creditSupportObligations.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("calculationDateLocation")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setCalculationDateLocation(CalculationDateLocation calculationDateLocation) {
			this.calculationDateLocation = calculationDateLocation==null?null:calculationDateLocation.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("notificationTime")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setNotificationTime(NotificationTime notificationTime) {
			this.notificationTime = notificationTime==null?null:notificationTime.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("terminationCurrency")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setTerminationCurrency(TerminationCurrencyAmendment terminationCurrency) {
			this.terminationCurrency = terminationCurrency==null?null:terminationCurrency.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("otherEligibleSupport")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setOtherEligibleSupport(String otherEligibleSupport) {
			this.otherEligibleSupport = otherEligibleSupport==null?null:otherEligibleSupport;
			return this;
		}
		@Override
		@RosettaAttribute("transferTiming")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setTransferTiming(String transferTiming) {
			this.transferTiming = transferTiming==null?null:transferTiming;
			return this;
		}
		@Override
		@RosettaAttribute("pledgorRightsEvent")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setPledgorRightsEvent(RightsEvent pledgorRightsEvent) {
			this.pledgorRightsEvent = pledgorRightsEvent==null?null:pledgorRightsEvent.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("pledgorAdditionalRightsEvent")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setPledgorAdditionalRightsEvent(AdditionalRightsEvent pledgorAdditionalRightsEvent) {
			this.pledgorAdditionalRightsEvent = pledgorAdditionalRightsEvent==null?null:pledgorAdditionalRightsEvent.toBuilder();
			return this;
		}
		@Override
		@RosettaAttribute("deliveryInLieuRight")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDeliveryInLieuRight(Boolean deliveryInLieuRight) {
			this.deliveryInLieuRight = deliveryInLieuRight==null?null:deliveryInLieuRight;
			return this;
		}
		@Override
		@RosettaAttribute("japaneseSecuritiesProvisions")
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setJapaneseSecuritiesProvisions(Boolean japaneseSecuritiesProvisions) {
			this.japaneseSecuritiesProvisions = japaneseSecuritiesProvisions==null?null:japaneseSecuritiesProvisions;
			return this;
		}
		
		@Override
		public CsaInitialMargin2016NewYorkLaw build() {
			return new CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawImpl(this);
		}
		
		@Override
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder toBuilder() {
			return this;
		}
	
		@SuppressWarnings("unchecked")
		@Override
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder prune() {
			super.prune();
			if (pledgorRightsEvent!=null && !pledgorRightsEvent.prune().hasData()) pledgorRightsEvent = null;
			if (pledgorAdditionalRightsEvent!=null && !pledgorAdditionalRightsEvent.prune().hasData()) pledgorAdditionalRightsEvent = null;
			return this;
		}
		
		@Override
		public boolean hasData() {
			if (super.hasData()) return true;
			if (getOtherEligibleSupport()!=null) return true;
			if (getTransferTiming()!=null) return true;
			if (getPledgorRightsEvent()!=null && getPledgorRightsEvent().hasData()) return true;
			if (getPledgorAdditionalRightsEvent()!=null && getPledgorAdditionalRightsEvent().hasData()) return true;
			if (getDeliveryInLieuRight()!=null) return true;
			if (getJapaneseSecuritiesProvisions()!=null) return true;
			return false;
		}
	
		@SuppressWarnings("unchecked")
		@Override
		public CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
			super.merge(other, merger);
			
			CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder o = (CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder) other;
			
			merger.mergeRosetta(getPledgorRightsEvent(), o.getPledgorRightsEvent(), this::setPledgorRightsEvent);
			merger.mergeRosetta(getPledgorAdditionalRightsEvent(), o.getPledgorAdditionalRightsEvent(), this::setPledgorAdditionalRightsEvent);
			
			merger.mergeBasic(getOtherEligibleSupport(), o.getOtherEligibleSupport(), this::setOtherEligibleSupport);
			merger.mergeBasic(getTransferTiming(), o.getTransferTiming(), this::setTransferTiming);
			merger.mergeBasic(getDeliveryInLieuRight(), o.getDeliveryInLieuRight(), this::setDeliveryInLieuRight);
			merger.mergeBasic(getJapaneseSecuritiesProvisions(), o.getJapaneseSecuritiesProvisions(), this::setJapaneseSecuritiesProvisions);
			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;
		
			CsaInitialMargin2016NewYorkLaw _that = getType().cast(o);
		
			if (!Objects.equals(otherEligibleSupport, _that.getOtherEligibleSupport())) return false;
			if (!Objects.equals(transferTiming, _that.getTransferTiming())) return false;
			if (!Objects.equals(pledgorRightsEvent, _that.getPledgorRightsEvent())) return false;
			if (!Objects.equals(pledgorAdditionalRightsEvent, _that.getPledgorAdditionalRightsEvent())) return false;
			if (!Objects.equals(deliveryInLieuRight, _that.getDeliveryInLieuRight())) return false;
			if (!Objects.equals(japaneseSecuritiesProvisions, _that.getJapaneseSecuritiesProvisions())) return false;
			return true;
		}
		
		@Override
		public int hashCode() {
			int _result = super.hashCode();
			_result = 31 * _result + (otherEligibleSupport != null ? otherEligibleSupport.hashCode() : 0);
			_result = 31 * _result + (transferTiming != null ? transferTiming.hashCode() : 0);
			_result = 31 * _result + (pledgorRightsEvent != null ? pledgorRightsEvent.hashCode() : 0);
			_result = 31 * _result + (pledgorAdditionalRightsEvent != null ? pledgorAdditionalRightsEvent.hashCode() : 0);
			_result = 31 * _result + (deliveryInLieuRight != null ? deliveryInLieuRight.hashCode() : 0);
			_result = 31 * _result + (japaneseSecuritiesProvisions != null ? japaneseSecuritiesProvisions.hashCode() : 0);
			return _result;
		}
		
		@Override
		public String toString() {
			return "CsaInitialMargin2016NewYorkLawBuilder {" +
				"otherEligibleSupport=" + this.otherEligibleSupport + ", " +
				"transferTiming=" + this.transferTiming + ", " +
				"pledgorRightsEvent=" + this.pledgorRightsEvent + ", " +
				"pledgorAdditionalRightsEvent=" + this.pledgorAdditionalRightsEvent + ", " +
				"deliveryInLieuRight=" + this.deliveryInLieuRight + ", " +
				"japaneseSecuritiesProvisions=" + this.japaneseSecuritiesProvisions +
			'}' + " " + super.toString();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy