/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 2.4.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime.js';
/**
* Insight data from a user
* @export
* @interface Insight
*/
export interface Insight {
/**
* Unique identifier for the insight
* @type {string}
* @memberof Insight
*/
id: string;
/**
* Type of insight
* @type {string}
* @memberof Insight
*/
type: InsightTypeEnum;
/**
* Source of the insight
* @type {string}
* @memberof Insight
*/
source: string;
/**
* Title of the insight
* @type {string}
* @memberof Insight
*/
title: string;
/**
* Description of the insight
* @type {string}
* @memberof Insight
*/
description: string;
/**
* Detailed feedback content
* @type {string}
* @memberof Insight
*/
feedback: string;
/**
* Whether the insight has been seen
* @type {boolean}
* @memberof Insight
*/
seen: boolean;
/**
* Whether the insight content should be hidden
* @type {boolean}
* @memberof Insight
*/
hideContent: boolean;
/**
* ID of the insight owner
* @type {string}
* @memberof Insight
*/
ownerId?: string;
/**
* Creation timestamp
* @type {string}
* @memberof Insight
*/
createdAt: string;
/**
* Last update timestamp
* @type {string}
* @memberof Insight
*/
updatedAt: string;
}
/**
* @export
*/
export const InsightTypeEnum = {
Feedback: 'Feedback',
Bug: 'Bug',
FeatureRequest: 'FeatureRequest'
} as const;
export type InsightTypeEnum = typeof InsightTypeEnum[keyof typeof InsightTypeEnum];
/**
* Check if a given object implements the Insight interface.
*/
export function instanceOfInsight(value: object): value is Insight {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('source' in value) || value['source'] === undefined) return false;
if (!('title' in value) || value['title'] === undefined) return false;
if (!('description' in value) || value['description'] === undefined) return false;
if (!('feedback' in value) || value['feedback'] === undefined) return false;
if (!('seen' in value) || value['seen'] === undefined) return false;
if (!('hideContent' in value) || value['hideContent'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
return true;
}
export function InsightFromJSON(json: any): Insight {
return InsightFromJSONTyped(json, false);
}
export function InsightFromJSONTyped(json: any, ignoreDiscriminator: boolean): Insight {
if (json == null) {
return json;
}
return {
'id': json['id'],
'type': json['type'],
'source': json['source'],
'title': json['title'],
'description': json['description'],
'feedback': json['feedback'],
'seen': json['seen'],
'hideContent': json['hideContent'],
'ownerId': json['ownerId'] == null ? undefined : json['ownerId'],
'createdAt': json['createdAt'],
'updatedAt': json['updatedAt'],
};
}
export function InsightToJSON(json: any): Insight {
return InsightToJSONTyped(json, false);
}
export function InsightToJSONTyped(value?: Insight | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'type': value['type'],
'source': value['source'],
'title': value['title'],
'description': value['description'],
'feedback': value['feedback'],
'seen': value['seen'],
'hideContent': value['hideContent'],
'ownerId': value['ownerId'],
'createdAt': value['createdAt'],
'updatedAt': value['updatedAt'],
};
}