53 lines
1.8 KiB
C#
53 lines
1.8 KiB
C#
namespace SGU.AuthBroker.Core.Profiles;
|
|
|
|
public sealed record InstitutionalProfile(
|
|
string? EmployeeNumber = null,
|
|
string? DisplayName = null,
|
|
string? GivenName = null,
|
|
string? Surname = null,
|
|
string? Email = null,
|
|
string? EmployeeType = null,
|
|
string? JobTitle = null,
|
|
string? Department = null,
|
|
string? StreetAddress = null,
|
|
string? City = null,
|
|
string? State = null,
|
|
string? PostalCode = null,
|
|
InstitutionalGender? Gender = null)
|
|
{
|
|
public bool HasValues =>
|
|
EmployeeNumber is not null ||
|
|
DisplayName is not null ||
|
|
GivenName is not null ||
|
|
Surname is not null ||
|
|
Email is not null ||
|
|
EmployeeType is not null ||
|
|
JobTitle is not null ||
|
|
Department is not null ||
|
|
StreetAddress is not null ||
|
|
City is not null ||
|
|
State is not null ||
|
|
PostalCode is not null ||
|
|
Gender is not null;
|
|
|
|
public InstitutionalProfile Overlay(InstitutionalProfile? values) =>
|
|
values is null
|
|
? this
|
|
: this with
|
|
{
|
|
EmployeeNumber = values.EmployeeNumber ?? EmployeeNumber,
|
|
DisplayName = values.DisplayName ?? DisplayName,
|
|
GivenName = values.GivenName ?? GivenName,
|
|
Surname = values.Surname ?? Surname,
|
|
Email = values.Email ?? Email,
|
|
EmployeeType = values.EmployeeType ?? EmployeeType,
|
|
JobTitle = values.JobTitle ?? JobTitle,
|
|
Department = values.Department ?? Department,
|
|
StreetAddress = values.StreetAddress ?? StreetAddress,
|
|
City = values.City ?? City,
|
|
State = values.State ?? State,
|
|
PostalCode = values.PostalCode ?? PostalCode,
|
|
Gender = values.Gender ?? Gender
|
|
};
|
|
}
|