/// <summary>
 /// Initializes a new instance of the <see cref="InstrumentDefinition" /> class.
 /// </summary>
 /// <param name="name">The name of the instrument. (required).</param>
 /// <param name="identifiers">A set of identifiers that can be used to identify the instrument. At least one of these must be configured to be a unique identifier. (required).</param>
 /// <param name="properties">Set of unique instrument properties and associated values to store with the instrument. Each property must be from the &#39;Instrument&#39; domain..</param>
 /// <param name="lookThroughPortfolioId">lookThroughPortfolioId.</param>
 /// <param name="definition">definition.</param>
 public InstrumentDefinition(string name = default(string), Dictionary <string, InstrumentIdValue> identifiers = default(Dictionary <string, InstrumentIdValue>), List <Property> properties = default(List <Property>), ResourceId lookThroughPortfolioId = default(ResourceId), LusidInstrument definition = default(LusidInstrument))
 {
     // to ensure "name" is required (not null)
     this.Name = name ?? throw new ArgumentNullException("name is a required property for InstrumentDefinition and cannot be null");
     // to ensure "identifiers" is required (not null)
     this.Identifiers            = identifiers ?? throw new ArgumentNullException("identifiers is a required property for InstrumentDefinition and cannot be null");
     this.Properties             = properties;
     this.LookThroughPortfolioId = lookThroughPortfolioId;
     this.Definition             = definition;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WeightedInstrument" /> class.
 /// </summary>
 /// <param name="quantity">The quantity of the instrument that is owned..</param>
 /// <param name="holdingIdentifier">Identifier for the instrument.  For a single, unique trade or transaction this can be thought of as equivalent to the transaction identifier, or  a composite of the sub-holding keys for a regular sub-holding. When there are multiple transactions sharing the same underlying instrument  such as purchase of shares on multiple dates where tax implications are different this would not be the case.    In an inlined aggregation request if this is wanted to identify a line item, it can be specified in the set of aggregation keys given on the aggregation  request that accompanies the set of weighted instruments..</param>
 /// <param name="instrument">instrument.</param>
 public WeightedInstrument(decimal quantity = default(decimal), string holdingIdentifier = default(string), LusidInstrument instrument = default(LusidInstrument))
 {
     this.Quantity          = quantity;
     this.HoldingIdentifier = holdingIdentifier;
     this.Instrument        = instrument;
 }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FutureAllOf" /> class.
        /// </summary>
        /// <param name="startDate">The start date of the instrument. This is normally synonymous with the trade-date. (required).</param>
        /// <param name="maturityDate">The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.              For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as              Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date (required).</param>
        /// <param name="identifiers">external market codes and identifiers for the bond, e.g. ISIN. (required).</param>
        /// <param name="contractDetails">contractDetails (required).</param>
        /// <param name="contracts">The number of contracts held.</param>
        /// <param name="refSpotPrice">The reference spot price for the future at which the contract was entered into..</param>
        /// <param name="underlying">underlying (required).</param>
        /// <param name="instrumentType">The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashflowLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CashSettled, CdsIndex, Basket (required).</param>
        public FutureAllOf(DateTimeOffset?startDate = default(DateTimeOffset?), DateTimeOffset?maturityDate = default(DateTimeOffset?), Dictionary <string, string> identifiers = default(Dictionary <string, string>), FuturesContractDetails contractDetails = default(FuturesContractDetails), decimal?contracts = default(decimal?), decimal?refSpotPrice = default(decimal?), LusidInstrument underlying = default(LusidInstrument), InstrumentTypeEnum instrumentType = default(InstrumentTypeEnum))
        {
            // to ensure "startDate" is required (not null)
            if (startDate == null)
            {
                throw new InvalidDataException("startDate is a required property for FutureAllOf and cannot be null");
            }
            else
            {
                this.StartDate = startDate;
            }

            // to ensure "maturityDate" is required (not null)
            if (maturityDate == null)
            {
                throw new InvalidDataException("maturityDate is a required property for FutureAllOf and cannot be null");
            }
            else
            {
                this.MaturityDate = maturityDate;
            }

            // to ensure "identifiers" is required (not null)
            if (identifiers == null)
            {
                throw new InvalidDataException("identifiers is a required property for FutureAllOf and cannot be null");
            }
            else
            {
                this.Identifiers = identifiers;
            }

            // to ensure "contractDetails" is required (not null)
            if (contractDetails == null)
            {
                throw new InvalidDataException("contractDetails is a required property for FutureAllOf and cannot be null");
            }
            else
            {
                this.ContractDetails = contractDetails;
            }

            // to ensure "underlying" is required (not null)
            if (underlying == null)
            {
                throw new InvalidDataException("underlying is a required property for FutureAllOf and cannot be null");
            }
            else
            {
                this.Underlying = underlying;
            }

            // to ensure "instrumentType" is required (not null)
            if (instrumentType == null)
            {
                throw new InvalidDataException("instrumentType is a required property for FutureAllOf and cannot be null");
            }
            else
            {
                this.InstrumentType = instrumentType;
            }

            this.Contracts    = contracts;
            this.RefSpotPrice = refSpotPrice;
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Instrument" /> class.
 /// </summary>
 /// <param name="href">The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param>
 /// <param name="scope">The scope in which the instrument lies..</param>
 /// <param name="lusidInstrumentId">The unique LUSID Instrument Identifier (LUID) of the instrument. (required).</param>
 /// <param name="version">version (required).</param>
 /// <param name="name">The name of the instrument. (required).</param>
 /// <param name="identifiers">The set of identifiers that can be used to identify the instrument. (required).</param>
 /// <param name="properties">The requested instrument properties. These will be from the &#39;Instrument&#39; domain..</param>
 /// <param name="lookthroughPortfolio">lookthroughPortfolio.</param>
 /// <param name="instrumentDefinition">instrumentDefinition.</param>
 /// <param name="state">The state of of the instrument at the asAt datetime of this version of the instrument definition. The available values are: Active, Inactive (required).</param>
 /// <param name="assetClass">The nominal asset class of the instrument, e.g. InterestRates, FX, Inflation, Equities, Credit, Commodities, etc. The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown.</param>
 /// <param name="domCcy">The domestic currency, meaning the currency in which the instrument would typically be expected to pay cashflows, e.g. a share in AAPL being USD..</param>
 /// <param name="links">Collection of links..</param>
 public Instrument(string href = default(string), string scope = default(string), string lusidInstrumentId = default(string), Version version = default(Version), string name = default(string), Dictionary <string, string> identifiers = default(Dictionary <string, string>), List <Property> properties = default(List <Property>), ResourceId lookthroughPortfolio = default(ResourceId), LusidInstrument instrumentDefinition = default(LusidInstrument), StateEnum state = default(StateEnum), AssetClassEnum?assetClass = default(AssetClassEnum?), string domCcy = default(string), List <Link> links = default(List <Link>))
 {
     // to ensure "lusidInstrumentId" is required (not null)
     this.LusidInstrumentId = lusidInstrumentId ?? throw new ArgumentNullException("lusidInstrumentId is a required property for Instrument and cannot be null");
     // to ensure "version" is required (not null)
     this.Version = version ?? throw new ArgumentNullException("version is a required property for Instrument and cannot be null");
     // to ensure "name" is required (not null)
     this.Name = name ?? throw new ArgumentNullException("name is a required property for Instrument and cannot be null");
     // to ensure "identifiers" is required (not null)
     this.Identifiers          = identifiers ?? throw new ArgumentNullException("identifiers is a required property for Instrument and cannot be null");
     this.State                = state;
     this.Href                 = href;
     this.Scope                = scope;
     this.Properties           = properties;
     this.LookthroughPortfolio = lookthroughPortfolio;
     this.InstrumentDefinition = instrumentDefinition;
     this.AssetClass           = assetClass;
     this.DomCcy               = domCcy;
     this.Links                = links;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="Instrument" /> class.
        /// </summary>
        /// <param name="href">The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param>
        /// <param name="lusidInstrumentId">The unique LUSID Instrument Identifier (LUID) of the instrument. (required).</param>
        /// <param name="version">version (required).</param>
        /// <param name="name">The name of the instrument. (required).</param>
        /// <param name="identifiers">The set of identifiers that can be used to identify the instrument. (required).</param>
        /// <param name="properties">The requested instrument properties. These will be from the &#39;Instrument&#39; domain..</param>
        /// <param name="lookthroughPortfolio">lookthroughPortfolio.</param>
        /// <param name="instrumentDefinition">instrumentDefinition.</param>
        /// <param name="state">The state of of the instrument at the asAt datetime of this version of the instrument definition. The available values are: Active, Inactive (required).</param>
        /// <param name="links">links.</param>
        public Instrument(string href = default(string), string lusidInstrumentId = default(string), Version version = default(Version), string name = default(string), Dictionary <string, string> identifiers = default(Dictionary <string, string>), List <Property> properties = default(List <Property>), ResourceId lookthroughPortfolio = default(ResourceId), LusidInstrument instrumentDefinition = default(LusidInstrument), StateEnum state = default(StateEnum), List <Link> links = default(List <Link>))
        {
            this.Href = href;
            // to ensure "lusidInstrumentId" is required (not null)
            if (lusidInstrumentId == null)
            {
                throw new InvalidDataException("lusidInstrumentId is a required property for Instrument and cannot be null");
            }
            else
            {
                this.LusidInstrumentId = lusidInstrumentId;
            }

            // to ensure "version" is required (not null)
            if (version == null)
            {
                throw new InvalidDataException("version is a required property for Instrument and cannot be null");
            }
            else
            {
                this.Version = version;
            }

            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for Instrument and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // to ensure "identifiers" is required (not null)
            if (identifiers == null)
            {
                throw new InvalidDataException("identifiers is a required property for Instrument and cannot be null");
            }
            else
            {
                this.Identifiers = identifiers;
            }

            this.Properties = properties;
            // to ensure "state" is required (not null)
            if (state == null)
            {
                throw new InvalidDataException("state is a required property for Instrument and cannot be null");
            }
            else
            {
                this.State = state;
            }

            this.Links                = links;
            this.Href                 = href;
            this.Properties           = properties;
            this.LookthroughPortfolio = lookthroughPortfolio;
            this.InstrumentDefinition = instrumentDefinition;
            this.Links                = links;
        }