/// <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";
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StoryPropertiesAbridged" /> class.
 /// </summary>
 /// <param name="type">type (default to &quot;StoryPropertiesAbridged&quot;).</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;
 }
Example #3
0
        /// <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);
            }
        }