/// <summary> /// Initializes a new instance of the <see cref="CreatePropertyDefinitionRequest" /> class. /// </summary> /// <param name="domain">The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity (required).</param> /// <param name="scope">The scope that the property exists in. (required).</param> /// <param name="code">The code of the property. Together with the domain and scope this uniquely identifies the property. (required).</param> /// <param name="valueRequired">Whether or not a value is always required for this property..</param> /// <param name="displayName">The display name of the property. (required).</param> /// <param name="dataTypeId">dataTypeId (required).</param> /// <param name="lifeTime">Describes how the property's values can change over time. The available values are: Perpetual, TimeVariant.</param> /// <param name="constraintStyle">Describes the uniqueness and cardinality of the property for entity objects under the property domain specified in Key. Defaults to \"Property\" if not specified. Valid values for this field are: Property, Collection or Identifier..</param> /// <param name="propertyDescription">Describes the property.</param> public CreatePropertyDefinitionRequest(DomainEnum domain = default(DomainEnum), string scope = default(string), string code = default(string), bool?valueRequired = default(bool?), string displayName = default(string), ResourceId dataTypeId = default(ResourceId), LifeTimeEnum?lifeTime = default(LifeTimeEnum?), string constraintStyle = default(string), string propertyDescription = default(string)) { // to ensure "domain" is required (not null) if (domain == null) { throw new InvalidDataException("domain is a required property for CreatePropertyDefinitionRequest and cannot be null"); } else { this.Domain = domain; } // to ensure "scope" is required (not null) if (scope == null) { throw new InvalidDataException("scope is a required property for CreatePropertyDefinitionRequest and cannot be null"); } else { this.Scope = scope; } // to ensure "code" is required (not null) if (code == null) { throw new InvalidDataException("code is a required property for CreatePropertyDefinitionRequest and cannot be null"); } else { this.Code = code; } // to ensure "displayName" is required (not null) if (displayName == null) { throw new InvalidDataException("displayName is a required property for CreatePropertyDefinitionRequest and cannot be null"); } else { this.DisplayName = displayName; } // to ensure "dataTypeId" is required (not null) if (dataTypeId == null) { throw new InvalidDataException("dataTypeId is a required property for CreatePropertyDefinitionRequest and cannot be null"); } else { this.DataTypeId = dataTypeId; } this.ConstraintStyle = constraintStyle; this.PropertyDescription = propertyDescription; this.ValueRequired = valueRequired; this.LifeTime = lifeTime; this.ConstraintStyle = constraintStyle; this.PropertyDescription = propertyDescription; }
/// <summary> /// Initializes a new instance of the <see cref="CreatePropertyDefinitionRequest" /> class. /// </summary> /// <param name="domain">The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity (required).</param> /// <param name="scope">The scope that the property exists in. (required).</param> /// <param name="code">The code of the property. Together with the domain and scope this uniquely identifies the property. (required).</param> /// <param name="valueRequired">This field is not implemented and should be disregarded..</param> /// <param name="displayName">The display name of the property. (required).</param> /// <param name="dataTypeId">dataTypeId (required).</param> /// <param name="lifeTime">Describes how the property's values can change over time. The available values are: Perpetual, TimeVariant.</param> /// <param name="constraintStyle">Describes the uniqueness and cardinality of the property for entity objects under the property domain specified in Key. Defaults to \"Property\" if not specified. Valid values for this field are: Property, Collection or Identifier..</param> /// <param name="propertyDescription">Describes the property.</param> public CreatePropertyDefinitionRequest(DomainEnum domain = default(DomainEnum), string scope = default(string), string code = default(string), bool valueRequired = default(bool), string displayName = default(string), ResourceId dataTypeId = default(ResourceId), LifeTimeEnum?lifeTime = default(LifeTimeEnum?), string constraintStyle = default(string), string propertyDescription = default(string)) { this.Domain = domain; // to ensure "scope" is required (not null) this.Scope = scope ?? throw new ArgumentNullException("scope is a required property for CreatePropertyDefinitionRequest and cannot be null"); // to ensure "code" is required (not null) this.Code = code ?? throw new ArgumentNullException("code is a required property for CreatePropertyDefinitionRequest and cannot be null"); // to ensure "displayName" is required (not null) this.DisplayName = displayName ?? throw new ArgumentNullException("displayName is a required property for CreatePropertyDefinitionRequest and cannot be null"); // to ensure "dataTypeId" is required (not null) this.DataTypeId = dataTypeId ?? throw new ArgumentNullException("dataTypeId is a required property for CreatePropertyDefinitionRequest and cannot be null"); this.ValueRequired = valueRequired; this.LifeTime = lifeTime; this.ConstraintStyle = constraintStyle; this.PropertyDescription = propertyDescription; }
/// <summary> /// Initializes a new instance of the <see cref="PropertyDefinition" /> class. /// </summary> /// <param name="href">The specifc Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param> /// <param name="key">The property key which uniquely identifies the property. The format for the property key is {domain}/{scope}/{code}, e.g. 'Portfolio/Manager/Id'..</param> /// <param name="valueType">The type of values that can be associated with this property. This is defined by the property's data type..</param> /// <param name="valueRequired">Whether or not a value is always required for this property..</param> /// <param name="displayName">The display name of the property..</param> /// <param name="dataTypeId">dataTypeId.</param> /// <param name="lifeTime">Describes how the property's values can change over time..</param> /// <param name="type">The type of the property..</param> /// <param name="unitSchema">The units that can be associated with the property's values. This is defined by the property's data type..</param> /// <param name="links">links.</param> public PropertyDefinition(string href = default(string), string key = default(string), ValueTypeEnum?valueType = default(ValueTypeEnum?), bool?valueRequired = default(bool?), string displayName = default(string), ResourceId dataTypeId = default(ResourceId), LifeTimeEnum?lifeTime = default(LifeTimeEnum?), TypeEnum?type = default(TypeEnum?), UnitSchemaEnum?unitSchema = default(UnitSchemaEnum?), List <Link> links = default(List <Link>)) { this.Href = href; this.Key = key; this.ValueType = valueType; this.ValueRequired = valueRequired; this.DisplayName = displayName; this.DataTypeId = dataTypeId; this.LifeTime = lifeTime; this.Type = type; this.UnitSchema = unitSchema; this.Links = links; }
public bool IsRegisteredFor <TRequestedServiceGroup>(LifeTimeEnum?lifeTime = null) where TRequestedServiceGroup : class { return(lifeTime == null || (this._serviceGroupType == typeof(TRequestedServiceGroup) && this._lifeTime == lifeTime)); }