/// <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 'Instrument' 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), InstrumentEconomicDefinition definition = default(InstrumentEconomicDefinition)) { // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for InstrumentDefinition 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 InstrumentDefinition and cannot be null"); } else { this.Identifiers = identifiers; } this.Properties = properties; this.LookThroughPortfolioId = lookThroughPortfolioId; this.Definition = definition; }
/// <summary> /// Initializes a new instance of the <see cref="Instrument" /> class. /// </summary> /// <param name="href">The specifc 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 'Instrument' 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. (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), InstrumentEconomicDefinition instrumentDefinition = default(InstrumentEconomicDefinition), StateEnum state = default(StateEnum), List <Link> links = default(List <Link>)) { // 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; } // 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.Href = href; this.Properties = properties; this.LookthroughPortfolio = lookthroughPortfolio; this.InstrumentDefinition = instrumentDefinition; this.Links = links; }