/* tslint:disable */
/* eslint-disable */
/**
 * RMI Backend
 * Rug Munch Intelligence — institutional-grade crypto intelligence API. 13+ chains, 96 data providers, 8 MCP tools, x402 paid tier, sovereign-first FOSS.
 *
 * The version of the OpenAPI document: 2026.06.21
 * 
 *
 * 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';
/**
 * 
 * @export
 * @interface GenerateRequest
 */
export interface GenerateRequest {
    /**
     * 
     * @type {string}
     * @memberof GenerateRequest
     */
    subjectType: string;
    /**
     * "chain:address"
     * @type {string}
     * @memberof GenerateRequest
     */
    subjectId: string;
    /**
     * 
     * @type {string}
     * @memberof GenerateRequest
     */
    model?: string;
    /**
     * 
     * @type {boolean}
     * @memberof GenerateRequest
     */
    save?: boolean;
}

/**
 * Check if a given object implements the GenerateRequest interface.
 */
export function instanceOfGenerateRequest(value: object): value is GenerateRequest {
    if ((!('subjectType' in value) && !('subject_type' in value)) || (value['subjectType'] === undefined && value['subject_type'] === undefined)) return false;
    if ((!('subjectId' in value) && !('subject_id' in value)) || (value['subjectId'] === undefined && value['subject_id'] === undefined)) return false;
    return true;
}

export function GenerateRequestFromJSON(json: any): GenerateRequest {
    return GenerateRequestFromJSONTyped(json, false);
}

export function GenerateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'subjectType': json['subject_type'],
        'subjectId': json['subject_id'],
        'model': json['model'] == null ? undefined : json['model'],
        'save': json['save'] == null ? undefined : json['save'],
    };
}

export function GenerateRequestToJSON(json: any): GenerateRequest {
    return GenerateRequestToJSONTyped(json, false);
}

export function GenerateRequestToJSONTyped(value?: GenerateRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'subject_type': value['subjectType'],
        'subject_id': value['subjectId'],
        'model': value['model'],
        'save': value['save'],
    };
}

