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

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

package com.rosetta.jptlegalagreement.model;

import com.rosetta.jptlegalagreement.model.AdditionalRepresentation;
import com.rosetta.jptlegalagreement.model.AdditionalRepresentation.AdditionalRepresentationBuilder;
import com.rosetta.jptlegalagreement.model.AdditionalRightsEvent;
import com.rosetta.jptlegalagreement.model.AdditionalRightsEvent.AdditionalRightsEventBuilder;
import com.rosetta.jptlegalagreement.model.CalculationDateLocation;
import com.rosetta.jptlegalagreement.model.CalculationDateLocation.CalculationDateLocationBuilder;
import com.rosetta.jptlegalagreement.model.ConditionsPrecedent;
import com.rosetta.jptlegalagreement.model.ConditionsPrecedent.ConditionsPrecedentBuilder;
import com.rosetta.jptlegalagreement.model.ContactElection;
import com.rosetta.jptlegalagreement.model.ContactElection.ContactElectionBuilder;
import com.rosetta.jptlegalagreement.model.CreditSupportObligationsInitialMargin;
import com.rosetta.jptlegalagreement.model.CreditSupportObligationsInitialMargin.CreditSupportObligationsInitialMarginBuilder;
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.DisputeResolution.DisputeResolutionBuilder;
import com.rosetta.jptlegalagreement.model.FxHaircutCurrency;
import com.rosetta.jptlegalagreement.model.FxHaircutCurrency.FxHaircutCurrencyBuilder;
import com.rosetta.jptlegalagreement.model.Method;
import com.rosetta.jptlegalagreement.model.Method.MethodBuilder;
import com.rosetta.jptlegalagreement.model.NotificationTime;
import com.rosetta.jptlegalagreement.model.NotificationTime.NotificationTimeBuilder;
import com.rosetta.jptlegalagreement.model.OneWayProvisions;
import com.rosetta.jptlegalagreement.model.OneWayProvisions.OneWayProvisionsBuilder;
import com.rosetta.jptlegalagreement.model.Regime;
import com.rosetta.jptlegalagreement.model.Regime.RegimeBuilder;
import com.rosetta.jptlegalagreement.model.RightsEvent;
import com.rosetta.jptlegalagreement.model.RightsEvent.RightsEventBuilder;
import com.rosetta.jptlegalagreement.model.SensitivityMethodology;
import com.rosetta.jptlegalagreement.model.SensitivityMethodology.SensitivityMethodologyBuilder;
import com.rosetta.jptlegalagreement.model.Substitution;
import com.rosetta.jptlegalagreement.model.Substitution.SubstitutionBuilder;
import com.rosetta.jptlegalagreement.model.TerminationCurrencyAmendment;
import com.rosetta.jptlegalagreement.model.TerminationCurrencyAmendment.TerminationCurrencyAmendmentBuilder;
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();
		@Override
		RightsEvent.RightsEventBuilder getPledgorRightsEvent();
		AdditionalRightsEvent.AdditionalRightsEventBuilder getOrCreatePledgorAdditionalRightsEvent();
		@Override
		AdditionalRightsEvent.AdditionalRightsEventBuilder getPledgorAdditionalRightsEvent();
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBaseCurrency(FieldWithMetaString baseCurrency);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBaseCurrencyValue(String baseCurrency);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAdditionalObligations(String additionalObligations);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setConditionsPrecedent(ConditionsPrecedent conditionsPrecedent);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSubstitution(Substitution substitution);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDisputeResolution(DisputeResolution disputeResolution);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAdditionalRepresentation(AdditionalRepresentation additionalRepresentation);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setDemandsAndNotices(ContactElection demandsAndNotices);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setAddressesForTransfer(ContactElection addressesForTransfer);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setBespokeProvision(String bespokeProvision);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setRegime(Regime regime);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setOneWayProvisions(OneWayProvisions oneWayProvisions);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setMethod(Method method);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setIdentifiedCrossCurrencySwap(Boolean identifiedCrossCurrencySwap);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSensitivityToEquity(SensitivityMethodology sensitivityToEquity);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setSensitivityToCommodity(SensitivityMethodology sensitivityToCommodity);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setFxHaircutCurrency(FxHaircutCurrency fxHaircutCurrency);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setCreditSupportObligations(CreditSupportObligationsInitialMargin creditSupportObligations);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setCalculationDateLocation(CalculationDateLocation calculationDateLocation);
		@Override
		CsaInitialMargin2016NewYorkLaw.CsaInitialMargin2016NewYorkLawBuilder setNotificationTime(NotificationTime notificationTime);
		@Override
		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;
		
		@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 - 2025 Weber Informatics LLC | Privacy Policy