/* tslint:disable */
/* eslint-disable */
/**
 * starchart
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.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 { exists, mapValues } from '../runtime';
import type { Kind } from './Kind';
import {
    KindFromJSON,
    KindFromJSONTyped,
    KindToJSON,
} from './Kind';
import type { Position } from './Position';
import {
    PositionFromJSON,
    PositionFromJSONTyped,
    PositionToJSON,
} from './Position';
import type { Protostar } from './Protostar';
import {
    ProtostarFromJSON,
    ProtostarFromJSONTyped,
    ProtostarToJSON,
} from './Protostar';
import type { Size } from './Size';
import {
    SizeFromJSON,
    SizeFromJSONTyped,
    SizeToJSON,
} from './Size';

/**
 * 
 * @export
 * @interface Star
 */
export interface Star {
    /**
     * 
     * @type {Protostar}
     * @memberof Star
     */
    core: Protostar;
    /**
     * 
     * @type {any}
     * @memberof Star
     */
    description: any | null;
    /**
     * 
     * @type {Kind}
     * @memberof Star
     */
    kind: Kind;
    /**
     * 
     * @type {any}
     * @memberof Star
     */
    name: any | null;
    /**
     * 
     * @type {Position}
     * @memberof Star
     */
    position: Position;
    /**
     * 
     * @type {Size}
     * @memberof Star
     */
    size: Size;
}

/**
 * Check if a given object implements the Star interface.
 */
export function instanceOfStar(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "core" in value;
    isInstance = isInstance && "description" in value;
    isInstance = isInstance && "kind" in value;
    isInstance = isInstance && "name" in value;
    isInstance = isInstance && "position" in value;
    isInstance = isInstance && "size" in value;

    return isInstance;
}

export function StarFromJSON(json: any): Star {
    return StarFromJSONTyped(json, false);
}

export function StarFromJSONTyped(json: any, ignoreDiscriminator: boolean): Star {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'core': ProtostarFromJSON(json['core']),
        'description': json['description'],
        'kind': KindFromJSON(json['kind']),
        'name': json['name'],
        'position': PositionFromJSON(json['position']),
        'size': SizeFromJSON(json['size']),
    };
}

export function StarToJSON(value?: Star | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'core': ProtostarToJSON(value.core),
        'description': value.description,
        'kind': KindToJSON(value.kind),
        'name': value.name,
        'position': PositionToJSON(value.position),
        'size': SizeToJSON(value.size),
    };
}

