Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QuoteSeriesId" /> class.
        /// </summary>
        /// <param name="provider">The platform or vendor that provided the quote, e.g. &#39;DataScope&#39;, &#39;LUSID&#39; etc. (required).</param>
        /// <param name="priceSource">The source or originator of the quote, e.g. a bank or financial institution..</param>
        /// <param name="instrumentId">The value of the instrument identifier that uniquely identifies the instrument that the quote is for, e.g. &#39;BBG00JX0P539&#39;. (required).</param>
        /// <param name="instrumentIdType">The type of instrument identifier used to uniquely identify the instrument that the quote is for, e.g. &#39;Figi&#39;. The available values are: LusidInstrumentId, Figi, RIC, QuotePermId, Isin, CurrencyPair, ClientInternal (required).</param>
        /// <param name="quoteType">The type of the quote. This allows for quotes other than prices e.g. rates or spreads to be used. The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront (required).</param>
        /// <param name="field">The field of the quote e.g. bid, mid, ask etc. This should be consistent across a time series of quotes. The allowed values are dependant on the specified Provider. (required).</param>
        public QuoteSeriesId(string provider = default(string), string priceSource = default(string), string instrumentId = default(string), InstrumentIdTypeEnum instrumentIdType = default(InstrumentIdTypeEnum), QuoteTypeEnum quoteType = default(QuoteTypeEnum), string field = default(string))
        {
            // to ensure "provider" is required (not null)
            if (provider == null)
            {
                throw new InvalidDataException("provider is a required property for QuoteSeriesId and cannot be null");
            }
            else
            {
                this.Provider = provider;
            }

            this.PriceSource = priceSource;
            // to ensure "instrumentId" is required (not null)
            if (instrumentId == null)
            {
                throw new InvalidDataException("instrumentId is a required property for QuoteSeriesId and cannot be null");
            }
            else
            {
                this.InstrumentId = instrumentId;
            }

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

            this.InstrumentIdType = instrumentIdType;
            // to ensure "quoteType" is required (not null)
            if (quoteType == null)
            {
                throw new InvalidDataException("quoteType is a required property for QuoteSeriesId and cannot be null");
            }
            else
            {
                this.QuoteType = quoteType;
            }

            this.QuoteType = quoteType;
            // to ensure "field" is required (not null)
            if (field == null)
            {
                throw new InvalidDataException("field is a required property for QuoteSeriesId and cannot be null");
            }
            else
            {
                this.Field = field;
            }

            this.PriceSource = priceSource;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuoteSeriesId" /> class.
 /// </summary>
 /// <param name="provider">The platform or vendor that provided the quote, e.g. &#39;DataScope&#39;, &#39;LUSID&#39; etc. (required).</param>
 /// <param name="priceSource">The source or originator of the quote, e.g. a bank or financial institution..</param>
 /// <param name="instrumentId">The value of the instrument identifier that uniquely identifies the instrument that the quote is for, e.g. &#39;BBG00JX0P539&#39;. (required).</param>
 /// <param name="instrumentIdType">The type of instrument identifier used to uniquely identify the instrument that the quote is for, e.g. &#39;Figi&#39;. The available values are: LusidInstrumentId, Figi, RIC, QuotePermId, Isin, CurrencyPair, ClientInternal (required).</param>
 /// <param name="quoteType">The type of the quote. This allows for quotes other than prices e.g. rates or spreads to be used. The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta (required).</param>
 /// <param name="field">The field of the quote e.g. bid, mid, ask etc. This should be consistent across a time series of quotes. The allowed values are dependant on the specified Provider. (required).</param>
 public QuoteSeriesId(string provider = default(string), string priceSource = default(string), string instrumentId = default(string), InstrumentIdTypeEnum instrumentIdType = default(InstrumentIdTypeEnum), QuoteTypeEnum quoteType = default(QuoteTypeEnum), string field = default(string))
 {
     // to ensure "provider" is required (not null)
     this.Provider = provider ?? throw new ArgumentNullException("provider is a required property for QuoteSeriesId and cannot be null");
     // to ensure "instrumentId" is required (not null)
     this.InstrumentId     = instrumentId ?? throw new ArgumentNullException("instrumentId is a required property for QuoteSeriesId and cannot be null");
     this.InstrumentIdType = instrumentIdType;
     this.QuoteType        = quoteType;
     // to ensure "field" is required (not null)
     this.Field       = field ?? throw new ArgumentNullException("field is a required property for QuoteSeriesId and cannot be null");
     this.PriceSource = priceSource;
 }