/// <summary> /// Initializes a new instance of the <see cref="Portfolio" /> class. /// </summary> /// <param name="href">The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param> /// <param name="id">id (required).</param> /// <param name="type">The type of the portfolio. The available values are: Transaction, Reference, DerivedTransaction (required).</param> /// <param name="displayName">The name of the portfolio. (required).</param> /// <param name="description">The long form description of the portfolio..</param> /// <param name="created">The effective datetime at which the portfolio was created. No transactions or constituents can be added to the portfolio before this date. (required).</param> /// <param name="parentPortfolioId">parentPortfolioId.</param> /// <param name="version">version.</param> /// <param name="isDerived">Whether or not this is a derived portfolio..</param> /// <param name="baseCurrency">The base currency of the portfolio. This will be an empty string for reference portfolios..</param> /// <param name="properties">The requested portfolio properties. These will be from the 'Portfolio' domain..</param> /// <param name="links">links.</param> public Portfolio(string href = default(string), ResourceId id = default(ResourceId), TypeEnum type = default(TypeEnum), string displayName = default(string), string description = default(string), DateTimeOffset?created = default(DateTimeOffset?), ResourceId parentPortfolioId = default(ResourceId), Version version = default(Version), bool?isDerived = default(bool?), string baseCurrency = default(string), Dictionary <string, Property> properties = default(Dictionary <string, Property>), List <Link> links = default(List <Link>)) { this.Href = href; // to ensure "id" is required (not null) if (id == null) { throw new InvalidDataException("id is a required property for Portfolio and cannot be null"); } else { this.Id = id; } // to ensure "type" is required (not null) if (type == null) { throw new InvalidDataException("type is a required property for Portfolio and cannot be null"); } else { this.Type = type; } // to ensure "displayName" is required (not null) if (displayName == null) { throw new InvalidDataException("displayName is a required property for Portfolio and cannot be null"); } else { this.DisplayName = displayName; } this.Description = description; // to ensure "created" is required (not null) if (created == null) { throw new InvalidDataException("created is a required property for Portfolio and cannot be null"); } else { this.Created = created; } this.BaseCurrency = baseCurrency; this.Properties = properties; this.Links = links; this.Href = href; this.Description = description; this.ParentPortfolioId = parentPortfolioId; this.Version = version; this.IsDerived = isDerived; this.BaseCurrency = baseCurrency; this.Properties = properties; 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 '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. 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; }
/// <summary> /// Initializes a new instance of the <see cref="Portfolio" /> class. /// </summary> /// <param name="href">The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param> /// <param name="id">id (required).</param> /// <param name="type">The type of the portfolio. The available values are: Transaction, Reference, DerivedTransaction (required).</param> /// <param name="displayName">The name of the portfolio. (required).</param> /// <param name="description">The long form description of the portfolio..</param> /// <param name="created">The effective datetime at which the portfolio was created. No transactions or constituents can be added to the portfolio before this date. (required).</param> /// <param name="parentPortfolioId">parentPortfolioId.</param> /// <param name="version">version.</param> /// <param name="isDerived">Whether or not this is a derived portfolio..</param> /// <param name="baseCurrency">The base currency of the portfolio..</param> /// <param name="properties">The requested portfolio properties. These will be from the 'Portfolio' domain..</param> /// <param name="instrumentScopes">The instrument scope resolution strategy of this portfolio..</param> /// <param name="links">Collection of links..</param> public Portfolio(string href = default(string), ResourceId id = default(ResourceId), TypeEnum type = default(TypeEnum), string displayName = default(string), string description = default(string), DateTimeOffset created = default(DateTimeOffset), ResourceId parentPortfolioId = default(ResourceId), Version version = default(Version), bool isDerived = default(bool), string baseCurrency = default(string), Dictionary <string, Property> properties = default(Dictionary <string, Property>), List <string> instrumentScopes = default(List <string>), List <Link> links = default(List <Link>)) { // to ensure "id" is required (not null) this.Id = id ?? throw new ArgumentNullException("id is a required property for Portfolio and cannot be null"); this.Type = type; // to ensure "displayName" is required (not null) this.DisplayName = displayName ?? throw new ArgumentNullException("displayName is a required property for Portfolio and cannot be null"); this.Created = created; this.Href = href; this.Description = description; this.ParentPortfolioId = parentPortfolioId; this.Version = version; this.IsDerived = isDerived; this.BaseCurrency = baseCurrency; this.Properties = properties; this.InstrumentScopes = instrumentScopes; this.Links = links; }
/// <summary> /// Initializes a new instance of the <see cref="AllocationRequest" /> class. /// </summary> /// <param name="properties">Client-defined properties associated with this allocation..</param> /// <param name="instrumentIdentifiers">The instrument allocated. (required).</param> /// <param name="quantity">The quantity of given instrument allocated. (required).</param> /// <param name="portfolioId">portfolioId (required).</param> /// <param name="allocatedOrderId">allocatedOrderId (required).</param> /// <param name="id">id (required).</param> public AllocationRequest(Dictionary <string, PerpetualProperty> properties = default(Dictionary <string, PerpetualProperty>), Dictionary <string, string> instrumentIdentifiers = default(Dictionary <string, string>), int?quantity = default(int?), ResourceId portfolioId = default(ResourceId), ResourceId allocatedOrderId = default(ResourceId), ResourceId id = default(ResourceId)) { this.Properties = properties; // to ensure "instrumentIdentifiers" is required (not null) if (instrumentIdentifiers == null) { throw new InvalidDataException("instrumentIdentifiers is a required property for AllocationRequest and cannot be null"); } else { this.InstrumentIdentifiers = instrumentIdentifiers; } // to ensure "quantity" is required (not null) if (quantity == null) { throw new InvalidDataException("quantity is a required property for AllocationRequest and cannot be null"); } else { this.Quantity = quantity; } // to ensure "portfolioId" is required (not null) if (portfolioId == null) { throw new InvalidDataException("portfolioId is a required property for AllocationRequest and cannot be null"); } else { this.PortfolioId = portfolioId; } // to ensure "allocatedOrderId" is required (not null) if (allocatedOrderId == null) { throw new InvalidDataException("allocatedOrderId is a required property for AllocationRequest and cannot be null"); } else { this.AllocatedOrderId = allocatedOrderId; } // to ensure "id" is required (not null) if (id == null) { throw new InvalidDataException("id is a required property for AllocationRequest and cannot be null"); } else { this.Id = id; } this.Properties = properties; }