// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
namespace AmazonGameLiftPlugin.Core.Shared
{
///
/// Response Base Class
///
public class Response
{
public bool Success { get; private set; }
public string ErrorCode { get; set; }
public string ErrorMessage { get; set; }
public static T Ok(T response) where T : Response
{
response.Success = true;
response.ErrorCode = default;
response.ErrorMessage = default;
return response;
}
public static T Fail(T response) where T : Response
{
response.Success = false;
return response;
}
}
}