public override int GetHashCode() { unchecked { var hashCode = (Info != null ? Info.GetCollectionHashCode() : 0); hashCode = (hashCode * 397) ^ (InitiatedBy != null ? InitiatedBy.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Retry != null ? Retry.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Sync != null ? Sync.GetHashCode() : 0); return(hashCode); } }
internal static string ToSerializedValue(this InitiatedBy value) { switch (value) { case InitiatedBy.Manual: return("Manual"); case InitiatedBy.Scheduled: return("Scheduled"); } return(null); }
/// <summary> /// Initializes a new instance of the Backup class. /// </summary> /// <param name="sizeInBytes">The backup size in bytes.</param> /// <param name="initiatedBy">Indicates how the backup was initiated /// "Manual | Scheduled". Possible values include: 'Manual', /// 'Scheduled'</param> /// <param name="deviceId">The Device Identifier.</param> /// <param name="elements">The backup elements.</param> /// <param name="id">The identifier.</param> /// <param name="name">The name.</param> /// <param name="type">The type.</param> /// <param name="targetId">The path id of the target FileServer or /// IscsiServer for which the backup was taken.</param> /// <param name="targetType">Type of target, FileServer or /// IscsiServer</param> /// <param name="createdTime">The time when the backup was /// created.</param> /// <param name="expirationTime">The time when the backup will /// expire.</param> public Backup(long sizeInBytes, InitiatedBy initiatedBy, string deviceId, IList <BackupElement> elements, string id = default(string), string name = default(string), string type = default(string), string targetId = default(string), string targetType = default(string), System.DateTime?createdTime = default(System.DateTime?), System.DateTime?expirationTime = default(System.DateTime?)) : base(id, name, type) { TargetId = targetId; TargetType = targetType; SizeInBytes = sizeInBytes; CreatedTime = createdTime; ExpirationTime = expirationTime; InitiatedBy = initiatedBy; DeviceId = deviceId; Elements = elements; CustomInit(); }