/// <summary> /// Initializes a new instance of the <see cref="QuestionTemplateResource" /> class. /// </summary> /// <param name="AllowAdditional">Whether to allow additional properties beyond those specified or not.</param> /// <param name="AnswerProperty">A property definition for all answers. If included each answer must match this definition's type and be valid.</param> /// <param name="Name">The name of the template (required).</param> /// <param name="Properties">The customized properties that are present.</param> /// <param name="QuestionProperty">A property definition for the question itself. If included the answer must match this definition's type and be valid.</param> public QuestionTemplateResource(bool?AllowAdditional = default(bool?), PropertyDefinitionResource AnswerProperty = default(PropertyDefinitionResource), string Name = default(string), List <PropertyDefinitionResource> Properties = default(List <PropertyDefinitionResource>), PropertyDefinitionResource QuestionProperty = default(PropertyDefinitionResource)) { // to ensure "Name" is required (not null) if (Name == null) { throw new InvalidDataException("Name is a required property for QuestionTemplateResource and cannot be null"); } else { this.Name = Name; } this.AllowAdditional = AllowAdditional; this.AnswerProperty = AnswerProperty; this.Properties = Properties; this.QuestionProperty = QuestionProperty; }
/// <summary> /// Initializes a new instance of the <see cref="ListPropertyDefinitionResource" /> class. /// </summary> /// <param name="Description">The description of the property.</param> /// <param name="FieldList">A list of the fields on both the property definition and property of this type.</param> /// <param name="FriendlyName">The friendly front-facing name of the property.</param> /// <param name="Name">The name of the property (required).</param> /// <param name="OptionLabelPath">The JSON path to the option label.</param> /// <param name="OptionValuePath">The JSON path to the option value.</param> /// <param name="OptionsUrl">URL of service containing the property options (assumed JSON array).</param> /// <param name="Required">Whether the property is required (required).</param> /// <param name="Type">The type of the property. Used for polymorphic type recognition and thus must match an expected type with additional properties. (required).</param> /// <param name="MaxCount">If provided, the maximum number of files in the group.</param> /// <param name="MinCount">If provided, the minimum number of files in the group.</param> /// <param name="ValueDefinition">If provided, a property definition for validating values within list.</param> public ListPropertyDefinitionResource(string Description = default(string), PropertyFieldListResource FieldList = default(PropertyFieldListResource), string FriendlyName = default(string), string Name = default(string), string OptionLabelPath = default(string), string OptionValuePath = default(string), string OptionsUrl = default(string), bool?Required = default(bool?), string Type = default(string), int?MaxCount = default(int?), int?MinCount = default(int?), PropertyDefinitionResource ValueDefinition = default(PropertyDefinitionResource)) { // to ensure "Name" is required (not null) if (Name == null) { throw new InvalidDataException("Name is a required property for ListPropertyDefinitionResource and cannot be null"); } else { this.Name = Name; } // to ensure "Required" is required (not null) if (Required == null) { throw new InvalidDataException("Required is a required property for ListPropertyDefinitionResource and cannot be null"); } else { this.Required = Required; } // to ensure "Type" is required (not null) if (Type == null) { throw new InvalidDataException("Type is a required property for ListPropertyDefinitionResource and cannot be null"); } else { this.Type = Type; } this.Description = Description; this.FieldList = FieldList; this.FriendlyName = FriendlyName; this.OptionLabelPath = OptionLabelPath; this.OptionValuePath = OptionValuePath; this.OptionsUrl = OptionsUrl; this.MaxCount = MaxCount; this.MinCount = MinCount; this.ValueDefinition = ValueDefinition; }