// Copyright Epic Games, Inc. All Rights Reserved. using System.Collections.Generic; using EpicGames.Horde.Acls; #pragma warning disable CA1054 // URI-like parameters should not be strings #pragma warning disable CA1056 // Change string to URI namespace EpicGames.Horde.Accounts { /// /// Creates a new user account /// /// Name of the user /// Perforce login identifier /// Claims for the user /// Description for the account /// User's email address /// Password for the user /// Whether the account is enabled public record class CreateAccountRequest(string Name, string Login, List Claims, string? Description, string? Email, string? Password, bool? Enabled); /// /// Creates the admin account /// /// Password for the user public record class CreateAdminAccountRequest(string Password); /// /// Response from the request to create a new user account /// /// The created account id public record class CreateAccountResponse(AccountId Id); /// /// Update request for a user account /// /// Name of the user /// Perforce login identifier /// Claims for the user /// Description for the account /// User's email address /// Optional secret token for API access /// Password for the user /// Whether the account is enabled public record class UpdateAccountRequest(string? Name, string? Login, List? Claims, string? Description, string? Email, string? SecretToken, string? Password, bool? Enabled); /// /// Update request for the current user account /// /// Old password for the user /// New password for the user public record class UpdateCurrentAccountRequest(string? OldPassword, string? NewPassword); /// /// Creates a new user account /// /// Id of the account /// Name of the user /// Perforce login identifier /// Claims for the user /// Description for the account /// User's email address /// Whether the account is enabled public record class GetAccountResponse(AccountId Id, string Name, string Login, List Claims, string? Description, string? Email, bool Enabled); /// /// Message describing a claim for an account /// /// Claim type /// Value of the claim public record class AccountClaimMessage(string Type, string Value); /// /// Dashboard login request /// /// Username /// Password /// Url to return to upon success public record class DashboardLoginRequest(string Username, string? Password, string? ReturnUrl); /// /// Gets all entitlements for an account /// /// Whether the user is an administrator /// List of scopes with entitlements public record class GetAccountEntitlementsResponse(bool Administrator, List Scopes); /// /// Creates a new user account /// /// Name of the scope /// Actions for this scope public record class GetAccountScopeEntitlementsResponse(string Name, List Actions); }