/**
 * backend/api/visualization.proto
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: version not set
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */ import * as url from 'url' ; import * as portableFetch from 'portable-fetch' ; import { Configuration } from './configuration' ; const BASE_PATH = 'http://localhost' . replace ( /\/+$/ , '' ) ; export export const COLLECTION_FORMATS = { csv : ',' , ssv : ' ' , tsv : '\t' , pipes : '|' , } ; export interface export interface FetchAPI { ( url , init ? ) : Promise < Response > ; } export interface export interface FetchArgs { url : string ; options : any ; } export class export class BaseAPI { protected configuration : Configuration ; constructor ( configuration ? , protected basePath = BASE_PATH , protected fetch = portableFetch ) { if ( configuration ) { this . configuration = configuration ; this . basePath = configuration . basePath || this . basePath ; } } } export class extends Error export class RequiredError extends Error { name : 'RequiredError' ; constructor ( public field , msg ? ) { super ( msg ) ; } } export interface export interface ApiStatus { type { string } memberof error ? : string ; type { number } memberof code ? : number ; type { Array < ProtobufAny > } memberof details ? : Array < ProtobufAny > ; } export interface export interface ApiVisualization { type { ApiVisualizationType } memberof type ? : ApiVisualizationType ; type { string } memberof source ? : string ; type { string } memberof arguments ? : string ; type { string } memberof html ? : string ; type { string } memberof error ? : string ; } export enum { string } export enum ApiVisualizationType { ROCCURVE = < any > 'ROC_CURVE' , TFDV = < any > 'TFDV' , TFMA = < any > 'TFMA' , TABLE = < any > 'TABLE' , CUSTOM = < any > 'CUSTOM' } export interface export interface ProtobufAny { type { string } memberof type_url ? : string ; type { string } memberof value ? : string ; } export export const VisualizationServiceApiFetchParamCreator = function ( configuration ? ) { return { param { string } namespace param { ApiVisualization } body param { * } options throws createVisualization ( namespace , body , options = { } ) { if ( namespace === null || namespace === undefined ) { throw new RequiredError ( 'namespace' , 'Required parameter namespace was null or undefined when calling createVisualization.' ) ; } if ( body === null || body === undefined ) { throw new RequiredError ( 'body' , 'Required parameter body was null or undefined when calling createVisualization.' ) ; } const localVarPath = `/apis/v1beta1/visualizations/{namespace}` . replace ( `{${ 'namespace' }}` , encodeURIComponent ( String ( namespace ) ) ) ; const localVarUrlObj = url . parse ( localVarPath , true ) ; const localVarRequestOptions = Object . assign ( { method : 'POST' } , options ) ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( configuration && configuration . apiKey ) { const localVarApiKeyValue = typeof configuration . apiKey === 'function' ? configuration . apiKey ( 'authorization' ) : configuration . apiKey ; localVarHeaderParameter [ 'authorization' ] = localVarApiKeyValue ; } localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ; localVarUrlObj . query = Object . assign ( { } , localVarUrlObj . query , localVarQueryParameter , options . query ) ; delete localVarUrlObj . search ; localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ; const needsSerialization = < any > 'ApiVisualization' !== 'string' || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ; localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : body || '' ; return { url : url . format ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , } ; } ; export export const VisualizationServiceApiFp = function ( configuration ? ) { return { param { string } namespace param { ApiVisualization } body param { * } options throws createVisualization ( namespace , body , options ? ) { const localVarFetchArgs = VisualizationServiceApiFetchParamCreator ( configuration ) . createVisualization ( namespace , body , options ) ; return ( fetch = portableFetch , basePath = BASE_PATH ) => { return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( response => { if ( response . status >= 200 && response . status < 300 ) { return response . json ( ) ; } else { throw response ; } } ) ; } ; } , } ; } ; export export const VisualizationServiceApiFactory = function ( configuration ? , fetch ? , basePath ? ) { return { param { string } namespace param { ApiVisualization } body param { * } options throws createVisualization ( namespace , body , options ? ) { return VisualizationServiceApiFp ( configuration ) . createVisualization ( namespace , body , options ) ( fetch , basePath ) ; } , } ; } ; export class extends BaseAPI export class VisualizationServiceApi extends BaseAPI { param { string } namespace param { ApiVisualization } body param { * } options throws memberof public createVisualization ( namespace , body , options ? ) { return VisualizationServiceApiFp ( this . configuration ) . createVisualization ( namespace , body , options ) ( this . fetch , this . basePath ) ; } }