// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.ComponentModel.DataAnnotations;
using EpicGames.Horde.Users;
namespace EpicGames.Horde.Server.Notices
{
///
/// Parameters required to create a notice
///
public class CreateNoticeRequest
{
///
/// Start time to display this message
///
public DateTime? StartTime { get; set; }
///
/// Finish time to display this message
///
public DateTime? FinishTime { get; set; }
///
/// Message to display
///
[Required]
public string Message { get; set; }
///
/// Constructor
///
public CreateNoticeRequest(string message)
{
Message = message;
}
}
///
/// Parameters required to update a notice
///
public class UpdateNoticeRequest
{
///
/// The id of the notice to update
///
public string Id { get; set; }
///
/// Start time to display this message
///
public DateTime? StartTime { get; set; }
///
/// Finish time to display this message
///
public DateTime? FinishTime { get; set; }
///
/// Message to display
///
public string? Message { get; set; }
///
/// Constructor
///
public UpdateNoticeRequest(string id)
{
Id = id;
}
}
///
/// Notice information
///
public class GetNoticeResponse
{
///
/// The id of the notice to update
///
public string? Id { get; set; }
///
/// Start time to display this message
///
public DateTime? StartTime { get; set; }
///
/// Finish time to display this message
///
public DateTime? FinishTime { get; set; }
///
/// Whether this notice is for scheduled downtime
///
public bool ScheduledDowntime { get; set; } = false;
///
/// Whether the notice is currently active
///
public bool Active { get; set; }
///
/// Message to display
///
public string? Message { get; set; }
///
/// User id who created the notice, otherwise null if a system message
///
public GetThinUserInfoResponse? CreatedByUser { get; set; }
}
}