/* tslint:disable */
/* eslint-disable */
/**
 * OpenAPI Petstore
 * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
 *
 * The version of the OpenAPI document: 1.0.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 {ApiRecordUtils, knownRecordFactories} from "../runtimeSagasAndRecords";
import {getApiEntitiesState} from "../ApiEntitiesSelectors"
import {List, Record, RecordOf, Map} from 'immutable';
import {Schema, schema, NormalizedSchema} from "normalizr";
import {select, call} from "redux-saga/effects";

import {
    ResponseMeta,
    ResponseMetaCodeEnum,
} from './ResponseMeta';

import {
    ErrorCode,
} from './ErrorCode';


export const ResponseMetaRecordProps = {
    recType: "ResponseMetaApiRecord" as "ResponseMetaApiRecord",
    code: ResponseMetaCodeEnum.Ok,
    detail: null as string | null,
    exception: null as string | null,
    type: null as string | null,
    errorCode: null as ErrorCode | null,
    errors: null as Array<Error> | null,
};

export type ResponseMetaRecordPropsType = typeof ResponseMetaRecordProps;
export const ResponseMetaRecord = Record(ResponseMetaRecordProps, ResponseMetaRecordProps.recType);
export type ResponseMetaRecord = RecordOf<ResponseMetaRecordPropsType>;

knownRecordFactories.set(ResponseMetaRecordProps.recType, ResponseMetaRecord);


class ResponseMetaRecordUtils extends ApiRecordUtils<ResponseMeta, ResponseMetaRecord> {
    public normalize(apiObject: ResponseMeta, asEntity?: boolean): ResponseMeta {
        (apiObject as any).recType = ResponseMetaRecordProps.recType;
        return apiObject;
    }

    public toApi(record: ResponseMetaRecord): ResponseMeta {
        const apiObject = super.toApi(record);
        return apiObject;
    }
}

export const responseMetaRecordUtils = new ResponseMetaRecordUtils();


