export class DeviceProfile {
  installId: string;
  userId: string | null;
  deviceBrand: string | null;
  deviceModel: string | null;
  deviceOs: string | null;
  appVersion: string | null;
  locale: string | null;
  eventCount: number;

  static create(props: {
    installId: string;
    userId?: string | null;
    deviceBrand?: string | null;
    deviceModel?: string | null;
    deviceOs?: string | null;
    appVersion?: string | null;
    locale?: string | null;
    eventCount?: number;
  }): DeviceProfile {
    const profile = new DeviceProfile();
    profile.installId = props.installId;
    profile.userId = props.userId ?? null;
    profile.deviceBrand = props.deviceBrand ?? null;
    profile.deviceModel = props.deviceModel ?? null;
    profile.deviceOs = props.deviceOs ?? null;
    profile.appVersion = props.appVersion ?? null;
    profile.locale = props.locale ?? null;
    profile.eventCount = props.eventCount ?? 1;
    return profile;
  }
}
