/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (CrashId == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CrashId");
     }
     if (Version == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Version");
     }
     if (Build == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Build");
     }
     if (Device == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Device");
     }
     if (OsVersion == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "OsVersion");
     }
     if (UserName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UserName");
     }
     if (Details != null)
     {
         Details.Validate();
     }
     if (Stacktrace != null)
     {
         Stacktrace.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the Crash class.
 /// </summary>
 public Crash(string crashId, System.DateTime timestamp, string version, string build, string device, string osVersion, string userName, CrashDetails details = default(CrashDetails), string displayId = default(string), string deviceName = default(string), string osType = default(string), Stacktrace stacktrace = default(Stacktrace), string userEmail = default(string))
 {
     Details    = details;
     CrashId    = crashId;
     DisplayId  = displayId;
     Timestamp  = timestamp;
     Version    = version;
     Build      = build;
     Device     = device;
     DeviceName = deviceName;
     OsVersion  = osVersion;
     OsType     = osType;
     Stacktrace = stacktrace;
     UserName   = userName;
     UserEmail  = userEmail;
     CustomInit();
 }