/// <summary> /// Initializes a new instance of the <see cref="StoryPropertiesAbridged" /> class. /// </summary> /// <param name="energy">energy.</param> public StoryPropertiesAbridged ( // Required parameters StoryEnergyPropertiesAbridged energy = default // Optional parameters ) : base() // BaseClass { this.Energy = energy; // Set non-required readonly properties with defaultValue this.Type = "StoryPropertiesAbridged"; }
/// <summary> /// Initializes a new instance of the <see cref="StoryPropertiesAbridged" /> class. /// </summary> /// <param name="type">type (default to "StoryPropertiesAbridged").</param> /// <param name="energy">energy.</param> public StoryPropertiesAbridged(string type = "StoryPropertiesAbridged", StoryEnergyPropertiesAbridged energy = default) { // use default value if no "type" provided if (type == null) { this.Type = "StoryPropertiesAbridged"; } else { this.Type = type; } this.Energy = energy; }
/// <summary> /// Initializes a new instance of the <see cref="StoryPropertiesAbridged" /> class. /// </summary> /// <param name="energy">energy.</param> public StoryPropertiesAbridged ( // Required parameters StoryEnergyPropertiesAbridged energy = default // Optional parameters ) : base() // BaseClass { this.Energy = energy; // Set non-required readonly properties with defaultValue this.Type = "StoryPropertiesAbridged"; // check if object is valid if (this.GetType() == typeof(StoryPropertiesAbridged)) { this.IsValid(throwException: true); } }