/* 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';
import type { ScanTier } from './ScanTier';
import {
    ScanTierFromJSON,
    ScanTierFromJSONTyped,
    ScanTierToJSON,
    ScanTierToJSONTyped,
} from './ScanTier';

/**
 * Request body for the token scan endpoint.
 * @export
 * @interface AppDomainScannerModelsScanRequest
 */
export interface AppDomainScannerModelsScanRequest {
    /**
     * Token contract address
     * @type {string}
     * @memberof AppDomainScannerModelsScanRequest
     */
    address: string;
    /**
     * 
     * @type {string}
     * @memberof AppDomainScannerModelsScanRequest
     */
    chain?: string;
    /**
     * 
     * @type {ScanTier}
     * @memberof AppDomainScannerModelsScanRequest
     */
    tier?: ScanTier;
    /**
     * Optional user id for rate-limit tracking
     * @type {string}
     * @memberof AppDomainScannerModelsScanRequest
     */
    userId?: string | null;
}



/**
 * Check if a given object implements the AppDomainScannerModelsScanRequest interface.
 */
export function instanceOfAppDomainScannerModelsScanRequest(value: object): value is AppDomainScannerModelsScanRequest {
    if (!('address' in value) || value['address'] === undefined) return false;
    return true;
}

export function AppDomainScannerModelsScanRequestFromJSON(json: any): AppDomainScannerModelsScanRequest {
    return AppDomainScannerModelsScanRequestFromJSONTyped(json, false);
}

export function AppDomainScannerModelsScanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppDomainScannerModelsScanRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'address': json['address'],
        'chain': json['chain'] == null ? undefined : json['chain'],
        'tier': json['tier'] == null ? undefined : ScanTierFromJSON(json['tier']),
        'userId': json['user_id'] == null ? undefined : json['user_id'],
    };
}

export function AppDomainScannerModelsScanRequestToJSON(json: any): AppDomainScannerModelsScanRequest {
    return AppDomainScannerModelsScanRequestToJSONTyped(json, false);
}

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

    return {
        
        'address': value['address'],
        'chain': value['chain'],
        'tier': ScanTierToJSON(value['tier']),
        'user_id': value['userId'],
    };
}

