/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 2.1.0
*
*
* 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';
import type { Requirement } from './Requirement.js';
import {
RequirementFromJSON,
RequirementFromJSONTyped,
RequirementToJSON,
RequirementToJSONTyped,
} from './Requirement.js';
import type { Outcome } from './Outcome.js';
import {
OutcomeFromJSON,
OutcomeFromJSONTyped,
OutcomeToJSON,
OutcomeToJSONTyped,
} from './Outcome.js';
import type { Opportunity } from './Opportunity.js';
import {
OpportunityFromJSON,
OpportunityFromJSONTyped,
OpportunityToJSON,
OpportunityToJSONTyped,
} from './Opportunity.js';
import type { Solution } from './Solution.js';
import {
SolutionFromJSON,
SolutionFromJSONTyped,
SolutionToJSON,
SolutionToJSONTyped,
} from './Solution.js';
/**
* Feedback with relationships
* @export
* @interface FeedbackWithRelationships
*/
export interface FeedbackWithRelationships {
/**
*
* @type {Array<Opportunity>}
* @memberof FeedbackWithRelationships
*/
opportunities: Array<Opportunity>;
/**
*
* @type {Array<Solution>}
* @memberof FeedbackWithRelationships
*/
solutions: Array<Solution>;
/**
*
* @type {Array<Requirement>}
* @memberof FeedbackWithRelationships
*/
requirements: Array<Requirement>;
/**
*
* @type {Array<Outcome>}
* @memberof FeedbackWithRelationships
*/
outcomes: Array<Outcome>;
/**
* Unique identifier for the feedback
* @type {string}
* @memberof FeedbackWithRelationships
*/
id: string;
/**
* Type of feedback
* @type {string}
* @memberof FeedbackWithRelationships
*/
type: FeedbackWithRelationshipsTypeEnum;
/**
* Source of the feedback
* @type {string}
* @memberof FeedbackWithRelationships
*/
source: string;
/**
* Title of the feedback
* @type {string}
* @memberof FeedbackWithRelationships
*/
title: string;
/**
* Description of the feedback
* @type {string}
* @memberof FeedbackWithRelationships
*/
description: string;
/**
* Detailed feedback content
* @type {string}
* @memberof FeedbackWithRelationships
*/
feedback: string;
/**
* Whether the feedback has been seen
* @type {boolean}
* @memberof FeedbackWithRelationships
*/
seen: boolean;
/**
* Whether the feedback content should be hidden
* @type {boolean}
* @memberof FeedbackWithRelationships
*/
hideContent: boolean;
/**
* ID of the feedback owner
* @type {string}
* @memberof FeedbackWithRelationships
*/
ownerId?: string;
/**
* Creation timestamp
* @type {string}
* @memberof FeedbackWithRelationships
*/
createdAt: string;
/**
* Last update timestamp
* @type {string}
* @memberof FeedbackWithRelationships
*/
updatedAt: string;
}
/**
* @export
*/
export const FeedbackWithRelationshipsTypeEnum = {
Feedback: 'Feedback',
Bug: 'Bug',
FeatureRequest: 'FeatureRequest'
} as const;
export type FeedbackWithRelationshipsTypeEnum = typeof FeedbackWithRelationshipsTypeEnum[keyof typeof FeedbackWithRelationshipsTypeEnum];
/**
* Check if a given object implements the FeedbackWithRelationships interface.
*/
export function instanceOfFeedbackWithRelationships(value: object): value is FeedbackWithRelationships {
if (!('opportunities' in value) || value['opportunities'] === undefined) return false;
if (!('solutions' in value) || value['solutions'] === undefined) return false;
if (!('requirements' in value) || value['requirements'] === undefined) return false;
if (!('outcomes' in value) || value['outcomes'] === undefined) return false;
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 FeedbackWithRelationshipsFromJSON(json: any): FeedbackWithRelationships {
return FeedbackWithRelationshipsFromJSONTyped(json, false);
}
export function FeedbackWithRelationshipsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeedbackWithRelationships {
if (json == null) {
return json;
}
return {
'opportunities': ((json['opportunities'] as Array<any>).map(OpportunityFromJSON)),
'solutions': ((json['solutions'] as Array<any>).map(SolutionFromJSON)),
'requirements': ((json['requirements'] as Array<any>).map(RequirementFromJSON)),
'outcomes': ((json['outcomes'] as Array<any>).map(OutcomeFromJSON)),
'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 FeedbackWithRelationshipsToJSON(json: any): FeedbackWithRelationships {
return FeedbackWithRelationshipsToJSONTyped(json, false);
}
export function FeedbackWithRelationshipsToJSONTyped(value?: FeedbackWithRelationships | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'opportunities': ((value['opportunities'] as Array<any>).map(OpportunityToJSON)),
'solutions': ((value['solutions'] as Array<any>).map(SolutionToJSON)),
'requirements': ((value['requirements'] as Array<any>).map(RequirementToJSON)),
'outcomes': ((value['outcomes'] as Array<any>).map(OutcomeToJSON)),
'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'],
};
}