/* 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';
import type { SolutionRefinementLogInner } from './SolutionRefinementLogInner.js';
import {
SolutionRefinementLogInnerFromJSON,
SolutionRefinementLogInnerFromJSONTyped,
SolutionRefinementLogInnerToJSON,
SolutionRefinementLogInnerToJSONTyped,
} from './SolutionRefinementLogInner.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 { Insight } from './Insight.js';
import {
InsightFromJSON,
InsightFromJSONTyped,
InsightToJSON,
InsightToJSONTyped,
} from './Insight.js';
import type { Solution } from './Solution.js';
import {
SolutionFromJSON,
SolutionFromJSONTyped,
SolutionToJSON,
SolutionToJSONTyped,
} from './Solution.js';
/**
* Requirement with relationships
* @export
* @interface RequirementWithRelationships
*/
export interface RequirementWithRelationships {
/**
*
* @type {Array<Opportunity>}
* @memberof RequirementWithRelationships
*/
opportunities: Array<Opportunity>;
/**
*
* @type {Array<Solution>}
* @memberof RequirementWithRelationships
*/
solutions: Array<Solution>;
/**
*
* @type {Array<Insight>}
* @memberof RequirementWithRelationships
*/
insights: Array<Insight>;
/**
*
* @type {Array<Outcome>}
* @memberof RequirementWithRelationships
*/
outcomes: Array<Outcome>;
/**
* Unique identifier for the requirement
* @type {string}
* @memberof RequirementWithRelationships
*/
id: string;
/**
* System prompt used to generate the requirement
* @type {string}
* @memberof RequirementWithRelationships
*/
systemPrompt?: string | null;
/**
* Current state of AI processing
* @type {string}
* @memberof RequirementWithRelationships
*/
aiProcessingState: RequirementWithRelationshipsAiProcessingStateEnum;
/**
* Log of refinements made to the requirement
* @type {Array<SolutionRefinementLogInner>}
* @memberof RequirementWithRelationships
*/
refinementLog: Array<SolutionRefinementLogInner>;
/**
* Title of the requirement
* @type {string}
* @memberof RequirementWithRelationships
*/
title: string;
/**
* Description of the requirement
* @type {string}
* @memberof RequirementWithRelationships
*/
description: string;
/**
* The feature this requirement belongs to
* @type {string}
* @memberof RequirementWithRelationships
*/
feature: string;
/**
* Detailed requirements specification
* @type {string}
* @memberof RequirementWithRelationships
*/
requirements: string;
/**
* Whether the requirement content should be hidden
* @type {boolean}
* @memberof RequirementWithRelationships
*/
hideContent: boolean;
/**
* ID of the requirement owner
* @type {string}
* @memberof RequirementWithRelationships
*/
ownerId?: string;
/**
* Creation timestamp
* @type {string}
* @memberof RequirementWithRelationships
*/
createdAt: string;
/**
* Last update timestamp
* @type {string}
* @memberof RequirementWithRelationships
*/
updatedAt: string;
/**
*
* @type {string}
* @memberof RequirementWithRelationships
*/
status: RequirementWithRelationshipsStatusEnum;
}
/**
* @export
*/
export const RequirementWithRelationshipsAiProcessingStateEnum = {
Initial: 'INITIAL',
Processing: 'PROCESSING',
Finished: 'FINISHED',
Error: 'ERROR'
} as const;
export type RequirementWithRelationshipsAiProcessingStateEnum = typeof RequirementWithRelationshipsAiProcessingStateEnum[keyof typeof RequirementWithRelationshipsAiProcessingStateEnum];
/**
* @export
*/
export const RequirementWithRelationshipsStatusEnum = {
Draft: 'draft',
Ready: 'ready',
Complete: 'complete'
} as const;
export type RequirementWithRelationshipsStatusEnum = typeof RequirementWithRelationshipsStatusEnum[keyof typeof RequirementWithRelationshipsStatusEnum];
/**
* Check if a given object implements the RequirementWithRelationships interface.
*/
export function instanceOfRequirementWithRelationships(value: object): value is RequirementWithRelationships {
if (!('opportunities' in value) || value['opportunities'] === undefined) return false;
if (!('solutions' in value) || value['solutions'] === undefined) return false;
if (!('insights' in value) || value['insights'] === undefined) return false;
if (!('outcomes' in value) || value['outcomes'] === undefined) return false;
if (!('id' in value) || value['id'] === undefined) return false;
if (!('aiProcessingState' in value) || value['aiProcessingState'] === undefined) return false;
if (!('refinementLog' in value) || value['refinementLog'] === undefined) return false;
if (!('title' in value) || value['title'] === undefined) return false;
if (!('description' in value) || value['description'] === undefined) return false;
if (!('feature' in value) || value['feature'] === undefined) return false;
if (!('requirements' in value) || value['requirements'] === 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;
if (!('status' in value) || value['status'] === undefined) return false;
return true;
}
export function RequirementWithRelationshipsFromJSON(json: any): RequirementWithRelationships {
return RequirementWithRelationshipsFromJSONTyped(json, false);
}
export function RequirementWithRelationshipsFromJSONTyped(json: any, ignoreDiscriminator: boolean): RequirementWithRelationships {
if (json == null) {
return json;
}
return {
'opportunities': ((json['opportunities'] as Array<any>).map(OpportunityFromJSON)),
'solutions': ((json['solutions'] as Array<any>).map(SolutionFromJSON)),
'insights': ((json['insights'] as Array<any>).map(InsightFromJSON)),
'outcomes': ((json['outcomes'] as Array<any>).map(OutcomeFromJSON)),
'id': json['id'],
'systemPrompt': json['systemPrompt'] == null ? undefined : json['systemPrompt'],
'aiProcessingState': json['aiProcessingState'],
'refinementLog': ((json['refinementLog'] as Array<any>).map(SolutionRefinementLogInnerFromJSON)),
'title': json['title'],
'description': json['description'],
'feature': json['feature'],
'requirements': json['requirements'],
'hideContent': json['hideContent'],
'ownerId': json['ownerId'] == null ? undefined : json['ownerId'],
'createdAt': json['createdAt'],
'updatedAt': json['updatedAt'],
'status': json['status'],
};
}
export function RequirementWithRelationshipsToJSON(json: any): RequirementWithRelationships {
return RequirementWithRelationshipsToJSONTyped(json, false);
}
export function RequirementWithRelationshipsToJSONTyped(value?: RequirementWithRelationships | 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)),
'insights': ((value['insights'] as Array<any>).map(InsightToJSON)),
'outcomes': ((value['outcomes'] as Array<any>).map(OutcomeToJSON)),
'id': value['id'],
'systemPrompt': value['systemPrompt'],
'aiProcessingState': value['aiProcessingState'],
'refinementLog': ((value['refinementLog'] as Array<any>).map(SolutionRefinementLogInnerToJSON)),
'title': value['title'],
'description': value['description'],
'feature': value['feature'],
'requirements': value['requirements'],
'hideContent': value['hideContent'],
'ownerId': value['ownerId'],
'createdAt': value['createdAt'],
'updatedAt': value['updatedAt'],
'status': value['status'],
};
}